From 3b9550ca2adb3541c66218c6e32b3af8a5258bac Mon Sep 17 00:00:00 2001 From: ulukyn Date: Thu, 6 Sep 2018 17:28:09 +0200 Subject: [PATCH] Removed: client datas moved to RyzomDatas repository --HG-- branch : compatibility-develop --- .../common/data_common/chat/bot_chat.txt | 33 - .../common/data_common/chat/bs_combat.txt | 40 - .../common/data_common/chat/bs_magic.txt | 80 - .../common/data_common/chat/bs_static.txt | 15 - .../common/data_common/chat/chat_dynamic.occ | 4 - .../common/data_common/chat/chat_static.cdb | Bin 61383 -> 0 bytes .../common/data_common/chat/chat_static.occ | 705 - .../common/data_common/chat/chat_static.txt | 8 - .../common/data_common/chat/create_cdb.bat | 5 - .../common/data_common/chat/death_static.txt | 16 - .../data_common/chat/egs_brick_error_msg.txt | 76 - .../data_common/chat/egs_effect_static.txt | 115 - .../common/data_common/chat/egs_static.txt | 573 - .../common/data_common/chat/faber_static.txt | 53 - .../data_common/chat/harvest_static.txt | 44 - .../chat/identify_creature_static.txt | 9 - .../common/data_common/chat/news_static.txt | 4 - .../chat/report_progression_static.txt | 16 - .../common/data_common/chat/wos_static.txt | 2 - code/ryzom/common/data_common/database.xml | 1706 -- .../landscape_col_prim_pacs_list.txt | 493 - code/ryzom/common/data_common/msg.xml | 1165 -- .../data_common/r2/IslandScreenshots.cfg | 27 - .../common/data_common/r2/r2_actions.lua | 40 - .../common/data_common/r2/r2_activities.lua | 1549 -- .../common/data_common/r2/r2_base_class.lua | 870 - .../data_common/r2/r2_base_class_private.lua | 146 - .../common/data_common/r2/r2_basic_bricks.lua | 34 - .../common/data_common/r2/r2_components.lua | 1403 -- .../ryzom/common/data_common/r2/r2_config.lua | 127 - .../common/data_common/r2/r2_console.lua | 173 - code/ryzom/common/data_common/r2/r2_core.lua | 89 - .../r2/r2_core_user_component_manager.lua | 1658 -- code/ryzom/common/data_common/r2/r2_debug.lua | 170 - .../common/data_common/r2/r2_dialogs.lua | 1114 -- .../common/data_common/r2/r2_entry_points.txt | 1068 -- .../common/data_common/r2/r2_environment.lua | 203 - .../r2/r2_event_handler_system.lua | 142 - .../ryzom/common/data_common/r2/r2_events.lua | 1811 -- .../common/data_common/r2/r2_features.lua | 1205 -- .../data_common/r2/r2_features_ambush.lua | 470 - .../r2/r2_features_bandits_camp.lua | 900 - .../r2/r2_features_boss_spawner.lua | 557 - .../data_common/r2/r2_features_counter.lua | 291 - .../data_common/r2/r2_features_default.lua | 2101 --- .../r2/r2_features_delivery_task.lua | 625 - .../data_common/r2/r2_features_easter_egg.lua | 489 - .../data_common/r2/r2_features_empty.lua | 268 - .../data_common/r2/r2_features_fauna.lua | 840 - .../r2/r2_features_get_item_from_scenery.lua | 487 - ...r2_features_get_item_from_scenery_task.lua | 543 - .../data_common/r2/r2_features_give_item.lua | 516 - .../r2/r2_features_hidden_chest.lua | 290 - .../data_common/r2/r2_features_hunt_task.lua | 708 - .../data_common/r2/r2_features_kill_npc.lua | 479 - .../data_common/r2/r2_features_loaded.lua | 40 - .../r2/r2_features_loot_spawner.lua | 499 - .../data_common/r2/r2_features_man_hunt.lua | 442 - .../data_common/r2/r2_features_npc_groups.lua | 591 - .../r2/r2_features_npc_interaction.lua | 411 - .../r2/r2_features_proximity_dialog.lua | 304 - .../data_common/r2/r2_features_quest.lua | 589 - .../r2/r2_features_random_chest.lua | 472 - .../r2/r2_features_request_item.lua | 562 - .../r2/r2_features_reward_provider.lua | 426 - ...r2_features_scenery_object_interaction.lua | 438 - ...atures_scenery_object_interaction_task.lua | 549 - .../r2/r2_features_scenery_object_remover.lua | 448 - .../data_common/r2/r2_features_talk_to.lua | 529 - .../data_common/r2/r2_features_target_mob.lua | 436 - .../r2/r2_features_time_trigger.lua | 435 - .../r2/r2_features_timed_spawn.lua | 453 - .../data_common/r2/r2_features_timer.lua | 593 - .../data_common/r2/r2_features_user_item.lua | 208 - .../r2/r2_features_user_trigger.lua | 330 - .../data_common/r2/r2_features_visit_zone.lua | 502 - .../r2/r2_features_zone_triggers.lua | 403 - code/ryzom/common/data_common/r2/r2_init.lua | 35 - .../common/data_common/r2/r2_islands.xml | 2847 --- code/ryzom/common/data_common/r2/r2_logic.lua | 2637 --- .../common/data_common/r2/r2_logic_comp.lua | 316 - .../data_common/r2/r2_logic_entities.lua | 598 - .../common/data_common/r2/r2_logic_ui.lua | 388 - .../data_common/r2/r2_mini_activities.lua | 213 - code/ryzom/common/data_common/r2/r2_misc.lua | 348 - .../common/data_common/r2/r2_palette.lua | 14263 ---------------- .../data_common/r2/r2_palette_light.lua | 1671 -- code/ryzom/common/data_common/r2/r2_piece.lua | 238 - .../common/data_common/r2/r2_plot_item.lua | 472 - .../common/data_common/r2/r2_prim_render.lua | 304 - code/ryzom/common/data_common/r2/r2_refid.lua | 24 - .../common/data_common/r2/r2_ring_access.xml | 2211 --- .../common/data_common/r2/r2_scenario.lua | 290 - code/ryzom/common/data_common/r2/r2_texts.lua | 164 - .../common/data_common/r2/r2_translator.lua | 4676 ----- code/ryzom/common/data_common/r2/r2_ui.lua | 97 - .../common/data_common/r2/r2_ui_acts.lua | 1336 -- .../common/data_common/r2/r2_ui_anim_acts.lua | 120 - .../common/data_common/r2/r2_ui_anim_bar.lua | 185 - .../r2/r2_ui_anim_user_triggers.lua | 84 - .../data_common/r2/r2_ui_char_tracking.lua | 664 - .../r2/r2_ui_contextual_commands.lua | 162 - .../r2/r2_ui_contextual_commands_new.lua | 307 - .../r2/r2_ui_custom_boxes_data.lua | 5 - .../r2/r2_ui_custom_selection_bbox.lua | 157 - .../data_common/r2/r2_ui_displayer_npc.lua | 3093 ---- .../data_common/r2/r2_ui_displayers.lua | 744 - .../common/data_common/r2/r2_ui_dm_gift.lua | 128 - .../data_common/r2/r2_ui_event_handlers.lua | 1394 -- .../data_common/r2/r2_ui_features_tree.lua | 312 - .../common/data_common/r2/r2_ui_forms.lua | 674 - .../data_common/r2/r2_ui_logic_entities.lua | 3111 ---- .../data_common/r2/r2_ui_lua_inspector.lua | 228 - .../common/data_common/r2/r2_ui_main_loop.lua | 56 - .../data_common/r2/r2_ui_mini_toolbar.lua | 59 - .../common/data_common/r2/r2_ui_misc.lua | 292 - .../common/data_common/r2/r2_ui_palette.lua | 223 - .../data_common/r2/r2_ui_player_tracking.lua | 631 - .../data_common/r2/r2_ui_property_sheet.lua | 2339 --- .../common/data_common/r2/r2_ui_reset.lua | 566 - .../common/data_common/r2/r2_ui_scenario.lua | 944 - .../data_common/r2/r2_ui_scenario_scores.lua | 311 - .../data_common/r2/r2_ui_select_bar.lua | 337 - .../data_common/r2/r2_ui_select_bar_2.lua | 578 - .../data_common/r2/r2_ui_toolbar_base.lua | 193 - .../common/data_common/r2/r2_ui_tools.lua | 149 - .../common/data_common/r2/r2_ui_triggers.lua | 3931 ----- .../common/data_common/r2/r2_ui_windows.lua | 118 - code/ryzom/common/data_common/r2/r2_utils.lua | 500 - .../common/data_common/r2/r2_version.lua | 496 - .../common/data_common/r2/r2_world_object.lua | 214 - .../data_common/r2/unit_test/r2_client1.lua | 4 - .../data_common/r2/unit_test/r2_client2.lua | 6 - .../data_common/r2/unit_test/r2_client3.lua | 5 - .../data_common/r2/unit_test/r2_unit_test.lua | 1509 -- .../ryzom/common/data_common/system_files.cfg | 15 - code/ryzom/common/data_common/visual_slot.tab | Bin 9972 -> 0 bytes code/ryzom/common/data_common/weather.cfg | 14 - 138 files changed, 94201 deletions(-) delete mode 100644 code/ryzom/common/data_common/chat/bot_chat.txt delete mode 100644 code/ryzom/common/data_common/chat/bs_combat.txt delete mode 100644 code/ryzom/common/data_common/chat/bs_magic.txt delete mode 100644 code/ryzom/common/data_common/chat/bs_static.txt delete mode 100644 code/ryzom/common/data_common/chat/chat_dynamic.occ delete mode 100644 code/ryzom/common/data_common/chat/chat_static.cdb delete mode 100644 code/ryzom/common/data_common/chat/chat_static.occ delete mode 100644 code/ryzom/common/data_common/chat/chat_static.txt delete mode 100644 code/ryzom/common/data_common/chat/create_cdb.bat delete mode 100644 code/ryzom/common/data_common/chat/death_static.txt delete mode 100644 code/ryzom/common/data_common/chat/egs_brick_error_msg.txt delete mode 100644 code/ryzom/common/data_common/chat/egs_effect_static.txt delete mode 100644 code/ryzom/common/data_common/chat/egs_static.txt delete mode 100644 code/ryzom/common/data_common/chat/faber_static.txt delete mode 100644 code/ryzom/common/data_common/chat/harvest_static.txt delete mode 100644 code/ryzom/common/data_common/chat/identify_creature_static.txt delete mode 100644 code/ryzom/common/data_common/chat/news_static.txt delete mode 100644 code/ryzom/common/data_common/chat/report_progression_static.txt delete mode 100644 code/ryzom/common/data_common/chat/wos_static.txt delete mode 100644 code/ryzom/common/data_common/database.xml delete mode 100644 code/ryzom/common/data_common/landscape_col_prim_pacs_list.txt delete mode 100644 code/ryzom/common/data_common/msg.xml delete mode 100644 code/ryzom/common/data_common/r2/IslandScreenshots.cfg delete mode 100644 code/ryzom/common/data_common/r2/r2_actions.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_activities.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_base_class.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_base_class_private.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_basic_bricks.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_components.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_config.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_console.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_core.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_core_user_component_manager.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_debug.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_dialogs.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_entry_points.txt delete mode 100644 code/ryzom/common/data_common/r2/r2_environment.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_event_handler_system.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_events.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_ambush.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_bandits_camp.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_boss_spawner.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_counter.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_default.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_delivery_task.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_easter_egg.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_empty.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_fauna.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_get_item_from_scenery.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_get_item_from_scenery_task.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_give_item.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_hidden_chest.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_hunt_task.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_kill_npc.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_loaded.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_loot_spawner.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_man_hunt.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_npc_groups.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_npc_interaction.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_proximity_dialog.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_quest.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_random_chest.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_request_item.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_reward_provider.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_scenery_object_interaction.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_scenery_object_interaction_task.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_scenery_object_remover.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_talk_to.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_target_mob.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_time_trigger.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_timed_spawn.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_timer.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_user_item.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_user_trigger.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_visit_zone.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_features_zone_triggers.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_init.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_islands.xml delete mode 100644 code/ryzom/common/data_common/r2/r2_logic.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_logic_comp.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_logic_entities.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_logic_ui.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_mini_activities.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_misc.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_palette.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_palette_light.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_piece.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_plot_item.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_prim_render.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_refid.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ring_access.xml delete mode 100644 code/ryzom/common/data_common/r2/r2_scenario.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_texts.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_translator.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_acts.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_anim_acts.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_anim_bar.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_anim_user_triggers.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_char_tracking.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_contextual_commands.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_contextual_commands_new.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_custom_boxes_data.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_custom_selection_bbox.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_displayer_npc.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_displayers.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_dm_gift.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_event_handlers.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_features_tree.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_forms.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_logic_entities.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_lua_inspector.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_main_loop.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_mini_toolbar.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_misc.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_palette.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_player_tracking.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_property_sheet.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_reset.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_scenario.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_scenario_scores.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_select_bar.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_select_bar_2.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_toolbar_base.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_tools.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_triggers.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_ui_windows.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_utils.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_version.lua delete mode 100644 code/ryzom/common/data_common/r2/r2_world_object.lua delete mode 100644 code/ryzom/common/data_common/r2/unit_test/r2_client1.lua delete mode 100644 code/ryzom/common/data_common/r2/unit_test/r2_client2.lua delete mode 100644 code/ryzom/common/data_common/r2/unit_test/r2_client3.lua delete mode 100644 code/ryzom/common/data_common/r2/unit_test/r2_unit_test.lua delete mode 100644 code/ryzom/common/data_common/system_files.cfg delete mode 100644 code/ryzom/common/data_common/visual_slot.tab delete mode 100644 code/ryzom/common/data_common/weather.cfg diff --git a/code/ryzom/common/data_common/chat/bot_chat.txt b/code/ryzom/common/data_common/chat/bot_chat.txt deleted file mode 100644 index 05512ca99..000000000 --- a/code/ryzom/common/data_common/chat/bot_chat.txt +++ /dev/null @@ -1,33 +0,0 @@ - -# for the bot -BC_INTRO "Hello sir, what can I do for you ?" -BC_TRADE "Choose something to buy, or maybe you've got something to sell ?" -BC_BRICKS "Here are my bricks." -BC_SKILLS "For what skill do you need training ?" -BC_AVAILABLE_MISSIONS "Pick a mission." -BC_MISSION_DESCRIPTION "Here's the mission description :" -BC_MISSION_DETAILS "Here's the reason for this mission :" -BC_MISSION_ITEM_DESCRIPTION "To get this, you should :" -BC_MISSION_ITEM_DETAILS "Here's the reason for this mission :" -BC_MISSION_PROGRESS "Which point did you reach in your mission ?" -BC_NEXT_STEP "Here's the following step of your mission :" -BC_COMPLETED_MISSION "Which mission did you complete ?" -BC_MISSION_REWARD "Here's your reward" -BC_PACTS "Choose a pact." - -# for the player -BC_BUY_BRICKS "I want to buy bricks." -BC_ASK_TRADE "Let's trade." -BC_ASK_MISSION_LIST "Do you have any mission for me ?" -BC_ASK_TELEPORT "I want to teleport somewhere ?" -BC_ASK_PACTS "Let's talk about pacts." -BC_ASK_SKILL "Can you train me ?" -BC_ASK_MISSION_PROGRESS "I've completed steps in a mission." -BC_ASK_MISSION_COMPLETED "I've completed a mission." -BC_QUIT "See you later." -BC_TO_INTRO "Let's talk about something else." -BC_ACCEPT_MISSION "I accept this mission." -BC_TELL_ME_MORE "Tell me more." -BC_BACK_TO_MISSIONS "Can I see what missions you propose again ?" -BC_NEXT_PAGE "Next page" -BC_PREVIOUS_PAGE "Previous page" diff --git a/code/ryzom/common/data_common/chat/bs_combat.txt b/code/ryzom/common/data_common/chat/bs_combat.txt deleted file mode 100644 index 30f401820..000000000 --- a/code/ryzom/common/data_common/chat/bs_combat.txt +++ /dev/null @@ -1,40 +0,0 @@ -#CMS down -EGS_COMBAT_CMS_DOWN "&RG&(Server Debug) The combat move service is down, cannot engage melee combat..." - -# when an entity attacks another entity -BS_YOU_ATTACK_E "&BC&You attack $0e." -BS_ATTACKS_YOU_E "&RG&$0e attacks you." -BS_ATTACKS_EE "&BC&$0e attacks $1e." - -# when an entity leaves combat -BS_YOU_END_ATTACK_E "&BC&You stop attacking $0e." -BS_END_ATTACKS_YOU_E "&RG&$0e leaves combat." -BS_END_ATTACKS_EE "&BC&$0e stops attacking $1e." - -# when damage is done to/by an entity -BS_HIT_EEI "&BC&$0e hits $1e for $2i damage." -BS_YOU_HIT_EI "&BC&You inflict $1i points of damage on $0e." -BS_HITS_YOU_EI "&RG&$0e hits you for $1i damage." -BS_HIT_NULL_EE "&BC&$0e hits $1e but does no damage." -BS_YOU_HIT_NULL_E "&BC&You hit $0e but do no damage." -BS_HITS_YOU_NULL_E "&RG&$0e hits you but does no damage." - -# when an entity misses his/her enemy in combat -BS_YOU_MISS_E "&BC&You miss $0e." -BS_MISSES_YOU_E "&RG&$0e misses you." -BS_MISSES_EE "&BC&$0e misses $1e." - -# critical hit -EGS_YOU_CRITICAL_HIT_E "&BC&You perform a critical strike on $0e." -EGS_CRITICAL_HIT_YOU_E "&RG&$0e performs a critical strike on you." -EGS_CRITICAL_HIT_EE "&BC&$0e performs a critical strike on $1e." - -# Fumble -EGS_YOU_FUMBLE "&RG&You fumble." -EGS_ENEMY_FUMBLE_E "&BC&$0e fumbles." -EGS_FUMBLE_E "&BC&$0e fumbles." - -EGS_START_DEFAULT_ATTACK "&BL& you return to basic fighting style." -BS_SUFFER_PENALTY_NO_STAMINA "&RG&You are low on stamina and suffer a penalty on your combat skills." - -EGS_RANGE_CLOSE_COMBAT_LEAVE "You cannot use a range weapon against an opponent engaged in close combat with you." diff --git a/code/ryzom/common/data_common/chat/bs_magic.txt b/code/ryzom/common/data_common/chat/bs_magic.txt deleted file mode 100644 index 76a7d58f3..000000000 --- a/code/ryzom/common/data_common/chat/bs_magic.txt +++ /dev/null @@ -1,80 +0,0 @@ -# when an entity resists a spell -BS_U_RESIST_SPELL_E "&BC&You resist the spell from $0e." -BS_UR_RESIST_SPELL_E "&RG&$0e resists your spell." -BS_RESIST_SPELL_EE "&BC&$0e resists the spell from $1e." -BS_RESIST_SPELL_E "&BC&$0e resists a spell." - -# when an entity is protected against a special effect -BS_TARGET_PROTECTED "&RG&Your target is protected against this type of effect." -BS_U_PROTECTED "&VE&You are protected against this type of effect." - -# magic shield -BS_MAGIC_SHIELD_I "&VE&Your magic shield has absorbed $0i damage." -BS_MAGIC_SHIELD_DEAD "&VE&Your magic shield has been destroyed." - -# when an entity is hit by a spell -BS_SUFFER_OFFENSIVE_SPELL_E "&BC&An aggressive spell is cast on $0e." -BS_SUFFER_NEUTRAL_SPELL_E "&BC&A neutral spell is cast on $0e." -BS_SUFFER_BENEFICIAL_SPELL_E "&BC&A beneficial spell is cast on $0e." - -# when the player is hit by a spell -BS_U_SUFFER_OFFENSIVE_SPELL_E "&RG&$0e casts an aggressive spell on you." -BS_U_SUFFER_NEUTRAL_SPELL_E "&BC&$0e casts a neutral spell on you." -BS_U_SUFFER_BENEFICIAL_SPELL_E "&BC&$0e casts a beneficial spell on you." - -BS_SELF_CAST_S "&BC&The $0s magic hits you." - -# when an entity is casting -BS_CASTING_OFFENSIVE_E "&BL&$0e casts an aggressive spell" -BS_CASTING_NEUTRAL_E "&BL&$0e casts a neutral spell" -BS_CASTING_BENEFICIAL_E "&BL&$0e casts a beneficial spell" - - -# when an entity is healed -BS_HEAL_EEI "&BC&$0e heals $1e by $2i hp" -BS_YOU_HEAL_EI "&BC&You heal $0e by $1i hp." -BS_HEALS_YOU_EI "&BC&$0e heals you by $1i hp." - - -# break cast -BS_CAST_BREAK "&RG&Your spell casting has been broken." -BS_TARGET_HIGHER_LEVEL "&RG&This spell has no effect because the target level is too high." - - -EGS_MAGIC_U_SUFFER_OFFENSIVE_SPELL_SAP_EI "&RG&$0e inflicts you $1i magic sap damage." -EGS_MAGIC_U_CAST_OFFENSIVE_SPELL_SAP_EI "&BC&You inflict $1i magic sap damage to $0e." -EGS_MAGIC_U_SUFFER_OFFENSIVE_SPELL_STA_EI "&RG&$0e inflicts you $1i magic stamina damage." -EGS_MAGIC_U_CAST_OFFENSIVE_SPELL_STA_EI "&BC&You inflict $1i magic stamina damage to $0e." -EGS_MAGIC_U_SUFFER_OFFENSIVE_SPELL_HP_EI "&RG&$0e inflicts you $1i magic hit points damage." -EGS_MAGIC_U_CAST_OFFENSIVE_SPELL_HP_EI "&BC&You inflict $1i magic hit points damage to $0e." - -EGS_MAGIC_U_SELFCAST_OFFENSIVE_SPELL_HP_I "&BC&You inflict yourself $0i magic hit points damage." -EGS_MAGIC_U_SELFCAST_OFFENSIVE_SPELL_SAP_I "&BC&You inflict yourself $0i magic sap points damage." -EGS_MAGIC_U_SELFCAST_OFFENSIVE_SPELL_STA_I "&BC&You inflict yourself $0i magic stamina points damage." - -EGS_MAGIC_CAST_OFFENSIVE_SPELL_HP_EEI "&BC&$0e inflicts $2i magic hit points damage on $1e." -EGS_MAGIC_CAST_OFFENSIVE_SPELL_SAP_EEI "&BC&$0e inflicts $2i magic sap points damage on $1e." -EGS_MAGIC_CAST_OFFENSIVE_SPELL_STA_EEI "&BC&$0e inflicts $2i magic stamina points damage on $1e." - -EGS_MAGIC_SELFCAST_OFFENSIVE_SPELL_HP_EI "&BC&$0e inflicts himself $1i magic hit points damage." -EGS_MAGIC_SELFCAST_OFFENSIVE_SPELL_SAP_EI "&BC&$0e inflicts himself $1i magic sap points damage." -EGS_MAGIC_SELFCAST_OFFENSIVE_SPELL_STA_EI "&BC&$0e inflicts himself $1i magic stamina points damage." - -EGS_MAGIC_U_SUFFER_HEAL_SPELL_SAP_EI "&BC&$0e heals you $1i sap." -EGS_MAGIC_U_CAST_HEAL_SPELL_SAP_EI "&BC&You heal $0e $1i sap." -EGS_MAGIC_U_SUFFER_HEAL_SPELL_STA_EI "&BC&$0e heals you $1i stamina." -EGS_MAGIC_U_CAST_HEAL_SPELL_STA_EI "&BC&You heal $0e $1i stamina." -EGS_MAGIC_U_SUFFER_HEAL_SPELL_HP_EI "&BC&$0e heals you $1i hit points." -EGS_MAGIC_U_CAST_HEAL_SPELL_HP_EI "&BC&You heal $0e $1i hit points." - -EGS_MAGIC_HEAL_SPELL_HP_EEI "&BC&$0e heals $1e $2i hit points." -EGS_MAGIC_HEAL_SPELL_SAP_EEI "&BC&$0e heals $1e $2i sap points." -EGS_MAGIC_HEAL_SPELL_STA_EEI "&BC&$0e heals $1e $2i stamina points." - -EGS_MAGIC_U_SELF_HEAL_HP_I "&BC&You heal yourself $0i hit points." -EGS_MAGIC_U_SELF_HEAL_SAP_I "&BC&You regain $0i sap points." -EGS_MAGIC_U_SELF_HEAL_STA_I "&BC&You regain $0i stamina points." -EGS_MAGIC_SELF_HEAL_HP_EI "&BC&$0e regains $1i hit points." -EGS_MAGIC_SELF_HEAL_SAP_EI "&BC&$0e regains $1i sap points." -EGS_MAGIC_SELF_HEAL_STA_EI "&BC&$0e regains $1i stamina points." - diff --git a/code/ryzom/common/data_common/chat/bs_static.txt b/code/ryzom/common/data_common/chat/bs_static.txt deleted file mode 100644 index 1e973a664..000000000 --- a/code/ryzom/common/data_common/chat/bs_static.txt +++ /dev/null @@ -1,15 +0,0 @@ -# code for sentence difficulty -BS_CHILD_PLAY "&VE&Child's play" -BS_REAL_EASY "&VE&Really Easy" -BS_EASY "&BL&Easy" -BS_FAIRLY_EASY "&BL&Fairly easy" -BS_AVERAGE "&BC&Average" -BS_QUITE_DIFF "&BC&Quite difficult" -BS_DIFFICULT "&JA&Difficult" -BS_REALLY_DIFF "&JA&Really Difficult" -BS_HARSH "&RG&Harsh" -BS_EXTR_DIFF "&RG&Keep dreaming!" - -BS_SENTENCE_FAILED "&RG&You failed to use this formula or action phrase." -BS_SENTENCE_FAILED_S "&RG&You failed to use the brick $0s." -BS_SENTENCE_MAGIC_FAILED_S "&RG&You failed to cast the spell $0s." diff --git a/code/ryzom/common/data_common/chat/chat_dynamic.occ b/code/ryzom/common/data_common/chat/chat_dynamic.occ deleted file mode 100644 index 36a919224..000000000 --- a/code/ryzom/common/data_common/chat/chat_dynamic.occ +++ /dev/null @@ -1,4 +0,0 @@ -# occ test file -"toto" 2 -"titi" 5 - diff --git a/code/ryzom/common/data_common/chat/chat_static.cdb b/code/ryzom/common/data_common/chat/chat_static.cdb deleted file mode 100644 index 2aba34b5018cb47199c5572918f65c2ba2722c4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 61383 zcmb__PjIAJai{*bJz#9(@vJ>&*&3Mbv2k0585Vmn7)sKoR!x^wqN>zAjWOktRFaC8 zRB~0RdxY5w2M(C(mlPfk1Gd*VdbP(d7tC4_@5?$ zY&RRXn^~*%7W`8IjnTMwHmdYbOYnK)-0LH#?doc~MbP!$__Fy5B$Cb10 z-gxA6c;iy?QR_~vUVkG#TJ4?+`r~02OQra}appJUBJHf6Z8w_jH{(aO%A@Wnh&`x` zd&j-A!Ejs|4NiKGj(WpnyKh`bmTNbwYZ?EpI1an}y@=TS@9IK#tF?M{rJmU_wTQuX ze-9fnvc|7&=$WikSMPM%4gcnk@eOxXtBiWR%A=$1*uEXfPS1vev%v^wb;uq2@w{>N z*8>(S&D!dn7J+YYLtXqixv1<8fkr~i#oy51-nriiUvLwVG`r^$-+X88$?%OcpW$4= z&+i@e_l^wH%6@-ekTtH1cz$Q;*8-HDN1L1P&w=c*}f$-866GIkM|QOH&n1}R|@6T zp=6?Nz)V8PR^g1!27R!Z4*fa%R@XEfHNNTPY)|pCY8ZK z9!WpXpBhhzE_nlhtR4+SMns3W%>8ucxA1Q`_w8nOx7OHc32u~x?P2d>e{ep^;rG*p z8{yYKuv2RjY6}8MhCJ?$d&3BIUL{YIQtQ9s7uUfuBDtdn{o~^bc$uG__Mn|bQE^L7 z;-B77MFk~Q?`%SQG@2QaYC|xn(oP1$sBL~a%S!=!fXWaNs^G5^s*?&0Jd0&|$D`!q zMHN0#Xz$0DN~rkzP>YcLTNP^m?!~TbnD@)!AgIXz6~8qicD{*WP!6q5b#s%5QAbqU zH7LXPVU?TB+c(=dP<+$d;~n*=*FA%1;kxUeQb%;h{oP||yZ-n{#MghZdvY>xN)MMr zYhjUg8(Oo~$ug>>n=7j~pM5)2-FV!ElB+!Xj=1AtIP&<({l-owdtxSN0>QO>csT6A)WF&1aS2yL0ED|CtKNBz--BHDsUqZ;E8G#;>!>@zu6n1qU(%>|y_y9F<1yNb}g{`%OQ{E)M8aQP%9>6vU{K8$N z9P{aUJ&W{n;TjT{WFXfZ_h2uLXm#y&$IdsmX2od0(l51}vKJ~!esiY>1-1`mdxG_z zvAx_{6ou64tXEgECfMh8ZL8DzFS;p^8?-%yZicw+4Z8=tMS7KI-yZMrf1eZGVE|UE zTdP_9&vi|H&z+t@;C6es#)9@b=%4mSNBEh5G>4 z+RCyuqLQ-F5LcMfjev*!!y}r|gX1eUyO=u`fqk#hywlofZ2x6(pSWyru-(d|!SDf$ zq%;0)FxMabZY}ay{`fkrKhw3^AQahwKn}2((K%IFzX$8fq{3~>;*Mr=Ow!_Y zC;Ci;u-2;m1=qlhG$Do0zP+yu%!|-j#TKL(J|D&Kcp=o5^nEz%L;9^eWCr z)E$>>?y6Ipr%ffNR%_Ppi$13|qds5n_J_w86&T>I){k$9?b7OORGY00nq1VY8{OgP z$kgevaWa18Zq{m>LggNL^N?7sP>;GpXz;P9(?7*8EaA@!dUM$KL7y(`TKIfe8TR(T zFGFq}?kU|0zXHKHd$`nl`z~6?!Fm>)1)=qwO_)R*5nxb72j?d+f8e^G;t$L!5wYF~ z>+Ru^A;BNfms6BwZT$6kFp3KMQ*#m~h)bDDt!=GkFUgexa@9^BLLKi{Qgs5(-0!{Y zIDcwMjT$3@0itfEhoqJOOaRf%Mn_>BNEzVWAK=mO!4i@;iqo#tv*L<^$9yMj`o zV3+6dJ&m!ypV14+Ai17O^++(W^9qVu2$EInt&Z3gwbV2Lc2Mv<^4$yGn3bcm`0;|+ z{^4U7zcnfevwp*euw>-J=lP+@Mbjj0qt>=HEBqAup)qsRhjq#&NqDZg-#vkuyZoO4 zfb?I~3&KC&+JUFy%#Z`Ii@?qP09<=IFfja@HrwB-Q4KIezJeb)^2C6+3kE=5F(AKD zFyE@Gf}e)P!|H1J%LZiYldC%sZs_vL&$K^C027H3n6C!`j?|u2ZD0b>t~PIHZAMno z@7moV{QKnv{Fn>;ojF25Qzwp4RHV?E*yqXlahGnEs*$s!VHai&{;k|4k~&d-I)Eyb5Y}i+qnP4E zN0~ZgxzeO&KIjh<1@|ShNH?puYpb2sMlFM5v6fZW#9$2Solfgvf3Gq+>h}<1an+14 z(0DkwNL2HeLOizB$$_hhuAd64yE_^TccG|x%PNcdwnM-W01?^E=$i_sD2Fnz0-;D9 zjW5ls?XDk)E->z*OzAf`mgQGKK62O%m4jeNW!3G*)-y`kHkB`S35)RXLR1tz&fsV- zQwviB|3GD6t09iM=nu$%e5*b=PX}M7e)pGd&>I7TF%Xi8Ut@dwz&ZF5!K8wd_N7@x z6z*dkcRSrW>Th~F^g5!9*_x>P z0D4$4BN9b^2m<$f4Ku)dpMDYtfzWNASm z)>?OjBN9Vdp-Fr?+;(9H5YFe-T&8q)_xJlW?+|A>?jQ6j5;cvE_YZII6yr80)~%gz zVX!+{QRw)Z78YfUivb?r2>PebREgR2G!$NlHvJE0)l$*}He$4D*;HEajH74--<^iQ zRa971FMeXF+TqmgKi*nbZ9H*icB4+%uGT!9@|^5C)d|Di8T^a9%;r?WZd3^Z>G4!T z8F;rUc4yR>YGwjDsDw^SG?z+W&;z^>1E^`5Yd0zgft4zVw{zD;1;K4oLFiFWQxUsS zMF?D15vfwVTtztI^bhl)rCkevCpP1SlJJFRVIPck~e z=2T!?{SbGTn6)3##}`}#(@(RvmV8V6Ld5%EI5^4KZyz_Ws+HB(B?ZuFnM2klhamJ5 ztWoo?mVXT^@XtFGfmXKF&JeOi;EIO9JBh%A4q)(8ZrW)+!!kYKMf_P%#a{s1k;LXS z!0;ED8_wy!kKcG2;2U*%Kvta1uxb zQ&wTO<&z{7ZUK#03(VpOb5Uap3e$2X3eZlo3bl~rOQu2l{G4hCg%;B%3NKtEKyWg3 zG8N`he%IUCR<({mFRX8Mi`ElDGNy)fCxe{k5>en8HH81wh4OKS~z?Ud&k@$Vt)t} z93DCSKfj<6CtYc)(bjYeYargA>`V<*LLOkDQ%O3h+bd-Z;2TkNd*{O;!=qvCxRTvR zx)O5QZQK~yT5=yDNE{FbstDwZ#o=jN#LNnNhE9M}ibAC;D%?=N(DPvYg1k+=41Q-S6T`w7QT`S;BgO z(?ci3TkO)=X~MrqwX0}G=r%gGrkLf-gKqW^oH>p=NYd*mKToVQd`lsDyyJb#lKMM4 z1&mmGVj=W^QKGzpwokOpTV~X++38HxVZr+hDaL6jUlrd-u?5vT4!5AkMAvE*!GPv9 zT2KfP;=IQ69pZ#8vlJT-Lt&O^wIbY5rw{^&Ap_s>7{`4wu;kx!I{Gc497ThUo{#Nh zc2V*>y4PtkHl_Na#t|4CVaT)-gP#19K~FAN5-k0pWuWC#h8%0Rk`wQr9vt_f@@U5e z-;NRD5Yyoq@uvBI_(G6ANb)s{>)IfX17s+u!7)SW2@7ywNY3WE?~JUAxo=+6G|oJsfT0+1Ru3V z=g6*8&Gz?t!;!@}ekfThfw$U5OfY1cy=4W0B)A0nGCo`UP^a9=289Ii;k zG`P1LjVXX9FZm+i1(J6fU=xunSPj9qGo%ameF5;wJgtUlfOENb1xOQ+wwx+dm$MZK z0Tdz87$jXgE7i3>!Acg5a_r&_=oFkuTxJs!y34F0~8E~cT zAD7`?rg!p~e`W639B^YXl!R@pxFfa`=Sv_!O z33TxbCZX$9pS_JtQ@G@LZo%S`Gk zg+WBc?}wkAZXLE1Y)D#Sg0fndj`Z_$c|9UB&oY^yqAR3?il>Hi1Wa<45!BK&P{MOm zgbqp*#nWMxu&)#j=#GOm5fr9K-Dq@h&TzbVSS5$^{6ayX8=EUtXg5|FcUJGO){%=z zgiY^5NnKcomAaGlBBbSLd~qCIxaa37p~>--0QaK`8fjHTLiBMCCX<-yNk!`3$m>#6 zCdLf}%u{!^h&lL4>h*Tvnnjqi1+A093=*biKZdBGZ)a$>_<@ZVi>s6FyWi^wN1S0U0EOr;^>uCU&SO}6wvA*6wfTI*g zgLp8Y`#uFnDR?Y^tY^0`$MLv#I2GW+wi1jS2sC(KUD- z`R29zo!dJsRNl-sQHg5~7S#uMuX`L66}otOC#*t+Iob`Lmcd(*5=5b$!rQ2}IxjX* z&x<(5cB56T-yw2p92rEa6otgF1{!-L>9}0kK>DAxpD=+@Q-)v=wIpiKdaT!`8gtif zCGx7TjH2(&#?DqdO)3Er{94@fl8j_U)JgBbcyPXp{(|${%FF`)^C;q^{-uY@r|)K|M}#HNL~Y2dO#W%fu4a;1Q# z_cE$+P*%DZ%BLjy7ow|v$^B%>+>Oxe~>Wn!fNT4!2oNe7kHwC*FX@cF)+Ry0Lxg(8X_D&B` zd#3f>l?#+sIW-r|Hd1h#JGg^1$n-qmhjj?emlsxY~BymP8R-4@&IL^k%u{nG47u%R!YgFgjYW~ ziFX@WBJ~5|S;Nnkvyjyx;AcN zQzB&(=m)VAeRhH_Efc`Fh51XDYgV^hupe`|VfWPKJuY|SQf_PRY;ECO()dn+XqDml zsc5Bww4csW=S(FVx~^950P-`ip@*JWC9tAgI4t+Y9}g^N~s)W>x2f1BBzc4KFyMASlAFZ<_%4S6se#Y5zdis@WGe;o&zu1+FA1 z4rypbrL7VvQ6E~UYqiU;VrdB!nuJbau8u}sL_pkv@I^l)>2{?Y!bxaDufjrLs(Kp| zm^I~&Qd1G4jixQOq<3L@kZH|y#fX3hNh|J$+!n@GP!qzEkm}a`_6DS_#$5nlEf~NA zM0&uKM>{lXh;U)kb>lu@YD*6+ihY^x1SyegM{);?6?%U^eOrN z@JFg#5{XN?5nV*MkI_9kMx_qcU?a&PE?E3PveDS#+e>0{b$AV!5SS)$LC9 z-q*BJH?|mjNa`s|RtaU?x+e`hz4kqMJlV*{ByA+%ZQYhwym2+LO0P*j9x&)1$vA7l z*5Z;v$ko@fVpn?9bE_@-#jl5E8`J`jP9}Q!tFQt|y0Osf;VPGQ!Ce3V6Tl37Eo81oGC}UtVV`gq!2T(mi-ernr*Hlq4apb0k_9 z6v-pS)+((z@)+o?HBmx1lgp08>W!}6ODa8KK~xzyZ+*as#;f8ne$g(@` z+;nXVqFk*b_zG8!!d#;}Y4whWhz*5{m_-dy%wloavb2>NzvQ3^32U^C%fUs8Irl9~ z=}I}Yb`{8pPXmfjKJ&=g{#7Ws>=OR`cA}fZX5}K)!Vj^@6&wpcLKq&EBXS??p&L?I zX4>AREGCC-1TH09D#AbWm8*!Fn+Pe@n_0a}-ke#^T~!T)Bq!b7`k+$vQcuE?meR z=qU?{u64>KEV;Gd{*j4`gU+9^T({RaPDD&WQG zON71rh4SmQ_fo#tw`IauVKFloYN@>-<;>E(g_28I?H}LcVC2~mfIqz zoAd%NgB^)q0y;IVg0ct~k)1_WlVi|(wG@1g9$^U@=Mnwf)h+1nvpkWDN9 zrPWZl+Sv&Xj&i%4B507ZAys~=mNqL`vDi+01e=Tf^t4>3`k z@1YbysR{a1mLS=S`mDIl8x~U=A-|3((Dz?wEj^4Y*PAWbmutJMX4mCq$3hbe_hsZN zKbSYSEnT zDrY1&+ULtmlYdxbOhxt1B@4;jlGW^Rlf{nuCoEH(Sa6EPwYA7fgJ}y!PR+s{lfN&g zY%Cs@`)8XlZN4jn4o(;TF~|A|AbvR z{7}-}60ct^287Mg^^ya{{50yVQ2-JAtde0Dvmo2+@Ta~|ARsFrAj4rBc0A={FG{!Z zLb45+NR=m(jl~FCQ21ADfiia47NT7ksD2}Apfpan;2@$fgWb7^B6ITMS30) zpk%!(b}FUAl*LB~m><#d;$I#h7vps>-{qQUw*@ri4FtfmUw~1+*6>;41KC-s3f!whZR_+{eI6j3JaQ zu*C0uq=q6tJ{k@l1=WW(1|&p|S)L?gZBddg+#?k{NGhVAn+ixNJ(C@ z-qspJ=5}Uk1P3zddJ&!%0+r$aE5+Px%F>k{2WRg;QAo(wBk8r?%(gy=def(L?>tUX zsT9zI^I@#R_|yW&#w0{s&$L-FXeDD=DvN^yjKyX*5b0;S=Tp*6SpY!3rzggfh6pMU z)Eph4x(Ar-$J^&qH;82M`>=txD*6!wIQ_K02VAr|oAXos06*m}j1q%;aawGxRVFZE zxSiECQWLs|`GXObD{h0e)07#%D~$&E*g|h@D2~DK5Lk^))P;*NeBAh)wu`QMv_v0A zqQBnbzvaLwiQ-4%47k9=3h1#t9-z)4NwZ8{%R|1pRz1TQS`0T-7GaaO#b|X5X^uf& z?^Rd!Jz9XqU^SRTaH{-s&+8=?1dU2yu%Rmo#^ty)pa_1Y{|y zcJEp5GMJt9!V|js^`21I6+-%A{a48)v*z$zw#2WLS3KsBTd`T)#xT{DohBJyZV1FT z$d?v(r<({3g?Dk@o{ob$_9^O}BL?bYm~RDQozl!+W< z?!aQHBE1DNm2aVZA!&+FBqg*)wE`boBU7RtSpgh+npimq=YqrYq}(BAt$fQ(ej|-^ zS3@g6W6BBV6t{we+66>0!jWMsy$!zQ?J+sP0#{XzRj?#jKfpL+mgZvqYn+@4-Igl% zZ@JN~kX!AYE$zX!%Ao{g+SrBZuPC)ha376P&6OB$-}2zE!M1&G zB7oq_73_}BNh^24**k$pGDh&!Y>=4%378Z#i5p2)s&5kMxxY1SD|uDh65#K zMnCX=5Z`!FomhYsdx!Ics$r%W4vu>-gLN_Lh2auVg2iZ}zDm@~4~qU25HHbL3|$*N zsIdfIxx)H^r)CxHd+=vrNT728mV{Ls(sa0%D=3VJs=8#V>JN&1oLk{B9H}1^Z$tsq zLg2NDuu#+q(*JjiBK+_o4Z2A{P@7j-IUJ(-Wnbk_-Eh%j`+d$!=bU`!lOGf{Xu9I# zU_MJXDbb`1rL5E^BL``|PT~eJY~ZNsMFviZcrG$%bPf1)`ottrsTSt&$ONym%a(bM z%yBC&lX&!&yb%WH`14}~J~)ZByW2nRe>C(lfz{J4gZC6gTxgR31)(rq;Z=by235*I zlPID=iUyTbO$5iY7>M{~F_1C=`qcm}-cT9) z4b11FLF^#4Ru$ZaCOC7V>20wz7J_w(nZVuXlmBwTQlhF(xP^l6_$rzFm-7YBqy+S9 zW<_7ukPjeGL=HcuKQYEmt z6DzTr%2l@Jbf)@PF+ReRPnNlI3#CHwF`s0UY$1XAt3tkb{So=(3Y0?be53=E$OT(< z&NCwQFh>!qDvz~(%v%$Z{Ui%CK32Q{9eKHSUjjdyogsy=e(PFHa?0h)n?|mI zPh&^=h!b~KatD9RyW5J}(wqNP>`KPl%RMG7a^a1JPR4Wsw?k_uJkSthpr7;fXz-yh zyA%&V;lC+k)_fY=C~i)AVzBwp$GU*uc>;g_Zq_5Y5(D05tAT9Fzr<&a4+$-&6BLoL? z7BC5ezNWM{|FzPVaum~-obd@_isK~YeCNLaY@-CH&8kw0^|LUwLjRD+8AEogweiQv4!lJY z=ChThX!3kz+dvb(spPu{6#-d-KN0 zk&-lwQo!kO^aDh63dW!C(yJ8X6lkZ_L`)Gh6^FxUdR_2tsHEWUU~p2HGLbUD1LT_& zU$*XrjNLGQY@e91ynYI=-nebY)I`G_rl(?J>nTJl2O~Z=`iTXrP*0)oWe52?JBRGZ zWlYNCL4U$ci&6+euirB;6qspnTs0QqAYuj`i6=g`s|E)g2#v_e1Jtw#ka6N#ev5d$ zn5NyboVt#bqrY}yQuK*gbBw1i=qJ8vD{}|5Mqb6*pq;NRPeDZn)>-Y;SiEg(`Y=6d)QSiqN@i5E{qOgoJ`a_o9j7bQsG(C)DHm%Owpfo1AQTo^#2I%*)^ISj#5lN?e! z0DKMt^_*W9ZJA3O_e9ptnqq$|TJmg_@^)190T!!PB7R?(quR>D(phSfxmAE@1r1Y7 z2o!GT2#>u4#aUo@+xHiI@@3d}U@eY%Xya9q7DsXJ=^5BTcaf>Z{j1l!AbSf>L`yVI zyUe@0NKT+mCh{U)oH<*r@HrIu;cXei2?DMm-hr2AU==t<9%IX4q{yU)nsQyBnX&1~bvF|UR&q^|yf65SspLD>nzpGMTrCG9o^5;iTkZ=!)F*ttRmH2d*-IG1?(ZRn z{hxNxHfwi2ZV!|qa7?1SLFRk#8UTBBYqinbM)FtZFt6z8w84aXgW(xM+Yl>}NDNn# zFeYp;G|N*zq;r*T$-B#Yj6uf7dcUy9^f}qgR=d{-g^hP~osz;v%sRnL)oCS-I`0AL zstZK7WQ5OhENQ&y9s9N*ou-YQChX5nb$h#h-}3onzekKl@*YS+$u~U?R02T;xr)!A zW7Pyg{(H}Trr%41y95K!YnLOAau|45O$h|SKs=Cib_5f8^#gbY^o)M?SWsIu4c)*;PjWh`tLQ z{_o~85rDjYL|F>};NN1@P=#`q`(AuXVucrhIe0mN;6=26fE-$>n=Lgkf&}+CIfQ9_ z(cJ6+1Zd>l>;NEL_iOHEhfgNm?EIqQX4~n1O52V3=rD{1Ol9j*%TIe7x`*s@YgO+CjN?`Nt@bEoZQ2Hz^15Zw2Mi#r~3kOi(Q+iIm<^d5&ZKB%*nH)APSUjQx zN_qME*IdnqDI6TX6-K29`$9I_;k5vc`y}hdd&y7ZT|S~Bz~F=I*+!dY#7f2w2SBhPJ_YU&sbLP4Sko0(Epm7=Ngtp2e z=U9sgMLTeRq(t$l#Gfx&C(;$m1wA6A4Og!hNj0(F%yrijjgvOeI0sGcFHg&fHQmjQ zdkihk(zkCpd2(r}B_Ruyvd_=GN3IAdkY^gGNDn{fC7%vG0ZMlM)`YE7tnyop;Jhk2 zfYV`AQA5%dHDmFc9PY)X0yWZ!wUcX6I8^r+7g@O8B0?ppyi}5xETYEAl!fN= zS_#EFm#AIWx+(3zk6}6m?a3)bjMTe9ag4UXCF_xb*Ih8GnW75(x7q722x`_$?_ROP zyfT_t)Qh={M@UuIygrkJiwIxmXc+G-C);|#3=Cuo0EJFsQ7R7vr3t1j?Wtb(X7@?l zXzcnl7b2H}DmQZ1XQ;1p2O3^iD=M2w^8%ZmcHOM|z<)<_0&0-3;BkipX)uBeY^re9 z=Nad|9Lr$o8zJS!5TnZB6?D$JxBM1xEUE&zYb}0AxPG4-=&Ph=eRe`h138LI1)5m! z^OCiq>Tw?Xu(xJkv7bOFDws}k-Z z-*88cZ~%{H7Y`}o2FO)+f7M6rg-N4QzsB+;G%<-qQU(VO5r(*@-ArHgoJIh%maW%0 zBsq*lQy60@=j|f8W{<}~2XNdmu*1)e`E(u5lSQp8?v^S8R!LyiIer>9?}In;Ya!_+ zsY|@6_CBS+eL|a94j_@i5ATAY$JvU=5d?-$tAz`3wRsC@ht*^z^WPW1x3^(w*}Pl;HG2u&ZuRDF5V*Eo=xBQOJS< zSq^YVimJCeKxi26UC0jy=Z7*k+xRQN*(a7xS%5gF3MS%QT&&29@AUGA0Q%lWt%*nj zn>1RnF{LmXFjkruIx(C zNK~o<0nOFun+sA$N;?!%$lTuqQcyEqTM}VKe^rzWVdd1IC_zvpueG9X&LK9>mE%=9 z0gT9rhM5336~BU95oAGe89?xZsX-juG?n${=#2V?3jk9r2~<)i*eBiQa@G3gg7znt z1zjlDXy7cooqDArOqnWhU{s2)c#%=$qQYw2f~ZC1<+z37(nYoSN;JrwJ~`D$1Dhfu zqk{C>0llXw##elxbwoA?Z#uQ7f?QyBPuL8pYEFM%m$E%8cj1}E_u?_WYH)IP3=;rY zN^E-&$8EpjJ+{nx6BGj4+x8-#RihA~M6?gI{~CnO(;1&F% zC3r$;oG9TfSq8@yr&;{Y>+t858_ZU7calSfOlftd%Uc!sPD&N^N0Kzg_&Urb@S3kzW*q~Ji-7v($mr%KN9Ja2iB|vv(nQJv z*%ODy7^vwWAQ&AA{TQZzz>vc&i4?$L>>7W?C1uND!#BH&S=Y9L_`D@6z@K`Eao5*d z=fmD?6xWd|`>WSE<|ArXt+RlG;F14}7yiU`HnX+b4sx8fA?XAz*^s84uDc`8J<3Y= zvg$V3)jT;#nHss}WMJ%99);mD=aSHw96A1Bue)G?GR!vL*{U~Cv$ED{$wiAq+dV$E zfzpoNGa~bBuaVp$vpUdIbURQA@Su<1dJZYWSPb)Fe~$^Zr5rep0tOl55{+TxlS5&r z4Ic;haDg-tmJQu zbZ3Q=NUT=9hHYx51h{enJ4^HYLjAD!ghsfX>gHxc%H_ZXWd|kY_uZ3|^V9Iwk?Ddb zm!33Tfc&Kwrl1ha5{au*-@8RR7WH6W?DXVJWeO;~z20O(jB4h2{0{ZYm0+b488!I1 zCv~6n-d^rKpd0G?#9CDmuo5171ecs?@N#mUAK zc+!V)5CT*d0YI;#)VTHD1P)XrM(FQhxDwi9;jp44au*557o)O=zQ zH_tHvs-#}x871V_V3*CHX`KY5r%-(Qq^D*9jJ4MtR4{ke>($$<3dV0B^xY2!gA;ni z7vNCVNDw`uAIdTgj=P7;mGvQ>D?yY3|2#s4wh{NcZlgEwVmbvfJPsHxmwK|87nQjx zx5w!ZC`?>C_g3aUUlR-whr!tybVc%f)^~k|fvp;b0KN8Ar7>^XsvbtMRrReu#^%k& z&+S1Beo}I9*5f-VF4N!j2?i*Xz{_9yT9rN&l@XrSBUrJDFsIdSJnkD&-}PxU+jqAi zoqQh)K54f0;rsznH%ZMkDm+eh!LpK&0XOi>Ae$H&#i!Bi%?pdo*n<&3?*d0D%3LBt z=!PPHZ%r3T2fR;k-R2@(k8hbL0Sn5ypY zdi6?#p|7roS6ub`^qcmaY0~%&><&Z^g0qzSkURiuL#71ffGpA1plOx^;>HV{ND0*a znQ+(yNLJ&ZRKfL60xCutsMWQ4mLl5?xR}uv z5#YK$msC=ib_YZpv~w)-Dtd=nAhWU$ObK#ox(^4#(xm%bYf3hO}U+ ziL#dn{Vn_unE1QKv@+Q-%^Wm}XMMlpf_xKxkZAcJ?5CWO^6Lhe}0&ri}@MgtHB z)(bidBaOYlNEd6YyvPfAt%@9Cwr1t*;(^6YLG?-zeke%@6Q@dcRB86ky6EPF3OVQx zNAV5L&vm|I9ijTe@pScR4CCu%32kk9jpkN z4shd;QDe@E1-rPHFx%n$IGW8*&N1jp<&^-`XFxkXD%RhuZ%JebDv_|YI}5y+jGu)f z>z=|T)gcqMZvJi17d^pKvMNc2T}W(HSBkOGupi$}9_-iWxb-QUv1Zto-QV282_g=_ ze)l+Z>8h1`tv!6*P3w|9i0^?u-dDMgnM?Me^PI9U$VUm3&Rr`!*%h8!40M~AGW>PF zq)RqoE46&C9!Yk|Qe-e(YRAfTVYTOD8sO_b?xSQigx@OcSBW(aPEM}Dm5ZjA6axP?*BK|(~W)fbA z1!Z2jA*Tv>jP3NnK;;14ze)hoV#hmREGNmrGa0xhlu4u-9f$?vnwAkO)5Db?(R7cp z05y0L`b@?oP;n=w!Sts@3oz^A{$w?_OgJ5N_&pGnHbpo>V#Sr=>Lu?*xa+jKK>-ny zNn{1^ftcUrRQQG0ofIL%9U|b%Fos7o4dY*UX0ZUbsg#(4@X+!xQvrK7UlFj8!W+wi z#xQ0GkT0c$r^kz+l@^!cd>Ju3ZzO^nMU@4CNIpUf5H>4 zWst*IigM6M7;*%K=(%#x9!V+#y_M~tZ4t&sNXHZrM^5S-*}!AHe~MVoKa;9XrH57j zN?8tR5}fe7F;-3zZBB66e!@prrMRaH1k#kQP)eDJ6=to`Xxa)+A(5b~2{f_7BAZJ6 zvJ7SP$nf&V2N*fauT^4^adk#Sly{3pwMpPIb;j&NdREj!+aPd zC6SMl_V@hl7I*FWNO>dXHk&8!Hc+Nkn2?0`qVYZlo&(1Gh;GlP*iHjlAbdpcAu_qX$xw|{ShIprp_|7u(P;qU4ge1Q< z+)unyo%3?j)nSM^V0!IEY}l+l5M*vu&_-T(*7=)WE16$ZPg%S&O@c@;F&U5~EsEj} zrsxzY5Vz;tOn`dqyZZZnR~KQ~u5*^*<#%9 z<+H?vSILnefiZdB`JHlae}BOmP7Li5=)QvxAJ7FD9{{3Be1KuQ@>s<8y{oirnXF}n zX%zWM&-#)WL5@;4m~c)RJl%_uNa6$KBr1&$e1Fyw(`A@P%7|XSj56iW7tJ=$LoY-g zB=DfXC&@EC@Q_mHgFfCVzmx_Y(oEDoD^4WI2m`ecZ}{L6laiA})>uOr%@XufC?Ua- zmOz=YI!Hw(2{42gGb1TwIuy#{(Px7E03B;|E*HWJA6&4gb^NMR zIhR0OETLiuAxuHC5I~p&`HQlRH+AC^9=>e67&<5cTDJ3M*!e^RC4qU#)_)OimCfzW z?QAP+BKE3NU&ZER{LzLm1n0`+E?mOQwqh-dzJAo-k!Vi>#BF6+1G@ngi2FtR92J5* zE9B5YddVVlU)f8jGm}L1#2lvYf{C+yuC{-`I?^RUrp zm~_9F0cV3DrBb|*kUWi0J!@EiD&9dgEqE?L+gfj@LiaW!ndu}oceN(6k}NjQTA_JC zZDEa+^Wg+x2pOD()K5g!i&h;NZ3<1Thtd=&^)DUt^wC+Xf%30|XPpIwXy2n=77if% zRwj<28RPO^r|1AkGSrsX)rhkNk;5Dr7)L&P4DKd&6cY6qccbu`PwvO#{jAq;0DMi# z6N4kwvY-rE2Lva6$cf@1w@|GjFYwwl0?z4*1rDEGvbqz8i8*(xS>41sU`$YDC2YvP z?I8t|ggZVPdC-vLrA^N<<-urDUk^VsK@3#$wM|fU-CDbir%G|lVO~}I6J>)iU25RS_?glwL4lBk>1TlsG*_4CBv7{ck z82u{Nnl=wd)Qxy)xxzGu{Ig!H?Mhr8f0wG8TR<@H1 zdM~4|r7wBwP&uD6smJpjS5|21;ACi`q&gCsh$Y6k`f(^C@UAkko|_BUXFWqz3Op#J zcPc5sxn&Dzm-F;Ro}LslwGhP!(I8IF_7?_&k|!}KY>x2L-jsmI6UqXRdtt3R?L{&x zQIy?FjfETqYr`ribssp4r)I3;2M;0e{hrV^o?1ll@uJISWj(b}1SA6~Qe&tLkPwjG{NIdg>umQ(i^WC!<3@%m zWcd$h#DU%S-;+pk4HF~LLV_XLNItEgTp1_H>WQpYV>FaXOAelrkwW7j}DmM3XuN`nK0Sxy8~UFoy^m z64>-<6v1*w`G)iSo+RcPHWeYw{uXFJNGm({G3tMtXS^fkK^lBUp%y(u7z-RG81Dg8 z!9m-Pk_|7uPT?VOjH0GyMM=C0*GmfLu+80Wcnzt-vrOig-j%sQM23^=!TLK*RE*xu z&@Bg}4E=JLCAxwEc4qBMKENA0$sR}o41#F{aUTy+-8(*7CPu%8KmV6n^it^ctQCSC z@{}bH#9EO9@KfwT8|zs?$cg>SbfItH&tGxsg+p(k&{9z+#=+iV$w&_9Bi3)B%5N+U z`(Qb~Pxk1jcN|Ob?#fK%61c?Gj9v0CWB^yg={_R#!6-M>muaLD!{4Fh=8#%d4Ad1A zL*{1!Ibez_JXFj%Ei-_i%KCNYvm93YUV}BRS#Hnb>wt+0dnN(MKqviud4KF+&|9YR z{J{j-XActWI2owy%zk%0 zftR9CO3`aYNg5xfq14HSiW0-#`>e>Kr_Hf~mmt)(wqDQ=ndG45q?uBJkWh3e6b{h^ zT(8WKpNJJhJF))||KcL`Q2cFTrzUfYuA#&Qr13<(j1yc%p#quB7s)f_4`t*=>Gu{l z3H7&xpii9_K}bJd5d;D+p-3Xck>glWg4>c=)}{Sk`8X*D=r76fx}ZZA7HoErn^b_4WexV{1K@8oHY9Em`vwU?C3sNa;r z_9gB@ZApNeCJOM79X^a@QbmSGMVBkvB%Cxr0tTj&v45G}6wmm3#81sRryA{Qo7)Yv zJK>O56#=S8Ab{YCxErW@C6~6>3oICd zLP)rr=u>P#>F1_m?vAw zt}bqQCSoEK{A1Utw#c+5X+@J5Ybca9$;6vuPbl&&YO<6vNY3Pl@k#x>qNM-7lJfB+z=jkoS3>=s_TM3LH2E-ecTZh+oQLKVPD`f(H!h=7mq1EWR(ZIWYQPGW^zM7 ztSL3}9a)v1(RIWcCKex&?rRb#e(X^Y47Zc~Jp3A>C5Qwc1u`d48CJ<7J3>RW#Udsqv3zpQ zIA9yyoSoZ9DV2nZ5IBV)i+N@b`!KKBCM!*{$FTf4;5nA!eNsZ*M6Ojug{;M%#IeJ+ z$Wmga!!qw7rdNzVk?^B#()sd9340Ts&wZs7!q7$5|9bZcDwD1}pNhgmm z;Xd`VK}L3P%+<|rkM>kCQs`&@Nr{^~Cb$Feii%D^RAC9yMs_zI_tP_(`K0rt?1#;y zt=b1ks48M>YcEn|flh6cIPuDQT~th$39o9% zW|HFC+)m2&fO823LHQ=0a9bWT1Nkr`7hWu92F7zHvo z@+ysNA*XJ0q%Nr2yB>wTm(@|=n~8x6WH5OOwY$P}&5Mu1lze6dhsuDSR3q~&UfS-g z)NYG(<3Ga)tI&sr?@0{FiJY8MSH!d)ZngZVsxL~FodT@a+HHt9HAaLfX`~b;9{`g_ zXD)>+6?Y2Pro!a`Zz`XXx|WH>btF+yoed`keF&{0`R;ThA;Z%Py9q-P3XX#-fOQ%u&av6D5E(uIW*)#0E6;2fCtkZ#d_*5 z&Q}0US8`Jju38g{95pW((2OT2W!82$kfH7$uTUaAgucTlR$uf`7LL+kZETD0ZeQcQ zQW^6^L-jO_mPjDXGS*ha2G%Ku1h?$!#=Z>;V1QUD&BZckG6P6JRNpy#BusAb-@JZs*5~WH3 zwD8Q?DnAy!z{>T(K+1xscO3T$!lKN}(PRA&8eIe-i2ztin9%ng{D^E&*%+X_ - - - - - - inline void _setProp(CCDBSynchronised &db, - ICDBStructNode *node, TCharConnectionState value, bool - forceSending = false) { db.x_setProp(node, uint64(value), - forceSending); } inline void _getProp(const CCDBSynchronised - &db, ICDBStructNode *node, TCharConnectionState - &value) { value = - (TCharConnectionState)db.x_getProp(node); } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/ryzom/common/data_common/landscape_col_prim_pacs_list.txt b/code/ryzom/common/data_common/landscape_col_prim_pacs_list.txt deleted file mode 100644 index a1e4fb801..000000000 --- a/code/ryzom/common/data_common/landscape_col_prim_pacs_list.txt +++ /dev/null @@ -1,493 +0,0 @@ -FY_S1_baobab_A.pacs_prim -FY_S1_baobab_B.pacs_prim -FY_S1_baobab_C.pacs_prim -FY_S1_burnedtree_A.pacs_prim -FY_S1_burnedtree_B.pacs_prim -FY_S2_coconuts_A.pacs_prim -FY_S2_coconuts_B.pacs_prim -FY_S2_palmtree_A.pacs_prim -FY_S2_palmtree_B.pacs_prim -FY_S2_palmtree_C.pacs_prim -FY_S2_palmtree_D.pacs_prim -FY_S2_palmtree_E.pacs_prim -FY_S3_Termitiere_A.pacs_prim -FY_S3_Termitiere_B.pacs_prim -FY_S3_Termitiere_C.pacs_prim -FY_S3_Termitiere_D.pacs_prim -fy_acc_asc_appart_joueur.pacs_prim -fy_acc_asc_hall_conseil.pacs_prim -fy_acc_asc_hall_vitrine_hall_reunion_rdc_1.pacs_prim -fy_acc_asc_hall_vitrine_hall_reunion_rdc_2.pacs_prim -fy_acc_asc_hall_vitrine_hall_reunion_ss_1.pacs_prim -fy_acc_asc_hall_vitrine_hall_reunion_ss_2.pacs_prim -fy_acc_asc_hall_vitrine_hall_reunion_ss_3.pacs_prim -fy_acc_asc_hall_vitrine_hall_reunion_ss_4.pacs_prim -fy_acc_asc_oasis_1er.pacs_prim -fy_acc_asc_oasis_rdc.pacs_prim -fy_acc_asc_salle_npc.pacs_prim -fy_acc_ascenseur_01_city.pacs_prim -fy_acc_ascenseur_01_war.pacs_prim -fy_acc_ascenseur_02_city.pacs_prim -fy_acc_ascenseur_02_war.pacs_prim -fy_acc_ascenseur_03_city.pacs_prim -fy_acc_ascenseur_04_city.pacs_prim -fy_acc_ascenseur_05_city.pacs_prim -fy_acc_ascenseur_06_city.pacs_prim -fy_acc_ascenseur_07_city.pacs_prim -fy_acc_ascenseur_08_city.pacs_prim -fy_acc_ascenseur_09_city.pacs_prim -fy_acc_ascenseur_10_city.pacs_prim -fy_acc_ascenseur_11_city.pacs_prim -fy_acc_ascenseur_12_city.pacs_prim -fy_asc_151_dy.pacs_prim -fy_asc_161_dy.pacs_prim -fy_asc_164_eg.pacs_prim -fy_asc_168_ew.pacs_prim -fy_asc_1porte.pacs_prim -fy_asc_fortress_1er.pacs_prim -fy_asc_fortress_rdc.pacs_prim -fy_asc_village_nb01.pacs_prim -fy_asc_village_nb02.pacs_prim -fy_asc_village_nb03.pacs_prim -fy_asc_village_nb04.pacs_prim -fy_asc_village_nb05.pacs_prim -fy_bt_sheriff_ok_ascen_1er.pacs_prim -fy_bt_sheriff_ok_ascen_rdc.pacs_prim -fy_bt_sheriff_ok_elevator_armurie_1er.pacs_prim -fy_bt_sheriff_ok_elevator_armurie_rdc.pacs_prim -fy_ecorce_collision.pacs_prim -fy_s1_burnedtree_c.pacs_prim -fy_s1_burnedtree_d.pacs_prim -fy_s1_burnedtree_growth_a.pacs_prim -fy_s1_burnedtree_growth_b.pacs_prim -fy_s2_lovejail_a.pacs_prim -fy_s2_lovejail_b.pacs_prim -fy_s2_lovejail_c.pacs_prim -fy_s2_papaleaf_a.pacs_prim -fy_s2_papaleaf_b.pacs_prim -fy_s2_savantree_a.pacs_prim -fy_s2_savantree_b.pacs_prim -fy_s2_savantree_c.pacs_prim -fy_s2_savantree_d.pacs_prim -fy_smoke_elevateur_1er.pacs_prim -fy_smoke_elevateur_rdc.pacs_prim -FO_S1_giant_tree.pacs_prim -FO_S1_giant_trunk.pacs_prim -FO_S2_arbragrelot.pacs_prim -FO_S2_big_tree.pacs_prim -FO_S2_bigroot_A.pacs_prim -FO_S2_bigroot_B.pacs_prim -FO_S2_bigroot_C.pacs_prim -FO_S2_birch.pacs_prim -FO_S2_spiketree.pacs_prim -FO_S3_birch.pacs_prim -FO_S3_buissonaepine.pacs_prim -FO_S3_champignou_A.pacs_prim -FO_S3_champignou_B.pacs_prim -FO_S3_fougere.pacs_prim -JU_S1_bamboo.pacs_prim -JU_S1_canopy_tree.pacs_prim -JU_S2_big_tree.pacs_prim -JU_S2_young_tree.pacs_prim -JU_S3_Banana_tree.pacs_prim -JU_S3_Bush_tree.pacs_prim -JU_S3_bamboo.pacs_prim -JU_S3_dead_tree.pacs_prim -JU_S3_fantree.pacs_prim -JU_S3_plante.pacs_prim -JU_S3_plantegrasse.pacs_prim -JU_S3_tree.pacs_prim -Ma_barriere_A_02.pacs_prim -Ma_barriere_B_02.pacs_prim -fo_s1_arbragrelot.pacs_prim -gen_bt_col_ext.pacs_prim -ma_asc_17_portal_trykers.pacs_prim -ma_asc_3portes.pacs_prim -ma_asc_3portes_bourgeons.pacs_prim -ma_asc_6_portal_prime_racine.pacs_prim -ma_asc_appart_joueur.pacs_prim -ma_asc_hall_du_conseil.pacs_prim -ma_asc_hall_vitrine_hall_reunion_1ss_d.pacs_prim -ma_asc_hall_vitrine_hall_reunion_1ss_g.pacs_prim -ma_asc_hall_vitrine_hall_reunion_rdc_d.pacs_prim -ma_asc_hall_vitrine_hall_reunion_rdc_g.pacs_prim -ma_asc_hall_vitrine_hall_reunion_ss_d.pacs_prim -ma_asc_hall_vitrine_hall_reunion_ss_g.pacs_prim -ma_asc_nb_01_a.pacs_prim -ma_asc_nb_01_b.pacs_prim -ma_asc_nb_01_c.pacs_prim -ma_asc_nb_02_a.pacs_prim -ma_asc_nb_02_b.pacs_prim -ma_asc_nb_02_c.pacs_prim -ma_asc_nb_03_a.pacs_prim -ma_asc_nb_03_b.pacs_prim -ma_asc_nb_03_c.pacs_prim -ma_asc_nb_04_a.pacs_prim -ma_asc_nb_04_b.pacs_prim -ma_asc_nb_04_c.pacs_prim -ma_asc_nb_05_a.pacs_prim -ma_asc_nb_05_b.pacs_prim -ma_asc_nb_05_c.pacs_prim -ma_asc_plateau-frontiere-2.pacs_prim -ma_asc_salle_npc.pacs_prim -ma_asc_village_a_bar_ext_1.pacs_prim -ma_asc_village_a_bar_ext_2.pacs_prim -ma_asc_village_a_bar_int_1.pacs_prim -ma_asc_village_a_bar_int_2.pacs_prim -ma_asc_village_a_imm1_a.pacs_prim -ma_asc_village_a_imm1_b.pacs_prim -ma_asc_village_a_imm1_c.pacs_prim -ma_asc_village_a_imm2_a.pacs_prim -ma_asc_village_a_imm2_b.pacs_prim -ma_asc_village_a_imm2_c.pacs_prim -ma_asc_village_a_imm3_a.pacs_prim -ma_asc_village_a_imm3_b.pacs_prim -ma_asc_village_a_imm3_c.pacs_prim -ma_asc_village_a_imm4_a.pacs_prim -ma_asc_village_a_imm4_b.pacs_prim -ma_asc_village_a_imm4_c.pacs_prim -ma_asc_village_a_mairie_1er.pacs_prim -ma_asc_village_a_mairie_rdc.pacs_prim -ma_asc_village_a_serre_1.pacs_prim -ma_asc_village_a_serre_2.pacs_prim -ma_asc_village_a_serre_npc1.pacs_prim -ma_asc_village_a_serre_npc2.pacs_prim -ma_asc_village_b_bar_ext_1.pacs_prim -ma_asc_village_b_bar_ext_2.pacs_prim -ma_asc_village_b_bar_int_1.pacs_prim -ma_asc_village_b_bar_int_2.pacs_prim -ma_asc_village_b_imm1_a.pacs_prim -ma_asc_village_b_imm1_b.pacs_prim -ma_asc_village_b_imm1_c.pacs_prim -ma_asc_village_b_imm2_a.pacs_prim -ma_asc_village_b_imm2_b.pacs_prim -ma_asc_village_b_imm2_c.pacs_prim -ma_asc_village_b_mairie_1er.pacs_prim -ma_asc_village_b_mairie_rdc.pacs_prim -ma_asc_village_c_bar_ext_1.pacs_prim -ma_asc_village_c_bar_ext_2.pacs_prim -ma_asc_village_c_bar_int_1.pacs_prim -ma_asc_village_c_bar_int_2.pacs_prim -ma_asc_village_c_imm1_a.pacs_prim -ma_asc_village_c_imm1_b.pacs_prim -ma_asc_village_c_imm1_c.pacs_prim -ma_asc_village_c_imm2_a.pacs_prim -ma_asc_village_c_imm2_b.pacs_prim -ma_asc_village_c_imm2_c.pacs_prim -ma_asc_village_c_mairie_1er.pacs_prim -ma_asc_village_c_mairie_rdc.pacs_prim -ma_asc_village_d_bar_ext_1.pacs_prim -ma_asc_village_d_bar_ext_2.pacs_prim -ma_asc_village_d_bar_int_1.pacs_prim -ma_asc_village_d_bar_int_2.pacs_prim -ma_asc_village_d_imm1_a.pacs_prim -ma_asc_village_d_imm1_b.pacs_prim -ma_asc_village_d_imm1_c.pacs_prim -ma_asc_village_d_imm2_a.pacs_prim -ma_asc_village_d_imm2_b.pacs_prim -ma_asc_village_d_imm2_c.pacs_prim -ma_asc_village_d_mairie_1er.pacs_prim -ma_asc_village_d_mairie_rdc.pacs_prim -ma_lampadaire_blue.pacs_prim -ma_lampadaire_red.pacs_prim -ma_lampadaire_white.pacs_prim -ma_lampadaire_yellow.pacs_prim -ma_milestone.pacs_prim -ma_paneau_armure.pacs_prim -ma_paneau_melee.pacs_prim -ma_paneau_object.pacs_prim -ma_paneau_range.pacs_prim -ma_paneau_tool.pacs_prim -nx_asc_40_cg.pacs_prim -nx_asc_44_by.pacs_prim -nx_asc_51_cd.pacs_prim -zo_acc_asc-01_hall_reunion.pacs_prim -zo_acc_asc-02_hall_reunion.pacs_prim -zo_acc_asc-03_hall_reunion.pacs_prim -zo_acc_asc-04_hall_reunion.pacs_prim -zo_acc_asc-05_hall_reunion.pacs_prim -zo_acc_asc-06_hall_reunion.pacs_prim -zo_acc_asc_appart_joueur.pacs_prim -zo_acc_asc_hall_du_conseil.pacs_prim -zo_acc_asc_salle_npc.pacs_prim -zo_acc_rdc_mairie_village_c.pacs_prim -zo_acc_ss_mairie_village_c.pacs_prim -zo_acc_village_a_imm1_a.pacs_prim -zo_acc_village_a_imm1_b.pacs_prim -zo_acc_village_a_imm1_c.pacs_prim -zo_acc_village_a_imm2_a.pacs_prim -zo_acc_village_a_imm2_b.pacs_prim -zo_acc_village_a_imm2_c.pacs_prim -zo_acc_village_a_imm3_a.pacs_prim -zo_acc_village_a_imm3_b.pacs_prim -zo_acc_village_a_imm3_c.pacs_prim -zo_acc_village_a_imm4_a.pacs_prim -zo_acc_village_a_imm4_b.pacs_prim -zo_acc_village_a_imm4_c.pacs_prim -zo_acc_village_b_imm1_a.pacs_prim -zo_acc_village_b_imm1_b.pacs_prim -zo_acc_village_b_imm1_c.pacs_prim -zo_acc_village_b_imm2_a.pacs_prim -zo_acc_village_b_imm2_b.pacs_prim -zo_acc_village_b_imm2_c.pacs_prim -zo_acc_village_c_imm1_a.pacs_prim -zo_acc_village_c_imm1_b.pacs_prim -zo_acc_village_c_imm1_c.pacs_prim -zo_acc_village_c_imm2_a.pacs_prim -zo_acc_village_c_imm2_b.pacs_prim -zo_acc_village_c_imm2_c.pacs_prim -zo_acc_village_d_imm1_a.pacs_prim -zo_acc_village_d_imm1_b.pacs_prim -zo_acc_village_d_imm1_c.pacs_prim -zo_acc_village_d_imm2_a.pacs_prim -zo_acc_village_d_imm2_b.pacs_prim -zo_acc_village_d_imm2_c.pacs_prim -zo_asc_13_cp.pacs_prim -zo_asc_15_by.pacs_prim -zo_asc_29_cq.pacs_prim -zo_asc_2portes.pacs_prim -zo_asc_nb_01_a.pacs_prim -zo_asc_nb_01_b.pacs_prim -zo_asc_nb_01_c.pacs_prim -zo_asc_nb_02_a.pacs_prim -zo_asc_nb_02_b.pacs_prim -zo_asc_nb_02_c.pacs_prim -zo_asc_nb_03_a.pacs_prim -zo_asc_nb_03_b.pacs_prim -zo_asc_nb_03_c.pacs_prim -zo_asc_nb_04_a.pacs_prim -zo_asc_nb_04_b.pacs_prim -zo_asc_nb_04_c.pacs_prim -zo_asc_nb_05_a.pacs_prim -zo_asc_nb_05_b.pacs_prim -zo_asc_nb_05_c.pacs_prim -zo_asc_plateau-frontiere-13_br.pacs_prim -zo_asc_village_a_rdc.pacs_prim -zo_asc_village_a_ss.pacs_prim -zo_asc_village_b_rdc.pacs_prim -zo_asc_village_b_ss.pacs_prim -zo_asc_village_d_rdc.pacs_prim -zo_asc_village_d_ss.pacs_prim -zo_lampadaire_black.pacs_prim -zo_lampadaire_blue.pacs_prim -zo_lampadaire_green.pacs_prim -zo_lampadaire_yellow.pacs_prim -zo_paneau_armure.pacs_prim -zo_paneau_melee.pacs_prim -zo_paneau_object.pacs_prim -zo_paneau_range.pacs_prim -zo_paneau_tool.pacs_prim -tr_asc_186_ep.pacs_prim -tr_asc_187_ea.pacs_prim -tr_asc_188_ed.pacs_prim -tr_asc_192_ea.pacs_prim -tr_asc_193_ec.pacs_prim -tr_asc_194_dy.pacs_prim -tr_asc_194_el.pacs_prim -tr_asc_194_eo.pacs_prim -tr_asc_196_ea.pacs_prim -tr_asc_197_ds.pacs_prim -tr_asc_198_dq.pacs_prim -tr_asc_1porte.pacs_prim -tr_asc_201_dq.pacs_prim -tr_asc_201_dt.pacs_prim -tr_asc_203_di.pacs_prim -tr_asc_208_dl.pacs_prim -tr_asc_208_ek.pacs_prim -tr_asc_210_el.pacs_prim -tr_asc_212_dm.pacs_prim -tr_asc_214_dw.pacs_prim -tr_asc_214_ea.pacs_prim -tr_asc_215_du.pacs_prim -tr_asc_217_ec.pacs_prim -tr_asc_appart_joueur.pacs_prim -tr_asc_hall_conseil.pacs_prim -tr_asc_hall_vitrine_hall_reunion_rdc_1.pacs_prim -tr_asc_hall_vitrine_hall_reunion_rdc_2.pacs_prim -tr_asc_hall_vitrine_hall_reunion_ss_1.pacs_prim -tr_asc_hall_vitrine_hall_reunion_ss_2.pacs_prim -tr_asc_hall_vitrine_hall_reunion_ss_3.pacs_prim -tr_asc_salle_npc.pacs_prim -tr_asc_saucisse_fond_ilot_4_a.pacs_prim -tr_asc_saucisse_fond_ilot_4_b.pacs_prim -tr_asc_saucisse_fond_ilot_4_c.pacs_prim -tr_asc_saucisse_fond_ilot_4_d.pacs_prim -tr_asc_saucisse_fond_ilot_4_e.pacs_prim -tr_asc_saucisse_fond_ilot_4_f.pacs_prim -tr_asc_saucisse_village_nb01_a.pacs_prim -tr_asc_saucisse_village_nb01_b.pacs_prim -tr_asc_saucisse_village_nb01_c.pacs_prim -tr_asc_saucisse_village_nb01_d.pacs_prim -tr_asc_saucisse_village_nb01_e.pacs_prim -tr_asc_saucisse_village_nb01_f.pacs_prim -tr_asc_saucisse_village_nb02_a.pacs_prim -tr_asc_saucisse_village_nb02_b.pacs_prim -tr_asc_saucisse_village_nb02_c.pacs_prim -tr_asc_saucisse_village_nb02_d.pacs_prim -tr_asc_saucisse_village_nb02_e.pacs_prim -tr_asc_saucisse_village_nb02_f.pacs_prim -tr_asc_saucisse_village_nb03_a.pacs_prim -tr_asc_saucisse_village_nb03_b.pacs_prim -tr_asc_saucisse_village_nb03_c.pacs_prim -tr_asc_saucisse_village_nb03_d.pacs_prim -tr_asc_saucisse_village_nb03_e.pacs_prim -tr_asc_saucisse_village_nb03_f.pacs_prim -tr_asc_saucisse_village_nb04_a.pacs_prim -tr_asc_saucisse_village_nb04_b.pacs_prim -tr_asc_saucisse_village_nb04_c.pacs_prim -tr_asc_saucisse_village_nb04_d.pacs_prim -tr_asc_saucisse_village_nb04_e.pacs_prim -tr_asc_saucisse_village_nb04_f.pacs_prim -tr_asc_saucisse_village_nb05_a.pacs_prim -tr_asc_saucisse_village_nb05_b.pacs_prim -tr_asc_saucisse_village_nb05_c.pacs_prim -tr_asc_saucisse_village_nb05_d.pacs_prim -tr_asc_saucisse_village_nb05_e.pacs_prim -tr_asc_saucisse_village_nb05_f.pacs_prim -tr_mairie_asc_00_village_a.pacs_prim -tr_mairie_asc_01_village_a.pacs_prim -tr_mairie_asc_01_village_b.pacs_prim -tr_mairie_asc_01_village_d.pacs_prim -tr_mairie_asc_02_village_a.pacs_prim -tr_mairie_asc_02_village_b.pacs_prim -tr_mairie_asc_02_village_d.pacs_prim -tr_mairie_asc_03_village_a.pacs_prim -tr_mairie_asc_03_village_b.pacs_prim -tr_mairie_asc_03_village_d.pacs_prim -tr_mairie_asc_04_village_a.pacs_prim -tr_mairie_asc_04_village_b.pacs_prim -tr_mairie_asc_04_village_d.pacs_prim -tr_mairie_asc_05_village_a.pacs_prim -tr_mairie_asc_05_village_b.pacs_prim -tr_mairie_asc_05_village_d.pacs_prim -tr_mairie_asc_06_village_a.pacs_prim -tr_mairie_asc_06_village_b.pacs_prim -tr_mairie_asc_06_village_d.pacs_prim -tr_mairie_asc_07_village_a.pacs_prim -tr_mairie_asc_07_village_b.pacs_prim -tr_mairie_asc_07_village_d.pacs_prim -tr_mairie_asc_08_village_b.pacs_prim -tr_mairie_asc_08_village_d.pacs_prim -tr_mairie_ascr_01_village_c.pacs_prim -tr_mairie_ascr_02_village_c.pacs_prim -tr_mairie_ascr_03_village_c.pacs_prim -tr_mairie_ascr_04_village_c.pacs_prim -tr_mairie_ascr_05_village_c.pacs_prim -tr_mairie_ascr_06_village_c.pacs_prim -tr_mairie_ascr_07_village_c.pacs_prim -tr_mairie_ascr_08_village_c.pacs_prim -tr_s1_bambo_a.pacs_prim -tr_s1_bamboo_a.pacs_prim -tr_s2_bamboo_a.pacs_prim -tr_s2_champiflot_a.pacs_prim -tr_s2_lokness_a.pacs_prim -tr_s2_lokness_b.pacs_prim -tr_s2_lokness_c.pacs_prim -tr_s2_mangrove_a.pacs_prim -tr_s2_mangrove_b.pacs_prim -tr_s2_nenufly_a.pacs_prim -tr_s2_palmtree_a.pacs_prim -tr_s2_palmtree_b.pacs_prim -tr_s2_palmtree_c.pacs_prim -tr_s2_palmtree_d.pacs_prim -tr_s2_palmtree_e.pacs_prim -tr_s2_palmtree_f.pacs_prim -tr_s2_sailtree_a.pacs_prim -tr_s2_wigweed_a.pacs_prim -tr_s3_aquabole_a.pacs_prim -tr_s3_aquabole_b.pacs_prim -tr_s3_nenufly_b.pacs_prim -tr_saucisse_asc01_01_village_a.pacs_prim -tr_saucisse_asc01_01_village_d.pacs_prim -tr_saucisse_asc01_02_village_a.pacs_prim -tr_saucisse_asc01_02_village_d.pacs_prim -tr_saucisse_asc01_03_village_a.pacs_prim -tr_saucisse_asc01_04_village_a.pacs_prim -tr_saucisse_asc01_village_a.pacs_prim -tr_saucisse_asc01_village_b.pacs_prim -tr_saucisse_asc02_01_village_d.pacs_prim -tr_saucisse_asc02_02_village_a.pacs_prim -tr_saucisse_asc02_02_village_d.pacs_prim -tr_saucisse_asc02_03_village_a.pacs_prim -tr_saucisse_asc02_04_village_a.pacs_prim -tr_saucisse_asc02_village_a.pacs_prim -tr_saucisse_asc02_village_b.pacs_prim -tr_saucisse_asc03_01_village_d.pacs_prim -tr_saucisse_asc03_02_village_a.pacs_prim -tr_saucisse_asc03_02_village_d.pacs_prim -tr_saucisse_asc03_03_village_a.pacs_prim -tr_saucisse_asc03_04_village_a.pacs_prim -tr_saucisse_asc03_village_a.pacs_prim -tr_saucisse_asc03_village_b.pacs_prim -tr_saucisse_asc04_01_village_d.pacs_prim -tr_saucisse_asc04_02_village_a.pacs_prim -tr_saucisse_asc04_02_village_d.pacs_prim -tr_saucisse_asc04_03_village_a.pacs_prim -tr_saucisse_asc04_04_village_a.pacs_prim -tr_saucisse_asc04_village_a.pacs_prim -tr_saucisse_asc04_village_b.pacs_prim -tr_saucisse_asc05_01_village_d.pacs_prim -tr_saucisse_asc05_02_village_a.pacs_prim -tr_saucisse_asc05_02_village_d.pacs_prim -tr_saucisse_asc05_03_village_a.pacs_prim -tr_saucisse_asc05_04_village_a.pacs_prim -tr_saucisse_asc05_village_a.pacs_prim -tr_saucisse_asc05_village_b.pacs_prim -tr_saucisse_asc06_01_village_d.pacs_prim -tr_saucisse_asc06_02_village_a.pacs_prim -tr_saucisse_asc06_02_village_d.pacs_prim -tr_saucisse_asc06_03_village_a.pacs_prim -tr_saucisse_asc06_04_village_a.pacs_prim -tr_saucisse_asc06_village_b.pacs_prim -tr_saucisse_asc_01_app_02_village_c.pacs_prim -tr_saucisse_asc_02_app_02_village_c.pacs_prim -tr_saucisse_asc_03_app_02_village_c.pacs_prim -tr_saucisse_asc_04_app_02_village_c.pacs_prim -tr_saucisse_asc_05_app_02_village_c.pacs_prim -tr_saucisse_asc_06_app_02_village_c.pacs_prim -tr_saucisse_asr01_02_village_b.pacs_prim -tr_saucisse_asr02_02_village_b.pacs_prim -tr_saucisse_asr03_02_village_b.pacs_prim -tr_saucisse_asr04_02_village_b.pacs_prim -tr_saucisse_asr05_02_village_b.pacs_prim -tr_saucisse_asr06_02_village_b.pacs_prim -tr_saucisse_asr_01_app_01_village_c.pacs_prim -tr_saucisse_asr_02_app_01_village_c.pacs_prim -tr_saucisse_asr_03_app_01_village_c.pacs_prim -tr_saucisse_asr_04_app_01_village_c.pacs_prim -tr_saucisse_asr_05_app_01_village_c.pacs_prim -tr_saucisse_asr_06_app_01_village_c.pacs_prim -PR_S1_rotaflore_A.pacs_prim -PR_S1_rotaflore_B.pacs_prim -PR_S1_rotaflore_C.pacs_prim -PR_S2_Mycotree_A.pacs_prim -PR_S2_Mycotree_B.pacs_prim -PR_S2_Toopetz_A.pacs_prim -PR_S2_Toopetz_B.pacs_prim -PR_S2_Toopetz_C.pacs_prim -PR_S3_cokamool_A.pacs_prim -PR_S3_cokamool_B.pacs_prim -PR_S3_cokamool_C.pacs_prim -PR_S3_ploomweed_A.pacs_prim -PR_S3_ploomweed_B.pacs_prim -pr_asc_104_bi.pacs_prim -pr_asc_105_bs.pacs_prim -pr_asc_61_bj.pacs_prim -pr_asc_62_ai.pacs_prim -pr_asc_62_av.pacs_prim -pr_asc_70_ae.pacs_prim -pr_asc_71_au.pacs_prim -pr_asc_77_bp.pacs_prim -pr_asc_89_ar.pacs_prim -pr_asc_91_ad.pacs_prim -pr_s1_lumiseed_a.pacs_prim -pr_s1_lumiseed_b.pacs_prim -pr_s1_lumiseed_c.pacs_prim -pr_s1_lumiseed_d.pacs_prim -pr_s3_amoeba_a.pacs_prim -pr_s3_amoeba_b.pacs_prim -pr_s3_amoeba_c.pacs_prim -pr_s3_small_lumiseed_a.pacs_prim -pr_s3_small_lumiseed_b.pacs_prim -ma_asc_to_kitiniere.pacs_prim -pr_asc_kitiniere.pacs_prim diff --git a/code/ryzom/common/data_common/msg.xml b/code/ryzom/common/data_common/msg.xml deleted file mode 100644 index 7b30729f8..000000000 --- a/code/ryzom/common/data_common/msg.xml +++ /dev/null @@ -1,1165 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/ryzom/common/data_common/r2/IslandScreenshots.cfg b/code/ryzom/common/data_common/r2/IslandScreenshots.cfg deleted file mode 100644 index a2360f996..000000000 --- a/code/ryzom/common/data_common/r2/IslandScreenshots.cfg +++ /dev/null @@ -1,27 +0,0 @@ -SearchPaths = -{ - "r:/code/ryzom/data_common/r2", // entry points file - "R:/code/ryzom/data_shard/collisions", - "F:/r2 daily", -}; - -Continents = {"r2_jungle", "r2_forest", "r2_lakes", "r2_desert","r2_roots"}; - -SeasonSuffixes = { "_sp"}; //{ "_sp", "_su", "_au", "_wi" }; - -MeterPixelSize = 2; - -OutDir = "F:/perso/code/HelloWorld/Affichage/Final"; - -CompleteIslandsFile= "r2_islands.xml"; - -EntryPointsFile= "r2_entry_points.txt"; - -Vegetation = true; - -InverseZTest = true; - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_actions.lua b/code/ryzom/common/data_common/r2/r2_actions.lua deleted file mode 100644 index 8a7222e18..000000000 --- a/code/ryzom/common/data_common/r2/r2_actions.lua +++ /dev/null @@ -1,40 +0,0 @@ --- if not r2.Actions then r2.Actions={} end - --- obsolete -r2._obsolete_Actions_createActionWithCondition = function(name, conditions, actions) - assert(name) - assert(type(conditions) == "table") - assert(actions) - - local first = nil - local previous = nil - - local k, condition = next(conditions, nil) - while condition do - local condition_if = r2.newComponent("RtNpcEventHandlerAction") - condition_if.Action = "condition_if" - condition_if.Parameters = condition - if (previous) then table.insert(previous, condition_if) end - if (first == nil) then first = condition_if end - previous = condition_if.Children - k, condition = next(conditions, k) - end - - do - local multi_actions = r2.newComponent("RtNpcEventHandlerAction") - multi_actions.Action = "multi_actions" - multi_actions.Parameters = "" - multi_actions.Children = actions - assert(multi_actions) - if (previous) then table.insert(previous, multi_actions) end - if (first == nil) then first = multi_actions end - end - --- table.insert(multi_actions.Children, actions) - return first -end - - - - ---debugInfo("actions ok!!") diff --git a/code/ryzom/common/data_common/r2/r2_activities.lua b/code/ryzom/common/data_common/r2/r2_activities.lua deleted file mode 100644 index 0a2675e75..000000000 --- a/code/ryzom/common/data_common/r2/r2_activities.lua +++ /dev/null @@ -1,1549 +0,0 @@ -r2.activities = { - -uiId = "ui:interface:r2ed_activities", -sequenceEditorId = "ui:interface:r2ed_edit_activity_sequence", -ownCreatedInstances = {}, -openFirst = nil, -elementsIdCounter = 0, -sequencesNb = 0, -sequencesIdCounter = 0, -elementOrder = true, -maxAndMin = false, -eltTemplateParams = { - selectElt="r2.activities.selectElement()", - openEltEditor="", - maxMinElt="", - removeElt="r2.activities.removeElementInst()", - colOver="200 120 80 120", - colPushed="200 120 80 255", - multiMaxLine="3" - }, -elementEditorTemplate = "template_edit_activity", -elementInitialName=i18n.get("uiR2EdActivity"):toUtf8(), -sequenceInitialName=i18n.get("uiR2EdSeq"):toUtf8(), - -isInitialized = false, - -maxSequences = 7, -maxElements = 14, - -firstSequence = {}, - --- element --------------------------------------------------- -currentEltUIID = nil, -- initialisי quand l'editeur est ouvert ou fermי - -updatedSequUIID = nil, -- creation of sequence or of one of this elements -updatedEltUIID = nil, -- creation or update of element - - -activityTypeTranslation = { - ["Stand Still"] ={trans=i18n.get("uiR2EdStandStill"):toUtf8(), zone=""}, - ["Follow Route"] ={trans=i18n.get("uiR2EdFollowRoad"):toUtf8(), zone="Road"}, - ["Patrol"] ={trans=i18n.get("uiR2EdPatrol"):toUtf8(), zone="Road"}, - ["Repeat Road"] ={trans=i18n.get("uiR2EdRepeatRoad"):toUtf8(), zone="Road"}, - ["Wander"] ={trans=i18n.get("uiR2EdWander"):toUtf8(), zone="Region"}, - ["Stand On Start Point"] ={trans=i18n.get("uiR2EdStandOnStartPoint"):toUtf8(), zone=""}, - ["Go To Start Point"] ={trans=i18n.get("uiR2EdGoToStartPoint"):toUtf8(), zone=""}, - ["Go To Zone"] ={trans=i18n.get("uiR2EdGoToZone"):toUtf8(), zone="Region"}, - ["Sit Down"] ={trans=i18n.get("uiR2EdSitDown"):toUtf8(), zone=""}, - ["Stand Up"] ={trans=i18n.get("uiR2EdStandUp"):toUtf8(), zone=""}, - ["Rest In Zone"] ={trans=i18n.get("uiR2EDRest"):toUtf8(), zone="Region"}, - ["Feed In Zone"] ={trans=i18n.get("uiR2EDFeed"):toUtf8(), zone="Region"}, - ["Work In Zone"] ={trans=i18n.get("uiR2EDWork"):toUtf8(), zone="Region"}, - ["Hunt In Zone"] ={trans=i18n.get("uiR2EDHunt"):toUtf8(), zone="Region"}, - ["Guard Zone"] ={trans=i18n.get("uiR2EDGuard"):toUtf8(), zone="Region"}, - }, - -timeLimitsTranslation = { - ["No Limit"] =i18n.get("uiR2EdNoTimeLimit"):toUtf8(), - ["Chat"] =i18n.get("uiR2EdWhileChat"):toUtf8(), - ["Few Sec"] =i18n.get("uiR2EdForCertainTime"):toUtf8(), - }, - -timeLimitsProperties = { - [i18n.get("uiR2EdNoTimeLimit"):toUtf8()] ="No Limit", - [i18n.get("uiR2EdWhileChat"):toUtf8()] ="Chat", - [i18n.get("uiR2EdForCertainTime"):toUtf8()] ="Few Sec" - }, -} - - --- sequence -------------------------------------------------- -function r2.activities:currentSequUI() - local ui = getUI(self.uiId) - local tab = ui:find("sequence_tabs") - assert(tab) - - local sequenceUI = tab:getGroup(tab.selection) - - return sequenceUI -end - -function r2.activities:currentSequInstId() - if self:currentSequUI() then - return self:currentSequUI().Env.InstanceId - end - return nil -end - ---initialisי quand selection sequence dans tab ou dans barre menu -function r2.activities:setSequUIInstId(sequUI, id) - sequUI.Env.InstanceId = id -end - -function r2.activities:currentSequInst() - if self:currentSequInstId() then - return r2:getInstanceFromId(self:currentSequInstId()) - end - return nil -end - --- element --------------------------------------------------- - -function r2.activities:currentEltUIId() - return self.currentEltUIID -end - -function r2.activities:currentEltUI() - if self.currentEltUIID then - return getUI(self.currentEltUIID) - end - return nil -end - -function r2.activities:setCurrentEltUIId(id) - self.currentEltUIID = id -end - -function r2.activities:currentEltInstId() - if self.currentEltUIID then - return self:currentEltUI().Env.InstanceId - end - return nil -end - -function r2.activities:currentEltInst() - if self.currentEltUIID and self:currentEltInstId() then - return r2:getInstanceFromId(self:currentEltInstId()) - end - return nil -end - --- updated element and/or sequence (not necessary the same as current sequence or element) -function r2.activities:updatedSequUI() - if self.updatedSequUIID then - return getUI(self.updatedSequUIID) - end - return nil -end - -function r2.activities:setUpdatedSequUIId(sequUIId) - self.updatedSequUIID = sequUIId -end - -function r2.activities:updatedEltUI() - if self.updatedEltUIID then - return getUI(self.updatedEltUIID) - end - return nil -end - -function r2.activities:setUpdatedEltUIId(eltUIId) - self.updatedEltUIID = eltUIId -end - - - - - - - ------------------- INIT ACTIVITIES EDITOR -------------------------------------- -function r2.activities:initEditor() - -end - -function r2.activities:initEditorAfterFirstCall() - - if not self.isInitialized then - - self:cleanEditor() - - -- create sequences UI for selected entity - local entity = r2:getSelectedInstance() - assert(entity) - local activitySequences = entity:getBehavior().Activities - - local selectedSequenceIndex = entity:getSelectedSequenceIndex() - - for s = 0, activitySequences.Size - 1 do - r2.activities:newSequenceUI(activitySequences[s]) - end - - -- - local ui = getUI(self.uiId) - assert(ui) - - local tabActivities = ui:find("sequence_tabs") - assert(tabActivities) - tabActivities.selection = -1 - - if activitySequences.Size>0 then - self:triggerSelectSequence(activitySequences[selectedSequenceIndex].InstanceId) - end - - local uc_title = ucstring() - uc_title:fromUtf8(i18n.get("uiR2EDActivitySequenceEditor"):toUtf8() .. entity.Name) - ui.uc_title = uc_title - - self.isInitialized = true - end -end - ------- OPEN EDITOR --------------------------------------------------------------- -function r2.activities:openEditor() - - local ui = getUI(self.uiId) - - if not ui.active then - - self:initEditorAfterFirstCall() - - -- active editor - ui.active = true - ui:updateCoords() - - if self.openFirst == nil then - self.openFirst = true - ui:center() - end - else - setTopWindow(ui) - ui:blink(1) - end -end - ------- OPEN SEQUENCE EDITOR --------------------------------------------------------------- -function r2.activities:openSequenceEditor() - - local sequenceEditor = getUI(self.sequenceEditorId) - assert(sequenceEditor) - sequenceEditor.active = false - - local ui = getUI(self.uiId) - assert(ui) - - sequenceEditor.x = ui.x - sequenceEditor.y = ui.y - sequenceEditor.active = true - - -- update edit box text with current sequence name - local editName = sequenceEditor:find("sequence_name"):find("edit_box_group") - assert(editName) - - local tab = ui:find("sequence_tabs") - assert(tab) - - local sequInstId = r2.logicUI:getSequUIInstId(ui:find(tab.associatedGroupSelection)) - assert(sequInstId) - local activitySequence = r2:getInstanceFromId(sequInstId) - assert(activitySequence) - local tabName - if activitySequence.Name~= "" then - tabName = activitySequence.Name - else - local comps = activitySequence.Parent - for i=0, comps.Size-1 do - if comps[i].InstanceId == activitySequence.InstanceId then - tabName = self.sequenceInitialName..(i+1) - break - end - end - end - - local uc_sequ = ucstring() - uc_sequ:fromUtf8(tabName) - editName.uc_input_string = uc_sequ -end - - ------- SET SEQUENCE NAME --------------------------------------------------------------- -function r2.activities:setSequenceName() - - r2.requestNewAction(i18n.get("uiR2EDSetSequenceNameAction")) - - local sequenceEditor = getUI(self.sequenceEditorId) - assert(sequenceEditor) - - local editName = sequenceEditor:find("sequence_name"):find("edit_box_group") - assert(editName) - - local sequenceInstId = self:currentSequInstId() - r2.requestSetNode(sequenceInstId, "Name", editName.uc_input_string:toUtf8()) - - sequenceEditor.active = false -end - - ------- NEW SEQUENCE INST ------------------------------------------------------------- -function r2.activities:newSequenceInst() - - r2.requestNewAction(i18n.get("uiR2EDNewSequenceListAction")) - - local ui = getUI(self.uiId) - assert(ui) - - local tab = ui:find("sequence_tabs") - assert(tab) - - --if tab.tabButtonNb == self.maxSequences then return end - - local entity = r2:getSelectedInstance() - assert(entity) - - local activitySequence = r2.newComponent("ActivitySequence") - - r2.requestInsertNode(entity:getBehavior().InstanceId, "Activities", -1, "", activitySequence) - self.ownCreatedInstances[activitySequence.InstanceId] = true - - if entity:getBehavior().Activities.Size == 0 then - self.firstSequence[entity.InstanceId] = activitySequence.InstanceId - end - - return activitySequence.InstanceId -end - ------- NEW SEQUENCE UI -------------------------------------------------------------- -function r2.activities:newSequenceUI(activitySequence) - - local templateParams = { - newElt="r2.activities:newElementInst()", - newEltText=i18n.get("uiR2EdNewActivity"):toUtf8(), - eltOrderText=i18n.get("uiR2EdActivityOrder"):toUtf8(), - upElt="r2.activities:upElementInst()", - downElt="r2.activities:downElementInst()", - maxMinElts="r2.activities:maximizeMinimizeElements()", - downUpColor="220 140 100 255", - overDownUpColor="255 180 170 255", - colPushed = "220 140 100 255", - paramsL= "r2.activities:selectSequence('"..activitySequence.InstanceId.."')" - } - - local ui = getUI(self.uiId) - assert(ui) - - local menu = ui:find("sequence_menu") - assert(menu) - - local tab = menu:find("sequence_tabs") - assert(tab) - - -- NEW SEQUENCE GROUP -------------------------------------------- - local newTabNb = tab.tabButtonNb+1 - local posParent, posRef, id, group - if newTabNb == 1 then - posParent = "parent" - posRef = "TL TL" - else - posParent = "tab"..(newTabNb-2) - posRef = "TR TL" - end - - local id = "tab"..(newTabNb-1) - - local groupId = "sequence"..self.sequencesIdCounter - self.sequencesIdCounter = self.sequencesIdCounter+1 - - local newTabGroup = createUIElement("sequence_elements_template", menu.id, {id=groupId, - new_elt=templateParams.newElt, new_elt_text=templateParams.newEltText, - elt_order_text=templateParams.eltOrderText, up_elt=templateParams.upElt, - down_elt=templateParams.downElt, max_min_elts=templateParams.maxMinElts, - down_up_color=templateParams.downUpColor, over_down_up_color=templateParams.overDownUpColor}) - assert(newTabGroup) - - menu:addGroup(newTabGroup) - - r2.logicUI:setSequUIInstId(newTabGroup, activitySequence.InstanceId) - self:setUpdatedSequUIId(newTabGroup.id) - - -- NEW TAB ---------------------------------------------------- - local comps = activitySequence.Parent - local sequIndex = -1 - for i=0, comps.Size-1 do - if comps[i].InstanceId == activitySequence.InstanceId then - sequIndex = i - break - end - end - - local newTab = createUIElement("sequence_tab_template", tab.id, - {id=id, posparent=posParent, posref=posRef, group=groupId, - col_pushed =templateParams.colPushed, params_l=templateParams.paramsL}) - assert(newTab) - - tab:addTabWithOrder(newTab, sequIndex) - - local viewText = newTab:getViewText() - assert(viewText) - viewText.overExtendViewText = true - viewText.overExtendViewTextUseParentRect = false - viewText:setLineMaxW(40) - - newTab:updateCoords() - - -- if it's the first sequence, active all separators and buttons around it - if tab.tabButtonNb == 1 then - self:updateUI(true) - end - - -- create element editor of new sequence - self:createElementEditor() - - -- create all elements ui of new sequence - for a = 0, activitySequence.Components.Size - 1 do - self:newElementUI(activitySequence.Components[a]) - end - - -- if YOU just called creation of this sequence (or undo/redo request), it becomes current - -- selected sequence - if self.ownCreatedInstances[activitySequence.InstanceId] == true - or r2.logicComponents.undoRedoInstances[activitySequence.InstanceId]==true then - - -- right and left buttons to decal showed sequences - self:triggerSelectSequence(activitySequence.InstanceId) - self.ownCreatedInstances[activitySequence.InstanceId] = nil - - r2.logicComponents.undoRedoInstances[activitySequence.InstanceId] = nil - end - - -- update next sequences UI names - for i=sequIndex, tab.tabButtonNb-1 do - - local tabButton = tab:getTabButton(i) - assert(tabButton) - local sequenceUI = tab:getGroup(i) - assert(sequenceUI) - local sequInst = r2:getInstanceFromId(r2.logicUI:getSequUIInstId(sequenceUI)) - assert(sequInst) - - sequName="" - if sequInst.Name~= "" then - sequName = sequInst.Name - else - sequName = self.sequenceInitialName .. (i+1) - end - - local uc_name = ucstring() - uc_name:fromUtf8(sequName) - tabButton.uc_hardtext = uc_name - end -end - ----- REMOVE SEQUENCE INSTANCE --------------------------------------------- -function r2.activities:removeSequenceInst() - r2.requestNewAction(i18n.get("uiR2EDRemoveSequenceListAction")) - local sequenceInstId = self:currentSequInstId() - assert(sequenceInstId) - r2.requestEraseNode(sequenceInstId, "", -1) -end - ----- REMOVE SEQUENCE UI -------------------------------------------------- -function r2.activities:removeSequenceUI(instance) - - -- if sequenceUI to delete is the current sequenceUI, no current elementUI anymore - local selectedElt = self:currentEltUI() - if (selectedElt and selectedElt.parent.parent.parent == self:updatedSequUI()) then - self:setCurrentEltUIId(nil) - end - local deleteCurrentSequUI = (self:updatedSequUI() == self:currentSequUI()) - - -- rename sequences which have default name and are after the removed sequence in list - local ui = getUI(self.uiId) - assert(ui) - local tab = ui:find("sequence_tabs") - assert(tab) - - local selection = tab.selection - - local removedIndex = tab.tabButtonNb - for i=0, tab.tabButtonNb-1 do - local sequenceUI = tab:getGroup(i) - assert(sequenceUI) - if r2.logicUI:getSequUIInstId(sequenceUI) == instance.InstanceId then - removedIndex = i - end - if i>removedIndex then - local buttonTab = tab:find("tab"..i) - assert(buttonTab) - if buttonTab.hardtext == self.sequenceInitialName..(i+1) then - buttonTab.uc_hardtext = self.sequenceInitialName..i - end - end - end - - if removedIndex < selection then - selection = selection-1 - end - - -- remove tab of the tab list - tab:removeTab(removedIndex) - - local firstIndex - for i=0, tab.tabButtonNb-1 do - local tabButton = tab:getTabButton(i) - if tabButton.active then - firstIndex = i - break - end - end - - -- if no sequence anymore, hide separators, buttons... - if tab.tabButtonNb == 0 then - self:updateUI(false) - end -end - ------ REPEAT SEQUENCE ------------------------------------------- -function r2.activities:repeatSequence() - - r2.requestNewAction(i18n.get("uiR2EDSetSequenceRepeatFlagAction")) - - - local sequenceInst = self:currentSequInst() - if sequenceInst==nil then return end - - local sequenceType = 1 - if getUICaller().pushed==true then sequenceType = 0 end - - r2.requestSetNode(sequenceInst.InstanceId, "Repeating", sequenceType) -end - ------- UPDATE SEQUENCE UI ------------------------------------------------------ -function r2.activities:updateSequenceUI(instance, attributeName) - - local ui = getUI(self.uiId) - assert(ui) - - if attributeName=="Name" then - - local name = instance:getName() - - local tab = ui:find("sequence_tabs") - assert(tab) - - local tabId - for i=0, tab.tabButtonNb-1 do - local sequenceUI = tab:getGroup(i) - if r2.logicUI:getSequUIInstId(sequenceUI) == instance.InstanceId then - tabId = i - break - end - end - - if tabId then - local buttonTab = tab:find("tab"..tabId) - assert(buttonTab) - - local uc_name = ucstring() - uc_name:fromUtf8(name) - buttonTab.uc_hardtext = uc_name - - local viewText = buttonTab:getViewText() - assert(viewText) - end - --- r2.miniActivities:updateSequenceButtonBar() - - elseif attributeName=="Repeating" then - local sequenceUI = self:updatedSequUI() - assert(sequenceUI) - - local repeatButton = ui:find("repeat_group"):find("repeat"):find("toggle_butt") - repeatButton.pushed = (instance.Repeating == 0) - end -end - ------- DECAL TO RIGHT SEQUENCES IN EDITOR ------------------------------ -function r2.activities:rightSequenceUI() - - local ui = getUI(self.uiId) - assert(ui) - - local tabGr = ui:find("sequence_tabs") - assert(tabGr) - - local lastTab = tabGr.lastTabButton - tabGr:showTabButton(lastTab+1); -end - ------- DECAL TO LEFT SEQUENCES IN EDITOR ------------------------------- -function r2.activities:leftSequenceUI() - - local ui = getUI(self.uiId) - assert(ui) - - local tabGr = ui:find("sequence_tabs") - assert(tabGr) - - local firstTab = tabGr.firstTabButton - tabGr:showTabButton(firstTab-1); -end - -function r2.activities:showSequencesUI() - - local ui = getUI(self.uiId) - assert(ui) - - local tabGr = ui:find("sequence_tabs") - assert(tabGr) - - local leftTabsButton = ui:find("left_sequences") - assert(leftTabsButton) - - local rightTabsButton = ui:find("right_sequences") - assert(rightTabsButton) - - local firstTab - local lastTab - for i=0, tabGr.tabButtonNb-1 do - local tab = tabGr:getTabButton(i) - assert(tab) - if tab.active then - if not firstTab then - firstTab = i - end - lastTab = i - elseif firstTab~=nil then - break - end - end - - if firstTab and lastTab then - leftTabsButton.active = (firstTab~=0) - rightTabsButton.active = (lastTab~=tabGr.tabButtonNb-1) - end -end - ------- CLOSE EDITOR ------------------------------------------------------ -function r2.activities:closeEditor() - - local ui = getUI(self.uiId) - assert(ui) - if ui.active then - ui.active = false - end - - local sequenceEditor = getUI(self.sequenceEditorId) - assert(sequenceEditor) - sequenceEditor.active = false - - self.isInitialized = false -end - ------- CLEAN EDITOR ------------------------------------------------------- -function r2.activities:cleanEditor() - - self:setCurrentEltUIId(nil) - self:setUpdatedSequUIId(nil) - self:setUpdatedEltUIId(nil) - self.elementsIdCounter = 0 - self.sequencesNb = 0 - self.sequencesIdCounter = 0 - - local ui = getUI(self.uiId) - assert(ui) - - -- remove all tabs and associated groups - local sequenceMenu = ui:find("sequence_menu") - assert(sequenceMenu) - - local tabActivities = ui:find("sequence_tabs") - assert(tabActivities) - - tabActivities:removeAll() - - -- hide separators and buttons around - self:updateUI(false) -end - ------- SELECT ELEMENT -------------------------------------------------- -function r2.activities:selectElement(selectedButtonElt, sequInstId) - if sequInstId then - self:triggerSelectSequence(sequInstId) - end - r2.logicComponents:selectElement(r2.activities, selectedButtonElt) -end - ------- SELECT SEQUENCE ----------------------------------------------- -function r2.activities:triggerSelectSequence(sequInstId) - - local ui = getUI(self.uiId) - assert(ui) - - local tabActivities = ui:find("sequence_tabs") - assert(tabActivities) - - local sequInst = r2:getInstanceFromId(sequInstId) - assert(sequInst) - local tabNb = r2.logicComponents:searchElementIndex(sequInst)-1 - - local sequenceUI = tabActivities:getGroup(tabNb) - if sequenceUI and r2.logicUI:getSequUIInstId(sequenceUI)==sequInstId then - - -- triggers call of r2.activities:selectSequence - tabActivities.selection = tonumber(tabNb) - end -end - -function r2.activities:selectSequence(sequInstId) - - r2.logicComponents:selectSequence(r2.activities) - - local ui = getUI(self.uiId) - assert(ui) - - local sequInst = r2:getInstanceFromId(sequInstId) - assert(sequInst) - - -- repeat sequence ? - local repeatButton = ui:find("repeat_group"):find("repeat"):find("toggle_butt") - repeatButton.pushed = (sequInst.Repeating == 0) - - -- update sequence button bar - r2.miniActivities:updateSequenceButtonBar() - - -- update mini activities view - r2.miniActivities:updateMiniActivityView() - - -- set the sequence in activity owner - local owner = sequInst.ParentInstance.ParentInstance - - owner.User.SelectedSequence = sequInst.IndexInParent -end - ------- CREATE EDITOR ------------------------------------------------------- -function r2.activities:createElementEditor() - - local activityEditor = r2.logicComponents:createElementEditor(r2.activities) - assert(activityEditor) - - -- time limit - local timeLimitCB = activityEditor:find("time_limit"):find("combo_box") - assert(timeLimitCB) - timeLimitCB:resetTexts() - timeLimitCB:addText(i18n.get("uiR2EdNoTimeLimit")) - timeLimitCB:addText(i18n.get("uiR2EdForCertainTime")) - - do - local cb = activityEditor:find("road_count_limit"):find("combo_box") - assert(cb) - cb:resetTexts() - cb:addText(i18n.get("uiR2EdNoRoadCountLimit")) - local i = 0 - while i < 20 do - i = i + 1 - cb:addText(ucstring(tostring(i))) - end - - end - -end - ------- OPEN ELEMENT EDITOR ----------------------------------------------- -function r2.activities:updateElementEditor() - - local instanceActivity = self:currentEltInst() - if instanceActivity==nil then return end - - local sequenceUI = self:currentSequUI() - assert(sequenceUI) - - local activityEditor = sequenceUI:find("edit_element") - assert(activityEditor) - - -- activity name - local activityName = activityEditor:find("name") - assert(activityName) - - -- activity type - local activityButtonText = activityEditor:find("activity"):find("text") - assert(activityButtonText) - - -- patrol / repeat road special casefalse - do - local grp = activityEditor:find("road_count_group") - if instanceActivity.Activity == "Patrol" or instanceActivity.Activity == "Repeat Road" then - grp.active = true - else - grp.active = false - end - - - -- time limit - local comboBox = activityEditor:find("road_count_limit").combo_box - assert(comboBox) - local value = select(instanceActivity.RoadCountLimit, instanceActivity.RoadCountLimit, "0") - if value == "0" then - value = i18n.get("uiR2EdNoRoadCountLimit"):toUtf8() - end - comboBox.Env.locked = true - comboBox.selection_text = value - comboBox.Env.locked = false - - end - - -- time limit - local comboBox = activityEditor:find("time_limit").combo_box - assert(comboBox) - - local index = r2.logicComponents:searchElementIndex(instanceActivity) - local uc_activityName = ucstring(self.elementInitialName.." : ") - if index~= nil then - uc_activityName:fromUtf8(self.elementInitialName.." "..index.." : ") - end - activityName.uc_hardtext = uc_activityName - - -- activity type - local activityText = instanceActivity:getVerb() - if instanceActivity.ActivityZoneId ~= "" then - local place = r2:getInstanceFromId(instanceActivity.ActivityZoneId) - assert(place) - - activityText = activityText .. " " .. place.Name - end - if activityText then - local uc_activityText = ucstring() - uc_activityText:fromUtf8(activityText) - activityButtonText.uc_hardtext = uc_activityText - end - - -- time limit - local timeLimit = instanceActivity.TimeLimit - - local certainTime = activityEditor:find("certain_time") - assert(certainTime) - - comboBox.Env.locked = true - if timeLimit == "Few Sec" then - - local timeLimitValue = tonumber(instanceActivity.TimeLimitValue) - - if timeLimitValue ~= nil then - - local hoursNb, minNb, secNb = r2.logicComponents:calculHourMinSec(timeLimitValue) - - local timeLimitText = i18n.get("uiR2EdFor"):toUtf8() .. " " - if hoursNb ~= 0 then timeLimitText = timeLimitText .. hoursNb .. i18n.get("uiR2EdShortHours"):toUtf8() .. " " end - if minNb ~= 0 then timeLimitText = timeLimitText .. minNb .. i18n.get("uiR2EdShortMinutes"):toUtf8() .. " " end - timeLimitText = timeLimitText .. secNb .. i18n.get("uiR2EdShortSeconds"):toUtf8() - - certainTime.active = true - local hoursMenu = certainTime:find("hours"):find("text") - assert(hoursMenu) - hoursMenu.uc_hardtext = tostring(hoursNb) - - local minutesMenu = certainTime:find("minutes"):find("text") - assert(minutesMenu) - minutesMenu.uc_hardtext = tostring(minNb) - - local secondsMenu = certainTime:find("seconds"):find("text") - assert(secondsMenu) - secondsMenu.uc_hardtext = tostring(secNb) - - local uc_time = ucstring() - uc_time:fromUtf8(timeLimitText) - comboBox.view_text = uc_time - end - else - certainTime.active = false - timeLimit = self.timeLimitsTranslation[timeLimit] - if timeLimit~= nil then - comboBox.selection_text = timeLimit - end - end - comboBox.Env.locked = false -end - ------ CLOSE ELEMENT EDITOR -------------------------------------------------------- -function r2.activities:closeElementEditor() - - r2.logicComponents:closeElementEditor(r2.activities) -end - ------- NEW ELEMENT INST ---------------------------------------------------------- -function r2.activities:newElementInst(tableInit) - - local sequenceUI = self:currentSequUI() - if sequenceUI then - local eltsList = sequenceUI :find("elements_list") - assert(eltsList) - - if eltsList.childrenNb >= self.maxElements then return end - end - - local sequenceInstId = self:currentSequInstId() - -- when no sequences, we create the first - local selectedInst = r2:getSelectedInstance() - assert(selectedInst) - local selectedInstId = selectedInst.InstanceId - if sequenceInstId == nil then - if self.firstSequence[selectedInstId] then - sequenceInstId = self.firstSequence[selectedInstId] - else - sequenceInstId = self:newSequenceInst() - end - end - - local instanceElement = r2.newComponent("ActivityStep") - - local existZone = false - local actionToInitDefaultActivity = "" - - if tableInit ~= nil then - instanceElement.Activity = tableInit.Activity - instanceElement.ActivityZoneId = r2.RefId(tableInit.ActivityZoneId) - instanceElement.TimeLimit = tableInit.TimeLimit - instanceElement.TimeLimitValue = tableInit.TimeLimitValue - - if tableInit.RoadCountLimit then instanceElement.RoadCountLimit = tableInit.RoadCountLimit end - else - instanceElement.TimeLimit = "No Limit" - - local activitiesTable = {} - selectedInst:getAvailableActivities(activitiesTable) - local standStillAct = false - local roadAct = false - local regionAct = false - local activityZone - for k, activity in pairs(activitiesTable) do - if activity=="Stand Still" then - standStillAct=true - break - elseif self.activityTypeTranslation[activity].zone=="Road" then - roadAct = true - activityZone = activity - elseif self.activityTypeTranslation[activity].zone=="Region" then - regionAct = true - activityZone = activity - end - end - - if standStillAct then - instanceElement.Activity = "Stand Still" - elseif roadAct then - local roadsTable = r2.Scenario:getAllInstancesByType("Road") - if table.getn(roadsTable) > 0 then - instanceElement.Activity = activityZone - local zoneId - for k, v in pairs(roadsTable) do - zoneId = v.InstanceId - break - end - instanceElement.ActivityZoneId = zoneId - existZone = true - end - elseif regionAct then - local regionsTable = r2.Scenario:getAllInstancesByType("Region") - if table.getn(regionsTable) > 0 then - instanceElement.Activity = activityZone - local zoneId - for k, v in pairs(regionsTable) do - zoneId = v.InstanceId - break - end - instanceElement.ActivityZoneId = zoneId - existZone = true - end - else - debugInfo("No activity type to initialize default activity step") - end - - if roadAct then - actionToInitDefaultActivity = i18n.get("uiR2EdRoad"):toUtf8() .. " " - end - - if regionAct then - if actionToInitDefaultActivity~="" then - actionToInitDefaultActivity = actionToInitDefaultActivity .. i18n.get("uiR2EdOr"):toUtf8().. " " - end - actionToInitDefaultActivity = actionToInitDefaultActivity .. i18n.get("uiR2EdRegion"):toUtf8() .. " " - end - end - - if instanceElement.Activity~="" then - r2.requestNewAction(i18n.get("uiR2EDNewSequenceElementAction")) - r2.requestInsertNode(sequenceInstId, "Components", -1, "", instanceElement) - self.ownCreatedInstances[instanceElement.InstanceId] = true - - r2.logicComponents:newElementInst(r2.activities) - - elseif not existZone then - local message = i18n.get("uiR2EdCreateZone"):toUtf8() .. actionToInitDefaultActivity .. i18n.get("uiR2EdFor"):toUtf8() .. " " .. selectedInst.Name - local uc_message = ucstring() - uc_message:fromUtf8(message) - messageBox(uc_message) - end - r2.requestForceEndMultiAction() -end - ------- NEW ELEMENT UI ------------------------------------------------------------- -function r2.activities:newElementUI(newInst) - r2.logicUI:newElementUI(r2.activities, newInst, true) -end - ------- REMOVE ELEMENT INST -------------------------------------------------------- -function r2.activities:removeElementInst() - r2.requestNewAction(i18n.get("uiR2EDRemoveLogicElementAction")) - r2.logicComponents:removeElementInst(r2.activities) - r2.requestEndAction() -end - ------- REMOVE ELEMENT UI --------------------------------------------------------- -function r2.activities:removeElementUI(removedEltUI) - r2.logicUI:removeElementUI(r2.activities, removedEltUI) -end - ------- UP ELEMENT INST ------------------------------------------------------------ -function r2.activities:upElementInst() - r2.logicComponents:upElementInst(r2.activities) -end - ------- DOWN ELEMENT INST --------------------------------------------------------- -function r2.activities:downElementInst() - r2.logicComponents:downElementInst(r2.activities) -end - ------- MAX/MIN ELEMENTS UI -------------------------------------------------------- -function r2.activities:maximizeMinimizeElements() - r2.logicUI:maximizeMinimizeElements(r2.activities) -end - ------- MAX/MIN ELEMENT UI ------------------------------------------------------------ -function r2.activities:maximizeMinimizeElement(element, allMinimize) - - r2.logicUI:maximizeMinimizeElement(element, allMinimize) -end - ------- DOWN/UP ELEMENT UI ----------------------------------------------------------- -function r2.activities:downUpElementUI(elementUI, instance) - r2.logicUI:downUpElementUI(r2.activities, elementUI, instance) -end - ------- UPDATE ELEMENT UI ------------------------------------------------------------- -function r2.activities:updateElementUI(elementUI) - - r2.logicUI:updateElementUI(r2.activities, elementUI) -end - ------- UPDATE ELEMENT TITLE ----------------------------------------------------------- -function r2.activities:updateElementTitle(activityUI) - - r2.logicComponents:updateElementTitle(r2.activities, activityUI, true) -end - ------- INIT ACTIVITY MENU ------------------------------------------------------------------- -function r2.activities:initActivityMenu() - - local menuName = "ui:interface:r2ed_triggers_menu" - local activityMenu = getUI(menuName) - local activityMenu = activityMenu:getRootMenu() - assert(activityMenu) - activityMenu:reset() - local uc_activity = ucstring() - - local activitiesTable = {} - r2:getSelectedInstance():getAvailableActivities(activitiesTable) - - local activitiesNb = 0 - for k, actType in pairs(activitiesTable) do - local uc_activity = ucstring() - local translation = self.activityTypeTranslation[actType].trans - uc_activity:fromUtf8(translation) - - local zone = self.activityTypeTranslation[actType].zone - if zone == "" then - activityMenu:addLine(uc_activity, "lua", "r2.activities:setActivityType('"..actType.."')", actType) - else - activityMenu:addLine(uc_activity, "", "", actType) - - local textureName = "" - if zone == "Road" then - textureName = "r2ed_icon_road.tga" - elseif zone == "Region" then - textureName = "r2ed_icon_region.tga" - end - - local menuButton = createGroupInstance("r2_menu_button", "", { bitmap = textureName, size="14" }) - activityMenu:setUserGroupLeft(activitiesNb, menuButton) - activityMenu:addSubMenu(activitiesNb) - local zonesMenu = activityMenu:getSubMenu(activitiesNb) - local zonesTable = r2.Scenario:getAllInstancesByType(zone) - for key, z in pairs(zonesTable) do - uc_activity:fromUtf8(z.Name) - zonesMenu:addLine(uc_activity, "lua", "r2.activities:setActivityType('"..actType.."', '".. z.InstanceId .."')", z.InstanceId) - end - if table.getn(zonesTable) == 0 then - zonesMenu:addLine(i18n.get("uiR2EdNoSelelection"), "lua", "r2.activities:setActivityType()", "") - end - end - - activitiesNb = activitiesNb+1 - end - - r2.logicUI:openLogicMenu(getUICaller()) -end - ---- SET ACTIVITY TYPE -------------------------------------------------------------------- -function r2.activities:setActivityType(activityType, placeId) - - local activityInstId = self:currentEltInstId() - assert(activityInstId) - - if activityType == nil then - return - elseif placeId == nil then - r2.requestNewAction(i18n.get("uiR2EDSetActivityTypeAction")) - r2.requestSetNode(activityInstId, "Activity", activityType) - r2.requestSetNode(activityInstId, "ActivityZoneId", r2.RefId("")) - else - r2.requestNewAction(i18n.get("uiR2EDSetActivityTypeAction")) - r2.requestSetNode(activityInstId, "Activity", activityType) - r2.requestSetNode(activityInstId, "ActivityZoneId", r2.RefId(placeId)) - end -end - ---- SET TIME LIMIT -------------------------------------------------------------------- -function r2.activities:setTimeLimit(timeLimit) - - r2.requestNewAction(i18n.get("uiR2EDSetActivityTimeLimitAction")) - - if timeLimit == nil then - timeLimit = getUICaller().selection_text - if getUICaller().Env.locked then return end - end - - local activityInstId = self:currentEltInstId() - assert(activityInstId) - - -- TimeLimitValue - if timeLimit == i18n.get("uiR2EdForCertainTime"):toUtf8() then - r2.requestSetNode(activityInstId, "TimeLimitValue", tostring(20)) - else - r2.requestSetNode(activityInstId, "TimeLimitValue", "") - end - - -- TimeLimit - timeLimit = self.timeLimitsProperties[timeLimit] - assert(timeLimit) - r2.requestSetNode(activityInstId, "TimeLimit", timeLimit) -end - ---- SET TIME LIMIT -------------------------------------------------------------------- -function r2.activities:setRoadCountLimit(limit) - - r2.requestNewAction(i18n.get("uiR2EDSetActivityRoadCountAction")) - - if limit == nil then - timeLimit = getUICaller().selection_text - if getUICaller().Env.locked then return end - end - - local activityInstId = self:currentEltInstId() - assert(activityInstId) - - -- RoadCountLimit - if limit == i18n.get("uiR2EdNoRoadCountLimit"):toUtf8() then - r2.requestSetNode(activityInstId, "RoadCountLimit", "0") - else - r2.requestSetNode(activityInstId, "RoadCountLimit", timeLimit) - end -end - ------- INIT TIME MENU ----------------------------------------------------------------- -function r2.activities:initTimeMenu(timeFunction, isHours) - - local timeMenu = getUI("ui:interface:r2ed_triggers_menu") - assert(timeMenu) - - local timeMenu = timeMenu:getRootMenu() - assert(timeMenu) - - timeMenu:reset() - - for i=0,9 do - timeMenu:addLine(ucstring(tostring(i)), "lua", timeFunction .. "(" .. tostring(i) .. ")", tostring(i)) - end - - if isHours == true then - timeMenu:addLine(ucstring(tostring(10)), "lua", timeFunction .. "(" .. tostring(10) .. ")", tostring(10)) - else - - local lineNb = 9 - for i=10, 50, 10 do - local lineStr = tostring(i).."/"..tostring(i+9) - timeMenu:addLine(ucstring(lineStr), "", "", tostring(i)) - lineNb = lineNb+1 - - timeMenu:addSubMenu(lineNb) - local subMenu = timeMenu:getSubMenu(lineNb) - - for s=0,9 do - lineStr = tostring(i+s) - subMenu:addLine(ucstring(lineStr), "lua", timeFunction .. "(" .. tostring(i+s) .. ")", lineStr) - end - end - end - - r2.logicUI:openLogicMenu(getUICaller()) -end - ------ SET HOURS/MINUTES/SECONDS ----------------------------------------------------------------- -function r2.activities:activityForHours(hourNb) - - local activityInst = self:currentEltInst() - assert(activityInst) - - local lastHourNb, minNb, secNb = r2.logicComponents:calculHourMinSec(tonumber(activityInst.TimeLimitValue)) - - self:setLimitTimeValue(hourNb, minNb, secNb) -end - -function r2.activities:activityForMinutes(minNb) - - local activityInst = self:currentEltInst() - assert(activityInst) - - local hoursNb, lastMinNb, secNb = r2.logicComponents:calculHourMinSec(tonumber(activityInst.TimeLimitValue)) - - self:setLimitTimeValue(hoursNb, minNb, secNb) -end - -function r2.activities:activityForSeconds(secNb) - - local activityInst = self:currentEltInst() - assert(activityInst) - - local hoursNb, minNb, lastSecNb = r2.logicComponents:calculHourMinSec(tonumber(activityInst.TimeLimitValue)) - - self:setLimitTimeValue(hoursNb, minNb, secNb) -end - --------- SET LIMIT TIME VALUE ------------------------------------------------------------------- -function r2.activities:setLimitTimeValue(hourNb, minNb, secNb) - r2.requestNewAction(i18n.get("uiR2EDSetActivityTimeLimitValueAction")) - - local activityInstId = self:currentEltInstId() - assert(activityInstId) - - local totalSec = tostring(hourNb*3600 + minNb*60 + secNb) - r2.requestSetNode(activityInstId, "TimeLimitValue", totalSec) -end - - ------ UTILS --------------------------------------------------------- - -function r2.activities:findSequenceUIFromInstance(instance) - - local ui = getUI(r2.activities.uiId) - assert(ui) - - local sequenceTabs = ui:find("sequence_tabs") - assert(sequenceTabs) - - for i=0,sequenceTabs.tabButtonNb-1 do - local sequenceUI = sequenceTabs:getGroup(i) - if r2.logicUI:getSequUIInstId(sequenceUI) == instance.InstanceId then - r2.activities:setUpdatedSequUIId(sequenceUI.id) - return sequenceUI - end - end - - return nil -end - -function r2.activities:findElementUIInSequenceUI(sequenceUI, instance) - - local eltsList = sequenceUI:find("elements_list") - assert(eltsList) - - for i=0,eltsList.childrenNb-1 do - local element = eltsList:getChild(i) - if r2.logicUI:getEltUIInstId(element) == instance.InstanceId then - return element - end - end - - return nil -end - -function r2.activities:updateUI(active) - - local ui = getUI(self.uiId) - - local sepTop = ui:find("sep_top") - assert(sepTop) - local sepBottom = ui:find("sep_bottom") - assert(sepBottom) - local sepLeft = ui:find("sep_left") - assert(sepLeft) - local sepRight = ui:find("sep_right") - assert(sepRight) - local removeSequence = ui:find("remove_sequence_button") - assert(removeSequence) - local editSequence = ui:find("edit_sequence") - assert(editSequence) - local repeatButtonGr = ui:find("repeat_group") - assert(repeatButtonGr) - - sepTop.active = active - sepBottom.active = active - sepLeft.active= active - sepRight.active= active - removeSequence.active = active - editSequence.active = active - repeatButtonGr.active = active -end - - - - - - - --------------------------------------------------------------------------------------------------- --------------------------------- ACTIVITY SEQUENCE DisplayerProperties --------------------------- --------------------------------------------------------------------------------------------------- -local activitySequencePropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function activitySequencePropertySheetDisplayerTable:onPostCreate(instance) - - local activeLogicEntity = r2:getSelectedInstance() - if activeLogicEntity and activeLogicEntity.isGrouped and (activeLogicEntity:isGrouped() or activeLogicEntity:isKindOf("NpcGrpFeature")) then - activeLogicEntity = r2:getLeader(activeLogicEntity) - end - - if activeLogicEntity ~= instance:getParentOfKind("LogicEntity") then return end - - local activeLogicEntityParent = instance:getActiveLogicEntityParent() - - if activeLogicEntity==nil or activeLogicEntity~=activeLogicEntityParent then - return - end - - if r2.activities.isInitialized then - r2.activities.firstSequence[activeLogicEntity.InstanceId] = nil - r2.activities:newSequenceUI(instance) - end - - r2.miniActivities:updateSequenceButtonBar() -end ------------------------------------------------- -function activitySequencePropertySheetDisplayerTable:onErase(instance) - - instance.User.Deleted = true - - local activeLogicEntity = r2:getSelectedInstance() - if activeLogicEntity and activeLogicEntity.isGrouped and (activeLogicEntity:isGrouped() or activeLogicEntity:isKindOf("NpcGrpFeature")) then - activeLogicEntity = r2:getLeader(activeLogicEntity) - end - - if activeLogicEntity ~= instance:getParentOfKind("LogicEntity") then return end - - local activeLogicEntityParent = instance:getActiveLogicEntityParent() - - if activeLogicEntity==nil or activeLogicEntity~=activeLogicEntityParent then - return - end - - if r2.activities.isInitialized and r2.activities:findSequenceUIFromInstance(instance) then - r2.activities:removeSequenceUI(instance) - end - - -- last sequence - if instance.Parent.Size==1 then - r2.miniActivities:updateMiniActivityView() - r2.miniActivities:updateSequenceButtonBar() - end -end ------------------------------------------------- -function activitySequencePropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function activitySequencePropertySheetDisplayerTable:onPostHrcMove(instance) -end ------------------------------------------------- -function activitySequencePropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function activitySequencePropertySheetDisplayerTable:onSelect(instance, isSelected) -end - ------------------------------------------------- -function activitySequencePropertySheetDisplayerTable:onAttrModified(instance, attributeName) - - local activeLogicEntity = r2:getSelectedInstance() - if activeLogicEntity and activeLogicEntity.isGrouped and (activeLogicEntity:isGrouped() or activeLogicEntity:isKindOf("NpcGrpFeature")) then - activeLogicEntity = r2:getLeader(activeLogicEntity) - end - - if activeLogicEntity ~= instance:getParentOfKind("LogicEntity") then return end - - local activeLogicEntityParent = instance:getActiveLogicEntityParent() - - if activeLogicEntity==nil or activeLogicEntity~=activeLogicEntityParent then - return - end - - if r2.activities.isInitialized and r2.activities:findSequenceUIFromInstance(instance) then - r2.activities:updateSequenceUI(instance, attributeName) - end - - if attributeName=="Name" then - r2.miniActivities:updateSequenceButtonBar() - end -end - ------------------------------------------------- -function r2:activitySequencePropertySheetDisplayer() - return activitySequencePropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - --------------------------------------------------------------------------------------------------- --------------------------------- ACTIVITY STEP DisplayerProperties-------------------------------- --------------------------------------------------------------------------------------------------- -local activityStepPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onPostCreate(instance) - - local activeLogicEntity = r2:getSelectedInstance() - if activeLogicEntity and activeLogicEntity.isGrouped and (activeLogicEntity:isGrouped() or activeLogicEntity:isKindOf("NpcGrpFeature")) then - activeLogicEntity = r2:getLeader(activeLogicEntity) - end - - if activeLogicEntity ~= instance:getParentOfKind("LogicEntity") then return end - - local activitySequInst = instance.Parent.Parent - local activeLogicEntityParent = activitySequInst:getActiveLogicEntityParent() - - if activeLogicEntity==nil or activeLogicEntity~=activeLogicEntityParent then - return - end - - if r2.activities.isInitialized and r2.activities:findSequenceUIFromInstance(activitySequInst) then - r2.activities:newElementUI(instance) - end - - -- update mini activities view - r2.miniActivities:updateMiniActivityView() -end ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onErase(instance) - - instance.User.Deleted = true - - local activeLogicEntity = r2:getSelectedInstance() - if activeLogicEntity and activeLogicEntity.isGrouped and (activeLogicEntity:isGrouped() or activeLogicEntity:isKindOf("NpcGrpFeature")) then - activeLogicEntity = r2:getLeader(activeLogicEntity) - end - - if activeLogicEntity ~= instance:getParentOfKind("LogicEntity") then return end - - local activitySequInst = instance.Parent.Parent - local activeLogicEntityParent = activitySequInst:getActiveLogicEntityParent() - - if activeLogicEntity==nil or activeLogicEntity~=activeLogicEntityParent then - return - end - - local sequenceUI = r2.activities:findSequenceUIFromInstance(activitySequInst) - if r2.activities.isInitialized and sequenceUI then - local eltUI = r2.activities:findElementUIInSequenceUI(sequenceUI, instance) - if eltUI then - r2.activities:removeElementUI(eltUI) - end - end - - r2.miniActivities:updateMiniActivityView() -end ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onPostHrcMove(instance) - - local activeLogicEntity = r2:getSelectedInstance() - if activeLogicEntity and activeLogicEntity.isGrouped and (activeLogicEntity:isGrouped() or activeLogicEntity:isKindOf("NpcGrpFeature")) then - activeLogicEntity = r2:getLeader(activeLogicEntity) - end - - if activeLogicEntity ~= instance:getParentOfKind("LogicEntity") then return end - - local activitySequInst = instance.Parent.Parent - local activeLogicEntityParent = activitySequInst:getActiveLogicEntityParent() - - if activeLogicEntity==nil or activeLogicEntity~=activeLogicEntityParent then - return - end - - local sequenceUI = r2.activities:findSequenceUIFromInstance(activitySequInst) - if r2.activities.isInitialized and sequenceUI then - local eltUI = r2.activities:findElementUIInSequenceUI(sequenceUI, instance) - if eltUI then r2.activities:downUpElementUI(eltUI, instance) end - end - - r2.miniActivities:updateMiniActivityView() -end ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onSelect(instance, isSelected) -end - ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onAttrModified(instance, attributeName) - - local activeLogicEntity = r2:getSelectedInstance() - if activeLogicEntity and activeLogicEntity.isGrouped and (activeLogicEntity:isGrouped() or activeLogicEntity:isKindOf("NpcGrpFeature")) then - activeLogicEntity = r2:getLeader(activeLogicEntity) - end - - if activeLogicEntity ~= instance:getParentOfKind("LogicEntity") then return end - - local activitySequInst = instance.Parent.Parent - local activeLogicEntityParent = activitySequInst:getActiveLogicEntityParent() - - if activeLogicEntity==nil or activeLogicEntity~=activeLogicEntityParent then - return - end - - local sequenceUI = r2.activities:findSequenceUIFromInstance(activitySequInst) - if r2.activities.isInitialized and sequenceUI then - local eltUI = r2.activities:findElementUIInSequenceUI(sequenceUI, instance) - if eltUI then r2.activities:updateElementUI(eltUI) end - end - - -- update mini activities view - r2.miniActivities:updateMiniActivityView() -end - ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onTargetInstanceEraseRequested(instance, refIdName, refIdIndexInArray) - if refIdName == "ActivityZoneId" then - r2.requestEraseNode(instance.InstanceId, "", -1) - end -end - ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onTargetInstanceAttrModified(instance, refIdName, refIdIndexInArray, targetAttrName, targetAttrIndexInArray) -end - -------------------------------------------------- -function r2:activityStepPropertySheetDisplayer() - return activityStepPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end diff --git a/code/ryzom/common/data_common/r2/r2_base_class.lua b/code/ryzom/common/data_common/r2/r2_base_class.lua deleted file mode 100644 index 9b053e26e..000000000 --- a/code/ryzom/common/data_common/r2/r2_base_class.lua +++ /dev/null @@ -1,870 +0,0 @@ ---------------------------------------------- --- Base class for R2 components / features -- ---------------------------------------------- - --- NB : throughout the file 'this' is used instead of the lua 'self' to denote the fact --- that method are not called on the class definition, but on the instances of this class - -baseClass = -- not local here because of the implementation ... -{ - ---------------------- - -- CLASS PROPERTIES -- - ---------------------- - - BaseClass = "", -- Name of the base class - Version = 0, - Name = "BaseClass", -- Name of the class - BuildPropertySheet = true, -- True if objects of this class should be editable by using a generic property sheet - -- Setting to 'true' will cause the framework to create the property sheet ui at launch - Menu="", -- ui path of the contextual menu for this class - -- - DisplayerUI = "", -- name of the C++ class that displays this object in the ui - DisplayerUIParams = "", -- parameters passed to the ui displayer when it is created - -- - DisplayerProperties = "R2::CDisplayerLua", -- 'lua' type of displayer takes the name of a lua function that must return the class of the displayer - DisplayerPropertiesParams = "propertySheetDisplayer", -- name of the function that build the displayer that update the property sheet. - -- - TreeIcon="", -- icon to be displayed in the tree (or a method returning it) - PermanentTreeIcon="", -- icon to be displayed in the tree if in permanent content (or a method returning it) - SelectBarType = "", -- type in select bar - -- rollout header for the generic property sheet (a string giving the xml code for the header) - PropertySheetHeader = nil, - - ------------------- - -- CLASS METHODS -- - ------------------- - ClassMethods = {}, - - -------------------------- - -- INSTANCES PROPERTIES -- - -------------------------- - -- * Unlike class properties above, they are created in each instance of the class. They are directly accessible in the objects. - -- * They are C++ objects exposed through the metatable mechanism - -- * They are *READ-ONLY*. They should be modified by network commands like r2.requestSetNode and the like - -- To store client side transcient values, use the native property 'User' (detailed below) instead - -- TODO complete doc (available types, widgets ...) - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Category="Advanced", Visible=false }, - }, - - - -- 'VIRTUAL' PROPERTIES (NOT IMPLEMENTED) - -- Not really properties of this class, but 'shortcuts' to other, real properties - -- The virtual properties are use by the property sheet to display properties than are jnot directly in the object, - -- but that can be found in another place. (son object for example, or object that require an indirection) - -- each virtual prop should provide a 'getPath' function which takes the InstanceId of the instance in which it is contained as its parameter - -- It should return a couple : realOwnerInstanceId, realPropName (arrays not supported yet) - -- an observer is placed on the real property to take its changes in account in the property sheet - -- IMPORTANT: the getPath function will be called each frame to see if observers should be removed - -- and placed on another target - - -- Example : indirection to fictive string property 'Toto' in the Scenario - --VirtualProp = - --{ - -- {Name="InstanceId", Type="String", WidgetStyle="StaticText", Category="Advanced", Visible=true, - -- getPath = function() - -- return r2.Scenario.InstanceId, "Toto" - -- end, - -- }, - --}, - - --------------------------------- - -- NATIVE / SPECIAL PROPERTIES -- - --------------------------------- - - -- They are implemented in C++ (thanks to the lua metatables) - -- Parent : (R/O) : The direct parent of this object. If parent object is in a table, returns the table - -- ParentInstance : (R/O) : Next parent of this object with an InstanceId. In object is contained in a property that - -- is a table, the object containing the table will be returned, not the table - -- IndexInParent : (R/O) : If parent is a table, then return index into it, -1 otherwise - -- User : Read/Write lua table attached to the object. The 'User' field itself is R/O This is the place to store client side - -- edition variables. - -- Size : (R/O) : If object is a table, returns its size, nil otherwise - -- DisplayerUI : (R/O) : for instances : returns reference to the ui displayer. May be nil. - -- In the case where the field 'DisplayerUI' of this class definition id 'R2::CDisplayerLua', it would return - -- the displayer object created by a call to the function defined in 'DisplayerUIParams' (in this class definition) - -- DisplayerVisual : (R/O) : Same as DisplayerUI but for 'in scene' displayer - -- DisplayerProperties : (R/O) : Same as DisplayerUI but for the properties displayer - -- Selectable : (R/W) : default is true. When false, the object can't be selected in the scene. This flag is local to the instance (ancestor state not inherited) - -- SelectableFromRoot : (R/O) : True if this object and also its ancestor are selectable - - ------------ - -- EVENTS -- - ------------ - -- Events that are sent to the displayers, are also sent to instances that hold those displayers : - -- By default they are not handled - -- To handle, one shouldd redefine : - -- function baseClass.onCreate(this) - -- function baseClass.onErase(this) - -- etc ... - -- see r2_ui_displayers.lua for details - -} - ---------------------- --- GENERAL METHODS -- ---------------------- - --- Methods are defined in the class definition and are nevertheless callable on instances as follow : --- instance:methodName(params ...) --- In the class, the method would be defined as follow: --- methodName = function(this, param1, param2 ...) ... some code ... end --- 'this' will be filled at runtime by a reference on the instance on which the method is called. --- Method calling is possible thanks to the metamethod mechanism (in this case it is implemented in C++) --- Calling a method is in fact equivalent to doing the following : --- r2:getClass(instance).methodName(instance, param1, param2 ..) - - ---------------------------------------- --- TYPE / CLASS / PROPERTIES METHODS -- ---------------------------------------- - ---------------------------------------------------------------------------------------------------------- --- return a reference to the class of this object -function baseClass.getClass(this) - return r2:getClass(this) -end - ---------------------------------------------------------------------------------------------------------- --- get description of a property (as found in the 'Prop' table of the class definition) from its name -function baseClass.getPropDesc(this, propName) - return this:getClass().NameToProp[propName] -end - ---------------------------------------------------------------------------------------------------------- --- return name of the parent class -function baseClass.getClassName(this) - return this.Class -end - ---------------------------------------------------------------------------------------------------------- --- test if object is of the given class (or derived from the class) --- param 'class' should be a string identifying the class -function baseClass.isKindOf(this, className) - - assert( type(this) == "userdata") - local currClass = this:getClass() - while currClass do - if currClass.Name == className then - return true - end - currClass = r2.Classes[currClass.BaseClass] - end - return false -end - - ---------------------------------------------------------------------------------------------------------- --- return a 'this' of the base class --- Use this to access a method defined in a base class from a derived class --- --- example : this:delegate():doThis() -- Call the doThis function in the parent class --- --- Expected behavior is the same than with C++ : --- Call from a delegated pointer is static --- any further call is the call chain is polymorphic --- Calls to delegate can be chained --- NB : this function shouldn't be redefined in derived classes (the delegation mechanism uses a pointer on this function) ---function baseClass.delegate(this) --- return __baseClassImpl.delegate(this) -- implementation defined in "r2_base_class_private.lua" ---end - ---------------------------------------------------------------------------------------------------------- --- Get actual C++ "this" for this object. Because of the delegation mechanism, this may be a raw C++ object --- or a lua table that performs the delegation --- OBSOLETE, TO REMOVE -function baseClass.getRawThis(this) - -- return __baseClassImpl.getRawThis(this) -- implementation defined in "r2_base_class_private.lua" - return this -end - - ---------------------------------------------------------------------------------------------------------- --- compare current "this", with another "this" pointer --- This should be the standard way to compare instance in memory because 'this' may sometime be a userdata --- (raw C++ pointer to internal C++ object), or a table (delegated 'this' pointer) --- OBSOLETE, TO REMOVE -function baseClass.isSameObjectThan(this, other) - --if this:isKindOf("Act") then - -- breakPoint() - --end - --return this:getRawThis() == other:getRawThis() - return this == other -end - - - - ---------------------------------------------------------------------------------------------------------- --- Helper : Return world position (that is, absolute position). By default, object deriving from the base class have no position -function baseClass.getWorldPos() - return { x = 0, y = 0, z = 0 } -end - ---------------------------------------------------------------------------------------------------------- --- When adding content, pionneer have a limited budget. This method gives the 'cost' of this object (0 by default) ---function baseClass.getUsedQuota(this) --- return 0 ---end - -------------------- --- SCENARIO COST -- -------------------- - ---------------------------------------------------------------------------------------------------------- --- See wether this element has a cost in the scenario -function baseClass.hasScenarioCost(this) - return false -end - ---------------------------------------------------------------------------------------------------------- --- get local cost cached in object -function baseClass.getLocalCost(this) - return defaulting(this.User.Cost, 0) -end - ---------------------------------------------------------------------------------------------------------- --- set local cost in object -function baseClass.setLocalCost(this, cost) - this.User.Cost = cost -end - ---------------------------------------------------------------------------------------------------------- --- get local static cost cached in object -function baseClass.getLocalStaticCost(this) - return defaulting(this.User.StaticCost, 0) -end - ---------------------------------------------------------------------------------------------------------- --- set local static cost in object -function baseClass.setLocalStaticCost(this, cost) - this.User.StaticCost = cost -end - - - -function baseClass.getStaticObjectCost(this) - return 0 -end - -function baseClass.getAiCost(this) - return 0 -end - ----------------------- --- OBJECT HIERARCHY -- ----------------------- - ---------------------------------------------------------------------------------------------------------- --- append all sub-content that is "kind of" 'kind' to 'destTable' --- NB : this is very SLOW!!! please use iterators instead (see r2:enumInstances) -function baseClass.appendInstancesByType(this, destTable, kind) - assert(type(kind) == "string") - if this.CompareClass and this.CompareClass == true then - if this.Class == kind then - if destTable == nil then - dumpCallStack(1) - end - table.insert(destTable, this:getRawThis()) - end - elseif this:isKindOf(kind) then - if destTable == nil then - dumpCallStack(1) - end - table.insert(destTable, this:getRawThis()) - end -end - ---------------------------------------------------------------------------------------------------------- --- Append all instances rooted at this object (including this one) - -function baseClass.getSons(this, destTable) - r2:exploreInstanceTree(this, destTable) -end - ---------------------------------------------------------------------------------------------------------- --- Search first ancestor of the wanted kind (that is of class 'className' or a derived class) -function baseClass.getParentOfKind(this, className) - local parent = this.ParentInstance - while parent do - assert(parent.isKindOf) - if parent:isKindOf(className) then return parent end - parent = parent.ParentInstance - end - return nil -end - ---------------------------------------------------------------------------------------------------------- --- Search parent until an act is found -function baseClass.getParentAct(this) - return this:getParentOfKind("Act") -end - ---------------------------------------------------------------------------------------------------------- --- Search parent until a scenario is found -function baseClass.getParentScenario(this) - return this:getParentOfKind("Scenario") -end - ---------------------------------------------------------------------------------------------------------- --- See if hits object is inserted in the default feature (that is : single npcs, bot objects, roads etc. with no enclosing group or feature) -function baseClass.isInDefaultFeature(this) - return this.ParentInstance:isKindOf('DefaultFeature') -end - - --------------------------- --- UI METHODS / DISPLAY -- --------------------------- - ---------------------------------------------------------------------------------------------------------- --- Called by the contextual menu/toolbar when the 'delete' option is chosen by the user --- on THIS client --- This is the place to perform additionnal deletion tasks --- Example : a vertex may want to delete its containing region when there are 2 vertices left only --- default -> just call 'r2.requestEraseNode' -function baseClass.onDelete(this) - if this.User.DeleteInProgress == true then return end - this.User.DeleteInProgress = true - this:setDeleteActionName() - this:selectNext() - r2.requestEraseNode(this.InstanceId, "", -1) - r2.requestEndAction() -end - --- helper : add "delete : name_of_the_thing_being_deleted" in the action historic as the name of the delete action that is about --- to be done -function baseClass.setDeleteActionName(this) - r2.requestNewAction(concatUCString(i18n.get("uiR2EDDeleteAction"), this:getDisplayName())) -end - - ---------------------------------------------------------------------------------------------------------- --- Test wether the user can delete this object -function baseClass.isDeletable(this) - if this.Deletable and this.Deletable == 0 then return false end - return true -end - ---------------------------------------------------------------------------------------------------------- --- called when the instance is selected (default is no op) -function baseClass.onSelect(this) - -end - ---------------------------------------------------------------------------------------------------------- --- Tell if object can be selected as next object if a predecessor object --- has been selected in the parent list -function baseClass.isNextSelectable(this) - return false -end - ---------------------------------------------------------------------------------------------------------- --- get next selectable object (or nil else) -function baseClass.getNextSelectableObject(this) - local startIndex = this.IndexInParent - if type(startIndex) ~= "number" then return nil end - local currIndex = startIndex - while true do - currIndex = currIndex + 1 - if currIndex == this.Parent.Size then - currIndex = 0 - end - local instance = this.Parent[currIndex] - if currIndex == startIndex then break end - if instance ~= nil then - local firstSon = instance:getFirstSelectableSon() - if firstSon ~= nil and firstSon:isNextSelectable() then - return firstSon - elseif instance.Selectable and instance:isNextSelectable() then - return instance - end - end - end - if this.ParentInstance:isKindOf("DefaultFeature") then - return this.ParentInstance:getNextSelectableObject() - end - return nil -end - ---------------------------------------------------------------------------------------------------------- --- select object next to this one, if there's one -function baseClass.selectNext(this) - local nextSelection = this - while 1 do - nextSelection = nextSelection:getNextSelectableObject() - if not nextSelection or nextSelection == this then - r2:setSelectedInstanceId("") - return - end - if nextSelection then - -- should not be frozen or hiden - if (not nextSelection.DisplayerVisual) or (nextSelection.DisplayerVisual.DisplayMode ~= 1 and nextSelection.DisplayerVisual.DisplayMode ~= 2) then - r2:setSelectedInstanceId(nextSelection.InstanceId) - return - end - end - end -end - ---------------------------------------------------------------------------------------------------------- --- if an object is not selectable if may nevertheless contain selectable object, the first one is returned by this method -function baseClass.getFirstSelectableSon(this) - return nil -end - ---------------------------------------------------------------------------------------------------------- --- get select bar type -function baseClass.getSelectBarType(this) - return r2:evalProp(this:getClass().SelectBarType, this, "") -end - ---------------------------------------------------------------------------------------------------------- --- get name of tree icon -function baseClass.getTreeIcon(this) - return r2:evalProp(this:getClass().TreeIcon, this, "") -end - ---------------------------------------------------------------------------------------------------------- --- get name of tree icon -function baseClass.getPermanentTreeIcon(this) - return r2:evalProp(this:getClass().PermanentTreeIcon, this, "") -end - ---------------------------------------------------------------------------------------------------------- --- get name of tree icon according to permanent or current act -function baseClass.getContextualTreeIcon(this) - if this:getParentAct() and this:getParentAct():isBaseAct() then - return this:getPermanentTreeIcon() - else - return this:getTreeIcon() - end -end - ---------------------------------------------------------------------------------------------------------- --- get name of permanent statut icon -function baseClass.getPermanentStatutIcon(this) - return "" -end ---------------------------------------------------------------------------------------------------------- --- get name of icon to be displayed in the slect bar -function baseClass.getSelectBarIcon(this) - return this:getContextualTreeIcon() -end - ---------------------------------------------------------------------------------------------------------- --- Get the display name (in i18n format). This name will be displayed in the property sheet or inthe instance tree -function baseClass.getDisplayName(this) - local displayName = ucstring() - if this.Name ~= nil and this.Name ~= "" then - displayName:fromUtf8(this.Name) - else - return i18n.get("uiR2EDNoName") - -- local className = this.Class - -- -- tmp patch - -- if this:isKindOf("Npc") then - -- if this:isBotObject() then - -- className = "Bot object" - -- end - -- end - -- className = className .. " : " .. this.InstanceId - -- displayName:fromUtf8(className) - end - return displayName -end - ---------------------------------------------------------------------------------------------------------- --- Get the base name for instance name generation (should return a ucstring) -function baseClass.getBaseName(this) - return ucstring("") -end - - ---------------------------------------------------------------------------------------------------------- --- return true if this instance can by displayed as a button in the select bar -function baseClass.displayInSelectBar(this) - return true -end - ---------------------------------------------------------------------------------------------------------- --- get first parent that is selectable in the select bar -function baseClass.getFirstSelectBarParent(this) - local curr = this.ParentInstance - while curr and not curr:displayInSelectBar() do - curr = curr.ParentInstance - end - return curr -end - ---------------------------------------------------------------------------------------------------------- --- search the first son that could be inserted in the select bar --- default is to look recursively in the 'son select bar container' -function baseClass.getFirstSelectBarSon(this) - local sons = this:getSelectBarSons() - if not sons then return nil end - for k, v in specPairs(sons) do - if v:displayInSelectBar() then - return v - end - local firstSelectBarSon = v:getFirstSelectBarSon() - if firstSelectBarSon ~= nil then - return firstSelectBarSon - end - end -end - ---------------------------------------------------------------------------------------------------------- --- test if object can have sons than are displayable in the select bar -function baseClass.canHaveSelectBarSons(this) - return false; -end - ---------------------------------------------------------------------------------------------------------- --- return the default container that may contain object displayable in the select bar -function baseClass.getSelectBarSons() - return nil -end - ---------------------------------------------------------------------------------------------------------- --- called by the select bar when it displays its menu. Additionnal can be added there -function baseClass.completeSelectBarMenu(rootMenu) - -- no-op -end - ---------------------------------------------------------------------------------------------------------- --- The following method is called when the default ui displayer wants to know where to attach an object in the instance tree --- Default behaviour is to return the tree node of the parent object when one is found -function baseClass.getParentTreeNode(this) - parent = this.ParentInstance - while parent ~= nil do - if parent.User.TreeNodes ~= nil then - return parent.User.TreeNodes - end - parent = parent.ParentInstance - end - return nil -end - --------------------------------------------------------------------------------------------- --- Helper function for features : return the feature parent tree node in their act -function baseClass.getFeatureParentTreeNode(this) - - --return this:getParentAct():getContentTreeNodes("macro_components") - return this:getParentAct():getContentTreeNodes() -end - - --------------------------------------------------------------------------------------------- --- TODO: test if the object can be exported (true by default) -function baseClass.isExportable(this) - return true -end - ---------------------------------------------------------------------------------------------------------- --- This method is called by the C++ when the contextual menu is about to be displayed -function baseClass.onSetupMenu(this) - local class = r2:getClass(this) - local menuName = class.Menu - if menuName == nil then return end - local menu = getUI(menuName) - -- setup menu entries to select parents - --for i = 1,8 do - -- menu["selectParent" .. tostring(i)].active = false - --end - -- local parent = this.ParentInstance - -- for i = 1,9 do - -- if parent == nil or parent.Parent == nil then break end - -- menu["selectParent" .. tostring(i)].active = true - -- menu["selectParent" .. tostring(i)].uc_hardtext = i18n.get("uimR2EDSelectParent") + (parent.InstanceId .. " (" .. parent.Class .. ")") - -- --debugInfo(colorTag(0, 255, 255) .. tostring(i)) - -- parent = parent.ParentInstance - -- end - -- -- setup cut & paste entries - -- local cuttedSelection = r2:getCuttedSelection() - -- if cuttedSelection and this.accept ~= nil then - -- local canPaste = this:accept(cuttedSelection) - -- debugInfo("canPaste = " .. tostring(canPaste)) - -- menu.paste.grayed = not canPaste - -- else - -- menu.paste.grayed = true - -- end - -- debug options - local extDebug = config.R2EDExtendedDebug == 1 - menu.dump_lua_table.active = extDebug - menu.inspect_lua_table.active = extDebug - menu.translateFeatures.active = extDebug - menu.dump_dialogs_as_text.active = extDebug - menu.update_dialogs_from_text.active = extDebug - - menu.cut.active = extDebug - menu.paste.active = extDebug - - - - r2.ContextualCommands:setupMenu(this, menu) - - - - -- delete entries for dynamic content - -- local menuRoot = menu:getRootMenu() - -- local startLine = menuRoot:getLineFromId("dynamic_content_start") - -- local endLine = menuRoot:getLineFromId("dynamic_content_end") - -- assert(startLine ~= -1 and endLine ~= -1) - -- for lineToDel = endLine - 1, startLine + 1, -1 do - -- menuRoot:removeLine(lineToDel) - -- end - -- retrieve dynamic commands - -- local commands = this:getAvailableCommands() - -- local currentLine = startLine + 1 - -- local commandIndex = 1 - -- for commandIndex, command in commands do - -- menuRoot:addLineAtIndex(currentLine, i18n.get(command.TextId), "lua", "", "dyn_command_" .. tostring(commandIndex)) - -- if there's a bitmap, build a group with the buitmap in it, and add to menu - -- if command.ButtonBitmap and command.ButtonBitmap ~= "" then - -- local menuButton = createGroupInstance("r2_menu_button", "", { bitmap = command.ButtonBitmap, }) - -- if menuButton then - -- menuRoot:setUserGroupLeft(currentLine, menuButton) - -- end - -- end - --currentLine = currentLine + 1 - --end -end ---------------------------------------------------------------------------------------------------------- --- Show the property window for this instance --- (react to the event 'show properties' triggered in the ui, by contextual menu or toolbar) -function baseClass.onShowProperties(this) - -- for now a global (see r2_ui_property_sheet.lua) - r2:showProperties(this) -end - ---------------------------------------------------------------------------------------------------------- --- Return list of currently available commands to launch on that instance. --- such commands are displayed in the contextual toolbar or in the contextual menu. --- Returned value should be an array (starting at index 1) with commands of the following format : --- --- { DoCommand = function(instance) ..., -- code to execute when the command is triggered (by menu or toolbar) --- -- Because the function takes 'instance' as a parameter, it may be --- -- either a global function or a method of this class --- Id = "", -- Id of the action. The action "r2ed_context_command" defined in actions.xml --- -- will search for this id when a key is pressed to find the good action --- TextId = "...", -- Text id for entry menu & toolbar tooltip --- ButtonBitmap = "filename.tga", -- Name of the button to display in the toolbar, nil --- -- or "" if the command should not appear in the contextual toolbar --- Separator = "true", -- optionnal, false by default : specify if there should be a separator --- -- between this button and previous buttons --- ShowInMenu = false, -- false if the entry shouldn't be displayed in the menu --- IsActivity = false -- true if event is an activity --- } --- --- 'getAvailableCommands' should be called by derived class, possibly adding their --- own commands --- --- See also : 'buildCommand' - -function baseClass.getAvailableCommands(this, dest) - if this.ParentInstance:isKindOf("UserComponentHolder") then - table.insert(dest, this:buildCommand(this.onRemoveFromUserComponent, "removeFromUserComponent", "uimR2EDRemoveFromUserComponent", "")) - end - if this:isDeletable() and this.User.DeleteInProgress ~= true then - table.insert(dest, this:buildCommand(this.onDelete, "delete", "uimR2EDMenuDelete", "r2_toolbar_delete.tga")) - end - if this:getClass().BuildPropertySheet then - table.insert(dest, this:buildCommand(this.onShowProperties, "properties", "uimR2EDMenuProperties", "r2_toolbar_properties.tga", true)) - end - - if this:isKindOf("NpcCustom") then - table.insert(dest, this:buildCommand(this.customizeLook, "customize_look", "uiR2EDCustomizeLook", "r2_toolbar_customize_look.tga", false)) - end - -end - ---------------------------------------------------------------------------------------------------------- --- Build a single command entry to be used by 'getAvailableCommands' --- A command entry translates into a button in the contextual toolbar -function baseClass.buildCommand(this, command, id, textId, bitmap, separator, showInMenu) - if showInMenu == nil then showInMenu = true end - return - { - DoCommand = command, - TextId = textId, - Id = id, - ButtonBitmap = bitmap, - Separator = separator, - ShowInMenu = showInMenu, - IsActivity = false - } -end - ---------------------------------------------------------------------------------------------------------- --- same as 'buildCommand', but for activities -function baseClass.buildActivityCommand(this, command, id, textId, bitmap, separator, showInMenu) - local result = this:buildCommand(command, id, textId, bitmap, separator, showInMenu) - result.IsActivity = true - return result -end - ---------------------------------------------------------------------------------------------------------- --- Special, class method (not instance method) for dev : returns a table containing all infos on which the xml generic property sheet depends --- When this table is modified, then the xml property sheet will be rebuild for this class (when 'resetEditor' --- is called for example. -function baseClass.ClassMethods.getGenericPropertySheetCacheInfos(this) - local infos = {} - infos.Prop = this.Prop -- if one of the properties change, then must rebuild the property sheet - infos.PropertySheetHeader = this.PropertySheetHeader -- if the xml header change, then must rebuild the sheet, too - return infos -end - - ---------------------------------------------------------------------------------------------------------- --- get list of command for display in the mini toolbar -function baseClass.getAvailableMiniCommands(this, result) - -- OBSOLETE - -- table.insert(result, this:buildCommand(this.editDialogs, "edit_dialogs", "uiR2EDEditDialogs", "r2_icon_dialog_mini.tga")) - -- table.insert(result, this:buildCommand(this.editActions, "edit_actions", "uiR2EDEditActions", "r2_icon_action_mini.tga")) - -- table.insert(result, this:buildCommand(this.editReactions, "edit_reactions", "uiR2EDEditReactions", "r2_icon_reaction_mini.tga")) -end - ---------------------------------------------------------------------------------------------------------- --- Return true if sequences can be edited on that object -function baseClass.isSequencable(this) - return false -end - ---------------------------------------------------------------------------------------------------------- --- For sequencable object only (baseClass.isSequencable) : return the lookup string for a verb from an activity name --- Indeed, an activity may have different name depending on who performs it --- for example, the "Feed In Zone" activity will be name "work" for a worker kitin instead of "feed" for a carnivore -function baseClass.getActivityVerbLookupName(this, activityName) - return activityName -end - - ---------------------------------------------------------------------------------------------------------- --- is the object global to the scenario ? The select bar will call this to force the good update --- for global objects that are selectable (plot items ...) -function baseClass.isGlobalObject(this) - return false -end - - - -function baseClass.onRemoveFromUserComponent(this) - r2_core.CurrentHolderId = this.ParentInstance.InstanceId - r2_core:removeUserComponentElement(this.InstanceId) -end - -------------- --- REF IDS -- -------------- - --- Set the value of a refId inside this object. (empty string to delete) --- This will push a new action name & call r2.requestNode -function baseClass.setRefIdValue(this, refIdName, targetId) - local name = this:getDisplayName() - local refIdUCName = r2:getPropertyTranslation(this:getClass().NameToProp[refIdName]) - if targetId == "" then - r2.requestNewAction(concatUCString(i18n.get("uiR2EDRemovingTargetAction"), name, - i18n.get("uiR2EDAddingReferenceSeparator"), refIdname)) - else - local targetName = r2:getInstanceFromId(targetId):getDisplayName() - r2.requestNewAction(concatUCString(i18n.get("uiR2EDAddingReferenceAction"), name, - i18n.get("uiR2EDAddingReferenceSeparator"), refIdUCName, - i18n.get("uiR2EDAddingReferenceToAction"), targetName)) - end - r2.requestSetNode(this.InstanceId, refIdName, targetId) - -end - - ---------------------------- --- COPY / PASTE HANDLING -- ---------------------------- - ---------------------------------------------------------------------------------------------------------- --- see if this object support copy (false by default) -function baseClass.isCopyable(this) - return false -end - ---------------------------------------------------------------------------------------------------------- --- Create a canonical copy of this object, this copy can be used by subsequent calls to 'newCopy' -function baseClass.copy(this) - -- implementation in "r2_base_class_private.lua" -end - - --- Create a new copy from a canonical copy --- New instance ids are generated --- Default behavior is to remove all external dependencies and to rename --- internal dependencies --- The result can be used as input to 'paste' & 'ghostPaste' -function baseClass.newCopy(canonicalCopy) - -- implementation in "r2_base_class_private.lua" -end - - ---------------------------------------------------------------------------------------------------------- --- Paste the current clipboard --- not really a method here, because 'src' id a lua table (should be the content of the clipboard ...) that can be used with --- a r2.request.. command. --- - this function should copy the result in a suitable place (maybe into current selection, or at global scope) --- NB : if newPlace is not true, then the result should be past at the coordinates found in src --- - It should check that there is some room in the scenario before doing the copy -function baseClass.paste(src, newPlace, srcInstanceId) - if r2:getLeftQuota() <= 0 then - r2:makeRoomMsg() - return - end -end - -function baseClass.pasteGhost(src) - - if r2:getLeftQuota() <= 0 then - r2:makeRoomMsg() - return - end -end - - - --- TMP TMP : move events test - --- -function baseClass.onTargetInstancePreHrcMove(this, targetAttr, targetIndexInArray) - debugInfo(string.format("instance: pre hrc move : %s", targetAttr)) -end --- -function baseClass.onTargetInstancePostHrcMove(this, targetAttr, targetIndexInArray) - debugInfo(string.format("instance : post hrc move : %s", targetAttr)) -end - - - --- IMPLEMENTATION -r2.doFile("r2_base_class_private.lua") - - -r2.registerComponent(baseClass) - -baseClass = nil - - - - - - - - - - - - - - - - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_base_class_private.lua b/code/ryzom/common/data_common/r2/r2_base_class_private.lua deleted file mode 100644 index 9d51c3596..000000000 --- a/code/ryzom/common/data_common/r2/r2_base_class_private.lua +++ /dev/null @@ -1,146 +0,0 @@ ------------------------------- --- 'BaseClass' private code -- ------------------------------- - ---------------------------------------------------------------------------------------------------------- --- copy default implementation - - -- privates, used by baseClass.copy : - local srcToCopyMapping = {} -- map each instance in the src tree to its shallow vopy - - local function isInstance(inst) - return (type(inst) == "table" or type(inst) == "userdata") and inst.InstanceId ~= nil - end - - local function isArray(inst) - return type(inst) == "table" and inst.InstanceId == nil - end - - local function isInstanceArray(array) - return type(array) == "userdata" and array.Size ~= nil - end - - - -------------------------------------------------------------- - -- create canonical copy - local function canonicalCopy(node) - if isInstance(node) then - assert(node.Class ~= nil) - local newNode = {} - for k, v in specPairs(node) do - -- special case for refId in class definition - --inspect(node:getClass()) - local prop = r2.Classes[node.Class].NameToProp[k] - if prop and prop.Type == "RefId" then - newNode[k] = r2.RefId(v) - else - newNode[k] = canonicalCopy(v) - end - end - return newNode - elseif isInstanceArray(node) then - local newArray = {} - for k, v in specPairs(node) do - newArray[k] = canonicalCopy(v) - end - return newArray - else - return node - end - end - - -------------------------------------------------------------- - -- clone an object into clipboard, refid are unmodified - local function cloneNode(node, mapping) - if isInstance(node) then - assert(node.Class ~= nil) - local newNode = r2.newComponent(node.Class) - for k, v in pairs(node) do - -- special case for refId in class definition - --inspect(node:getClass()) - local prop = r2.Classes[node.Class].NameToProp[k] - if prop and prop.Type == "RefId" then - newNode[k] = r2.RefId(v) - elseif k ~= "InstanceId" and k ~= "Class" then - newNode[k] = cloneNode(v, mapping) - end - end - mapping[node.InstanceId] = newNode.InstanceId - return newNode - elseif isArray(node) then - local newArray = {} - -- workaround here : if there are only numbers in the table keys, then sort and insert - -- this allow to preserve order when duplicating a road / place - local plainArray = true - for k, v in pairs(node) do - if type(k) ~= "number" then - plainArray = false - break - end - end - if plainArray then - local indices = {} - for k, v in pairs(node) do - table.insert(indices, k) - end - table.sort(indices) - for i = 1, table.getn(indices) do - table.insert(newArray, cloneNode(node[indices[i]], mapping)) - end - else - for k, v in pairs(node) do - newArray[k] = cloneNode(v, mapping) - end - end - return newArray - else - return node - end - end - - -------------------------------------------------------------- - -- remap refid for internal refs, external refs are left unmodified - local function renameRefIds(node, mapping) - if isInstance(node) then - assert(node.Class ~= nil) - for k, v in pairs(node) do - -- special case for refId in class definition - local prop = r2.Classes[node.Class].NameToProp[k] - if prop and prop.Type == "RefId" then - --debugInfo("***" .. tostring(v)) - if mapping[tostring(v)] ~= nil then - --debugInfo("###") - node[k] = mapping[tostring(v)] -- remap internal ref - end - else - renameRefIds(v, mapping) - end - end - mapping[node] = newNode - elseif type(node) == "table" then - for k, v in specPairs(node) do - renameRefIds(v, mapping) - end - return newArray - end - end - -function baseClass.copy(this) - return canonicalCopy(this) -end - -function baseClass.newCopy(this) - table.clear(srcToCopyMapping) - local result = cloneNode(this, srcToCopyMapping) - renameRefIds(result, srcToCopyMapping) - -- if the name is a generated one, create a new name - if result.Name ~= nil and r2:isPostFixedByNumber(ucstring(result.Name)) then - result.Name = r2:genInstanceName(ucstring(result.Name)):toUtf8() - end - - -- the copy of a undeletable object is a deltable object - if result.Deletable ~= nil and result.Deletable==0 then - result.Deletable = 1 - end - return result -end diff --git a/code/ryzom/common/data_common/r2/r2_basic_bricks.lua b/code/ryzom/common/data_common/r2/r2_basic_bricks.lua deleted file mode 100644 index add13de97..000000000 --- a/code/ryzom/common/data_common/r2/r2_basic_bricks.lua +++ /dev/null @@ -1,34 +0,0 @@ - -r2.BasicBricks = {} - -r2.BasicBricks["RtScenario"] = { acts = {} } - -r2.BasicBricks["RtAct"] = -{ - id="", npc_grps={}, fauna_grps={}, ai_states={}, npcs={} -} - -r2.BasicBricks["RtNpcGrp"] = -{ - id="", Name="", children={}, - autospawn=1, bot_chat_parameters="", bot_equipment="", - bot_sheet_client="", bot_vertical_pos="auto", - count = 0, grp_keywords ="" -} - -r2.BasicBricks["RtNpc"]= -{ - id="", Name="", - chat_parameters="", equipment="", is_stuck=0, - keywords="", sheet_client="", bot_vertical_pos="auto", - angle=0, pt = {x=0,y=0,z=0} -} - -r2.BasicBricks["RtAiState"]= -{ - id="", Name="", children={}, - ai_activity="no_change", ai_movement="stand_on_start_point", - ai_profile_params = 0, keywords="", vertical_pos="auto", - pt = {} -} - diff --git a/code/ryzom/common/data_common/r2/r2_components.lua b/code/ryzom/common/data_common/r2/r2_components.lua deleted file mode 100644 index fcb68f24b..000000000 --- a/code/ryzom/common/data_common/r2/r2_components.lua +++ /dev/null @@ -1,1403 +0,0 @@ -r2.registerHighLevel = function() - local classMapDescriptionVersion = 0 - - local classMapDescription = - { - BaseClass="BaseClass", - Name = "MapDescription", - DisplayerUI = "", - ersion = classMapDescriptionVersion, - Prop = - { - {Name="Title", Type="String", Category="uiR2EDRollout_Scenario"}, - {Name="LevelId", Type="String"}, - {Name="ShortDescription", Type="String", Category="uiREDRollout_"}, - {Name="OptimalNumberOfPlayer", Type="Number", Category="uiREDRollout_", Min="1", Max="10", Default="1"}, - {Name="Creator", Type="String", Category="uiREDRollout_", WidgetStyle = "StaticText"}, - {Name="CreatorMD5", Type="String", Category="uiREDRollout_", WidgetStyle = "StaticText"}, - - {Name="CreationDate", Type="String", Category="uiREDRollout_", WidgetStyle = "StaticText"}, - {Name="OtherCharAccess", Type="String", Category="uiREDRollout_", WidgetStyle = "StaticText", DefaultValue="Full", DefaultInBase = 1 }, - {Name="NevraxScenario", Type="String", Category="uiREDRollout_", WidgetStyle = "StaticText", DefaultValue="0", DefaultInBase = 1 }, - {Name="TrialAllowed", Type="String", Category="uiREDRollout_", WidgetStyle = "StaticText", DefaultValue="0", DefaultInBase = 1 }, - {Name="ScenarioTag", Type="String", Category="uiREDRollout_", WidgetStyle = "StaticText", DefaultValue="", DefaultInBase = 1 }, - }, - - - } - - - local classScenarioVersionName = getClientCfgVar("BuildName") - local classScenarioVersion = 4 - - local classScenario = - { - --BaseClass="BaseClass", - BaseClass="LogicEntity", - Name = "Scenario", - InEventUI = true, - Version = classScenarioVersion, - VersionName =classScenarioVersionName, - BuildPropertySheet = false, - Prop = - { - {Name="AccessRules", Type="String", WidgetStyle = "StaticText"}, - {Name="Description", Type="MapDescription"}, - {Name="Acts", Type="Table"}, - {Name="Locations", Type="Table"}, - {Name="Texts", Type="TextManager"}, - {Name="VersionName", Type="String", DefaultValue=classScenarioVersionName, Visible=false }, -- just a string - {Name="Versions", Type="Table"}, - {Name="UserComponents", Type="Table"}, - {Name="PlotItems", Type="Table"}, - {Name="Language", Type="String", DefaultValue="en", Visible=false}, - {Name="Type", Type="String", DefaultValue="so_story_telling", Visible=false}, - --{Name="TestRefId", Type="RefId", Category="uiR2EDRollout_Test"}, - {Name="ScenarioScore", Type="Number", DefaultValue="0", Min="0", Visible=false}, - {Name="Score", Type="Number"}, - }, - Parameters = {}, - ApplicableActions = { - --"Start Scenario Timing", "Stop Scenario Timing", "add scenario points", "succeed scenario", "fail scenario" - }, - Events = { - -- "on scenario succeeded", "on scenario failed" - }, - Conditions = { - -- "is active", "is finished" - }, - TextContexts = {}, - TextParameters = {}, - LiveParameters = {}, - ---------------------------------------------------------------------------------------------------- - isDisplayModeOptionAvailable = function(this) return false end, - ---------------------------------------------------------------------------------------------------- - updateVersion = function(this, scenarioValue, currentValue) - local patchValue = scenarioValue - if patchValue < 1 then - -- Patch only for old save (not the 0.0.3) - if VersionName ~= "0.0.3" then - -- TODO use identifier instead - local oldValue = this.Description.LocationId - local newValue = oldValue - - if 0 == oldValue then - newValue = 1 - elseif 1 <= oldValue and oldValue <= 5 then - newValue = oldValue + 2 - elseif 6 == oldValue then - newValue = 9 - elseif 7 == oldValue then - newValue = 11 - elseif 8 <= oldValue and oldValue <= 27 then - newValue = oldValue + 5 - end - - r2.requestSetNode(this.Description.InstanceId, "LocationId", newValue) - end - patchValue = 1 - end - - -- plot item feature - if patchValue < 2 then - r2.requestSetNode(this.InstanceId, "PlotItems", {}) - r2.requestSetNode(this.InstanceId, "UserComponents", {}) - patchValue = 2 - end - - -- update of enum for scenario type - if patchValue < 3 then - if this.Type == nil or this.Type == "" then - r2.requestSetNode(this.InstanceId, "Type", "so_story_telling") - elseif this.Type == "Roleplay" then - r2.requestSetNode(this.InstanceId, "Type", "so_story_telling") - elseif this.Type == "Combat" then - r2.requestSetNode(this.InstanceId, "Type", "so_hack_slash") - end - patchValue = 3 - end - - -- patch for level - if patchValue < 4 then - if this.Description.LevelId == nil or this.Description.LevelId < 0 or this.Description.LevelId > 5 then - r2.requestSetNode(this.Description.InstanceId, "LevelId", 0) - end - patchValue = 4 - end - - - - if patchValue == currentValue then return true end - return false - end, - - --------------------------------------------------------------------------------------------------------- - -- get name of tree icon - getContextualTreeIcon = function(this) - return this:getTreeIcon() - end, - - ----------------------------------------------------------------------------- - getBaseAct = function(this) - return this.Acts[0] - end, - - getCurrentAct = function(this) - return r2:getCurrentAct() - end, - ----------------------------------------------------------------------------- - -- from baseClass - getDisplayName = function(this) - return i18n.get("uiR2EDScenario") - end, - ----------------------------------------------------------------------------- - -- from baseClass - isDeletable = function(this) - return false - end, - ----------------------------------------------------------------------------- - -- - getBaseActLeftBudget = function(this) - local maxValue = this:getMaxSecondaryActCost() - return this.Description.MaxEntities - this:getBaseAct():getLocalCost() - maxValue - end, - ----------------------------------------------------------------------------- - -- Called by the C++ just before testing to see if the cost of this scenario is valid - -- Should return true in this case - -- If the scenario has a too high cost, then this function has the responsability to warn the player - validateForTesting = function(this) - if this:getMaxSecondaryActCost() < 0 then - messageBox(i18n.get("uiR2EDScenarioBudgetExceeded")) - return false - else - return true - end - end, - ----------------------------------------------------------------------------- - -- - getMaxSecondaryActCost = function(this) - local scenarioObj = r2.getScenarioObj() - local max = 0 - local maxStatic = 0 - local first = true - k,v = next(this.Acts,nil) - while k~=nil do - if first == true then - first = false - else - if max < v:getLocalCost() then - max = v:getLocalCost() - end - if maxStatic < v:getLocalStaticCost() then - debugInfo("setting maxStatic") - maxStatic = v:getLocalStaticCost() - end - end - k,v=next(this.Acts,k) - end - - return max, maxStatic - end, - ----------------------------------------------------------------------------- - -- returns a table with all objects of kind "kind" in the permanent act & current act - getAllInstancesByType = function(this, kind) - assert(type(kind) == "string") - local result = {} - --this:delegate():appendInstancesByType(result, kind) - r2.Classes.BaseClass.appendInstancesByType(this, result, kind) - this.Acts[0]:appendInstancesByType(result, kind) - local currAct = r2:getCurrentAct() - if currAct ~= nil and currAct ~= this.Acts[0] then - currAct:appendInstancesByType(result, kind) - end - return result - end, - ----------------------------------------------------------------------------- - -- from baseClass - completeSelectBarMenu = function(this, rootMenu) - -- if all acts are not used, propose to create a new one - --rootMenu:addSeparator() - --r2:addMenuLine(rootMenu, this:getDisplayName(), "lua", "r2:setSelectedInstanceId('" .. this.InstanceId .."')", tostring(k), this:getSelectBarIcon(), 14) - --rootMenu:addSeparator() - --r2:addMenuLine(rootMenu, i18n.get("uiR2EDNewAct"), "lua", "r2.ScenarioWindow:newAct()", "new_act", "r2_icon_create.tga", 14) - end, - ----------------------------------------------------------------------------- - -- from baseClass - displayInSelectBar = function(this) - return false -- don't display in the selection bar (only acts can be ...) - end, - -- - --------------------------------------------------------------------------------------------------------- - -- from base class - getFirstSelectBarSon = function(this) - return r2:getCurrentAct():getFirstSelectBarSon() - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - canHaveSelectBarSons = function(this) - return false; - end, - --------------------------------------------------------------------------------------------------------- - -- from base class, update the item ui on first display - onPostCreate = function(this) - r2.PlotItemsPanel:reinit() - r2.PlotItemDisplayerCommon:touch() - if r2.Mode == "Edit" then - -- if some element in the scenario are hidden, then display - -- a message for the user to remember it - -- local sons = {} - -- this:getSons(sons) - -- local showWarning = false - -- for k, v in pairs(sons) do - -- if type(v) == "userdata" and v.isKindOf and v:isKindOf("WorldObject") and v.DisplayMode ~= 0 then - -- showWarning = true - -- break - -- end - -- end - -- if showWarning then - -- messageBox(i18n.get("uiR2EDDisplayModeMenuReminder")) - -- end - -- reset display modes - r2.PrimDisplayFrozen = false - r2.PrimDisplayVisible = true - r2.PrimDisplayContextualVisibility = false - r2.BotObjectsFrozen = false - r2:setupFreezeBotObjectButton() - end - end, - - onAttrModified = function(this, name) - if this == r2.Scenario then - if name ~= "Acts" then - r2.ScenarioWindow:updateScenarioProperties() - end - - if name=="Acts" and r2.Scenario:getCurrentAct()==r2.Scenario:getBaseAct() and r2.Scenario.Acts.Size>1 then - r2.ScenarioWindow:setAct( r2.Scenario.Acts[1] ) - end - end - end, - - ----------------------------------------------------------------------------- - onErase = function(this) - r2.acts.deleteOldScenario = false - end, - getName = function(this) - if this.Ghost_Name then return this.Ghost_Name end - return this.Name - end, - } - - ---------------------------------------------------------------------------- - -- add a line to the event menu - function classScenario.initLogicEntitiesMenu(this, logicEntityMenu) - local name = i18n.get("uiR2EDScenario") - logicEntityMenu:addLine(name, "lua", "", "Scenario") - end - - ---------------------------------------------------------------------------- - -- add a line to the event sub menu - function classScenario.initLogicEntitiesInstancesMenu(this, subMenu, calledFunction) - local uc_name = ucstring() - uc_name:fromUtf8(r2.Scenario:getName()) - subMenu:addLine(uc_name, "lua", calledFunction.."('".. r2.Scenario.InstanceId .."')", r2.Scenario.InstanceId) - end - - ---------------------------------------------------------------------------- - -- add a line to the event menu - function classScenario:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - --["Start Scenario Timing"] = { menu=i18n.get( "uiR2AA0ScenarioStartTiming" ):toUtf8(), - -- text=i18n.get( "uiR2AA1ScenarioStartTiming" ):toUtf8()}, - --["Stop Scenario Timing"] = { menu=i18n.get( "uiR2AA0ScenarioStopTiming" ):toUtf8(), - -- text=i18n.get( "uiR2AA1ScenarioStopTiming" ):toUtf8()}, - --["add scenario points"] = { menu=i18n.get( "uiR2AA0ScenarioAddPoints" ):toUtf8(), - -- text=i18n.get( "uiR2AA1ScenarioAddPoints" ):toUtf8()}, - --["succeed scenario"] = { menu=i18n.get( "uiR2AA0ScenarioSucceed" ):toUtf8(), - -- text=i18n.get( "uiR2AA1ScenarioSucceed" ):toUtf8()}, - --["fail scenario"] = { menu=i18n.get( "uiR2AA0ScenarioFail" ):toUtf8(), - -- text=i18n.get( "uiR2AA1ScenarioFail" ):toUtf8()}, - }, - ["Events"] = { - --["On Scenario Started"] = { menu=i18n.get( "uiR2Event0ScenarioStart" ):toUtf8(), - -- text=i18n.get( "uiR2Event1ScenarioStart" ):toUtf8()}, - --["on scenario succeeded"] = { menu=i18n.get( "uiR2Event0ScenarioSucceed" ):toUtf8(), - -- text=i18n.get( "uiR2Event1ScenarioSucceed" ):toUtf8()}, - --["on scenario failed"] = { menu=i18n.get( "uiR2Event0ScenarioFailed" ):toUtf8(), - -- text=i18n.get( "uiR2Event1ScenarioFailed" ):toUtf8()}, - }, - ["Conditions"] = { - } - } - return logicTranslations - end - - function classScenario.initEventValuesMenu(this, menu, categoryEvent) - for ev=0,menu:getNumLine()-1 do - - local eventType = tostring(menu:getLineId(ev)) - - if r2.events.eventTypeWithValue[eventType] == "Number" then - menu:addSubMenu(ev) - local subMenu = menu:getSubMenu(ev) - local func = "" - - local lineNb = 0 - for i=1, 100, 20 do - local lineStr = tostring(i).."/"..tostring(i+19) - subMenu:addLine(ucstring(lineStr), "", "", tostring(i)) - - subMenu:addSubMenu(lineNb) - local subMenu2= subMenu:getSubMenu(lineNb) - for s=0, 19 do - lineStr = tostring(i+s) - local func = "r2.events:setEventValue('','" .. categoryEvent .."','".. lineStr.."')" - subMenu2:addLine(ucstring(lineStr), "lua", func, lineStr) - end - lineNb = lineNb+1 - end - end - end - end - - function classScenario.pretranslate(this, context) - -- Nothing to do: Done by act[0]:pretranslate - end - - function classScenario.translate(this, context) - r2.Translator.translateAiGroup(this, context) - end - - - function classScenario.getLogicEvent(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, firstCondition, lastCondition = nil, nil, nil - - local rtNpcGrp = r2.Translator.getRtGroup(context, r2.Scenario.Acts[0].InstanceId) - assert(rtNpcGrp) - - if eventType == "On Scenario Started" then - return r2.Translator.createEvent("timer_t0_triggered", "", rtNpcGrp.Id) - elseif eventType == "on scenario succeeded" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 7) - elseif eventType == "on scenario failed" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 8) - end - - return eventHandler, firstCondition, lastCondition - end - - function classScenario.getLogicAction(entity, context, action) - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Utils.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if (action.Action.Type == "Start Scenario Timing") then - local action = r2.Translator.createAction("start_scenario_timing") - return action, action - elseif (action.Action.Type == "Stop Scenario Timing") then - local action = r2.Translator.createAction("stop_scenario_timing") - return action, action - elseif (action.Action.Type == "add scenario points") then - if not action.Action.ValueString then return end - local points = tonumber(action.Action.ValueString) - local baseAct = r2.Scenario:getBaseAct() - local rtBaseActGrp = r2.Translator.getRtGroup(context, baseAct.InstanceId) - - local action = r2.Translator.createAction("add_scenario_points", rtBaseActGrp.Id, points) - return action, action - elseif action.Action.Type == "succeed scenario" then - local action1 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Success", 1) - local action2 = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 7) - local retAction = r2.Translator.createAction("multi_actions", {action1, action2}) - assert(retAction) - return retAction, retAction - elseif action.Action.Type == "fail scenario" then - local action1 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Success", 0) - local action2 = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 8) - local retAction = r2.Translator.createAction("multi_actions", {action1, action2}) - assert(retAction) - return retAction, retAction - end - - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) - end - - function classScenario.getLogicCondition(this, context, condition) - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Utils.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationCondition(condition, rtNpcGrp) - end - - - - function classScenario.getActIndex(this, actInstanceId) - local index = 0 - local k, v = next(this.Acts) - while k do - if tostring(v.InstanceId) == actInstanceId then - return index - end - index = index + 1 - k, v = next(this.Acts, k) - end - return -1 - end - - - -- maps each season found in the list box season to an enum to pass to setEditorSeason - r2.ListBoxSeasonToEditorSeason = - { - [0] = "Automatic", - [1] = "Spring", - [2] = "Summer", - [3] = "Autumn", - [4] = "Winter" - } - - - local classActVersion = 6 - - local classAct = - { - BaseClass="LogicEntity", - Name = "Act", - InEventUI = true, - Menu="ui:interface:r2ed_base_menu", - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "createActUIDisplayer", - TreeIcon="r2ed_icon_act.tga", - Version=classActVersion, - Parameters = {}, - ApplicableActions = { - "Start Act", - }, - Events = { - "On Act Started", - --"On Scenario Started", - }, - Conditions = { - -- "is active", "is finished" - }, - TextContexts = {}, - TextParameters = {}, - LiveParameters = {}, - Prop = - { - {Name="Version", Type="Number", Visible=false, DefaultValue=tostring(classActVersion)}, - {Name="Features", Type="Table"}, - {Name="Events",Type="Table"}, - - -- following field are tmp for property sheet building testing - -- {Name="PVP", Type="Number", WidgetStyle="Boolean", Category="uiR2EDRollout_Test" }, - -- {Name="Slider1", Type="Number", WidgetStyle="Slider", Category="uiR2EDRollout_Test"}, - -- {Name="Slider2", Type="Number", WidgetStyle="Slider", Category="uiR2EDRollout_Test"}, - -- {Name="ComboBox1", Type="Number", WidgetStyle="EnumDropDown", - -- Enum= { "Toto", "Tata", "Titi" } - --}, - -- {Name="ComboBox2", Type="Number", WidgetStyle="EnumDropDown", - -- Enum= { "A", "B", "C" } - -- }, - {Name="Title", Type="String", WidgetStyle = "StaticText"}, - {Name="Name", Type="String", MaxNumChar="25"}, - - - {Name="ActivitiesIds",Type="Table"}, - {Name="Counters",Type="Table"}, - {Name="ManualWeather", Type="Number", WidgetStyle="Boolean", DefaultValue="0", - Visible = function(act) return not act:isBaseAct() end, - }, - {Name="WeatherValue", Type="Number", WidgetStyle="Slider", Min=0, Max=1022, -- The final value in the Rt datas is 0 for autiweather and 1-1023 for weather value ([1, 1023] range <=> [0, 1022]) - Visible = function(act) return act.ManualWeather == 1 and not act:isBaseAct() end, - }, - {Name="Season", Type="Number", WidgetStyle="EnumDropDown", DefaultValue="0", Visible=false, - Enum= { "uiR2EDSeasonAuto", "uiR2EDSpring", "uiR2EDSummer", "uiR2EDAutumn", "uiR2EDWinter" }, - }, - {Name="LocationId", Type="String", Visible=false}, - {Name="ShortDescription", Type="String", Visible=false}, - {Name="PreActDescription", Type="String", DefaultValue="", Visible=false, DefaultInBase=1}, - }, - - updateVersion = function(this, scenarioValue, currentValue ) - local patchValue = scenarioValue - if patchValue < 1 then - r2.requestSetNode(this.InstanceId, "ManualWeather", 0) - r2.requestSetNode(this.InstanceId, "WeatherValue", 0) - patchValue = 1 - end - - if patchValue < 2 then - if not this.Behavior then - local behavior = r2.newComponent("LogicEntityBehavior") - r2.requestInsertNode(this.InstanceId, "", -1, "Behavior", behavior) - r2.requestSetNode(this.InstanceId, "InheritPos", 1) - -- TODO Add position (0,0,0) - end - patchValue = 2 - - end - if patchValue < 3 then - if not this.Name then - r2.requestSetNode(this.InstanceId, "Name", this.Title) - end - patchValue = 3 - end - if patchValue < 4 then - if not this.ExportList then - -- r2.requestInsertNode(this.InstanceId, "", -1, "ExportList", {}) - end - patchValue = 4 - end - -- version 5 : Remove the "Cost" field -> hold locally now - if patchValue < 5 then - if this.Cost then - r2.requestEraseNode(this.InstanceId, "Cost", -1) - end - if this.StaticCost then - r2.requestEraseNode(this.InstanceId, "StaticCost", -1) - end - patchValue = 5 - end - - if patchValue < 6 then - if this.ExportList then - r2.requestEraseNode(this.InstanceId, "ExportList", -1) - end - patchValue = 6 - end - - if patchValue == currentValue then return true end - return false - end, - ----------------------------------------------------------------------------- - canChangeDisplayMode = function(this) - return false - end, - ----------------------------------------------------------------------------- - onActChanged = function(this) - assert(this) - if this == r2:getCurrentAct() then - r2.acts:updatePaletteFromEcosystem() - r2.ScenarioWindow:updateActProperties() - end - end, - ----------------------------------------------------------------------------- - onAttrModified = function(this, name) - if name == "Features" or Name == "Events" then - -- ignore messages triggeered by sons for the update of the property window - return - end - r2.ScenarioWindow:updateActProperties() - end, - ----------------------------------------------------------------------------- - onErase = function(this) - - this.User.Deleted = true - - if this.User.DeleteInProgress == true then return end - - this.User.DeleteInProgress = true - this:setDeleteActionName() - -- assume than on delete can only be called if this act is selected - --assert(this:isSameObjectThan(r2:getCurrentAct())) - - -- update name of acts in act combo box - local afterDeletedAct = false - for i=0, r2.Scenario.Acts.Size-1 do - local act = r2.Scenario.Acts[i] - if afterDeletedAct then - r2.ActUIDisplayer:updateActName(act) - elseif act==this then - afterDeletedAct = true - end - end - - -- if Act[1] exists go to act1 - if not r2.acts.deleteOldScenario then - if (table.getn(r2.Scenario.Acts) > 1) and (this~=r2.Scenario.Acts[1]) then - r2.ScenarioWindow:setAct( r2.Scenario.Acts[1] ) - else - r2:setCurrentActFromId(r2.Scenario:getBaseAct().InstanceId) - - if r2.logicComponents.undoRedoInstances[this.InstanceId] and (table.getn(r2.Scenario.Acts) <= 2) then - r2.acts:openScenarioActEditor(false, true, true) - end - end - end - - if r2.logicComponents.undoRedoInstances[this.InstanceId] then - r2.logicComponents.undoRedoInstances[this.InstanceId] = nil - end - end, - - ----------------------------------------------------------------------------- - updateWeather = function(this) - if this==r2:getCurrentAct() and this.WeatherValue and this.ManualWeather then - setWeatherValue(this.ManualWeather == 0, this.WeatherValue / 1022) - end - end, - ----------------------------------------------------------------------------- - accept = function(this, targetInstance) - if targetInstance:isKindOf("BanditCampFeature") then - return "Features" - else - return nil - end - end, - getSelectBarIcon = function(this) - return "r2ed_icon_act.tga" - end, - ----------------------------------------------------------------------------- - isBaseAct = function(this) - local parentScenario = this:getParentScenario() - if not parentScenario then return false end - return this:isSameObjectThan(parentScenario:getBaseAct()) - --return this == this:getParentScenario():getBaseAct() - end, - - ----------------------------------------------------------------------------- - -- get the tree control where object other than botobject are inserted in this act - getContentTree = function(this) - return this.User.ContentTree - end, - - ----------------------------------------------------------------------------- - -- get the tree control where macro components are inserted in this act - getMacroContentTree = function(this) - return this.User.MacroContentTree - end, - - ----------------------------------------------------------------------------- - -- get the tree control where object other than botobject are inserted in this act - getContentTreeNodes = function(this, nodeName) - - local nodes = {} - if this:isBaseAct() then - local acts = this.Parent - if acts.Size>1 then - for i=1, acts.Size-1 do - if acts[i]:getContentTree() then - local node - if nodeName then - node = acts[i]:getContentTree():getRootNode():getNodeFromId(nodeName) - else - node = acts[i]:getMacroContentTree():getRootNode() - end - nodes[acts[i].InstanceId] = node - else - return nil - end - end - end - else - local node - if nodeName then - node = this:getContentTree():getRootNode():getNodeFromId(nodeName) - else - node = this:getMacroContentTree():getRootNode() - end - nodes[this.InstanceId] = node - end - return nodes - end, - - ----------------------------------------------------------------------------- - -- get the default feature for this act - getDefaultFeature = function(this) - assert(this.Features[0]:isKindOf("DefaultFeature")) - return this.Features[0] - end, - ----------------------------------------------------------------------------- - hasScenarioCost = function(this) - return true - end, - - getName = function(this) - assert(this) - - local name = this.Name - local actNb = r2.logicComponents:searchElementIndex(this)-1 - - local firstPart = i18n.get("uiR2EDDefaultActTitle"):toUtf8().. actNb - local firstPartSpace = i18n.get("uiR2EDDefaultActTitle"):toUtf8().. " " .. actNb - if name=="" then - name = firstPartSpace - elseif string.lower(name)==string.lower(firstPart) or string.lower(name)==string.lower(firstPartSpace) then - else - name = firstPartSpace .. ":" .. name - end - - return name - end, - setName = function(this, value) - assert(this) - this.Name = value - end, - ----------------------------------------------------------------------------- - -- from baseClass - getDisplayName = function(this) - if this:isBaseAct() then - return i18n.get("uiR2EDBaseAct") - end - local result = ucstring() - result:fromUtf8(this:getName()) - return result - end, - ----------------------------------------------------------------------------- - -- from baseClass - isDeletable = function(this) - return not this:isBaseAct() - end, - --------------------------------------------------------------------------------------------------------- - -- called when the instance is selected (default is no op) - onSelect = function(this, selected) - if selected and this ~= r2:getCurrentAct() then - -- act was changed from the select bar, update editor state - r2.ScenarioWindow:setAct(this) - end - end, - --------------------------------------------------------------------------------------------------------- - -- from baseClass : - -- special : the scenario is not displayed in the select bar, but serves as a 'root' for enumeration so - -- we return it when acts menu is popped in the selectbar, so that acts can be enumerated - getFirstSelectBarParent = function(this) - return this.ParentInstance - end, - --------------------------------------------------------------------------------------------------------- - -- from baseClass : - getSelectBarSons = function(this) - return this.Features - end, - - --------------------------------------------------------------------------------------------------------- - -- from BaseClass - getParentAct = function(this) - return this - end - } - - function classAct.getActivitiesIds(this) - local actActivitiesIds = {} - local k, v = next(this.Features, nil) - while k do - local activitiesIds = {} - if v.getActivitiesIds then - activitiesIds = v:getActivitiesIds() - table.merge(actActivitiesIds, activitiesIds) - end - k, v = next(this.Features, k) - end - return actActivitiesIds - end - - function classAct.getWorldPos(this) - return { x = 0, y = 0, z = 0 } - end - - ---------------------------------------------------------------------------- - -- add a line to the event sub menu - function classAct.initLogicEntitiesInstancesMenu(this, subMenu, calledFunction) - - local empty = true - local actsTable = r2.Scenario.Acts - - for i=0, r2.Scenario.Acts.Size-1 do - local act = r2.Scenario.Acts[i] - if not act:isBaseAct() then - local uc_name = ucstring() - uc_name:fromUtf8(act.Name) - subMenu:addLine(uc_name, "lua", calledFunction.."('".. act.InstanceId .."')", act.InstanceId) - empty = false - end - end - - if empty==true then - subMenu:addLine(i18n.get("uiR2EdNoSelelection"), "", "", "") - end - end - - ---------------------------------------------------------------------------- - -- add a line to the event menu - function classAct:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["Start Act"] = { menu=i18n.get( "uiR2AA0ActStart" ):toUtf8(), - text=i18n.get( "uiR2AA1ActStart" ):toUtf8()}, - }, - ["Events"] = { - ["On Act Started"] = { menu=i18n.get( "uiR2Event0ActStart" ):toUtf8(), - text=i18n.get( "uiR2Event1ActStart" ):toUtf8()}, - }, - ["Conditions"] = { - } - } - return logicTranslations - end - - ----------------------------------------------------------------------------- - -- eval the used quota for this act alone - function classAct.getUsedQuota(this) - return this:getLocalCost() - end - - ----------------------------------------------------------------------------- - function classAct.appendInstancesByType(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.BaseClass.appendInstancesByType(this, destTable, kind) - for key, feature in specPairs(this.Features) do - feature:appendInstancesByType(destTable, kind) - end - end - ----------------------------------------------------------------------------- - function classAct.onDelete(this) - if this.User.DeleteInProgress == true then return end - - -- assume than on delete can only be called if this act is selected - assert(this:isSameObjectThan(r2:getCurrentAct())) - - r2.ScenarioWindow:deleteAct() - end - - ----------------------------------------------------------------------------- - -- return the left quota to add content into this act - function classAct.getLeftQuota(this) - if this:isBaseAct() - then - local maxValue, maxValue2 = this:getParentScenario():getMaxSecondaryActCost() - local leftQuota = r2.getMaxNpcs() - this:getLocalCost() - maxValue - local leftStaticQuota = r2.getMaxStaticObjects() - this:getLocalStaticCost() - maxValue2 - - return leftQuota, leftStaticQuota - else - --return this:getParentScenario().Description.MaxEntities - this:getParentScenario():getBaseAct().Cost - this.Cost - local cost = r2.getMaxNpcs() - this:getParentScenario():getBaseAct():getLocalCost() - this:getLocalCost() - local staticCost = r2.getMaxStaticObjects() - this:getParentScenario():getBaseAct():getLocalStaticCost() - this:getLocalStaticCost() - - return cost, staticCost - end - end - - function classAct.getActId(this) - assert(this) - local parent = this:getParentScenario() - local id = -1; - local k,v = next(parent.Acts, nil) - while k do - id = id + 1 - if this:isSameObjectThan(v) then - return id - end - k,v = next(parent.Acts, k) - end - return id -- -1 - - end - - function classAct.getLogicAction(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - local firstAction, lastAction = nil, nil - if action.Action.Type == "Start Act" then - firstAction, lastAction = r2.Translator.createAction("dssStartAct", entity:getActId()) - assert(firstAction) - assert(lastAction) - end - - return firstAction, lastAction - end - - - function classAct.getLogicEvent(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "On Act Started" then - return r2.Translator.createEvent("timer_t0_triggered", "", rtNpcGrp.Id) - end - - - return eventHandler, firstCondition, lastCondition - end - - function classAct.getLogicCondition(this, context, condition) - return nil - end - - - ---------------------------------------------------------------------------- - -- Create a controler for the current Act - -- - function classAct.pretranslate(this, context) - r2.Translator.createAiGroup(this, context) - end - - function classAct.translate(this, context) - entity = this - - if this:isBaseAct() then - local baseAct = this:getParentScenario():getBaseAct() - local rtNpcGrpBase = r2.Translator.getRtGroup(context, baseAct.InstanceId) - local rtAction = r2.Translator.createAction("set_scenario_points", rtNpcGrpBase.Id ) - - r2.Translator.translateAiGroupEvent("timer_t1_triggered", this, context, rtAction) - end - - - if not this:isBaseAct() then - r2.Translator.translateAiGroup(entity, context) - local rtNpcGrp = r2.Translator.getRtGroup(context, entity.InstanceId) - local baseAct = this:getParentScenario():getBaseAct() - local rtNpcGrpBase = r2.Translator.getRtGroup(context, baseAct.InstanceId) - local index = context.Scenario:getActIndex(this.InstanceId) - - local rtAction = r2.Translator.createAction("act_starts", rtNpcGrp.Id, rtNpcGrpBase.Id, index) - r2.Translator.translateAiGroupInitialState(entity, context, rtAction) - end - end - - local classLocationVersion = 1 - local classLocation = - { - Version = classLocationVersion, - BaseClass="BaseClass", - Name = "Location", - Prop = - { - {Name="IslandName", Type="String"}, - {Name="ShortDescription", Type="String"}, - {Name="Time", Type="Number"}, - {Name="EntryPoint", Type="String"}, - {Name="Season", Type="String", DefaultValue=""}, - {Name="ManualSeason", Type="Number", WidgetStyle="Boolean", DefaultValue="0" }, - }, - - onCreate = function(this) - this:updateSeason() - end, - - onAttrModified = function(this, name) - if not r2:getCurrentAct() then return end - if this.InstanceId == r2:getCurrentAct().LocationId then - if name == "Season" then - this:updateSeason() - end - end - - end, - - updateSeason = function(this) - - -- change season in the editor - -- effect may be seen only at the next teleport message if we're joining a session - local season = this.Season - if this.ManualSeason == 0 then season="Automatic" end - --inspect(season) - r2:setEditorSeason(season) - end, - - updateVersion = function(this, scenarioValue, currentValue ) - local patchValue = scenarioValue - if patchValue < 1 then - local updateMap = { ["summer"] = "Summer", ["winter"] = "Winter", ["fall"] = "Autumn", ["spring"] = "Spring", - ["Summer"] = "Summer", ["Winter"] = "Winter", ["Autumn"] = "Autumn", ["Spring"] = "Spring"} - if (this.ManualSeason == 1 ) then - if updateMap[ this.Season ] then - r2.requestSetNode(this.InstanceId, "Season", updateMap[this.Season]) - else - debugInfo("Wrong conversion function") - assert(nil); - end - end - patchValue = 1 - end - if patchValue == currentValue then return true end - return false - end, - - } - - local classState = - { - Name="State", - Prop= - { - {Name="InstanceId", Type="String"}, - {Name="Name", Type="String" }, - {Name="Behavior",Type="Behavior"} - } - } - - r2.registerComponent(classMapDescription) - r2.registerComponent(classScenario) - r2.registerComponent(classAct) - r2.registerComponent(classState) - r2.registerComponent(classLocation) -end - - - - ---r2.Features.Act = {} --- ---local feature = r2.Features.Act --- ---function mergeTraduction(localLogicEntityAttributes) --- local k, v = next(localLogicEntityAttributes, nil) --- while k do --- local k2, v2 = next(v, nil) --- while k2 do --- if not r2.logicEntityAttributes[k][k2] then --- r2.logicEntityAttributes[k][k2] = v2 --- end --- k2, v2 = next(v, k2) --- end --- k, v = next(localLogicEntityAttributes, k) --- end ---end --- --- ---function feature:init() --- -- register trad --- local localLogicEntityAttributes = { --- ["ApplicableActions"] = { --- ["Start Act"] = i18n.get("uiR2EdStartAct"):toUtf8(), --- }, --- ["Events"] = { --- ["On Act Started"] = i18n.get("uiR2EdOnActStarted"):toUtf8(), --- }, --- ["Conditions"] = { --- } --- } --- mergeTraduction(localLogicEntityAttributes) ---end --- ---feature.init() --- ---r2.Features["Act"] = feature --- - ------------------------------------------------ --- Not Save to disc so not version number needed - -r2.registerBasicBricks=function() - local classRtScenario = - { - Name = "RtScenario", - Prop = - { - {Name="Acts", Type="Table"}, - {Name="Texts", Type="RtTextManager"}, - {Name="PlotItems", Type="Table"}, - {Name="Locations", Type="Table"} - } - } - - r2.registerComponent(classRtScenario) - - local classRtAct = - { - Name="RtAct", - Prop= - { - {Name="Id", Type="String"}, - {Name="NpcGrps", Type="Table"}, - {Name="FaunaGrps", Type="Table"}, - {Name="AiStates", Type="Table"}, - {Name="Npcs", Type="Table"}, - {Name="Events",Type="Table"}, - {Name="Actions", Type="Table"}, - {Name="WeatherValue", Type="Number"}, - {Name="Name", Type="String"}, - {Name="IslandName", Type="String"}, - {Name="Season", Type="Number"}, - {Name="LocationId", Type="Number"}, - {Name="UserTriggers", Type="Table"} - } - } - r2.registerComponent(classRtAct) - - local classRtLocation = - { - Name="RtLocation", - Prop= - { - {Name="Id", Type="String"}, - {Name="Island", Type="String"}, - {Name="EntryPoint", Type="String"}, - {Name="Season", Type="Number"}, - } - } - r2.registerComponent(classRtLocation) - - do - local classRt = - { - Name="RtUserTrigger", - Prop= - { - {Name="Id", Type="String"}, - {Name="Name", Type="String"}, - {Name="Grp", Type="String"}, - {Name="TriggerId", Type="Number"}, - } - } - r2.registerComponent(classRt) - - end - - local classRtNpcGrp = - { - Name = "RtNpcGrp", - Prop = - { - {Name="Id", Type="String"}, - {Name="Name", Type="String"}, - {Name="Children", Type="Table"}, - {Name="AutoSpawn", Type="Number", DefaultValue="1"}, - {Name="BotChat_parameters", Type="String"}, - {Name="BotEquipment", Type="String"}, - {Name="BotSheetClient", Type="String"}, - {Name="BotVerticalPos", Type="String", DefaultValue="auto"}, - {Name="Count", Type="Number"}, - {Name="GrpKeywords", Type="String"}, - {Name="AiProfilParams", Type="String"}, - {Name="GrpParameters", Type="String"}, - - } - - } - - r2.registerComponent(classRtNpcGrp) - - local classRtNpc = - { - Name = "RtNpc", - Prop = - { - {Name="Id", Type="String", DefaultValue="" }, - {Name="Name", Type="String" }, - {Name="Children", Type="Table" }, - {Name="ChatParameters", Type="String" }, - {Name="Equipment", Type="Table" }, - {Name="IsStuck", Type="Number" }, - {Name="Keywords", Type="String" }, - {Name="Sheet", Type="String" }, - {Name="SheetClient", Type="String" }, - {Name="BotVerticalPos", Type="String", DefaultValue="auto" }, - {Name="Angle", Type="Number" }, - {Name="DmProperty", Type="Number"}, - {Name="Pt", Type="RtPosition" }, - } - } - - r2.registerComponent(classRtNpc) - - local classRtPosition = - { - Name = "RtPosition", - Prop = - { - {Name="x", Type="Number" }, - {Name="y", Type="Number" }, - {Name="z", Type="Number" }, - } - } - - r2.registerComponent(classRtPosition) - - - - - local classRtAiState = - { - Name = "RtAiState", - Prop = - { - {Name="Id", Type="String", DefaultValue="" }, - {Name="Name", Type="String" }, - {Name="Children", Type="Table" }, - {Name="AiActivity", Type="String", DefaultValue="no_change" }, - {Name="AiMovement", Type="String", DefaultValue="" }, - {Name="AiProfileParams", Type="Number" }, - {Name="Keywords", Type="String" }, - {Name="VerticalPos", Type="String", DefaultValue="auto" }, - {Name="Pts", Type="Table" }, - {Name="Reactions",Type="Table"} - } - } - - - - r2.registerComponent(classRtAiState) - - local classRtNpcEventHandler = - { - Name = "RtNpcEventHandler", - Prop = - { - {Name="Id", Type="String", DefaultValue="" }, - {Name="Name",Type="String"}, - {Name="Event", Type="String"}, - {Name="StatesByName",Type="String"}, - {Name="GroupsByName",Type="String"}, - {Name="ActionsId", Type="Table"} - } - } - - r2.registerComponent(classRtNpcEventHandler) - - local classRtNpcEventHandlerAction = - { - Name = "RtNpcEventHandlerAction", - Prop = - { - {Name="Id", Type="String", DefaultValue="" }, - {Name="Action", Type="String"}, - {Name="Name", Type="String"}, - {Name="Parameters", Type="String"}, - {Name="Children",Type="Table"}, - {Name="Weight",Type="Number",DefaultValue="1"} - } - } - - r2.registerComponent(classRtNpcEventHandlerAction) - -local classRtFauna = - { - Name= "RtFauna", - Prop= - { - {Name="Id", Type="String", DefaultValue=""}, - {Name="Name",Type="String"}, - {Name="Pts", Type="Table" }, - {Name="Children", Type="Table"} - } - } - r2.registerComponent(classRtFauna) - - local classRtGroupFaunaEx = - { - Name="RtGroupFaunaEx", - Prop= - { - {Name="Id",Type="String",DefaultValue=""}, - {Name="Name",Type="String"}, - {Name="FaunaType",Type="String",DefaultValue="HERBIVORE"}, - {Name="Children", Type="Table"} - } - } - r2.registerComponent(classRtGroupFaunaEx) - - - local classRtFaunaGenericPlace = - { - Name="RtFaunaGenericPlace", - Prop= - { - {Name="Id",Type="String",DefaultValue=""}, - {Name="Name",Type="String"}, - {Name="FlagFood",Type="String",DefaultValue="true"}, - {Name="FlagRest",Type="String",DefaultValue="true"}, - {Name="FlagSpawn",Type="String",DefaultValue="true"}, - {Name="Index",Type="Number"}, - {Name="IndexNext",Type="Table"}, - {Name="Place",Type="Place"} - } - } - r2.registerComponent(classRtFaunaGenericPlace) - - local classRtPopulation = - { - Name = "RtPopulation", - Prop= - { - {Name="Id",Type="String",DefaultValue=""}, - {Name="Name",Type="String"}, - {Name="Children",Type="Table"} - } - } - r2.registerComponent(classRtPopulation) - - local classRtPeople = - { - Name="RtPeople", - Prop= - { - {Name="Name",Type="String"}, - {Name="Count",Type="Number"}, - {Name="CreatureCode",Type="String"} - } - } - r2.registerComponent(classRtPeople) - - local classRtTextManager = - { - Name="RtTextManager", - Prop= - { - {Name="Id", Type="String"}, - {Name="Texts", Type="Table"}, - } - } - - r2.registerComponent(classRtTextManager) - - local classRtEntryText = - { - Name="RtEntryText", - Prop= - { - {Name="Id", Type="String"}, - {Name="Text", Type="String"} - } - } - - r2.registerComponent(classRtEntryText) - - - -- Copy struct TMissionItem - local classRtPlotItem = - { - Name = "RtPlotItem", - Prop = - { - {Name="Id", Type="String"}, - { Name="SheetId", Type="Number" }, - { Name="Name", Type="String" }, - { Name="Description", Type="String" }, - { Name="Comment", Type="String" } - } - } - r2.registerComponent(classRtPlotItem) - -end - - diff --git a/code/ryzom/common/data_common/r2/r2_config.lua b/code/ryzom/common/data_common/r2/r2_config.lua deleted file mode 100644 index 8e5171471..000000000 --- a/code/ryzom/common/data_common/r2/r2_config.lua +++ /dev/null @@ -1,127 +0,0 @@ --- config file for the r2 environment - - -verboseDebugInfo = false -- when set to true, debug infos will be preceded by the number of the line that generated them -traceFunctions = false -- when set to true, each function enter / function leave are dumped to the stack - - --- TODO nico : a table with predefined colors -r2.Config = -{ - PrimDisplayEnabled = true, -- should route and zones be displayed ? - FloatingShapeRefScale = 1.0, -- size of the floating mesh displayed at the mouse position when view-ray didn't hit a valid pos (in creation mode) - RegionFadeTimeInMs = 300, -- time in ms needed for a region to get higlighted - TestPaletteSelection = false, -- complete the palette for a test for selection by ecosystem & level - VerboseGetUI = false, -- some getUI can be made silent when they fail by turning this option to 'false' - ResetWindowPos = true, -- TMP : should windows pos be reseted at startup ? - ActMaxQuota = 99, -- 'hardcoded" : max content that can be added into an act (checked by server too, but value is not taken from this file of course ..) - -- decals look - HightlightDecalLook = - { - DurationInMs = 1000, - Texture = "r2_highlight_decal.tga", - EndScaleFactor = 1, - EndAngleInDegrees = 0, - StartDiffuse = CRGBA(255, 255, 255), - EndDiffuse = CRGBA(127, 0, 255), - StartEmissive = CRGBA(0, 0, 0), - EndEmissive = CRGBA(0, 0, 0), - }, - SelectDecalLook = - { - DurationInMs = 1000, - Texture = "r2_select_decal.tga", - EndScaleFactor = 1.2, - EndAngleInDegrees = 0, - StartDiffuse = CRGBA(255, 0, 0), - EndDiffuse = CRGBA(255, 0, 0, 127), - StartEmissive = CRGBA(0, 0, 0), - EndEmissive = CRGBA(127, 127, 127), - }, - SelectingDecalLook = - { - DurationInMs = 200, - Texture = "r2_select_decal.tga", - EndScaleFactor = 1.2, - EndAngleInDegrees = 90, - StartDiffuse = CRGBA(255, 255, 255), - EndDiffuse = CRGBA(255, 255, 255, 0), - StartEmissive = CRGBA(0, 0, 0), - EndEmissive = CRGBA(0, 0, 0) - }, - PionneerDecalLook = - { - DurationInMs = 3000, - Texture = "r2_pionneer_edit.tga", - EndScaleFactor = 1.05, - EndAngleInDegrees = 0, - StartDiffuse = CRGBA(255, 0, 0, 255), - EndDiffuse = CRGBA(255, 0, 0, 192), - StartEmissive = CRGBA(0, 64, 0), - EndEmissive = CRGBA(0, 0, 0) - }, - -- - MapEntityInvalidTexture = "r2_icon_map_invalid.tga", -- over displayed on minimap when object in on invalid pos - MapEntityInvalidTextureSmall = "r2_icon_map_invalid_small.tga", -- over displayed on minimap when object in on invalid pos, small version - MapEntityFrozenColor = CRGBA(0, 255, 255, 80), - MapEntityLockedColor = CRGBA(127, 0, 200, 80), - ArrayInstanceColor = CRGBA(255, 255, 255, 127), - MapEntityDefaultTexture = "brick_default.tga"; -- Bitmap to be used when one of the following bitmaps wasn't found - MapEntitySelectTexture = "r2_icon_select.tga", -- The 'circle' bitmap draw on the map over selected / highlighted entities - MapEntityHighlightColor = CRGBA(255, 255, 255, 255), -- Color of selection bitmap over an entity on the map - MapEntitySelectColor = CRGBA(255, 0, 0, 255), -- Color of highlight bitmap over an entity on the map - MapEntityFarTexture = "r2_icon_far.tga", -- Texture to display on the border of the map when the current selection is out - -- ... of the current visible world part in the map - MapEntityFarArrowSize = 10, -- Size of the "MapEntityFarTexture" texture in pixels (scale applied ..) - MapEntitySmallTexture = "r2_icon_map_entity_small.tga", -- Texture for entities when map is zoomed out - MapEntitySmallHighlightTexture = "r2_icon_map_entity_small_highlight.tga", - MapEntityOrientTexture = "r2_icon_map_entity_orient.tga", -- arrow to signal entity orientation in close view - MapEntityOrientOriginDist = 9, -- distance from entity to its orient texture - MapEntityOrientOriginDistSmall = 5, -- distance from entity to its orient texture when the entity is small and wihle it is being rotated - MapEntityOrientBlendTimeInMs = 300, -- time that the orientation arrow need to get back to alpha = 0 when rotation is stopped - MapEntityCloseDist = 0.24, -- number of meter per pixel for the close view - MapGlowStarTexture = "r2_glow_star.tga", -- Texture displayed in the border of the map to signal that an object is too far to be seen - MapGlowStarSpeed1 = 0.50, -- rotation speed of first map glow star - MapGlowStarSpeed2 = -0.60, -- rotation speed of second map glow star - MapGlowStarSize = 7, -- size of glow star - -- color of regions in the 3D scene - FocusedRegionColor = CRGBA(63, 127, 255, 100), - SelectedRegionColor = CRGBA(192, 127, 64, 100), - UnselectedRegionColor = CRGBA(0, 0, 255, 80), - FrozenRegionColor = CRGBA(0, 255, 255, 80), - LockedRegionColor = CRGBA(127, 0, 200, 80), - -- colors for selected / focused entities / instance in scene (such as creature & npcs) - FocusedInstanceColor = CRGBA(200, 32, 64, 127), - SelectedInstanceColor = CRGBA(127, 127, 127), - UnselectedInstanceColor = CRGBA(0, 0, 0), - FrozenInstanceColor = CRGBA(0, 255, 255, 80), - LockedInstanceColor = CRGBA(127, 0, 200, 80), - -- world map auto pan - MapAutoPanBorder = 20, -- number of pixels in the border of the map for which the auto pan is tested - MapAutoPanDeltaInMs = 300, -- delta between each map pan when the mouse is on an auto-pan region - MapAutoPanFastDeltaInMs = 100, -- delta between each map pan when fast pan is active - MapAutoPanSpeedInPixels = 15, -- number of pixel to pan the map - MapAutoFastPanNumTicks = 4, -- number of 'slow' pan to do before entering fast pan mode - -- foot steps / wander look - FootStepMapTexture = "r2_map_foot_steps.tga", - FootStepDecalTexture = "r2_foot_steps.tga", - FootStepMapWidth = 3, - FootStepDecalUScale = 1.5, - FootStepDecalWidth = 0.15, - FootStepDecalSelectedColor = CRGBA(255, 255, 255, 255), - FootStepDecalHiddenColor = CRGBA(0, 0, 255, 120), - FootStepDecalFocusedColor = CRGBA(255, 255, 255, 127), - FootStepMapSelectedColor = CRGBA(180, 0, 192, 255), - FootStepMapHiddenColor = CRGBA(150, 0, 192, 100), - FootStepMapFocusedColor = CRGBA(150, 0, 192, 160), - WanderDecalTexture = "r2_wander.tga", - WanderDecalSize = 0.55, - AutoGroupMaxDist = 4, - -- display of inaccessible pos on map - InaccessiblePosColor0 = CRGBA(255, 0, 0, 255), - InaccessiblePosColor1 = CRGBA(200, 217, 0, 255), - InaccessiblePosAnimDurationInMS = 500, - DecalTopBlendStartDist = 3, -- Distance in meters at which the color starts to fade for player & selection decals (at top) - DecalBottomBlendStartDist = 1, -- Distance in meters at which the color starts to fade for player & selection decals (at bottom) - DecalBlendLength = 1.5 -- Length for decal color fading (player & selection decals) -} \ No newline at end of file diff --git a/code/ryzom/common/data_common/r2/r2_console.lua b/code/ryzom/common/data_common/r2/r2_console.lua deleted file mode 100644 index da44a189c..000000000 --- a/code/ryzom/common/data_common/r2/r2_console.lua +++ /dev/null @@ -1,173 +0,0 @@ --- console & printing related functions - ---------------- --- FUNCTIONS -- ---------------- - ------------------------------------------------------------------------------------------------------------- --- alias for 'debugInfo' -log = debugInfo - - ------------------------------------------------------------------------------------------------------------- --- Build color tag for use with debugInfo -function colorTag(r, g, b, a) - local function compToLetter(comp) - if comp == nil then - return 'F' - end - comp = math.floor(clamp(comp, 0, 255) / 16) + 1 - --debugInfo("Comp = " .. tostring(comp)) - return ComponentToLetter[comp] - end - return "@{" .. compToLetter(r) .. compToLetter(g) .. compToLetter(b) .. compToLetter(a) .. "}" -end - -------------------------------------------------------------------------------------------------- --- Display a string, splitting it when too long -function dumpSplittedString(str) - local splitSize = 50 - local numParts = math.floor(string.len(str) / splitSize) + 1 - for i = 0, numParts do - debugInfo(string.sub(str, i * splitSize, i * splitSize + splitSize - 1)) - end -end - -------------------------------------------------------------------------------------------------- --- display debug info with warning color -function debugWarning(msg) - debugInfo(warningTag .. msg) -end - -------------------------------------------------------------------------------------------------- --- dump content of a lua object -function luaObject(obj, maxDepth) - dumpCallStack(0) - if runCommand == nil - then - r2.print(obj) - else - __tmpInstance = obj - runCommand("luaObject", "__tmpInstance", select(maxDepth, maxDepth, 10)) - __tmpInstance = nil - end -end - -------------------------------------------------------------------------------------------------- --- dump content of a lua object (other version) --- output : object with a "write" function that display the result. if nil, 'output' default to the global 'io' - -function writeTable(t, output) - if output == nil then output = io end - function writeSpace(n) - for i = 1, n do - output.write("\t") - end - end - - function writeTableR(t, n) - if (type(t) == "table") - then - - output.write("{\n") - for key, value in pairs(t) do - if ( type(value) == "table") - then - writeSpace(n+1) - output.write (key) - output.write ("=") - writeTableR(value, n+1) - - elseif (type(value) == "string") - then - value = "\"" ..value .. "\"" - writeSpace(n+1) - output.write(key, "=", value,", \n") - elseif (type(value) == "number") - then - writeSpace(n+1) - output.write(key, "=", value,", \n") - end - end - writeSpace(n) - output.write("},\n"); - end - end - - writeTableR(t, 0) -end - - ---function loadTable(fileName) - --- local file = io.open(fileName, "r") - --- function loadTableR(file) - --- local line --- while (line=file:read("*l")) ~= "}" then - --- if line == "{" then --- loadTableR(file) --- else - --- end --- end --- end - --- if file:read("*l") ~= "{" then --- debugInfo("file doesn't store a valid table") --- return --- end - --- local resultT = loadTableR(file) --- io.close(file) --- return resultT ---end - - -------------- --- STATICS -- -------------- - - -ComponentToLetter = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' } -warningTag = colorTag(255, 127, 0) - ----------- --- INIT -- ----------- - - --- for vianney's tests : if debugInfo function wasn't registered externally, then use the standard 'print' instead -if debugInfo == nil then - debugInfo = r2.print -else - function print(a0, a1, a2, a3, a4, a5) - local result = "" - if a0 ~= nil then result = result .. tostring(a0) end - if a1 ~= nil then result = result .. " " ..tostring(a1) end - if a2 ~= nil then result = result .. " " ..tostring(a2) end - if a3 ~= nil then result = result .. " " ..tostring(a3) end - if a4 ~= nil then result = result .. " " ..tostring(a4) end - if a5 ~= nil then result = result .. " " ..tostring(a5) end - if result ~= nil then debugInfo(result) end - end -end - - -function gotoFile(name, line) - local path = fileLookup(name) - if path ~= "" then - local luaEditorPath = os.getenv("R2ED_LUA_EDITOR_PATH") - if luaEditorPath == nil then - debugInfo([[ Can't launch editor to edit lua file, please set ]] .. - [[ the environment variable R2ED_LUA_EDITOR_PATH ]] .. - [[ with the path of your editor. ]]) - - else - launchProgram(luaEditorPath, path .. "/" .. tostring(line)) - end - end -end - diff --git a/code/ryzom/common/data_common/r2/r2_core.lua b/code/ryzom/common/data_common/r2/r2_core.lua deleted file mode 100644 index 1463b3eed..000000000 --- a/code/ryzom/common/data_common/r2/r2_core.lua +++ /dev/null @@ -1,89 +0,0 @@ - -r2.doFile("r2_refid.lua") - -if r2.InClient == true then - r2.doFile("r2_ui_reset.lua") -end - -r2.doFile("r2_config.lua") -r2.doFile("r2_debug.lua") --- -r2.doFile("r2_misc.lua") -r2.doFile("r2_console.lua") --- -r2.doFile("r2_environment.lua") -- main tables & general editor functions --- -r2.doFile("r2_prim_render.lua") -r2.doFile("r2_components.lua") - - -if defaulting(config.R2EDLightPalette, 0) ~= 0 then - r2.doFile("r2_palette_light.lua") -else - r2.doFile("r2_palette.lua") -end - -r2.doFile("r2_translator.lua") -r2.doFile("r2_utils.lua") -r2.doFile("r2_features.lua") -r2.doFile("r2_base_class.lua") -r2.doFile("r2_world_object.lua") -r2.doFile("r2_logic_entities.lua") -r2.doFile("r2_version.lua") -r2.doFile("r2_init.lua") -r2.doFile("r2_plot_item.lua") - -if r2.InClient == true then - -- edit time - r2.doFile("r2_ui.lua") - r2.doFile("r2_ui_forms.lua") - r2.doFile("r2_ui_misc.lua") - r2.doFile("r2_ui_tools.lua") - r2.doFile("r2_ui_palette.lua") - - r2.doFile("r2_ui_features_tree.lua") - - r2.doFile("r2_ui_displayers.lua") - r2.doFile("r2_ui_property_sheet.lua") - r2.doFile("r2_ui_windows.lua") - r2.doFile("r2_ui_event_handlers.lua") - r2.doFile("r2_ui_lua_inspector.lua") - r2.doFile("r2_ui_displayer_npc.lua") - r2.doFile("r2_activities.lua") - r2.doFile("r2_mini_activities.lua") - r2.doFile("r2_dialogs.lua") - r2.doFile("r2_events.lua") - r2.doFile("r2_logic_comp.lua") - r2.doFile("r2_logic_ui.lua") - r2.doFile("r2_ui_acts.lua") - r2.doFile("r2_ui_custom_selection_bbox.lua") - r2.doFile("r2_ui_scenario.lua") - r2.doFile("r2_ui_main_loop.lua") - r2.doFile("r2_ui_toolbar_base.lua") - r2.doFile("r2_ui_select_bar_2.lua") - r2.doFile("r2_ui_mini_toolbar.lua") - -- animation time - r2.doFile("r2_ui_dm_gift.lua") - r2.doFile("r2_ui_anim_bar.lua") - r2.doFile("r2_ui_anim_acts.lua") - r2.doFile("r2_ui_anim_user_triggers.lua") - --r2.doFile("r2_ui_contextual_commands.lua") - r2.doFile("r2_ui_contextual_commands_new.lua") - r2.CustomBBox:load() -- custom bbox for ojbect selection -end - - - -profileFunction(r2.init, "r2.init") - - -if r2.InClient == true then - - profileMethod(r2, "initUI", "r2:initUI") - profileMethod(r2, "initNpcEditor", "r2:initNpcEditor") - profileMethod(r2.logicComponents, "initLogicEditors", "r2.logicComponents:initLogicEditors") - profileMethod(r2.acts, "initActsEditor", "r2.acts:initActsEditor") - profileMethod(r2.ScenarioWindow, "initScenarioWindow", "r2.ScenarioWindow:initScenarioWindow") -end - - diff --git a/code/ryzom/common/data_common/r2/r2_core_user_component_manager.lua b/code/ryzom/common/data_common/r2/r2_core_user_component_manager.lua deleted file mode 100644 index 4aa445484..000000000 --- a/code/ryzom/common/data_common/r2/r2_core_user_component_manager.lua +++ /dev/null @@ -1,1658 +0,0 @@ -r2_core = {} - -r2_core.UserComponentsPath = "./examples/user_components/" - -r2_core.UserComponentTable = {} - -r2_core.UserComponentManager = {} - -local userComponentManager = r2_core.UserComponentManager - -userComponentManager.CurrentExportList = {} - -userComponentManager.InstanceIds = {} - -userComponentManager.Texts = {} - -userComponentManager.PlotItems = {} - -userComponentManager.Positions = {} - -userComponentManager.CurrentDesc = "" - -userComponentManager.IsInitialized = false - -userComponentManager.InitialComponentToLoad = 0 - - --------------------------------------------------------------------------------------------------- --- Methods called when the holder specific ui buttons are pressed -function r2_core:doNothing(x, y, z) - -end - -function r2_core:testIsExportable(entityId) - local holder = r2:getInstanceFromId(r2_core.CurrentHolderId) - assert(holder) - local k, v = next(holder.Components, nil) - local entity = r2:getInstanceFromId(entityId) - - while k do - if entity.ParentInstance:isKindOf("NpcGrpFeature") - and entity.ParentInstance.InstanceId == v.InstanceId then - return false - end - if v.InstanceId == entityId then - return false - end - k, v = next(holder.Components, k) - end - - return true - -end - -local function getIndex(id, tbl) - local k, v = next(tbl, nil) - while k do - if v.InstanceId and v.InstanceId == id then - return k - end - k, v = next(tbl, k) - end - return -1 -end - -function r2_core:addEntityToExporter(instanceId) - local entityId = instanceId - local tmpInstance = r2:getInstanceFromId(entityId) - if tmpInstance:isKindOf("Npc") and tmpInstance.ParentInstance:isKindOf("NpcGrpFeature") then - entityId = tmpInstance.ParentInstance.InstanceId - end - - local entity = r2:getInstanceFromId(entityId) - assert(entity) - - local parent = entity.ParentInstance - local parentId = parent.InstanceId - - r2_core.UserComponentManager:replacePosition(entityId) - - if parent:isKindOf("DefaultFeature") then - local index = getIndex(entityId, parent.Components) - r2.requestMoveNode(parentId, "Components", index, r2_core.CurrentHolderId, "Components", -1) - elseif parent:isKindOf("Act") then - local index = getIndex(entityId, parent.Features) - r2.requestMoveNode(r2:getCurrentAct().InstanceId, "Features", index, r2_core.CurrentHolderId, "Components", -1) - end - local container = getUI("ui:interface:r2ed_scenario") - local tree = container:find("content_tree_list") - tree:forceRebuild() -end - - -function r2_core:testCanPickUserComponentElement(instanceId) - local instance = r2:getInstanceFromId(instanceId) - assert(instance) - local parent = instance.ParentInstance - - local holder = r2:getInstanceFromId(r2_core.CurrentHolderId) - assert(holder) - - if parent:isKindOf("NpcGrpFeature") and holder.InstanceId == parent.ParentInstance.InstanceId then - return true - end - - if holder.InstanceId == parent.InstanceId then - return true - end - return false -end - -function r2_core:removeUserComponentElement(instanceId) - local holder = r2:getInstanceFromId(r2_core.CurrentHolderId) - assert(holder) - - local index = getIndex(instanceId, holder.Components) - - local entity = r2:getInstanceFromId(instanceId) - assert(entity) - - local currentAct = r2:getCurrentAct() - - if entity:isKindOf("Region") or entity:isKindOf("Road") or entity:isBotObject() then - local refPosition = r2.Scenario.Acts[0].Position - r2_core.UserComponentManager:restorePosition(instanceId, refPosition) - r2.requestMoveNode(r2_core.CurrentHolderId, "Components", index, r2.Scenario.Acts[0].Features[0].InstanceId, "Components", -1) - elseif entity:isKindOf("Npc") then - local refPosition = currentAct.Position - if entity.ParentInstance:isKindOf("NpcGrpFeature") then - local grpId = entity.ParentInstance.InstanceId - local grpIndex = getIndex(grpId, holder.Components) - r2_core.UserComponentManager:restorePosition(grpId, refPosition) - r2.requestMoveNode(r2_core.CurrentHolderId, "Components", grpIndex, currentAct.InstanceId, "Features", -1) - else - r2_core.UserComponentManager:restorePosition(instanceId, refPosition) - r2.requestMoveNode(r2_core.CurrentHolderId, "Components", index, currentAct.Features[0].InstanceId, "Components", -1) - --getCurrentAct().Features[0].Components - end - else - local refPosition = currentAct.Position - r2_core.UserComponentManager:restorePosition(instanceId, refPosition) - r2.requestMoveNode(r2_core.CurrentHolderId, "Components", index, currentAct.InstanceId, "Features", -1) - --getCurrentAct().Features - end - - local container = getUI("ui:interface:r2ed_scenario") - local tree = container:find("content_tree_list") - tree:forceRebuild() -end - --------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------- --- Debug -local printDebug -printDebug = function(tbl) - local k,v = next(tbl, nil) - while k do - if type(v) == "table" then - debugInfo(k .. " : TABLE") - printDebug(v) - else - debugInfo(k .. " = " ..tostring(v)) - end - k,v = next(tbl, k) - end -end - -local foundInTable = function(tbl, key) - local k, v = next(tbl, nil) - while k do - if (k == key) then return true end - k,v = next(tbl, k) - end - return false -end - -local insertExistingId = function(tblSearch, tblInsert, clientid) - local k, v = next(tblSearch, nil) - while k do - if (k == clientid) then - tblInsert[clientid] = v - end - k, v = next(tblSearch, k) - end -end - -local checkLinkedId = function(instanceIdTbl, refIdTbl) - local k, v = next(refIdTbl, nil) - while k do - local key, value = next(instanceIdTbl, nil) - while key do - if key == k and value ~= v then - refIdTbl[k] = value - end - key, value = next(instanceIdTbl, key) - end - k, v = next(refIdTbl, k) - end -end - -local countIds = function(tbl) - local count = 0 - local k, v = next(tbl, nil) - while k do - count = count + 1 - k, v = next(tbl, k) - end - return count -end - -local countUCIds -countUCIds = function(tbl) - local count = 0 - local k, v = next(tbl, nil) - while k do - if type(v) ~= "table" and type(v) ~= "userdata" then - if k == "InstanceId" or string.find(tostring(v), "UserComponent_") ~= nil - or string.find(tostring(v), "UserText_") ~= nil or string.find(tostring(v), "UserItem_") ~= nil then - count = count + 1 - end - elseif type(v) == "table" then - count = count + countUCIds(v) - end - k, v = next(tbl, k) - end - return count -end - -local findUserSlotIn = function(str) - local currentSlot = r2.getUserSlot() .."_" - if string.find(str, currentSlot) ~= nil then - return true - end - return false -end - - --------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------- -function userComponentManager:init() - --init usercomponent table & retrieves entries from file if not empty - r2_core.UserComponentTable = {} - local userComponentTableOk = loadfile("save/r2_core_user_component_table.lua") - if userComponentTableOk then - userComponentTableOk() - end - --doFile on previously loaded user component files - local ucTable = r2_core.UserComponentTable - self.InitialComponentToLoad = table.getn(ucTable) - local k, v = next(ucTable, nil) - while k do - --local fun = loadfile(v[2]) - r2.loadUserComponentFile(v[2]) - --if not fun then - -- debugInfo("Couldn't load file '"..v[2].."' while initializing UserComponentManager.") - --else - -- local ok, msg = pcall(fun) - -- if not ok then - -- debugInfo("Error while loading component '"..filename.."' err: "..msg) - -- end - -- debugInfo("Component '" ..v[2].."' loaded.") - --end - k, v = next(ucTable, k) - end - - if r2_core.UserComponentManager.IsInitialized == false and r2_core.UserComponentManager.InitialComponentToLoad == 0 then - r2_core.UserComponentManager.IsInitialized = true - end - -end - -function userComponentManager:isInitialized() - return self.IsInitialized -end - - --------------------------------------------------------------------------------------------------------------------- --- Gets all the InstanceIds and the references to InstanceIds and store them separately. --- Each refId is unique and is renamed from client1_XX to userComponent_XX. --- Returns a table containing all the instanceIds and refIds. --- - -function userComponentManager:getRefIdTableFrom(argTbl) - - local refIdTbl = {} - local instanceIdTbl = {} - local plotItemTbl = {} - - local nbInstance = 0 - local nbText = 0 - local nbItems = 0 - - - local addTextToUCManager = function(instanceId) - local key, value = next(r2.Scenario.Texts.Texts, nil) - while key do - if value.InstanceId == instanceId then - userComponentManager.Texts[instanceIdTbl[instanceId]] = value.Text - return - end - key, value = next(r2.Scenario.Texts.Texts, key) - end - end - - local addItemToUCManager = function(instanceId) - local key, value = next(r2.Scenario.PlotItems, nil) - debugInfo("Adding '" ..instanceId.."' to manager item table") - while key do - if value.InstanceId == instanceId then - --copy the full plot item into manager's table - userComponentManager.PlotItems[plotItemTbl[instanceId]] = value - return - end - key, value = next(r2.Scenario.PlotItems, key) - end - end - - -- Doesn't insert the value if it's already in the table. - parseInstanceTable = function(tbl) - - --parsing string properties - local key,val = next(tbl, nil) - while key do - if (type(val) ~= "userdata") then - -- If the property is a real InstanceId - if (key == "InstanceId") then - -- If the instanceId is not already in the instanceIdTbl then add it as a key, with its usercomponent - -- translation as value. - if not foundInTable(instanceIdTbl, tostring(val)) then - nbInstance = nbInstance + 1 - instanceIdTbl[val] = "UserComponent_"..nbInstance - end - -- else if the instanceid found is a reference to another InstanceId - --elseif (string.find(tostring(val), "Client1_") ~= nil) then - elseif findUserSlotIn(tostring(val)) then - --if exporting a dialog, rename specifically the refId pointing to the said text (stored in r2.Scenario.Texts) - if key == "Says" then - if not foundInTable(instanceIdTbl, tostring(val)) then - nbText = nbText + 1 - instanceIdTbl[val] = "UserText_" ..nbText - addTextToUCManager(val) - end - --else if plotItem XXXXXX - elseif string.find(key, "Item") ~= nil then - if not foundInTable(plotItemTbl, tostring(val)) then - nbItems = nbItems + 1 - plotItemTbl[val] = "UserItem_" ..nbItems - addItemToUCManager(val) - end - elseif not foundInTable(refIdTbl, tostring(val)) then - if foundInTable(instanceIdTbl, tostring(val)) then --a refid pointing to an instanceid present in the component itself (zone...) - insertExistingId(instanceIdTbl, refIdTbl, tostring(val)) - else - refIdTbl[val] = "Not exported" - end - end - end - end - key,val = next(tbl, key) - end - - --parsing userdatas - key, val = next(tbl, nil) - while key do - if (type(val) == "userdata") then - parseInstanceTable(val) - end - if (type(val) == "table") then - --inspect(val) - assert(nil) - end - key, val = next(tbl, key) - end - end - - local i = 1 - - --printDebug(argTbl) - local nbExportedInstances = table.getn(argTbl) - - local k, v = next(argTbl, nil) - while k do - local tmpInstance = r2:getInstanceFromId(v) - if tmpInstance ~= nil then - parseInstanceTable(tmpInstance) - end - k, v = next(argTbl, k) - end - - checkLinkedId(instanceIdTbl, refIdTbl) - - userComponentManager.InstanceIds = instanceIdTbl - - local refIdTable = - { - RefIds = refIdTbl, - InstanceIds = instanceIdTbl, - PlotItemsId = plotItemTbl - } - return refIdTable -end - --------------------------------------------------------------------------------------------------------------------- -local generatePreCode = function(fName) - - local userComponentBody = "" - - local writePlotItemBlock = function(plotItem, ucId, index) - --file:write("\t{\n") - local str = "\t{\n" - local k, v = next(plotItem, nil) - while k do - if k == "InstanceId" then - --file:write("\t\t[" ..string.format("%q", k).. "]\t=\t" ..string.format("%q", ucId).. ",\n") - str = str .."\t\t[" ..string.format("%q", k).. "]\t=\t" ..string.format("%q", ucId).. ",\n" - elseif type(v) == "string" then - --file:write("\t\t[" ..string.format("%q", k).. "]\t=\t" ..string.format("%q", v).. ",\n") - str = str .."\t\t[" ..string.format("%q", k).. "]\t=\t" ..string.format("%q", v).. ",\n" - else - --file:write("\t\t[" ..string.format("%q", k).. "]\t=\t" ..tostring(v).. ",\n") - str = str .."\t\t[" ..string.format("%q", k).. "]\t=\t" ..tostring(v).. ",\n" - end - k, v = next(plotItem, k) - end - --file:write("\t},\n") - str = str .."\t},\n" - return str - end - - - local featureName = fName - if featureName == nil or featureName == "" then - featureName = "UnnamedComponent" - end - - local str = "" - -- "-- \n" - --.."-- r2_core.CurrentFeatureName='" ..featureName.. "'\n" - --.."-- \n\n\n" - str = "r2.Features."..featureName.. " = {}\n\n" - .."local feature = r2.Features." ..featureName.."\n\n" - .."feature.Name=\"".. featureName.."\"\n\n" - .."feature.Description=\"A user exported feature.\"\n" - .."feature.Components = {}\n\n" - --file:write(str) - userComponentBody = userComponentBody .. str - - - do - local count = 0 - --file:write("feature.PlotItems = \n{\n") - userComponentBody = userComponentBody .."feature.PlotItems = \n{\n" - local k, v = next(userComponentManager.PlotItems, nil) - while k do - count = count + 1 - userComponentBody = userComponentBody..writePlotItemBlock(v, k, count) - k, v = next(userComponentManager.PlotItems, k) - end - --file:write("}\n\n") - userComponentBody = userComponentBody .."}\n\n" - end - -- component.createComponent - str = "feature.createUserComponent = function(x, y)\n\t" - - .."local comp = r2.newComponent('UserComponentHolder')\n\t" - .."assert(comp)\n\n\t" - .."comp.Base = \"palette.entities.botobjects.user_event\"\n\t" - .."comp.Name = r2:genInstanceName(ucstring('"..featureName.."')):toUtf8()\n\t" - .."comp.Position.x = x\n\t" - .."comp.Position.y = y\n\t" - .."comp.Position.z = r2:snapZToGround(x, y)\n\n\t" - .."comp.Description = '" ..userComponentManager.CurrentDesc.. "'\n\n\t" - --file:write(str) - userComponentBody = userComponentBody .. str - - do - --file:write("comp.Texts = \n\t{\n") - userComponentBody = userComponentBody .."comp.Texts = \n\t{\n" - local key, value = next(userComponentManager.Texts, nil) - while key do - --file:write("\t\t[" ..string.format("%q", key).. "]\t=\t[[" ..value.. "]],\n") - userComponentBody = userComponentBody .. "\t\t[" ..string.format("%q", key).. "]\t=\t[[" ..value.. "]],\n" - - key, value = next(userComponentManager.Texts, key) - end - --file:write("\t}\n\n\t") - userComponentBody = userComponentBody .. "\t}\n\n\t" - end - - - str = "comp.Components = {}\n\t" - .."local tmpComponents = {}\n\t" - - userComponentBody = userComponentBody..str - --file:write(str) - return userComponentBody -end - --------------------------------------------------------------------------------------------------------------------- -local generatePostCode = function(fName) - local featureName = fName - if featureName == nil or featureName == "" then - featureName = "UserFeature" - end - - local str = "" - - str = str .."r2_core.UserComponentManager:insertAll(feature, comp, tmpComponents)\n\n\t" - .."comp._Seed = os.time()\n\n\t" - .."return comp\n" - .."end\n\n\n" - -- ! component.CreateComponent - - .."\n\nr2.Features[\""..featureName.."\"] = feature" - .."\n -- !"..featureName.." user exported\\o/ \n\n\n" - - return str - --file:write(str) -end - -------------------------------------------------------------------------------------------------------------------- --- Generates the LUA code corresponding to the selected instances. --- filename: file in which the code will be written. --- argTbl: contains all the instanceIds selected for export. --- instanceIdTbl: hashtable containing all clientIds (key) and their matching user component id (value). This table --- is returned by the getRefIdTableFrom method. --- refPosition: reference coordinates chosen by the user on export. -function userComponentManager:componentToFile(filename, featureName, argTbl, refIdTbl, refPosition) - - local instanceIdTbl = refIdTbl.InstanceIds - local plotItemsTbl = refIdTbl.PlotItemsId - - local body = "" - - - local function writeTab(file, nb) - local i = nb - while i > 0 do - file:write("\t") - i = i - 1 - end - end - - local function writeTabInString(str, nb) - local tmp = str - local i = nb - while i > 0 do - tmp = tmp..("\t") - i = i - 1 - end - return tmp - end - - --local function writeDataToFile(file, tbl, nbTab, isTopLevel) - local function writeDataToString(str, tbl, nbTab, isTopLevel) - local userComponentBody = str - - local key,val = next(tbl, nil) - while key do - --writing all properties except userdatas - if type(val) ~= "userdata" then - - --writeTab(file, nbTab) - userComponentBody = writeTabInString(userComponentBody, nbTab) - if isTopLevel == true and key == "InheritPos" then - --file:write("InheritPos = 1,\n") - userComponentBody = userComponentBody .. "InheritPos = 1,\n" - else - if type(key) == "number" then - --file:write("[" ..tostring(key + 1).. "] = ") - userComponentBody = userComponentBody .. "[" ..tostring(key + 1).. "] = " - else --file:write(tostring(key) .. " = ") end - userComponentBody = userComponentBody .. tostring(key).. " = " - end - - -- String/number value - if type(val) == "number" then - --file:write(val..",\n") - userComponentBody = userComponentBody..tostring(val)..", \n" - else - local str = val - if key == "InstanceId" or findUserSlotIn(val) then - str = instanceIdTbl[val] - end - if str == nil then - str = plotItemsTbl[val] - end - if str == nil then str = "" end --when finding a instanceId which is referring to a non exported entity - --file:write(string.format("%q", str) ..",\n") - userComponentBody = userComponentBody .. string.format("%q", str) ..",\n" - end - end - end - key,val = next(tbl, key) - end - - --writing userdatas - key, val = next(tbl, key) - while key do - if type(val) == "userdata" then - --writeTab(file, nbTab) - userComponentBody = writeTabInString(userComponentBody, nbTab) - if type(key) ~= "number" then - --file:write(tostring(key) .. " = ") - userComponentBody = userComponentBody ..tostring(key).. " = " - end - - --file:write("\n") - userComponentBody = userComponentBody .."\n" - --writeTab(file, nbTab) - userComponentBody = writeTabInString(userComponentBody, nbTab) - --file:write("{\n") - userComponentBody = userComponentBody .."{\n" - userComponentBody = writeDataToString(userComponentBody, val, nbTab + 1, false) - --writeTab(file, nbTab) - userComponentBody = writeTabInString(userComponentBody, nbTab) - --file:write("},\n") - userComponentBody = userComponentBody .."}, \n" - end - key,val = next(tbl, key) - end - - return userComponentBody - end - - -- - -- Write a code block for each component of the user feature. - local function writeComponentBlocks(str, tbl) - local userComponentBody = str - local i = 1 - local nbInstanceIds = table.getn(tbl) - - while i <= nbInstanceIds do - local tmpInstance = r2:getInstanceFromId(tbl[i]) - if (tmpInstance == nil) then - debugInfo("Cannot export entity with intanceId= " ..tostring(tbl[i])) - assert(tmpInstance) - else - - local compName = "uComp" ..i --+ 1 - --file:write("do\n\t\t") - userComponentBody = userComponentBody .. "do\n\t\t" - --file:write("local " ..compName.. " = \n\t\t{\n") - userComponentBody = userComponentBody .. "local " ..compName.. " = \n\t\t{\n" - - --writeDataToFile(file, tmpInstance, 3, true) - userComponentBody = writeDataToString(userComponentBody, tmpInstance, 3, true) - - --file:write("\t\t} --!" ..compName.. " \n\n\t\t") - userComponentBody = userComponentBody .."\t\t} --!" ..compName.. " \n\n\t\t" - --file:write("table.insert(tmpComponents, "..compName.. ")\n\t") - userComponentBody = userComponentBody .."table.insert(tmpComponents, "..compName.. ")\n\t" - --file:write("end\n\n\t") - userComponentBody = userComponentBody .."end\n\n\t" - end - i = i + 1 - end - return userComponentBody - end - - --f = io.open(filename, "w") - --assert(f) - - body = body..generatePreCode(featureName) - - body = writeComponentBlocks(body, argTbl) - - body = body .. generatePostCode(featureName) - - --f:close() - - --return res - - local headerInfo = {} - table.insert(headerInfo, {CurrentFeatureName = featureName}) - r2.saveUserComponent(filename, headerInfo, body) -end - - -------------------------------------------------------------------------------------------------------------------- --- Builds a table containing all user component ids (key) with their new instance id (ClientId_n) on import. --- tmpComponents: contains all the user feature components, in which all instance ids are user component ids. --- currentMaxId: max entity id in the current act (on user feature import). -local function generateReverseIdTable(tmpComponents, texts, currentMaxId) - - function findpattern(text, pattern, start) - return string.sub(text, string.find(text, pattern, start)) - end - - local function findMaxId(component, maxId, maxPlotItemId) - local maxIdLocal = maxId - - local maxItemId = maxPlotItemId - - local key, value = next(component, nil) - while key do - if type(value) ~= "table" then - if key == "InstanceId" - or string.find(tostring(value), "UserComponent_") ~= nil then - local tmpId = tonumber(findpattern(tostring(value), "%d+")) - if tmpId and tmpId > maxIdLocal then maxIdLocal = tmpId end - end - if string.find(tostring(value), "UserItem_") ~= nil then - local tmpItemId = tonumber(findpattern(tostring(value), "%d+")) - if tmpItemId and tmpItemId > maxItemId then maxItemId = tmpItemId end - end - end - key, value = next(component, key) - end - - --maxIdLocal = maxIdLocal + maxItemId - - key, value = next(component, nil) - while key do - if type(value) == "table" then - local tmpId, tmpItemId = findMaxId(value, maxIdLocal, maxItemId) - if tmpId and tmpId > maxIdLocal then maxIdLocal = tmpId end - if tmpItemId and tmpItemId > maxItemId then maxItemId = tmpItemId end - end - key, value = next(component, key) - end - return maxIdLocal, maxItemId - end - - local reverseIdTable = {} - local maxId, maxPlotItemId = findMaxId(tmpComponents, 0, 0) - - local i = 1 - local id = 0 - while i <= maxId do - id = i + currentMaxId - local ucName = "UserComponent_" ..i - --reverseIdTable[ucName] = "Client1_" ..id - reverseIdTable[ucName] = tostring(r2.getUserSlot()).."_"..id - i = i + 1 - end - - local j = 1 - while j <= maxPlotItemId do - id = i + currentMaxId - local ucName = "UserItem_" ..j - --reverseIdTable[ucName] = "Client1_" ..id - reverseIdTable[ucName] = tostring(r2.getUserSlot()).."_"..id - j = j + 1 - i = i + 1 - end - - --register component texts when a dialog has been exported - if texts ~= nil then - key, value = next(texts, nil) - while key do - local id = r2.registerText(tostring(value)) - reverseIdTable[key] = id.InstanceId - key, value = next(texts, key) - end - end - - return reverseIdTable -end - - --------------------------------------------------------------------------------------------------------------------- -function userComponentManager:reattributeClientId(tbl, reverseIdTable) - local key, value = next(tbl, nil) - while key do - if (type(value) ~= "userdata") then - if key == "InstanceId" or string.find(tostring(value), "UserComponent_") ~= nil - or string.find(tostring(value), "UserText_") ~= nil - or string.find(tostring(value), "UserItem_") ~= nil then - local id = reverseIdTable[value] - assert(id) - tbl[key] = id - end - end - key,value = next(tbl, key) - end - key, value = next(tbl, nil) - while key do - if type(value) ~= "string" and type(value) ~= "number" then - userComponentManager:reattributeClientId(value, reverseIdTable) - end - key, value = next(tbl, key) - end - return tbl -end - - - - --------------------------------------------------------------------------------------------------------------------- -function userComponentManager:insertPlotItem(plotItem, reverseIdTable) - - local function isAlreadyUsed(plotItem) - local k, v = next(r2.Scenario.PlotItems, nil) - while k do - if v.SheetId and v.SheetId == plotItem.SheetId then - reverseIdTable[plotItem.InstanceId] = v.InstanceId - return true - end - k, v = next(r2.Scenario.PlotItems, k) - end - userComponentManager:reattributeClientId(plotItem, reverseIdTable) - return false - end - - if isAlreadyUsed(plotItem) == false then - --insert plot item in scenario - r2.requestInsertNode(r2.Scenario.InstanceId, "PlotItems", -1, "", plotItem) - --r2:setCookie(newItem.InstanceId, "SelfCreate", true) - --TODO = delete plotItem from pitem table in scenario so that it cannot be used twice - return true - end - return false -end - - - --------------------------------------------------------------------------------------------------------------------- --- insertAll is called in the generated userFeature upon instanciation. --- Inserts all userComponents into the userFeature's components table after having renamed all --- userComponentIds into clientIds. --- -function userComponentManager:insertAll(feature, comp, tmpComponents) - local texts = comp.Texts - local items = feature.PlotItems - local components = comp.Components - local currentMaxId = r2.getMaxId() - local reverseIdTable = generateReverseIdTable(tmpComponents, texts, currentMaxId) - - local range = 0 - local nbItems = 0 - - local k, v = next(items, nil) - while k do - local inserted = self:insertPlotItem(v, reverseIdTable) - if inserted == true then - nbItems = nbItems + 1 - end - k, v = next(items, k) - end - - local key, value = next(tmpComponents, nil) - while key do - range= range + countUCIds(value) + 3 - userComponentManager:reattributeClientId(value, reverseIdTable) - table.insert(components , value) - key, value = next(tmpComponents, key) - end - r2.reserveIdRange(range + nbItems) -end - ---------------------------------------------------------------------------------------------------------------------- --- register the forms needed by the manager (save form, missing ids warning form). --- Called along with the other features registerForms method. -function userComponentManager.registerForms() - local fileListXML = - [[ - - - - - - - - - - ]] - - function getComponentNameFromFile(filename) - local prefixedFilename = r2_core.UserComponentsPath..filename - local f = io.open(prefixedFilename,"r") - assert(f) - f:read("*line") - f:read("*line") - f:read("*line") - f:read("*line") - f:read("*line") - local line = f:read("*line") - if string.find(line, "CurrentFeatureName") == nil then - messageBox("Unable to load a component from this file. Please select another file.") - return "No components found" - end - f:close() - local luaString = string.sub(line, 3) - - loadstring(luaString)() - local componentName = CurrentFeatureName - CurrentFeatureName = "" - return componentName - end - - local function getComponentFiles(searchPath) - local files = getPathContent(searchPath) - local componentFiles = {} - - for k, v in pairs(files) do - local prefixedFilename = r2_core.UserComponentsPath..nlfile.getFilename(v) - local f = io.open(prefixedFilename,"r") - assert(f) - local header = r2.getFileHeader(prefixedFilename) - --TODO : accטs fichier md5 - --local line = f:read("*line") - --if line == "-- " then - if header.CurrentFeatureName then - table.insert(componentFiles, v) - end - end - - return componentFiles - end - - function r2_core.setCurrSelectedFile(filename, formAttr) - local formInstance = r2.CurrentForm.Env.FormInstance - --inspect(formInstance) - if formInstance.LastFileButton then - formInstance.LastFileButton.pushed = false - end - getUICaller().pushed = true - formInstance.LastFileButton = getUICaller() - r2.CurrentForm.Env.FormInstance[formAttr] = filename - if r2.CurrentForm.Env.FormInstance["ComponentName"] then - r2.CurrentForm.Env.FormInstance["ComponentName"] = getComponentNameFromFile(filename) - end - r2.CurrentForm.Env.updateAll() - local eb = r2.CurrentForm:find("eb") - setCaptureKeyboard(eb) - eb:setSelectionAll() - end - - function r2.setCurrSelectedComponent(compName) - local formInstance = r2.CurrentForm.Env.FormInstance - if formInstance.LastFileButton then - formInstance.LastFileButton.pushed = false - end - getUICaller().pushed = true - formInstance.LastFileButton = getUICaller() - r2.CurrentForm.Env.FormInstance.ComponentName = compName - r2.CurrentForm.Env.updateAll() - local eb = r2.CurrentForm:find("eb") - setCaptureKeyboard(eb) - eb:setSelectionAll() - end - - -- called at init to fill the file list - local function showFileList(formInstance) - local fileGroupList = r2.CurrentForm:find('file_list') - r2.CurrentForm.Env.FormInstance["ComponentFileName"] = "UserComponent1.lua" - r2.CurrentForm.Env.FormInstance["Name"] = "UserComponent1" - r2.CurrentForm.Env.updateAll() - --local searchPath = select(config.R2ScenariiPath, "save") - local searchPath = r2_core.UserComponentsPath - --local files = getPathContent(searchPath) - local files = getComponentFiles(searchPath) - table.sort(files) - fileGroupList:clear() - for k, v in pairs(files) do - if string.lower(nlfile.getExtension(v)) == "lua" then - local shortFilename = nlfile.getFilename(v) - local entry = createGroupInstance("r2ed_filelist_entry", "", - { id = tostring(k), text = shortFilename, - params_l="r2_core.setCurrSelectedFile('" .. shortFilename .. "', 'ComponentFileName')" }) - fileGroupList:addChild(entry) - end - end - setCaptureKeyboard(r2.CurrentForm:find("eb")) - end - - --called at init to fill load form - local function showUserComponentFileList(formInstance) - local fileGroupList = r2.CurrentForm:find('file_list') - --local searchPath = select(config.R2ScenariiPath, "save") - local searchPath = r2_core.UserComponentsPath - local files = getPathContent(searchPath) - table.sort(files) - local defaultValue = "" - fileGroupList:clear() - for k, v in pairs(files) do - if string.lower(nlfile.getExtension(v)) == "lua" then - local shortFilename = nlfile.getFilename(v) - if defaultValue == "" then defaultValue = shortFilename end - local entry = createGroupInstance("r2ed_filelist_entry", "", - { id = tostring(k), text = shortFilename, - params_l="r2_core.setCurrSelectedFile('" .. shortFilename .. "', 'FileName')" }) - fileGroupList:addChild(entry) - end - end - setCaptureKeyboard(r2.CurrentForm:find("eb")) - end - - - --called at init to fill Unload Form - local function showUserComponentList(formInstance) - local fileGroupList = r2.CurrentForm:find('file_list') - local featureNameTable = r2.FeatureTree.getUserComponentList() - for k, v in pairs(featureNameTable) do - local entry = createGroupInstance("r2ed_filelist_entry", "", - {id = tostring(v), text=tostring(v), - params_l="r2.setCurrSelectedComponent('"..tostring(v).."')" }) - fileGroupList:addChild(entry) - end - setCaptureKeyboard(r2.CurrentForm:find("eb")) - end - - local function showMissingComponents() - local formUI = r2:getForm("MissingIdsForm") - local text = "The following objects are referenced in exported objects but will not be exported:\n" - local k, v = next(formUI.Env.FormInstance.Value, nil) - while k do - text = text .."# " ..v.."\n" - k, v = next(formUI.Env.FormInstance.Value, k) - end - text = text .."Continue anyway?" - formUI:find('name_list').hardtext = text - formUI.Env:updateAll() - formUI.Env.updateSize() - formUI:updateCoords() - formUI:center() - formUI:updateCoords() - end - - r2.Forms.MissingIdsForm = - { - - Caption = "uiR2EdMissingRefsWarning", - PropertySheetHeader = - [[ - - ]], - - Prop = - { - {Name="Value", Type="Table", Visible=false} - }, - onShow = showMissingComponents - } - - r2.Forms.SaveUserComponent = - { - Caption = "uiR2EDExportUserComponent", - PropertySheetHeader = fileListXML, - Prop = - { - {Name="Name", Type="String", Category="uiR2EDRollout_Save", ValidateOnEnter = true }, - {Name="ComponentFileName", Type="String", Category="uiR2EDRollout_Save"}, - {Name="ComponentName", Type="Table", Visible = false} - }, - onShow = showFileList - } - - r2.Forms.LoadUserComponent = - { - Caption = "uiR2EDExportLoadUserComponent", - PropertySheetHeader = fileListXML, - Prop = - { - {Name="FileName", Type="String", Category="uiR2EDRollout_Load", ValidateOnEnter = true }, - {Name="ComponentName", Type="String", Category="uiR2EDRollout_Load", WidgetStyle="StaticText"}, - }, - onShow = showUserComponentFileList - } - - r2.Forms.UnloadUserComponent = - { - Caption = "uiR2EDExportUnloadUserComponent", - PropertySheetHeader = fileListXML, - Prop = - { - {Name="ComponentName", Type="String", Category="uiR2EDRollout_Unload", ValidateOnEnter = true }, - }, - onShow = showUserComponentList - } - - -end - --------------------------------------------------------------------------------------------------------------------- -function userComponentManager:buildCurrentExportList(holder) - table.clear(self.CurrentExportList) - local components = holder.Components - local k, v = next(components, nil) - while k do - if v and v.InstanceId then - table.insert(self.CurrentExportList, v.InstanceId) - end - k, v = next(components, k) - end -end - --------------------------------------------------------------------------------------------------------------------- --- Tbl is a table containing all the instanceIds selected for export. -function userComponentManager:export(list, refX, refY, refZ) - - --local exportList = self.CurrentExportList - local exportList = list - assert(exportList) - --builds a table containing all instanceIds and their corresponding userComponentId - local refIdTable = userComponentManager:getRefIdTableFrom(exportList) - - local missingIds = refIdTable.RefIds - local missingIdsCount = 0 - --XXXXXX - - --TODO = reattribute UC ids for plotitems + container - - -- User component filename confirmation - local function onFileOk(form) - if (form.ComponentFileName ~= nil and type(form.ComponentFileName) == "string" and form.RefPosition ~= nil) then - if form.ComponentFileName == "" or string.len(form.ComponentFileName) < 2 then - messageBox(i18n.get("uiR2EDInvalidName")) - return - end - if string.find(form.ComponentFileName, '.lua', -4) == nil then - form.ComponentFileName = form.ComponentFileName .. ".lua" - end - local refPosition = form.RefPosition - local filename = form.ComponentFileName - local prefixedFilename = r2_core.UserComponentsPath..filename - local featureName = form.Name - - userComponentManager:computeAllPositions(exportList, refPosition, refIdTable.InstanceIds) - userComponentManager:componentToFile(prefixedFilename, featureName, exportList, refIdTable, refPosition) - userComponentManager:clear() - --the component is automatically loaded on receive save callback - --r2.loadUserComponentFile(prefixedFilename) - - - end - end - - local function onFileCancel(form) - - end - - -- Position confirmation - local function posOk(x, y, z) - debugInfo(string.format("Validate export with reference position (%d, %d, %d)", x, y, z)) - local refPosition = {} - refPosition["x"] = x - refPosition["y"] = y - refPosition["z"] = z - refPosition["InstanceId"] = "" - refPosition["Class"] = "Position" - r2:doForm("SaveUserComponent", {RefPosition=refPosition}, onFileOk, onFileCancel) - end - - local function posCancel() - debugInfo("Export canceled.") - end - - -- Export confirmation when missing some ids - local function confirmExport() - debugInfo("Export confirmed.") - r2:choosePos("", posOk, posCancel, "") - end - - local function cancelExport() - debugInfo("Export canceled.") - end - - local missingTbl = {} - local key, value = next(missingIds, nil) - while key do - if value == "Not exported" then - local tmpInstance = r2:getInstanceFromId(key) - if tmpInstance ~= nil then - missingIdsCount = missingIdsCount + 1 - table.insert(missingTbl, tmpInstance.Name) - debugInfo("Object named '" ..tmpInstance.Name .."' is referenced in an exported object but will not be exported.") - end - end - key, value = next(missingIds, key) - - end - - if missingIdsCount ~= 0 then - debugInfo(tostring(missingIdsCount) .." object(s) referenced but not exported. Continue anyway?y/n") - r2:doForm("MissingIdsForm", {Value=missingTbl}, confirmExport, cancelExport) - else - --r2:choosePos("", posOk, posCancel, "") - posOk(refX, refY, refZ) - end - -end -- !export - - --------------------------------------------------------------------------------------------------------------------- -function userComponentManager:getCurrentExportList() - return userComponentManager.CurrentExportList -end - --------------------------------------------------------------------------------------------------------------------- - -function userComponentManager:isInExportList(target) - local targetId = target.InstanceId - local k, v = next(self.CurrentExportList, nil) - while k do - if v == targetId then - return true - end - -- test if not a son of an already exported element - local currParent = target.ParentInstance - while currParent ~= nil do - if currParent.InstanceId == v then - return true - end - currParent = currParent.ParentInstance - end - k, v = next(self.CurrentExportList, k) - end - return false -end - - --------------------------------------------------------------------------------------------------------------------- -function userComponentManager:getCurrentExportList() - return userComponentManager.CurrentExportList -end - --------------------------------------------------------------------------------------------------------------------- - -function userComponentManager:isInExportList(target) - local targetId = target.InstanceId - local k, v = next(self.CurrentExportList, nil) - while k do - if v == targetId then - return true - end - -- test if not a son of an already exported element - local currParent = target.ParentInstance - while currParent ~= nil do - if currParent.InstanceId == v then - return true - end - currParent = currParent.ParentInstance - end - k, v = next(self.CurrentExportList, k) - end - return false -end - ---------------------------------------------------------------------------------------------------------------------- -function userComponentManager:addToExportList(instanceId) - local instance = r2:getInstanceFromId(instanceId) - if instance == nil then - debugInfo("UserComponentManager:AddToExportList : no instance") - return false - end - - table.insert(self.CurrentExportList, instanceId) - - return true - -end - --------------------------------------------------------------------------------------------------------------------- -function userComponentManager:clear() - table.clear(userComponentManager.InstanceIds) - table.clear(userComponentManager.Texts) - table.clear(userComponentManager.PlotItems) - table.clear(userComponentManager.Positions) - table.clear(userComponentManager.CurrentExportList) - userComponentManager.CurrentExportList = {} - userComponentManager.CurrentDesc = "" - debugInfo("UserComponentManager tables cleared.") -end - - --------------------------------------------------------------------------------------------------------------------- -function userComponentManager:computeAllPositions(argTbl, refPosition, refIdTable) - - local function buildPosition(instance, isTopLevel, refPosition) - local position = {} - if not instance.Position then return nil end - if instance ~= nil and (instance.InheritPos == 0 or isTopLevel == true) then - position["x"] = r2.getWorldPos(instance).x - refPosition["x"] - position["y"] = r2.getWorldPos(instance).y - refPosition["y"] - position["z"] = 0 - else - position["x"] = instance.Position.x - position["y"] = instance.Position.y - position["z"] = instance.Position.z - end - position["InstanceId"] = refIdTable[instance.Position.InstanceId] - position["Class"] = "Position" - return position - end - - - local function computePositions(instance, isTopLevel, refPosition) - assert(instance) - - local localRefPos = nil - - localRefPos = buildPosition(instance, isTopLevel, refPosition) - if localRefPos ~= nil and not userComponentManager.Positions[instance.Position.InstanceId] then - userComponentManager.Positions[instance.Position.InstanceId] = localRefPos - elseif localRefPos == nil then - localRefPos = refPosition - end - - local key, value = next(instance, nil) - while key do - if type(value) == "userdata" then - local subInstance = value - computePositions(subInstance, false, localRefPos) - end - key, value = next(instance, key) - end - end - - - if argTbl == nil then - else - local i = 1 - local nbExportedInstances = table.getn(argTbl) - while i <= nbExportedInstances do - local tmpInstance = r2:getInstanceFromId(argTbl[i]) - if tmpInstance ~= nil then - computePositions(tmpInstance, true, refPosition) - end - i = i + 1 - end - end -end - ---------------------------------------------------------------------------------------------------------------- -function userComponentManager:removeIdFromExportList(id) - local exportList = self.CurrentExportList - assert(exportList) - - local k, v = next(exportList, nil) - while k do - if v == id then - break - end - k, v = next(exportList, k) - end - if k ~= nil then - table.remove(exportList,k) - if table.getn(exportList) == 0 then - self.CurrentExportList = {} - end - debugInfo(tostring(v) .." removed from exportList") - end -end - --------------------------------------------------------------------------------------------------------------- - -function userComponentManager:registerUserComponentData(fileName) - - local function checkEntry(entry) - local ucTable = r2_core.UserComponentTable - local k, v = next(ucTable, nil) - while k do - if v[1] == entry[1] and self:isInitialized() == true then - messageBox("A UserComponent called '"..entry[1].."' is already loaded. Unload it before loading another component with the same name.") - return false - end - if v[2] == entry[2] and self:isInitialized() == true then - messageBox("This file has already been loaded.") - return false - end - k, v = next(ucTable, k) - end - return true - end - - local f = io.open(fileName,"r") - assert(f) - f:read("*line") - f:read("*line") - f:read("*line") - f:read("*line") - f:read("*line") - local line = f:read("*line") - f:close() - local luaString = string.sub(line, 3) - - loadstring(luaString)() - - local currentFeatureName = tostring(CurrentFeatureName) - - local entry = { currentFeatureName, fileName } - if checkEntry(entry) == false then return end - - table.insert(r2_core.UserComponentTable, entry) - - local userComponentTable = r2_core.UserComponentTable - local userComponentTableFile = io.open("save/r2_core_user_component_table.lua", "w") - - userComponentTableFile:write("r2_core.UserComponentTable = \n{\n") - - local k, v = next(userComponentTable , nil) - while k do - if v then - userComponentTableFile:write("\t{") - userComponentTableFile:write(string.format("%q", v[1]) ..", ") - userComponentTableFile:write(string.format("%q", v[2]) ..", ") - userComponentTableFile:write("},\n") - end - k, v = next(userComponentTable, k) - end - - userComponentTableFile:write("} --!UserComponentTable") - - userComponentTableFile:close() - -end --------------------------------------------------------------------------------------------------------------------- -function userComponentManager:unregisterComponent(featureName) - local userComponentTable = r2_core.UserComponentTable - local k, v = next(userComponentTable, nil) - while k do - if v[1] == featureName then - break - end - k, v = next(userComponentTable, k) - end - - if k ~= nil then - table.remove(userComponentTable,k) - if table.getn(userComponentTable) == 0 then - r2_core.UserComponentTable = {} - end - debugInfo(tostring(v[1]) .." removed from loaded usercomponent table.") - end - local userComponentTableFile = io.open("save/r2_core_user_component_table.lua", "w") - - userComponentTableFile:write("r2_core.UserComponentTable = \n{\n") - - local k, v = next(userComponentTable , nil) - while k do - if v then - userComponentTableFile:write("\t{") - userComponentTableFile:write(string.format("%q", v[1]) ..", ") - userComponentTableFile:write(string.format("%q", v[2]) ..", ") - userComponentTableFile:write("},\n") - end - k, v = next(userComponentTable, k) - end - - userComponentTableFile:write("} --!UserComponentTable") - - userComponentTableFile:close() - -end - --------------------------------------------------------------------------------------------------------------------- -function userComponentManager:unloadUserComponent() - - local function checkFeatureName(name) - local tbl = r2_core.UserComponentTable - local k, v = next(tbl, nil) - while k do - if v[1] == name then - return true - end - k, v = next(tbl, k) - end - return false - end - - local function onChoiceOk(form) - local featureName = form.ComponentName - if featureName == "" or checkFeatureName(featureName) == false then - messageBox("This User Component is not loaded.") - return - end - - userComponentManager:unregisterComponent(featureName) - r2.FeatureTree.removeUCFromTree(featureName) - local featureGroupList = r2:getForm("UnloadUserComponent"):find('file_list'):clear() - --inspect(featureGroupList) - --local featureNode = featureGroupList:getRootNode():getNodeFromId(featureName) - --featureNode:getFather():deleteChild(featureNode) - - end - - local function onChoiceCancel() - local featureGroupList = r2:getForm("UnloadUserComponent"):find('file_list'):clear() - end - - r2:doForm("UnloadUserComponent", {}, onChoiceOk, onChoiceCancel) -end - --------------------------------------------------------------------------------------------------------------------- -function userComponentManager:loadUserComponent(fileName, body, header) - --TODO : loading md5 - --local ok = loadfile(fileName) - local ok = loadstring(body) - if not ok then - messageBox("UserComponentManager: Couldn't load file '" ..fileName.."'.") - return false - end - ok() - - assert(header["CurrentFeatureName"]) - local currentFeatureName = header["CurrentFeatureName"] - - local userFeature = r2.Features[currentFeatureName] - - local componentId, component = next(userFeature.Components, nil) - while (component ~= nil) - do - debugInfo("Registering user component " .. component.Name) - r2.registerComponent(component) - local class = r2.Classes[component.Name] - class.NameToProp = {} - for k, prop in pairs(class.Prop) do - if prop.Name == nil then - debugInfo("Found a property in class " .. tostring(class.Name) .. " with no field 'Name'") - end - class.NameToProp[prop.Name] = prop - end - assert(class) - r2.Subclass(class) - r2.registerGenerator(class) - componentId, component = next(userFeature.Components, componentId) - end - - r2.FeatureTree.addUserComponentNode(currentFeatureName) - if self.IsInitialized == false then - self.InitialComponentToLoad = self.InitialComponentToLoad - 1 - else - userComponentManager:registerUserComponentData(fileName) - end -end --------------------------------------------------------------------------------------------------------------------- - - - -function userComponentManager:loadUserComponentFile() - - local function onChoiceOk(form) - local filename = form.FileName - local prefixedFilename = r2_core.UserComponentsPath..filename - - r2.loadUserComponentFile(prefixedFilename) - - end - - local function onChoiceCancel() - end - - - r2:doForm("LoadUserComponent", {}, onChoiceOk, onChoiceCancel) -end ---------------------------------------------------------------------------------------------------------------- - -function userComponentManager:computeNewPosition(instanceId, refPosition) - - local function buildPosition(instance, isTopLevel, refPosition) - --local position = {} - - local position = r2.newComponent("Position") - if not instance.Position then return nil end - if instance ~= nil and (instance.InheritPos == 0 or isTopLevel == true) then - position["x"] = r2.getWorldPos(instance).x - refPosition["x"] - position["y"] = r2.getWorldPos(instance).y - refPosition["y"] - position["z"] = r2:snapZToGround(r2.getWorldPos(instance).x, r2.getWorldPos(instance).y) - refPosition["z"] - else - position["x"] = instance.Position.x - position["y"] = instance.Position.y - position["z"] = instance.Position.z - end - --position["InstanceId"] = instance.Position.InstanceId - --position["Class"] = "Position" - return position - end - - - local function computePositions(instance, isTopLevel, refPosition) - assert(instance) - - local localRefPos = nil - - localRefPos = buildPosition(instance, isTopLevel, refPosition) - if localRefPos ~= nil and not userComponentManager.Positions[instance.Position.InstanceId] then - userComponentManager.Positions[instance.Position.InstanceId] = localRefPos - elseif localRefPos == nil then - localRefPos = refPosition - end - - local key, value = next(instance, nil) - while key do - if type(value) == "userdata" then - local subInstance = value - computePositions(subInstance, false, localRefPos) - end - key, value = next(instance, key) - end - end - - local tmpInstance = r2:getInstanceFromId(instanceId) - if tmpInstance ~= nil then - computePositions(tmpInstance, true, refPosition) - end - --table.clear(userComponentManager.Positions) - -end - --------------------------------------------------------------------------------------------------------------------- -function userComponentManager:insertNewPosition(instanceId) - local instance = r2:getInstanceFromId(instanceId) - local newPosition = userComponentManager.Positions[instance.Position.InstanceId] - if not newPosition then - debugInfo("Can't retrieve new position for '"..tostring(instance.Position.InstanceId)) - assert(0) - end - r2.requestSetNode(instanceId, "Position", newPosition) -end - --------------------------------------------------------------------------------------------------------------------- -function userComponentManager:replacePosition(instanceId) - local currentHolder = r2:getInstanceFromId(r2_core.CurrentHolderId) - assert(currentHolder) - - local refPosition = currentHolder.Position - - self:computeNewPosition(instanceId, refPosition) - - self:insertNewPosition(instanceId) - -end - --------------------------------------------------------------------------------------------------------------------- -function userComponentManager:restorePosition(instanceId, refPosition) - local instance = r2:getInstanceFromId(instanceId) - local newPosition = r2.newComponent("Position") - if not instance.Position then return nil end - if instance ~= nil then - newPosition["x"] = r2.getWorldPos(instance).x - refPosition["x"] - newPosition["y"] = r2.getWorldPos(instance).y - refPosition["y"] - newPosition["z"] = r2:snapZToGround(r2.getWorldPos(instance).x, r2.getWorldPos(instance).y) - refPosition["z"] - end - r2.requestSetNode(instanceId, "Position", newPosition) -end --------------------------------------------------------------------------------------------------------------------- - -function r2.loadUserComponentCallback(filename, body, header) - r2_core.UserComponentManager:loadUserComponent(filename, body, header) - if r2_core.UserComponentManager.IsInitialized == false and r2_core.UserComponentManager.InitialComponentToLoad == 0 then - debugInfo("# UserComponentManager init done.") - r2_core.UserComponentManager.IsInitialized = true - end -end - --------------------------------------------------------------------------------------------------------------------- -function r2.displayModifiedUserComponentFileError() - messageBox("You cannot load a UserComponent file which has been externally modified") -end diff --git a/code/ryzom/common/data_common/r2/r2_debug.lua b/code/ryzom/common/data_common/r2/r2_debug.lua deleted file mode 100644 index 78501dcab..000000000 --- a/code/ryzom/common/data_common/r2/r2_debug.lua +++ /dev/null @@ -1,170 +0,0 @@ --- debugging aid - ---------------- --- FUNCTIONS -- ---------------- - - ------------------------------------------------------------------------------------------------------------- --- function tracing asked in config file ? --- if traceFunctions == true then --- local function traceFunction(what) --- debug.sethook() --- local di = debug.getinfo(2) --- --luaObject(di) --- if di.name ~= nil and di.name ~= 'getmetatable' then --- debugInfo(what .. " : " .. tostring(di.name) .. " : " .. tostring(di.short_src) .. " : " .. tostring(di.currentline)) --- end --- debug.sethook(traceFunction, "cr") --- end --- debugInfo("turning debug hook on") --- debug.sethook(traceFunction, "c") ---else --- --debugInfo("turning debug hook off") --- debug.sethook() ---end - ------------------------------------------------------------------------------------------------------------- --- dump objects cycles for the given object -function dumpCycles(base, visitedSet, infos) - local function fullName(infos) - local result = "" - while infos do - result = infos.Name .. "." .. result - infos = infos.Parent - end - return result - end - if visitedSet == nil then - visitedSet = {} - end - if infos == nil then - infos = { Name = "root", Parent = nil } - end - for k, v in pairs(base) do - if v ~= _G._G then - if type(v) == "table" then - local newInfos = { Name = tostring(k), Parent = infos } - if visitedSet[v] then - debugInfo(fullName(visitedSet[v]) .. "is referenced by " .. fullName(newInfos)) - else - visitedSet[v] = newInfos -- mark as visited - dumpCycles(v, visitedSet, newInfos) - visitedSet[v] = nil -- only intersted in cycles - end - end - end - end -end - ------------------------------------------------------------------------------------------------------------- --- display time taken to execute a function -function profileFunction(func, name) - assert(type(func) == "function") - if name == nil then - name = debug.getinfo(func).name - end - local startTime = nltime.getPreciseLocalTime() - func() - local endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for %s is %d", tostring(name), endTime - startTime)) -end - --- display time taken to execute a function -function profileMethod(table, funcName, name) - assert(table) - assert(type(funcName) == "string") - assert(type(table[funcName]) == "function") - if name == nil then - name = select(debug.getinfo(table[funcName]).name, funcName) - end - local startTime = nltime.getLocalTime() - table[funcName](table) - local endTime = nltime.getLocalTime() - debugInfo(string.format("time for %s is %f", tostring(name), (endTime - startTime) / 1000)) -end - ------------------------------------------------------------------------------------------------------------- --- add a break that is triggered when a value in a table has been changed -function addBreakOnChange(table, watchedKey) - assert(type(table) == "table") - local value = table[watchedKey] - assert(value ~= nil) - table[watchedKey] = nil - debugInfo("Adding break on change of key " .. tostring(watchedKey)) - local mt = getmetatable(table) - local oldNewIndex - if mt then - oldNewIndex = mt.__newindex - end - local newMT - if mt then newMT = clone(mt) else newMT = {} end - -- WRITE - newMT.__newindex = function(table, key, newValue) - debugInfo('write') - if key == watchedKey then - value = newValue - debugInfo(debug.traceback()) - debugWarning(" Key " .. tostring(watchedKey) .. " changed to " .. tostring(value)) - assert(nil) - elseif mt and mt.__newindex then - mt.__newindex(table, key, newValue) - else - rawset(table, key, newValue) - end - end - -- READ - newMT.__index = function(table, key) - debugInfo('read') - if key == watchedKey then - return value - elseif mt and mt.__index then - return mt.__index(table, key, value) - else - return rawget(table, key) - end - end - -- - setmetatable(table, newMT) -end - ----------- --- INIT -- ----------- - - --- replace the assert function with a more verbose one -if oldAssert == nil then - oldAssert = assert -end - -function assert(cond) - if not cond then - -- rawDebugInfo(colorTag(255, 0, 255) .. "ASSERTION FAILED !! ") - rawDebugInfo("@{FOFF}ASSERTION FAILED !! ") - dumpCallStack(2); - error("") - end -end - - -local gcStartTime - --- special nico stuff : modified lua version calls "__notify_debug" when a garbage collection cycle occurs -function __notify_gc() - gcStartTime = nltime.getLocalTime() -end -function __notify_post_gc() - local deltaTime = nltime.getLocalTime() - gcStartTime - local used, threshold = gcinfo() - debugInfo(colorTag(255, 0, 0) .. string.format("** GC ** (%d ms) (used = %d kb, threshold = %d kb", deltaTime, used, threshold)) -end - - ---testTable = { tata = 1, toto = 2 } - ---addBreakOnChange(testTable, "tata") - ---testTable.tutu = 2 ---testTable.tata = testTable.tata + 20 - diff --git a/code/ryzom/common/data_common/r2/r2_dialogs.lua b/code/ryzom/common/data_common/r2/r2_dialogs.lua deleted file mode 100644 index 286cf2a34..000000000 --- a/code/ryzom/common/data_common/r2/r2_dialogs.lua +++ /dev/null @@ -1,1114 +0,0 @@ -r2.dialogs = { - -uiId = "ui:interface:r2ed_dialogs", -ownCreatedInstances = {}, -openFirst = nil, -elementsIdCounter = 0, -elementOrder = true, -fromEmoteIdToName= {}, -maxAndMin = true, -eltTemplateParams = { - selectElt="r2.dialogs:selectElement()", - openEltEditor="", - maxMinElt="r2.dialogs:maximizeMinimizeElement()", - removeElt="r2.dialogs:removeElementInst()", - colOver="120 150 140 100", - colPushed="120 150 140 255", - multiMaxLine="3" - }, -elementEditorTemplate = "template_edit_chat", -elementInitialName=i18n.get("uiR2EdChat"):toUtf8(), -sequenceInitialName=i18n.get("uiR2EDDialog"):toUtf8(), - -keepOpenedEditor = false, - -currentEltUIID = nil, -- initialisי quand l'editeur est ouvert ou fermי - -whoToWhoTranslation = { - ["_DM"] = i18n.get("uiR2EdDonjonMaster"):toUtf8(), - ["_System"] = i18n.get("uiR2EdSystem"):toUtf8(), - ["_Nobody"] = i18n.get("uiR2EdNobody"):toUtf8(), - }, - -maxVisibleLine = 10, -} - - - --- sequence -------------------------------------------------- -function r2.dialogs:currentSequUI() - return getUI(self.uiId):find("sequence_elts") -end - -function r2.dialogs:currentSequInstId() - return self:currentSequUI().Env.InstanceId -end - --- initialisי quand selection dialog dans menu -function r2.dialogs:setSequUIInstId(sequUI, id) - sequUI.Env.InstanceId = id -end - -function r2.dialogs:currentSequInst() - return r2:getInstanceFromId(self:currentSequInstId()) -end - --- element --------------------------------------------------- -function r2.dialogs:currentEltUIId() - return self.currentEltUIID -end - -function r2.dialogs:currentEltUI() - if self.currentEltUIID then - return getUI(self.currentEltUIID) - end - return nil -end - -function r2.dialogs:setCurrentEltUIId(id) - self.currentEltUIID = id -end - -function r2.dialogs:currentEltInstId() - if self.currentEltUIID then - return self:currentEltUI().Env.InstanceId - end - return nil -end - -function r2.dialogs:currentEltInst() - if self.currentEltUIID and self:currentEltInstId() then - return r2:getInstanceFromId(self:currentEltInstId()) - end - return nil -end - --- updated element and/or sequence (not necessary the same as current sequence or element) -function r2.dialogs:updatedSequUI() - return self:currentSequUI() -end - -function r2.dialogs:setUpdatedSequUIId(sequUIId) -end - -function r2.dialogs:updatedEltUI() - return self:currentEltUI() -end - -function r2.dialogs:setUpdatedEltUIId(eltUIId) -end - - ------------------- INIT DIALOGS EDITOR ------------------------- -function r2.dialogs:initEditor() - - local emoteTable = initEmotesMenu("ui:interface:r2ed_triggers_menu", "") - for id, name in pairs(emoteTable) do - self.fromEmoteIdToName[id] = name - end -end - ------- OPEN EDITOR ------------------------------------------ - -function r2.dialogs:checkDialog() - - local dialogUI = getUI(self.uiId) - - local dialog = r2:getSelectedInstance() - if not dialog or not dialog:isKindOf("ChatSequence") then - dialogUI.active = false - end -end - -function r2.dialogs:openEditor() - - local dialogUI = getUI(self.uiId) - - if not dialogUI.active then - - self:cleanEditor() - - local sequenceUI = self:currentSequUI() - assert(sequenceUI) - - -- select selected dialog in scene or first dialog of current act - local allDialogs = {} - r2:getCurrentAct():appendInstancesByType(allDialogs, "ChatSequence") - r2.Scenario:getBaseAct():appendInstancesByType(allDialogs, "ChatSequence") - - if table.getn(allDialogs) > 0 then - sequenceUI.active = true - - local selectedInstance = r2:getSelectedInstance() - if selectedInstance and selectedInstance:isKindOf("ChatSequence") then - self:selectSequence(selectedInstance.InstanceId) - else - local firstDialog - for k, dialog in pairs(allDialogs) do - firstDialog = dialog - break - end - self:selectSequence(firstDialog.InstanceId) - end - else - sequenceUI.active = false - local dialogName = dialogUI:find("dialogMenu"):find("menu"):find("text") - assert(dialogName) - dialogName.uc_hardtext = i18n.get("uiR2EdNoSelelection") - end - - -- active editor - dialogUI.active = true - dialogUI:updateCoords() - - if self.openFirst == nil then - self.openFirst = true - dialogUI:center() - end - else - setTopWindow(dialogUI) - dialogUI:blink(1) - end -end - ------- NEW SEQUENCE ------------------------------------------ - -function r2.dialogs:newSequenceInst(x, y, z) - - r2.requestNewAction(i18n.get("uiR2EDNewChatSequenceAction")) - local dialog = r2.newComponent("ChatSequence") - assert(dialog) - - dialog.Base = r2.Translator.getDebugBase("palette.entities.botobjects.dialog") - dialog.Name = r2:genInstanceName(i18n.get("uiR2EDDialog")):toUtf8() - dialog.Position.x = x - dialog.Position.y = y - dialog.Position.z = r2:snapZToGround(x, y) - - if dialog.onComponentCreated then - dialog:onComponentCreated() - end - - r2:setCookie(dialog.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", dialog) -end - - ------- CLOSE EDITOR ------------------------------------------ -function r2.dialogs:closeEditor() - - self:updateSaysWhat() - - r2.logicUI:closeEditor(r2.dialogs) -end - ------- CLEAN EDITOR ------------------------------------------ -function r2.dialogs:cleanEditor() - - -- reset current dialog and current chat - self:setCurrentEltUIId(nil) - self:setUpdatedSequUIId(nil) - self:setUpdatedEltUIId(nil) - self.elementsIdCounter = 0 - - local sequenceUI = self:currentSequUI() - assert(sequenceUI) - local eltsList = sequenceUI:find("elements_list") - assert(eltsList) - eltsList:clear() - - -- hide maximize/minimize - local minElts = sequenceUI:find("minimize_elements") - assert(minElts) - local maxElts = sequenceUI:find("maximize_elements") - assert(maxElts) - minElts.active = false - maxElts.active = false - - -- hide down/up buttons - local upDown = sequenceUI:find("order_group") - assert(upDown) - upDown.active = false -end - ------- INIT DIALOGS MENU ------------------------------------------ -function r2.dialogs:initDialogsMenu() - - local dialogMenu = getUI("ui:interface:r2ed_triggers_menu") - assert(dialogMenu) - - dialogMenu = dialogMenu:getRootMenu() - assert(dialogMenu) - - dialogMenu:reset() - - local allDialogs = {} - r2:getCurrentAct():appendInstancesByType(allDialogs, "ChatSequence") - - local uc_dialog = ucstring() - for k, dialog in pairs(allDialogs) do - uc_dialog:fromUtf8(dialog.Name) - dialogMenu:addLine(uc_dialog, "lua", "r2:setSelectedInstanceId('" .. dialog.InstanceId .."')", dialog.InstanceId) - end - - dialogMenu:setMaxVisibleLine(self.maxVisibleLine) - - r2.logicUI:openLogicMenu(getUICaller()) -end - ------- SELECT ELEMENT -------------------------------------------- -function r2.dialogs:selectElement(selectedButtonElt) - - r2.logicComponents:selectElement(self, selectedButtonElt) - - local sequenceUI = self:currentSequUI() - assert(sequenceUI) - - local editElt = sequenceUI:find("edit_element") - assert(editElt) - - if editElt.active then - local editBox = editElt:find("says"):find("edit_box_group") - assert(editBox) - editBox:setFocusOnText() - end -end - ------- SELECT SEQUENCE -------------------------------------- -function r2.dialogs:selectSequence(dialogId) - - local ui = getUI(self.uiId) - assert(ui) - - -- clean editor - self:cleanEditor() - - self:setSequUIInstId(self:currentSequUI(), dialogId) - local sequenceInst = self:currentSequInst() - if sequenceInst==nil then return end - - local sequenceUI = self:currentSequUI() - assert(sequenceUI) - - sequenceUI.active = true - - -- create dialog editor - self:createElementEditor() - - -- init dialog UI ------------------------- - -- add elts to sequence - local elts = sequenceInst.Components - for e = 0, elts.Size - 1 do - self:newElementUI(elts[e]) - end - - -- initialize repeat type - local repeatButton = ui:find("repeat"):find("toggle_butt") - assert(repeatButton) - repeatButton.pushed = (sequenceInst.Repeating == 0) - - -- dialog editor title - local uc_dialog = ucstring() - uc_dialog:fromUtf8(i18n.get("uiR2EDChatSequenceEditor"):toUtf8() .. sequenceInst.Name) - ui.uc_title = uc_dialog - - -- dialog name in menu box - local dialogName = ui:find("dialogMenu"):find("menu"):find("text") - assert(dialogName) - uc_dialog:fromUtf8(sequenceInst.Name) - dialogName.uc_hardtext = uc_dialog - - -- initialize maximize/minimize - local maxElts = sequenceUI:find("maximize_elements") - assert(maxElts) - maxElts.active = (elts.Size > 0) - - r2.logicComponents:selectSequence(r2.dialogs) -end - ------- CREATE EDITOR ----------------------------------------------- -function r2.dialogs:createElementEditor() - - r2.logicComponents:createElementEditor(r2.dialogs) - - -- not necessary current sequence UI - local sequenceUI = self:updatedSequUI() - - local newEditorElt = sequenceUI:find("edit_element") - assert(newEditorElt) - - local editBox = newEditorElt:find("edit_box_group") - assert(editBox) - - local scroll = newEditorElt:find("edit_box_scroll_ed") - assert(scroll) - - scroll:setTarget(editBox.id) -end - ------- OPEN ELEMENT EDITOR ----------------------------------------------- -function r2.dialogs:updateElementEditor() - - local instanceChat = self:currentEltInst() - - local dialogUI = getUI(self.uiId) - assert(dialogUI) - - local sequenceUI = self:currentSequUI() - assert(sequenceUI) - - local chatEditor = sequenceUI:find("edit_element") - assert(chatEditor) - - -- chat name - local chatName = chatEditor:find("name") - assert(chatName) - - -- time - local minutesText = chatEditor:find("minutes"):find("text") - assert(minutesText) - - local secondsText = chatEditor:find("seconds"):find("text") - assert(secondsText) - - -- update NPC name lists - local whoMenuText = chatEditor:find("whoMenu"):find("text") - assert(whoMenuText) - - local toWhoMenuText = chatEditor:find("toWhoMenu"):find("text") - assert(toWhoMenuText) - - local editBox = chatEditor:find("says"):find("edit_box_group") - assert(editBox) - - local emoteButtonText = chatEditor:find("emote"):find("menu"):find("text") - assert(emoteButtonText) - - if instanceChat then - - local uc_chat = ucstring() - - local index = r2.logicComponents:searchElementIndex(instanceChat) - if index~= nil then - uc_chat:fromUtf8(self.elementInitialName.." "..index.." : ") - else - uc_chat:fromUtf8(self.elementInitialName.." : ") - end - chatName.uc_hardtext = uc_chat - - -- after value - local time = instanceChat.Time - assert(time) - local minNb, secNb = self:calculMinSec(time) - - minutesText.uc_hardtext = tostring(minNb) - secondsText.uc_hardtext = tostring(secNb) - - -- who - local whoInst = r2:getInstanceFromId(tostring(instanceChat.Actions[0].Who)) - local hideToWhoAndEmote = false - if whoInst then - uc_chat:fromUtf8(whoInst.Name) - elseif instanceChat.Actions[0].WhoNoEntity=="_System" then - uc_chat = i18n.get("uiR2EdSystem") - hideToWhoAndEmote = true - elseif instanceChat.Actions[0].WhoNoEntity=="_DM" then - uc_chat = i18n.get("uiR2EdDonjonMaster") - hideToWhoAndEmote = true - else - uc_chat = ucstring("") - end - whoMenuText.uc_hardtext = uc_chat - - -- says what - editBox:cancelFocusOnText() - local textID = instanceChat.Actions[0].Says - if textID ~= "" and r2:getInstanceFromId(textID) then - local uc_says_what = ucstring() - uc_says_what:fromUtf8(r2:getInstanceFromId(textID).Text) - editBox.uc_input_string = uc_says_what - else - editBox.uc_input_string = "" - end - - local breakAtEnd = 0 - - if instanceChat.BreakAtEnd then - breakAtEnd = instanceChat.BreakAtEnd - end - local breakAtEndButton = chatEditor:find("break_group"):find("toggle_butt") - assert(breakAtEndButton) - breakAtEndButton.pushed = (breakAtEnd == 0) - - chatEditor:find("toWhoMenu").active = not hideToWhoAndEmote - chatEditor:find("emote").active = not hideToWhoAndEmote - if hideToWhoAndEmote then - return - end - - -- to who - local toWhoInst = r2:getInstanceFromId(tostring(instanceChat.Actions[0].Facing)) - if toWhoInst then - uc_chat:fromUtf8(toWhoInst.Name) - else - uc_chat = i18n.get("uiR2EdNobody") - end - toWhoMenuText.uc_hardtext = uc_chat - - -- emote - local emoteName = self.fromEmoteIdToName[instanceChat.Actions[0].Emote] - if emoteName then - uc_chat:fromUtf8(emoteName) - else - uc_chat = i18n.get("uiR2EdNoElt") - end - emoteButtonText.uc_hardtext = uc_chat - - else - local uc_chat = ucstring() - uc_chat:fromUtf8(self.elementInitialName.." : ") - chatName.uc_hardtext = uc_chat - - minutesText.uc_hardtext = tostring(0) - secondsText.uc_hardtext = tostring(0) - - whoMenuText.uc_hardtext = "" - - editBox.uc_input_string = "" - - toWhoMenuText.uc_hardtext = "" - emoteButtonText.uc_hardtext = i18n.get("uiR2EdNoElt") - end -end - - ------ CLOSE ELEMENT EDITOR --------------------------------------------- -function r2.dialogs:closeElementEditor() - - r2.logicComponents:closeElementEditor(r2.dialogs) -end - ------- NEW ELEMENT INST ------------------------------------------ -function r2.dialogs:newElementInst() - - r2.requestNewAction(i18n.get("uiR2EDNewChatStepAction")) - - local chatStep = r2.newComponent("ChatStep") - - local sequenceInst = self:currentSequInst() - assert(sequenceInst) - - if sequenceInst.Components.Size == 0 then - chatStep.Time = 0 - else - chatStep.Time = 3 - end - - local chatAction = r2.newComponent("ChatAction") - chatAction.WhoNoEntity = "_System" - table.insert(chatStep.Actions, chatAction) - - r2.requestInsertNode(sequenceInst.InstanceId, "Components", -1, "", chatStep) - - self.ownCreatedInstances[chatStep.InstanceId] = true - - r2.logicComponents:newElementInst(r2.dialogs) -end - ------- NEW ELEMENT UI ------------------------------------------ -function r2.dialogs:newElementUI(newInst) - r2.logicUI:newElementUI(r2.dialogs, newInst, true) -end - ------- REMOVE ELEMENT INST ---------------------------------------- -function r2.dialogs:removeElementInst() - - r2.requestNewAction(i18n.get("uiR2EDRemoveLogicElementAction")) - - local chatStep = self:currentEltInst() - assert(chatStep) - local says = chatStep.Actions[0].Says - - r2.logicComponents:removeElementInst(r2.dialogs) - - r2.unregisterTextFromId(chatStep.Actions[0].Says) - - r2.requestEndAction() -end - ------- REMOVE ELEMENT UI ------------------------------------------- -function r2.dialogs:removeElementUI(removedEltUI) - r2.logicUI:removeElementUI(r2.dialogs, removedEltUI) -end - ------- REMOVE SEQUENCE UI ------------------------------------------- -function r2.dialogs:removeSequenceUI(instance) - - local allDialogs = {} - if (not r2:getCurrentAct()) then return end - r2:getCurrentAct():appendInstancesByType(allDialogs, "ChatSequence") - -- be careful : instance is always in ChatSequences list - -- it's not removed yet when onErase is called - if table.getn(allDialogs) > 1 then - local firstDialog - for k, dialog in pairs(allDialogs) do - if dialog~=instance then - firstDialog = dialog - break - end - end - self:selectSequence(firstDialog.InstanceId) - else - self.keepOpenedEditor = false - end -end - ------- UPDATE SEQUENCE UI ------------------------------------------- -function r2.dialogs:updateSequenceUI(sequenceInst) - - local ui = getUI(self.uiId) - assert(ui) - - -- initialize repeat type - local repeatButton = ui:find("repeat"):find("toggle_butt") - assert(repeatButton) - repeatButton.pushed = (sequenceInst.Repeating == 0) - - -- dialog editor title - local uc_title = ucstring() - uc_title:fromUtf8(i18n.get("uiR2EDChatSequenceEditor"):toUtf8() .. sequenceInst.Name) - ui.uc_title = uc_title - - -- dialog name in menu box - local dialogName = ui:find("dialogMenu"):find("menu"):find("text") - assert(dialogName) - dialogName.uc_hardtext = sequenceInst.Name -end - ------- UP ELEMENT INST ------------------------------------------- -function r2.dialogs:upElementInst() - r2.logicComponents:upElementInst(r2.dialogs) -end - ------- DOWN ELEMENT INST ----------------------------------------- -function r2.dialogs:downElementInst() - r2.logicComponents:downElementInst(r2.dialogs) -end - ------- MAX/MIN ELEMENTS UI ------------------------------------------- -function r2.dialogs:maximizeMinimizeElements() - r2.logicUI:maximizeMinimizeElements(r2.dialogs) -end - ------- MAX/MIN ELEMENT UI ------------------------------------------- -function r2.dialogs:maximizeMinimizeElement(element, allMinimize) - - r2.logicUI:maximizeMinimizeElement(element, allMinimize) -end - ------- DOWN/UP ELEMENT UI ------------------------------------------- -function r2.dialogs:downUpElementUI(elementUI, instance) - r2.logicUI:downUpElementUI(r2.dialogs, elementUI, instance) -end - ------- UPDATE ELEMENT TITLE ------------------------------------------- -function r2.dialogs:updateElementTitle(chatUI) - r2.logicComponents:updateElementTitle(r2.dialogs, chatUI, true) -end - ------- UPDATE CHAT TEXT ------------------------------------------- -function r2.dialogs:updateElementUI(elementUI) - - local chatStep = r2:getInstanceFromId(r2.logicUI:getEltUIInstId(elementUI)) - assert(chatStep) - - local chatText = elementUI:find("text_list") - assert(chatText) - chatText:clear() - - local who = tostring(chatStep.Actions[0].Who) - if who=="" then who=chatStep.Actions[0].WhoNoEntity end - if who and who ~= "" then - - local text = "" - local textEmpty = true - - local says = chatStep.Actions[0].Says - - if r2:getInstanceFromId(says)~=nil and r2:getInstanceFromId(says).Text ~= "" then - text = "\n" .. r2:getInstanceFromId(says).Text - textEmpty = false - end - --text = text.."\n" - - -- Add a white line that indicate that the dialog pause at end (ChatStep) in reduced view - chatText:addColoredTextChild(text, 220, 140, 100, 255) - if chatStep.BreakAtEnd and chatStep.BreakAtEnd == 1 then - chatText:addColoredTextChild("\n"..i18n.get("uiR2EDThenPause"):toUtf8(), 255, 255, 255, 255) - end - - local sep = elementUI:find("sep") - assert(sep) - if textEmpty == false then - sep.active = true - else - chatText:clear() - sep.active = false - end - end - - r2.logicUI:updateElementUI(r2.dialogs, elementUI) -end - --------------------- INIT TIME MENU -------------------------------- -function r2.dialogs:initTimeMenu(timeFunction, isHours) - - local timeMenu = getUI("ui:interface:r2ed_triggers_menu") - assert(timeMenu) - - local timeMenu = timeMenu:getRootMenu() - assert(timeMenu) - - timeMenu:reset() - - for i=0,9 do - timeMenu:addLine(ucstring(tostring(i)), "lua", timeFunction .. "(" .. tostring(i) .. ")", tostring(i)) - end - - if isHours then - timeMenu:addLine(ucstring(tostring(10)), "lua", timeFunction .. "(" .. tostring(10) .. ")", tostring(10)) - else - - local lineNb = 9 - for i=10, 50, 10 do - local lineStr = tostring(i).."/"..tostring(i+9) - timeMenu:addLine(ucstring(lineStr), "", "", tostring(i)) - lineNb = lineNb+1 - - timeMenu:addSubMenu(lineNb) - local subMenu = timeMenu:getSubMenu(lineNb) - - for s=0,9 do - lineStr = tostring(i+s) - subMenu:addLine(ucstring(lineStr), "lua", timeFunction .. "(" .. tostring(i+s) .. ")", lineStr) - end - - timeMenu:setMaxVisibleLine(self.maxVisibleLine) - end - end - - timeMenu:setMaxVisibleLine(self.maxVisibleLine) - - r2.logicUI:openLogicMenu(getUICaller()) -end - ------ CHAT MINUTES ----------------------------------------------------------------- -function r2.dialogs:chatAfterMinutes(minNb) - - -- recover "says what" (equiv change focus) - self:updateSaysWhat() - - local chatStep = self:currentEltInst() - assert(chatStep) - - local hours, mins, secs = r2.logicComponents:calculHourMinSec(chatStep.Time) - self:setTime(minNb*60 + secs) -end - --------------------- CHAT SECONDS ----------------------------------------------------------------- -function r2.dialogs:chatAfterSeconds(secNb) - - -- recover "says what" (equiv change focus) - self:updateSaysWhat() - - local chatStep = self:currentEltInst() - assert(chatStep) - - local hours, mins, secs = r2.logicComponents:calculHourMinSec(chatStep.Time) - self:setTime(mins*60 + secNb) -end - ----- SET TIME -------------------------------------------------------------------- -function r2.dialogs:setTime(secNb) - - r2.requestNewAction(i18n.get("uiR2EDSetDialogTime")) - - local chatStepId = self:currentEltInstId() - assert(chatStepId) - - r2.requestSetNode(chatStepId, "Time", secNb) -end - ----- SET BREAK AT END OF CHATSTEP -------------------------------------------------------------------- -function r2.dialogs:setChatBreak() - self:updateSaysWhat() - local mustBreak = 0 - if getUICaller().pushed==false then mustBreak = 1 end - - r2.requestNewAction(i18n.get("uiR2EDSetDialogChatBreak")) - - local chatStepId = self:currentEltInstId() - assert(chatStepId) - r2.requestSetNode(chatStepId, "BreakAtEnd", mustBreak) -end - -------- INIT ENTITIES MENU ----------------------------------------- -function r2.dialogs:initWhoMenu(whoFunction, towho) - - local menuName = "ui:interface:r2ed_triggers_menu" - - local whoMenu = getUI(menuName) - local whoMenu = whoMenu:getRootMenu() - assert(whoMenu) - - whoMenu:reset() - - local npcTable = r2.Scenario:getAllInstancesByType("Npc") - - if towho == true then - whoMenu:addLine(i18n.get("uiR2EdNobody"), "lua", whoFunction.."('" ..i18n.get("uiR2EdNobody"):toUtf8().. "')", "Nobody") - else - whoMenu:addLine(i18n.get("uiR2EdSystem"), "lua", whoFunction.."('_System')", "System") - whoMenu:addLine(i18n.get("uiR2EdDonjonMaster"), "lua", whoFunction.."('_DM')", "DonjonMaster") - end - - local uc_who = ucstring() - for key, npc in pairs(npcTable) do - local addLine = true - - if not npc:isBotObject() and not npc:isPlant() and not r2.isCreature(npc.InstanceId) then - if towho == true then - local chatStepInst= self:currentEltInst() - assert(chatStepInst) - - local whoId = chatStepInst.Actions[0].Who - if whoId~="" and whoId == npc.InstanceId then - addLine = false - end - end - if addLine then - uc_who:fromUtf8(npc.Name) - whoMenu:addLine(uc_who, "lua", whoFunction.."('" ..npc.InstanceId.. "')", npc.InstanceId) - end - end - end - - whoMenu:setMaxVisibleLine(self.maxVisibleLine) - - r2.logicUI:openLogicMenu(getUICaller()) -end - ----- UPDATE SAYS WHAT ----------------------------------------------------------------- -function r2.dialogs:updateSaysWhat() - - -- recover "says what" (equiv change focus) - local sequenceUI = self:currentSequUI() - if sequenceUI then - local chatEditor = sequenceUI:find("edit_element") - if chatEditor then - local saysWhat = chatEditor:find("says"):find("edit_box_group").uc_input_string:toUtf8() - self:setSaysWhat(saysWhat) - end - end -end - ----- SET WHO -------------------------------------------------------------------------- -function r2.dialogs:setWho(who) - - -- recover "says what" (equiv change focus) - self:updateSaysWhat() - - r2.requestNewAction(i18n.get("uiR2EDChatSetWhoAction")) - - local chatStep = self:currentEltInst() - assert(chatStep) - - if r2:getInstanceFromId(who) then - r2.requestSetNode(chatStep.Actions[0].InstanceId, "Who", r2.RefId(who)) - r2.requestSetNode(chatStep.Actions[0].InstanceId, "WhoNoEntity", "") - - if who == chatStep.Actions[0].Facing then - self:setToWho(i18n.get("uiR2EdNobody"):toUtf8()) - end - else - r2.requestSetNode(chatStep.Actions[0].InstanceId, "Who", r2.RefId("")) - r2.requestSetNode(chatStep.Actions[0].InstanceId, "WhoNoEntity", who) - - r2.requestSetNode(chatStep.Actions[0].InstanceId, "Facing", r2.RefId("")) - end -end - ------ SET TO WHO ----------------------------------------------------------------------- -function r2.dialogs:setToWho(toWho) - - -- recover "says what" (equiv change focus) - self:updateSaysWhat() - - r2.requestNewAction(i18n.get("uiR2EDChatSetToWhoAction")) - - local chatStep = self:currentEltInst() - assert(chatStep) - - if toWho == i18n.get("uiR2EdNobody"):toUtf8() then toWho="" end - r2.requestSetNode(chatStep.Actions[0].InstanceId, "Facing", r2.RefId(toWho)) -end - --------------------- SAYS WHAT ------------------------------------------- -function r2.dialogs:setSaysWhat(whatText) - - if whatText == nil then - whatText = getUICaller().uc_input_string:toUtf8() - end - - r2.requestNewAction(i18n.get("uiR2EDChatSetSayWhatAction")) - - local chatStep = self:currentEltInst() - if chatStep ~= nil then - local oldSays = r2:getInstanceFromId(chatStep.Actions[0].Says) - if (oldSays==nil and whatText~="") or (oldSays~=nil and oldSays.Text~=whatText) then - - r2.unregisterTextFromId(chatStep.Actions[0].Says) - local whatId=r2.registerText(whatText).InstanceId - r2.requestSetNode(chatStep.Actions[0].InstanceId, "Says", whatId) - end - end - - r2.requestEndAction() -end - ------ INIT EMOTE MENU --------------------------------------------------- -function r2.dialogs:initEmoteMenu() - - local menuName = "ui:interface:r2ed_triggers_menu" - - local emoteMenu = getUI(menuName) - local emoteMenu = emoteMenu:getRootMenu() - assert(emoteMenu) - - emoteMenu:reset() - initEmotesMenu(menuName, "r2.dialogs:setEmote") - r2.logicUI:openLogicMenu(getUICaller()) -end - ------ SET EMOTE ------------------------------------------------------- -function r2.dialogs:setEmote(emoteId) - - -- recover "says what" (equiv change focus) - self:updateSaysWhat() - - r2.requestNewAction(i18n.get("uiR2EDChatSetEmoteAction")) - - local chatStep = self:currentEltInst() - assert(chatStep) - - r2.requestSetNode(chatStep.Actions[0].InstanceId, "Emote", emoteId) -end - ------- REPEAT SEQUENCE ------------------------------------------- -function r2.dialogs:repeatSequence() - - r2.requestNewAction(i18n.get("uiR2EDChatRepeatSequenceAction")) - - local dialogInst = self:currentSequInst() - if dialogInst==nil then return end - - local sequenceType = 1 - if getUICaller().pushed==true then sequenceType = 0 end - - r2.requestSetNode(dialogInst.InstanceId, "Repeating", sequenceType) -end - -------- UTIL --------------------------------------------------- -function r2.dialogs:calculMinSec(totalSecNb) - - assert(totalSecNb) - local minNb, secNb = 0, totalSecNb - while secNb > 59 do - minNb = minNb+1 - secNb = secNb - 60 - end - - return minNb, secNb -end - - - - - - - --------------------------------------------------------------------------------------------------- --------------------------------- CHAT STEP DisplayerProperties------------------------------------ --------------------------------------------------------------------------------------------------- -local chatStepPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function chatStepPropertySheetDisplayerTable:onPostCreate(instance) - - if instance.Parent.Parent.InstanceId == r2.dialogs:currentSequInstId() then - r2.dialogs:newElementUI(instance) - end -end ------------------------------------------------- -function chatStepPropertySheetDisplayerTable:onErase(instance) - - instance.User.Deleted = true - - local elementUI = r2.logicUI:findElementUIFromInstance(r2.dialogs, instance) - - if elementUI then - r2.dialogs:removeElementUI(elementUI) - end -end ------------------------------------------------- -function chatStepPropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function chatStepPropertySheetDisplayerTable:onPostHrcMove(instance) - - local elementUI = r2.logicUI:findElementUIFromInstance(r2.dialogs, instance) - if elementUI then - r2.dialogs:downUpElementUI(elementUI, instance) - end -end ------------------------------------------------- -function chatStepPropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function chatStepPropertySheetDisplayerTable:onSelect(instance, isSelected) -end - ------------------------------------------------- -function chatStepPropertySheetDisplayerTable:onAttrModified(instance, attributeName) - - local elementUI = r2.logicUI:findElementUIFromInstance(r2.dialogs, instance) - if elementUI then - r2.dialogs:updateElementUI(elementUI) - end -end - --------------------------------------------------- -function r2:chatStepPropertySheetDisplayer() - return chatStepPropertySheetDisplayerTable -end - - - --------------------------------------------------------------------------------------------------- --------------------------------- CHAT SEQUENCE DisplayerProperties --------------------------- --------------------------------------------------------------------------------------------------- -local chatSequencePropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function chatSequencePropertySheetDisplayerTable:onPostCreate(instance) -end ------------------------------------------------- -function chatSequencePropertySheetDisplayerTable:onErase(instance) - - instance.User.Deleted = true - - local currentDialogId = r2.dialogs:currentSequInstId() - if currentDialogId ~= instance.InstanceId then return end - - r2.dialogs:removeSequenceUI(instance) -end ------------------------------------------------- -function chatSequencePropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function chatSequencePropertySheetDisplayerTable:onPostHrcMove(instance) -end ------------------------------------------------- -function chatSequencePropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -r2.dialogEditorRemainsOpened = false -function chatSequencePropertySheetDisplayerTable:onSelect(instance, isSelected) - - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) - - local dialogUI = getUI(r2.dialogs.uiId) - assert(dialogUI) - - if not isSelected then - r2.dialogs.keepOpenedEditor = dialogUI.active - dialogUI.active = false - - elseif isSelected and r2.dialogs.keepOpenedEditor==true then - r2.dialogs.keepOpenedEditor = false - dialogUI.active = true - r2.dialogs:selectSequence(instance.InstanceId) - end -end - ------------------------------------------------- -function chatSequencePropertySheetDisplayerTable:onAttrModified(instance, attributeName) - - if attributeName == "Name" or attributeName == "Repeating" then - - local currentDialogId = r2.dialogs:currentSequInstId() - if currentDialogId == instance.InstanceId then - r2.dialogs:updateSequenceUI(instance) - end - - if r2.events.filteredLogicEntityId==instance.InstanceId then - r2.events:updateSequenceUI() - end - end -end - ------------------------------------------------- -function r2:chatSequencePropertySheetDisplayer() - return chatSequencePropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - - --------------------------------------------------------------------------------------------------- --------------------------------- CHAT ACTION DisplayerProperties ----------------------- --------------------------------------------------------------------------------------------------- -local chatActionPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onPostCreate(instance) -end ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onErase(instance) -end ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onPostHrcMove(instance) -end ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onSelect(instance, isSelected) -end - ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onAttrModified(instance, attributeName) -end - ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onTargetInstanceEraseRequested(instance, refIdName, refIdIndexInArray) - if refIdName == "Who" then - r2.requestSetNode(instance.InstanceId, "Who", r2.RefId("")) - r2.requestSetNode(instance.InstanceId, "WhoNoEntity", "_System") - elseif refIdName == "Facing" then - r2.requestSetNode(instance.InstanceId, "Facing", r2.RefId("")) - end -end ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onTargetInstanceAttrModified(instance, refIdName, refIdIndexInArray, targetAttrName, targetAttrIndexInArray) -end - ------------------------------------------------- -function r2:chatActionPropertySheetDisplayer() - return chatActionPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end diff --git a/code/ryzom/common/data_common/r2/r2_entry_points.txt b/code/ryzom/common/data_common/r2/r2_entry_points.txt deleted file mode 100644 index 643a416c7..000000000 --- a/code/ryzom/common/data_common/r2/r2_entry_points.txt +++ /dev/null @@ -1,1068 +0,0 @@ -a1 uiR2_Lakes01 uiR2EntryPoint01 31346 -1310 N -a1 uiR2_Lakes01 uiR2EntryPoint02 31269 -1238 E -a1 uiR2_Lakes01 uiR2EntryPoint03 31456 -1379 N - -a1 uiR2_Lakes07 uiR2EntryPoint01 36264 -1103 S -a1 uiR2_Lakes07 uiR2EntryPoint02 36208 -1353 N -a1 uiR2_Lakes07 uiR2EntryPoint03 36478 -1269 W -a1 uiR2_Lakes07 uiR2EntryPoint04 36478 -1105 SW - -a1 uiR2_Lakes22 uiR2EntryPoint01 32250 -2800 W -a1 uiR2_Lakes22 uiR2EntryPoint02 31920 -3160 N -a1 uiR2_Lakes22 uiR2EntryPoint03 32080 -3090 N -a1 uiR2_Lakes22 uiR2EntryPoint04 32250 -3065 NE - -l1 uiR2_Lakes15 uiR2EntryPoint01 34634 -1872 SW -l1 uiR2_Lakes15 uiR2EntryPoint02 34258 -1991 W -l1 uiR2_Lakes15 uiR2EntryPoint03 34321 -1860 S -l1 uiR2_Lakes15 uiR2EntryPoint04 34510 -2060 W - -l1 uiR2_Lakes17 uiR2EntryPoint01 36150 -2310 NE -l1 uiR2_Lakes17 uiR2EntryPoint02 35936 -2243 S -l1 uiR2_Lakes17 uiR2EntryPoint03 35920 -1844 W -l1 uiR2_Lakes17 uiR2EntryPoint04 36103 -1923 SW -l1 uiR2_Lakes17 uiR2EntryPoint05 35895 -1935 S - -l1 uiR2_Lakes18 uiR2EntryPoint01 36725 -1993 E -l1 uiR2_Lakes18 uiR2EntryPoint02 36688 -2159 N -l1 uiR2_Lakes18 uiR2EntryPoint03 36879 -2217 N -l1 uiR2_Lakes18 uiR2EntryPoint04 36941 -1970 SW - -l1 uiR2_Lakes26 uiR2EntryPoint01 34460 -3120 E -l1 uiR2_Lakes26 uiR2EntryPoint02 34689 -2756 SW -l1 uiR2_Lakes26 uiR2EntryPoint03 34681 -3111 N -l1 uiR2_Lakes26 uiR2EntryPoint04 34671 -2931 N - -l1 uiR2_Lakes27 uiR2EntryPoint01 35605 -3080 NW -l1 uiR2_Lakes27 uiR2EntryPoint02 35520 -2780 S -l1 uiR2_Lakes27 uiR2EntryPoint03 35133 -2663 SE -l1 uiR2_Lakes27 uiR2EntryPoint04 35283 -3051 N - -l1 uiR2_Lakes38 uiR2EntryPoint01 36720 -3740 S -l1 uiR2_Lakes38 uiR2EntryPoint02 36751 -4024 NW -l1 uiR2_Lakes38 uiR2EntryPoint03 36230 -3767 E -l1 uiR2_Lakes38 uiR2EntryPoint04 36481 -3564 S - -l1 uiR2_Lakes39 uiR2EntryPoint01 37510 -3900 N -l1 uiR2_Lakes39 uiR2EntryPoint02 37299 -3575 SE -l1 uiR2_Lakes39 uiR2EntryPoint03 37861 -3719 W - -l2 uiR2_Lakes03 uiR2EntryPoint01 32961 -1388 N -l2 uiR2_Lakes03 uiR2EntryPoint02 32784 -1507 NE -l2 uiR2_Lakes03 uiR2EntryPoint03 33390 -1517 NW -l2 uiR2_Lakes03 uiR2EntryPoint04 33365 -916 SW -l2 uiR2_Lakes03 uiR2EntryPoint05 33033 -991 S - -l2 uiR2_Lakes08 uiR2EntryPoint01 36991 -1311 E -l2 uiR2_Lakes08 uiR2EntryPoint02 37197 -1547 NW -l2 uiR2_Lakes08 uiR2EntryPoint03 37230 -1035 S -l2 uiR2_Lakes08 uiR2EntryPoint04 37111 -1264 SE -l2 uiR2_Lakes08 uiR2EntryPoint05 37393 -1285 W - -l2 uiR2_Lakes16 uiR2EntryPoint01 35330 -2120 W -l2 uiR2_Lakes16 uiR2EntryPoint02 35180 -2010 S -l2 uiR2_Lakes16 uiR2EntryPoint03 35145 -2135 NE - -l2 uiR2_Lakes19 uiR2EntryPoint01 37681 -2167 N -l2 uiR2_Lakes19 uiR2EntryPoint02 37367 -2341 NW -l2 uiR2_Lakes19 uiR2EntryPoint03 37331 -2070 NE -l2 uiR2_Lakes19 uiR2EntryPoint04 37521 -1929 S -l2 uiR2_Lakes19 uiR2EntryPoint05 37773 -2008 W - -l2 uiR2_Lakes23 uiR2EntryPoint01 32727 -3120 W -l2 uiR2_Lakes23 uiR2EntryPoint02 32694 -2802 W -l2 uiR2_Lakes23 uiR2EntryPoint03 32523 -2995 E - -l2 uiR2_Lakes10 uiR2EntryPoint01 38531 -1379 NE -l2 uiR2_Lakes10 uiR2EntryPoint02 38962 -1092 S -l2 uiR2_Lakes10 uiR2EntryPoint03 38677 -1146 SE -l2 uiR2_Lakes10 uiR2EntryPoint04 38953 -1444 NW - -l2 uiR2_Lakes11 uiR2EntryPoint01 31531 -2280 NW -l2 uiR2_Lakes11 uiR2EntryPoint02 31517 -1946 SW -l2 uiR2_Lakes11 uiR2EntryPoint03 31107 -2130 NE -l2 uiR2_Lakes11 uiR2EntryPoint04 31203 -1938 SE -l2 uiR2_Lakes11 uiR2EntryPoint05 31358 -2065 NW - -l3 uiR2_Lakes14 uiR2EntryPoint01 33438 -2169 E -l3 uiR2_Lakes14 uiR2EntryPoint02 33562 -2128 SW -l3 uiR2_Lakes14 uiR2EntryPoint03 33590 -2230 NW - -l3 uiR2_Lakes21 uiR2EntryPoint01 31247 -2790 E -l3 uiR2_Lakes21 uiR2EntryPoint02 31128 -3031 N -l3 uiR2_Lakes21 uiR2EntryPoint03 31536 -2778 W -l3 uiR2_Lakes21 uiR2EntryPoint04 31413 -3101 NE -l3 uiR2_Lakes21 uiR2EntryPoint05 31306 -3168 NW - -l3 uiR2_Lakes31 uiR2EntryPoint01 31295 -4080 N -l3 uiR2_Lakes31 uiR2EntryPoint02 31425 -3724 SW -l3 uiR2_Lakes31 uiR2EntryPoint03 31258 -3747 SE - -l3 uiR2_Lakes04 uiR2EntryPoint01 33740 -1068 E -l3 uiR2_Lakes04 uiR2EntryPoint02 34268 -1202 W -l3 uiR2_Lakes04 uiR2EntryPoint03 34145 -1045 SW -l3 uiR2_Lakes04 uiR2EntryPoint04 33996 -1283 N -l3 uiR2_Lakes04 uiR2EntryPoint05 33691 -1206 E - -l3 uiR2_Lakes06 uiR2EntryPoint01 35468 -1272 N -l3 uiR2_Lakes06 uiR2EntryPoint02 35954 -1080 SW -l3 uiR2_Lakes06 uiR2EntryPoint03 35764 -1026 E -l3 uiR2_Lakes06 uiR2EntryPoint04 35438 -890 SE -l3 uiR2_Lakes06 uiR2EntryPoint05 35634 -1288 N - -l3 uiR2_Lakes09 uiR2EntryPoint01 37916 -1124 S -l3 uiR2_Lakes09 uiR2EntryPoint02 37709 -1451 NE -l3 uiR2_Lakes09 uiR2EntryPoint03 38149 -1051 SW -l3 uiR2_Lakes09 uiR2EntryPoint04 38073 -1412 NW - -l3 uiR2_Lakes20 uiR2EntryPoint01 38155 -2000 E -l3 uiR2_Lakes20 uiR2EntryPoint02 38290 -1813 E -l3 uiR2_Lakes20 uiR2EntryPoint03 38488 -1996 W -l3 uiR2_Lakes20 uiR2EntryPoint04 38289 -2183 S - -l4 uiR2_Lakes33 uiR2EntryPoint01 32370 -3880 N -l4 uiR2_Lakes33 uiR2EntryPoint02 32447 -3577 SE -l4 uiR2_Lakes33 uiR2EntryPoint03 32561 -3774 SW -l4 uiR2_Lakes33 uiR2EntryPoint04 32716 -3591 S -l4 uiR2_Lakes33 uiR2EntryPoint05 32721 -3914 N - -l4 uiR2_Lakes02 uiR2EntryPoint01 32059 -1392 N -l4 uiR2_Lakes02 uiR2EntryPoint02 32267 -1181 W -l4 uiR2_Lakes02 uiR2EntryPoint03 32053 -1159 SE - -l4 uiR2_Lakes05 uiR2EntryPoint01 34650 -1133 NE -l4 uiR2_Lakes05 uiR2EntryPoint02 35018 -1280 SW -l4 uiR2_Lakes05 uiR2EntryPoint03 34984 -889 SW -l4 uiR2_Lakes05 uiR2EntryPoint04 34769 -1166 NE - -l4 uiR2_Lakes12 uiR2EntryPoint01 32040 -2368 N -l4 uiR2_Lakes12 uiR2EntryPoint02 32401 -2210 SW -l4 uiR2_Lakes12 uiR2EntryPoint03 32019 -1939 S -l4 uiR2_Lakes12 uiR2EntryPoint04 31891 -2241 E - -l4 uiR2_Lakes24 uiR2EntryPoint01 33350 -3120 N -l4 uiR2_Lakes24 uiR2EntryPoint02 33200 -2865 N -l4 uiR2_Lakes24 uiR2EntryPoint03 33450 -2950 W - -l4 uiR2_Lakes34 uiR2EntryPoint01 33520 -3910 N -l4 uiR2_Lakes34 uiR2EntryPoint02 33206 -3990 W -l4 uiR2_Lakes34 uiR2EntryPoint03 33276 -3784 N -l4 uiR2_Lakes34 uiR2EntryPoint04 33619 -3638 NW -l4 uiR2_Lakes34 uiR2EntryPoint05 33335 -3829 NE - -o1 uiR2_Lakes25 uiR2EntryPoint01 33980 -3110 N -o1 uiR2_Lakes25 uiR2EntryPoint02 33900 -2990 NE -o1 uiR2_Lakes25 uiR2EntryPoint03 34105 -2760 SW - -o1 uiR2_Lakes28 uiR2EntryPoint01 36480 -3100 N -o1 uiR2_Lakes28 uiR2EntryPoint02 36146 -2679 SE -o1 uiR2_Lakes28 uiR2EntryPoint03 36324 -2871 S - -o1 uiR2_Lakes29 uiR2EntryPoint01 37500 -3110 N -o1 uiR2_Lakes29 uiR2EntryPoint02 37078 -2937 SW -o1 uiR2_Lakes29 uiR2EntryPoint03 37389 -2802 S - -o1 uiR2_Lakes30 uiR2EntryPoint01 38100 -2850 E -o1 uiR2_Lakes30 uiR2EntryPoint02 38414 -2715 S -o1 uiR2_Lakes30 uiR2EntryPoint03 38489 -3116 NW - -o1 uiR2_Lakes32 uiR2EntryPoint01 31900 -3600 E -o1 uiR2_Lakes32 uiR2EntryPoint02 32108 -3832 N -o1 uiR2_Lakes32 uiR2EntryPoint03 32112 -3672 W - -o1 uiR2_Lakes35 uiR2EntryPoint01 34200 -4080 E -o1 uiR2_Lakes35 uiR2EntryPoint02 34145 -3645 SE -o1 uiR2_Lakes35 uiR2EntryPoint03 34387 -3988 S - -o1 uiR2_Lakes36 uiR2EntryPoint01 34960 -3770 N -o1 uiR2_Lakes36 uiR2EntryPoint02 35149 -3703 SW -o1 uiR2_Lakes36 uiR2EntryPoint03 34957 -3586 S - -o1 uiR2_Lakes37 uiR2EntryPoint01 35760 -3750 N -o1 uiR2_Lakes37 uiR2EntryPoint02 35577 -3640 SE -o1 uiR2_Lakes37 uiR2EntryPoint03 35912 -3874 N -o1 uiR2_Lakes37 uiR2EntryPoint04 35902 -3589 SE - -o1 uiR2_Lakes40 uiR2EntryPoint01 38180 -3470 SE -o1 uiR2_Lakes40 uiR2EntryPoint01 38416 -3819 NE -o1 uiR2_Lakes40 uiR2EntryPoint01 38151 -3740 N - - -//z1 uiR2_Lakes13 uiR2EntryPoint01 32479 -2298 E -//z1 uiR2_Lakes13 uiR2EntryPoint02 32880 -2080 S -//z1 uiR2_Lakes13 uiR2EntryPoint03 33050 -2265 NW - -// Desert - - -a1 uiR2_Deserts03 uiR2EntryPoint01 22791 -1289 N -a1 uiR2_Deserts03 uiR2EntryPoint02 23041 -1284 NW -a1 uiR2_Deserts03 uiR2EntryPoint03 22873 -1110 SE - -a1 uiR2_Deserts21 uiR2EntryPoint01 25980 -2015 E -a1 uiR2_Deserts21 uiR2EntryPoint02 26452 -1963 W -a1 uiR2_Deserts21 uiR2EntryPoint03 26353 -1872 SW -a1 uiR2_Deserts21 uiR2EntryPoint04 26214 -1961 S - -a1 uiR2_Deserts32 uiR2EntryPoint01 28070 -2340 E -a1 uiR2_Deserts32 uiR2EntryPoint02 28240 -2719 N -a1 uiR2_Deserts32 uiR2EntryPoint03 28318 -2643 W -a1 uiR2_Deserts32 uiR2EntryPoint04 28293 -2445 W - -d1 uiR2_Deserts02 uiR2EntryPoint01 22383 -1512 N -d1 uiR2_Deserts02 uiR2EntryPoint02 22454 -1186 SW -d1 uiR2_Deserts02 uiR2EntryPoint03 22062 -1050 S -d1 uiR2_Deserts02 uiR2EntryPoint04 22072 -1289 NE - -d1 uiR2_Deserts10 uiR2EntryPoint01 28923 -1434 N -d1 uiR2_Deserts10 uiR2EntryPoint02 29217 -1371 E -d1 uiR2_Deserts10 uiR2EntryPoint03 28901 -1115 SW - -d1 uiR2_Deserts22 uiR2EntryPoint01 26950 -2015 N -d1 uiR2_Deserts22 uiR2EntryPoint02 26937 -1864 S -d1 uiR2_Deserts22 uiR2EntryPoint03 27089 -2042 NW - -d1 uiR2_Deserts23 uiR2EntryPoint01 27600 -1924 S -d1 uiR2_Deserts23 uiR2EntryPoint02 27575 -2351 NW -d1 uiR2_Deserts23 uiR2EntryPoint03 27545 -2211 N -d1 uiR2_Deserts23 uiR2EntryPoint04 27442 -1866 S - -d1 uiR2_Deserts28 uiR2EntryPoint01 25050 -2650 S -d1 uiR2_Deserts28 uiR2EntryPoint02 24910 -2819 E -d1 uiR2_Deserts28 uiR2EntryPoint03 24881 -2720 N -d1 uiR2_Deserts28 uiR2EntryPoint04 24915 -2511 SW - -d1 uiR2_Deserts29 uiR2EntryPoint01 25880 -2630 E -d1 uiR2_Deserts29 uiR2EntryPoint02 26022 -2374 SW -d1 uiR2_Deserts29 uiR2EntryPoint03 26156 -2560 N -d1 uiR2_Deserts29 uiR2EntryPoint04 26163 -2402 S - -d1 uiR2_Deserts31 uiR2EntryPoint01 27760 -2700 N -d1 uiR2_Deserts31 uiR2EntryPoint02 27404 -2588 S -d1 uiR2_Deserts31 uiR2EntryPoint03 27538 -2606 S -d1 uiR2_Deserts31 uiR2EntryPoint04 27413 -2744 NE - -d1 uiR2_Deserts05 uiR2EntryPoint01 24257 -1520 NE -d1 uiR2_Deserts05 uiR2EntryPoint02 24593 -1447 N -d1 uiR2_Deserts05 uiR2EntryPoint03 24341 -1184 NE -d1 uiR2_Deserts05 uiR2EntryPoint04 24535 -1054 S - -d1 uiR2_Deserts13 uiR2EntryPoint01 28942 -1919 S -d1 uiR2_Deserts13 uiR2EntryPoint02 28538 -2241 E -d1 uiR2_Deserts13 uiR2EntryPoint03 28814 -2251 NW -d1 uiR2_Deserts13 uiR2EntryPoint04 28956 -2079 W -d1 uiR2_Deserts13 uiR2EntryPoint05 28794 -1912 S - -d1 uiR2_Deserts17 uiR2EntryPoint01 23250 -1840 W -d1 uiR2_Deserts17 uiR2EntryPoint02 23096 -1943 NE -d1 uiR2_Deserts17 uiR2EntryPoint03 23034 -1839 E -d1 uiR2_Deserts17 uiR2EntryPoint04 23096 -1713 S - -d1 uiR2_Deserts24 uiR2EntryPoint01 27915 -1875 S -d1 uiR2_Deserts24 uiR2EntryPoint02 28136 -1960 S -d1 uiR2_Deserts24 uiR2EntryPoint03 28233 -1746 S -d1 uiR2_Deserts24 uiR2EntryPoint04 28324 -1841 W - -d3 uiR2_Deserts27 uiR2EntryPoint01 23305 -2454 E -d3 uiR2_Deserts27 uiR2EntryPoint02 23313 -2682 N -d3 uiR2_Deserts27 uiR2EntryPoint03 23464 -2611 N -d3 uiR2_Deserts27 uiR2EntryPoint04 23496 -2442 SW - -d3 uiR2_Deserts04 uiR2EntryPoint01 23452 -1050 SE -d3 uiR2_Deserts04 uiR2EntryPoint02 23846 -1435 W -d3 uiR2_Deserts04 uiR2EntryPoint03 23599 -1418 N -d3 uiR2_Deserts04 uiR2EntryPoint04 23927 -1163 W - -d3 uiR2_Deserts11 uiR2EntryPoint01 29554 -1468 N -d3 uiR2_Deserts11 uiR2EntryPoint02 29922 -1222 W -d3 uiR2_Deserts11 uiR2EntryPoint03 29622 -1048 S -d3 uiR2_Deserts11 uiR2EntryPoint04 29615 -1306 SE -d3 uiR2_Deserts11 uiR2EntryPoint05 29755 -1447 NW - -d3 uiR2_Deserts16 uiR2EntryPoint01 22304 -1856 E -d3 uiR2_Deserts16 uiR2EntryPoint02 22513 -1995 E -d3 uiR2_Deserts16 uiR2EntryPoint03 22687 -1891 N -d3 uiR2_Deserts16 uiR2EntryPoint04 22537 -1877 N - -d4 uiR2_Deserts18 uiR2EntryPoint01 23730 -2280 N -d4 uiR2_Deserts18 uiR2EntryPoint02 23666 -2154 NE -d4 uiR2_Deserts18 uiR2EntryPoint03 23871 -1977 SE -d4 uiR2_Deserts18 uiR2EntryPoint04 23570 -2056 NE -d4 uiR2_Deserts18 uiR2EntryPoint05 23834 -1997 W - -d4 uiR2_Deserts19 uiR2EntryPoint01 24560 -2015 N -d4 uiR2_Deserts19 uiR2EntryPoint02 24267 -1998 E -d4 uiR2_Deserts19 uiR2EntryPoint03 24841 -2002 W -d4 uiR2_Deserts19 uiR2EntryPoint04 24562 -1914 S - -d4 uiR2_Deserts09 uiR2EntryPoint01 27814 -1375 N -d4 uiR2_Deserts09 uiR2EntryPoint02 27471 -1503 E -d4 uiR2_Deserts09 uiR2EntryPoint03 27609 -1197 E -d4 uiR2_Deserts09 uiR2EntryPoint04 27730 -1088 S -d4 uiR2_Deserts09 uiR2EntryPoint05 27529 -1014 SE - -d4 uiR2_Deserts14 uiR2EntryPoint01 30629 -2300 N -// d4 uiR2_Deserts14 uiR2EntryPoint04 30747 -2023 SW -d4 uiR2_Deserts14 uiR2EntryPoint02 30577 -1836 S -d4 uiR2_Deserts14 uiR2EntryPoint03 30347 -2140 SE -// d4 uiR2_Deserts14 uiR2EntryPoint05 30407 -1835 SE - -d5 uiR2_Deserts15 uiR2EntryPoint01 21500 -1830 E -d5 uiR2_Deserts15 uiR2EntryPoint02 21933 -1833 W -d5 uiR2_Deserts15 uiR2EntryPoint03 21763 -1839 E -d5 uiR2_Deserts15 uiR2EntryPoint04 21515 -1913 N - -d5 uiR2_Deserts30 uiR2EntryPoint01 26650 -2650 E -d5 uiR2_Deserts30 uiR2EntryPoint02 27036 -2638 W -d5 uiR2_Deserts30 uiR2EntryPoint03 26922 -2433 SE -d5 uiR2_Deserts30 uiR2EntryPoint04 26779 -2504 S - -d5 uiR2_Deserts33 uiR2EntryPoint01 29510 -2040 S -d5 uiR2_Deserts33 uiR2EntryPoint02 29517 -2239 N -d5 uiR2_Deserts33 uiR2EntryPoint03 29712 -2523 NW -d5 uiR2_Deserts33 uiR2EntryPoint04 29920 -2157 W -d5 uiR2_Deserts33 uiR2EntryPoint05 29758 -2318 W - -d5 uiR2_Deserts08 uiR2EntryPoint01 26694 -1485 N -d5 uiR2_Deserts08 uiR2EntryPoint02 26949 -1512 NW -d5 uiR2_Deserts08 uiR2EntryPoint03 26482 -1366 E -d5 uiR2_Deserts08 uiR2EntryPoint04 26875 -1010 S -d5 uiR2_Deserts08 uiR2EntryPoint05 26460 -1205 NE - -d6 uiR2_Deserts06 uiR2EntryPoint01 25523 -1500 NW -d6 uiR2_Deserts06 uiR2EntryPoint02 25419 -1142 SW -d6 uiR2_Deserts06 uiR2EntryPoint03 25220 -1416 W -d6 uiR2_Deserts06 uiR2EntryPoint04 25168 -1168 SW - -d6 uiR2_Deserts20 uiR2EntryPoint01 25206 -2118 N -d6 uiR2_Deserts20 uiR2EntryPoint02 25435 -1997 W -d6 uiR2_Deserts20 uiR2EntryPoint03 25410 -2177 N -d6 uiR2_Deserts20 uiR2EntryPoint04 25532 -1942 N -d6 uiR2_Deserts20 uiR2EntryPoint05 25724 -2192 W - -d6 uiR2_Deserts25 uiR2EntryPoint01 21845 -2475 S -d6 uiR2_Deserts25 uiR2EntryPoint02 21891 -2836 W -d6 uiR2_Deserts25 uiR2EntryPoint03 21442 -2799 NW -d6 uiR2_Deserts25 uiR2EntryPoint04 21460 -2447 S -d6 uiR2_Deserts25 uiR2EntryPoint05 21765 -2480 W - -d6 uiR2_Deserts26 uiR2EntryPoint01 22627 -2480 W -d6 uiR2_Deserts26 uiR2EntryPoint02 22352 -2474 E -d6 uiR2_Deserts26 uiR2EntryPoint03 22925 -2483 W -d6 uiR2_Deserts26 uiR2EntryPoint04 22790 -2627 N - - - -o1 uiR2_Deserts07 uiR2EntryPoint01 26051 -1405 N -o1 uiR2_Deserts07 uiR2EntryPoint02 26153 -1044 S -o1 uiR2_Deserts07 uiR2EntryPoint03 25855 -1233 E -o1 uiR2_Deserts07 uiR2EntryPoint04 25818 -1027 SE - -o1 uiR2_Deserts12 uiR2EntryPoint01 30818 -1487 NW -o1 uiR2_Deserts12 uiR2EntryPoint02 30726 -1023 S -o1 uiR2_Deserts12 uiR2EntryPoint03 30369 -1083 SE -o1 uiR2_Deserts12 uiR2EntryPoint04 30389 -1307 E -o1 uiR2_Deserts12 uiR2EntryPoint05 30539 -1440 NW - - - -//z1 uiR2_Deserts01 uiR2EntryPoint01 21570 -1363 N -//z1 uiR2_Deserts01 uiR2EntryPoint02 21340 -1066 SE -//z1 uiR2_Deserts01 uiR2EntryPoint03 21678 -1129 SW -//z1 uiR2_Deserts01 uiR2EntryPoint04 21503 -1296 N - - - - -// Forest - - -a1 uiR2_Forest04 uiR2EntryPoint01 24213 -11157 W -a1 uiR2_Forest04 uiR2EntryPoint02 23975 -11225 E -a1 uiR2_Forest04 uiR2EntryPoint03 23827 -11373 NE -a1 uiR2_Forest04 uiR2EntryPoint04 24180 -11383 NW -a1 uiR2_Forest04 uiR2EntryPoint05 23871 -11059 SE -a1 uiR2_Forest04 uiR2EntryPoint06 24189 -10982 SW - -a1 uiR2_Forest05 uiR2EntryPoint01 24752 -11360 N -a1 uiR2_Forest05 uiR2EntryPoint02 24602 -11060 SE -a1 uiR2_Forest05 uiR2EntryPoint03 24865 -11100 SW -a1 uiR2_Forest05 uiR2EntryPoint04 25046 -11197 W -a1 uiR2_Forest05 uiR2EntryPoint05 24640 -11453 N -a1 uiR2_Forest05 uiR2EntryPoint06 24537 -11201 E - -a1 uiR2_Forest14 uiR2EntryPoint01 21282 -12196 N -a1 uiR2_Forest14 uiR2EntryPoint02 21276 -11986 S -a1 uiR2_Forest14 uiR2EntryPoint03 21276 -11766 S - -a1 uiR2_Forest27 uiR2EntryPoint01 21173 -12644 W -a1 uiR2_Forest27 uiR2EntryPoint02 21068 -12561 S -a1 uiR2_Forest27 uiR2EntryPoint03 21113 -12714 N -a1 uiR2_Forest27 uiR2EntryPoint04 21119 -12639 S - -a1 uiR2_Forest32 uiR2EntryPoint01 24680 -12600 SE -a1 uiR2_Forest32 uiR2EntryPoint02 24538 -13025 N -a1 uiR2_Forest32 uiR2EntryPoint03 24822 -13039 N -a1 uiR2_Forest32 uiR2EntryPoint04 24718 -12889 N -a1 uiR2_Forest32 uiR2EntryPoint05 24830 -12554 SW -a1 uiR2_Forest32 uiR2EntryPoint06 24659 -12750 E - -f1 uiR2_Forest03 uiR2EntryPoint01 23010 -11209 E -f1 uiR2_Forest03 uiR2EntryPoint02 23080 -11152 E -f1 uiR2_Forest03 uiR2EntryPoint03 23400 -11400 NW -f1 uiR2_Forest03 uiR2EntryPoint04 23400 -11000 SW -f1 uiR2_Forest03 uiR2EntryPoint05 23000 -11000 SE - -f1 uiR2_Forest19 uiR2EntryPoint01 24944 -12220 N -f1 uiR2_Forest19 uiR2EntryPoint02 25357 -12233 N -f1 uiR2_Forest19 uiR2EntryPoint03 25265 -12240 W -f1 uiR2_Forest19 uiR2EntryPoint04 24971 -11947 S -f1 uiR2_Forest19 uiR2EntryPoint05 25155 -12081 SE - -f1 uiR2_Forest23 uiR2EntryPoint01 28465 -12056 W -f1 uiR2_Forest23 uiR2EntryPoint02 28011 -12082 E -f1 uiR2_Forest23 uiR2EntryPoint03 28496 -12248 N -f1 uiR2_Forest23 uiR2EntryPoint04 28375 -11911 SE -f1 uiR2_Forest23 uiR2EntryPoint05 28194 -12118 E -f1 uiR2_Forest23 uiR2EntryPoint06 27926 -11988 SE - -f1 uiR2_Forest39 uiR2EntryPoint01 30520 -12600 S -f1 uiR2_Forest39 uiR2EntryPoint02 30143 -12958 E -f1 uiR2_Forest39 uiR2EntryPoint03 30195 -12559 SE -f1 uiR2_Forest39 uiR2EntryPoint04 30621 -12958 NW -f1 uiR2_Forest39 uiR2EntryPoint05 30298 -12694 SE -f1 uiR2_Forest39 uiR2EntryPoint06 30524 -12799 W -f1 uiR2_Forest39 uiR2EntryPoint07 30291 -12910 NE - -f1 uiR2_Forest41 uiR2EntryPoint01 22140 -13150 SE -f1 uiR2_Forest41 uiR2EntryPoint02 22401 -13440 NW -f1 uiR2_Forest41 uiR2EntryPoint03 22263 -13269 S -f1 uiR2_Forest41 uiR2EntryPoint04 22338 -13133 SW -f1 uiR2_Forest41 uiR2EntryPoint05 22173 -13476 NE - -f1 uiR2_Forest20 uiR2EntryPoint01 26110 -11936 SW -f1 uiR2_Forest20 uiR2EntryPoint02 25734 -11920 SE -f1 uiR2_Forest20 uiR2EntryPoint03 25691 -12200 SW -f1 uiR2_Forest20 uiR2EntryPoint04 26113 -12164 NW -f1 uiR2_Forest20 uiR2EntryPoint05 25950 -12097 N - -f1 uiR2_Forest31 uiR2EntryPoint01 23470 -12600 SE -f1 uiR2_Forest31 uiR2EntryPoint02 23681 -12712 S -f1 uiR2_Forest31 uiR2EntryPoint03 23510 -13001 NE -f1 uiR2_Forest31 uiR2EntryPoint04 23948 -13020 W -f1 uiR2_Forest31 uiR2EntryPoint05 23598 -12850 SW -f1 uiR2_Forest31 uiR2EntryPoint06 23995 -12787 W -f1 uiR2_Forest31 uiR2EntryPoint07 23879 -12573 W - -f2 uiR2_Forest34 uiR2EntryPoint01 26220 -12600 SE -f2 uiR2_Forest34 uiR2EntryPoint02 26613 -12753 NW -f2 uiR2_Forest34 uiR2EntryPoint03 26413 -12556 S -f2 uiR2_Forest34 uiR2EntryPoint04 26238 -12888 N -f2 uiR2_Forest34 uiR2EntryPoint05 26661 -12640 W - -f2 uiR2_Forest35 uiR2EntryPoint01 27100 -12600 S -f2 uiR2_Forest35 uiR2EntryPoint02 27043 -12938 N -f2 uiR2_Forest35 uiR2EntryPoint03 27222 -12726 W - -f2 uiR2_Forest45 uiR2EntryPoint01 26000 -13600 SW -f2 uiR2_Forest45 uiR2EntryPoint02 25983 -13976 NW -f2 uiR2_Forest45 uiR2EntryPoint03 25684 -13611 SE -f2 uiR2_Forest45 uiR2EntryPoint04 25835 -13674 SE -f2 uiR2_Forest45 uiR2EntryPoint05 26004 -13834 NW -f2 uiR2_Forest45 uiR2EntryPoint06 25786 -13883 N - -f2 uiR2_Forest08 uiR2EntryPoint01 26957 -11364 NE -f2 uiR2_Forest08 uiR2EntryPoint02 27200 -11178 S -f2 uiR2_Forest08 uiR2EntryPoint03 27360 -11040 SW -f2 uiR2_Forest08 uiR2EntryPoint04 27002 -10967 SE -f2 uiR2_Forest08 uiR2EntryPoint05 27406 -11414 NW - -f2 uiR2_Forest12 uiR2EntryPoint01 29919 -11062 N -f2 uiR2_Forest12 uiR2EntryPoint02 29855 -11111 NE -f2 uiR2_Forest12 uiR2EntryPoint03 29986 -10996 SW - -f2 uiR2_Forest33 uiR2EntryPoint01 25300 -12600 S -f2 uiR2_Forest33 uiR2EntryPoint02 25598 -13023 N -f2 uiR2_Forest33 uiR2EntryPoint03 25598 -12632 W -f2 uiR2_Forest33 uiR2EntryPoint04 25299 -12957 N - -f3 uiR2_Forest38 uiR2EntryPoint01 29630 -12600 SW -f3 uiR2_Forest38 uiR2EntryPoint02 29735 -12939 NW -f3 uiR2_Forest38 uiR2EntryPoint03 29350 -12779 E -f3 uiR2_Forest38 uiR2EntryPoint04 29525 -12714 SE -f3 uiR2_Forest38 uiR2EntryPoint05 29391 -12585 SE -f3 uiR2_Forest38 uiR2EntryPoint06 29465 -13029 NE - -f3 uiR2_Forest46 uiR2EntryPoint01 27000 -13600 S -f3 uiR2_Forest46 uiR2EntryPoint02 28057 -14465 N -f3 uiR2_Forest46 uiR2EntryPoint03 26890 -14013 NE -f3 uiR2_Forest46 uiR2EntryPoint04 27254 -13872 S - -f3 uiR2_Forest02 uiR2EntryPoint01 22236 -11281 NE -f3 uiR2_Forest02 uiR2EntryPoint02 22468 -11198 W -f3 uiR2_Forest02 uiR2EntryPoint03 22222 -11426 NE -f3 uiR2_Forest02 uiR2EntryPoint04 22353 -11000 S -f3 uiR2_Forest02 uiR2EntryPoint05 22446 -11374 NW -f3 uiR2_Forest02 uiR2EntryPoint06 22137 -11199 E -f3 uiR2_Forest02 uiR2EntryPoint07 22158 -10990 E -f3 uiR2_Forest02 uiR2EntryPoint08 22259 -11108 E - -f3 uiR2_Forest07 uiR2EntryPoint01 26322 -11348 N -f3 uiR2_Forest07 uiR2EntryPoint02 26310 -11200 E -f3 uiR2_Forest07 uiR2EntryPoint03 26545 -11157 W -f3 uiR2_Forest07 uiR2EntryPoint04 26185 -10967 E -f3 uiR2_Forest07 uiR2EntryPoint05 26171 -11200 E -f3 uiR2_Forest07 uiR2EntryPoint06 26446 -11021 SW -f3 uiR2_Forest07 uiR2EntryPoint07 26222 -11401 NE -f3 uiR2_Forest07 uiR2EntryPoint08 26498 -11359 W - -f3 uiR2_Forest16 uiR2EntryPoint01 23114 -11953 W -f3 uiR2_Forest16 uiR2EntryPoint02 22883 -11999 E -f3 uiR2_Forest16 uiR2EntryPoint03 22743 -12136 N -f3 uiR2_Forest16 uiR2EntryPoint04 22735 -11817 SE -f3 uiR2_Forest16 uiR2EntryPoint05 23038 -12182 NW - -f3 uiR2_Forest18 uiR2EntryPoint01 24326 -11878 SE -f3 uiR2_Forest18 uiR2EntryPoint02 24390 -12095 N -f3 uiR2_Forest18 uiR2EntryPoint03 24525 -12090 E -f3 uiR2_Forest18 uiR2EntryPoint04 24225 -11836 E - -f4 uiR2_Forest25 uiR2EntryPoint01 29903 -11886 SO -f4 uiR2_Forest25 uiR2EntryPoint02 29714 -12046 NE -f4 uiR2_Forest25 uiR2EntryPoint03 29730 -11826 SE -f4 uiR2_Forest25 uiR2EntryPoint04 29959 -11791 SW - -f4 uiR2_Forest01 uiR2EntryPoint01 21581 -11056 S -f4 uiR2_Forest01 uiR2EntryPoint02 21733 -11412 NW -f4 uiR2_Forest01 uiR2EntryPoint03 21648 -11248 S -f4 uiR2_Forest01 uiR2EntryPoint04 21510 -11443 NE -f4 uiR2_Forest01 uiR2EntryPoint05 21400 -11247 E -f4 uiR2_Forest01 uiR2EntryPoint06 21762 -10995 S -f4 uiR2_Forest01 uiR2EntryPoint07 21855 -11231 W -f4 uiR2_Forest01 uiR2EntryPoint08 21355 -11040 E -f4 uiR2_Forest01 uiR2EntryPoint09 21596 -10946 S - -f4 uiR2_Forest10 uiR2EntryPoint01 28673 -11191 N -f4 uiR2_Forest10 uiR2EntryPoint02 28645 -11007 S -f4 uiR2_Forest10 uiR2EntryPoint03 28566 -11110 E - -f4 uiR2_Forest24 uiR2EntryPoint01 29365 -11968 W -f4 uiR2_Forest24 uiR2EntryPoint02 28963 -11969 E -f4 uiR2_Forest24 uiR2EntryPoint03 29146 -11817 S -f4 uiR2_Forest24 uiR2EntryPoint04 29117 -12186 N -f4 uiR2_Forest24 uiR2EntryPoint05 29139 -12001 N - -f4 uiR2_Forest30 uiR2EntryPoint01 22865 -12920 N -f4 uiR2_Forest30 uiR2EntryPoint02 23068 -12632 W -f4 uiR2_Forest30 uiR2EntryPoint03 22773 -12782 E -f4 uiR2_Forest30 uiR2EntryPoint04 22901 -12688 S - -f4 uiR2_Forest40 uiR2EntryPoint01 21150 -13350 N -f4 uiR2_Forest40 uiR2EntryPoint02 21536 -13506 N -f4 uiR2_Forest40 uiR2EntryPoint03 21359 -13195 S -f4 uiR2_Forest40 uiR2EntryPoint04 21162 -13553 NE -f4 uiR2_Forest40 uiR2EntryPoint05 21267 -13280 W -f4 uiR2_Forest40 uiR2EntryPoint06 21118 -13278 SE - - - -o1 uiR2_Forest09 uiR2EntryPoint01 28210 -10964 SW -o1 uiR2_Forest09 uiR2EntryPoint02 28058 -11137 S -o1 uiR2_Forest09 uiR2EntryPoint03 27855 -11099 E - -o1 uiR2_Forest13 uiR2EntryPoint01 30783 -11199 W -o1 uiR2_Forest13 uiR2EntryPoint02 30569 -10957 S -o1 uiR2_Forest13 uiR2EntryPoint03 30355 -11071 E - -o1 uiR2_Forest21 uiR2EntryPoint01 26547 -12021 E -o1 uiR2_Forest21 uiR2EntryPoint02 26748 -11980 SW -o1 uiR2_Forest21 uiR2EntryPoint03 26636 -12215 N -o1 uiR2_Forest21 uiR2EntryPoint04 26560 -11775 S - -o1 uiR2_Forest26 uiR2EntryPoint01 30827 -11803 W -o1 uiR2_Forest26 uiR2EntryPoint02 30559 -11816 E -o1 uiR2_Forest26 uiR2EntryPoint03 30347 -11839 E - -o1 uiR2_Forest28 uiR2EntryPoint01 21720 -12717 N -o1 uiR2_Forest28 uiR2EntryPoint02 21559 -12569 S -o1 uiR2_Forest28 uiR2EntryPoint03 21581 -12739 NE -o1 uiR2_Forest28 uiR2EntryPoint04 21831 -12579 SW -o1 uiR2_Forest28 uiR2EntryPoint05 21676 -12643 E - - - -//z1 uiR2_Forest06 uiR2EntryPoint01 25424 -11251 E -//z1 uiR2_Forest06 uiR2EntryPoint02 25768 -11068 SW -//z1 uiR2_Forest06 uiR2EntryPoint03 25616 -11254 NW - -//z1 uiR2_Forest11 uiR2EntryPoint01 29400 -11408 NW -//z1 uiR2_Forest11 uiR2EntryPoint02 29273 -11198 S -//z1 uiR2_Forest11 uiR2EntryPoint03 29112 -11028 SE - -//z1 uiR2_Forest15 uiR2EntryPoint01 22136 -11787 S -//z1 uiR2_Forest15 uiR2EntryPoint02 21908 -12109 NE -//z1 uiR2_Forest15 uiR2EntryPoint03 21903 -11855 SE -//z1 uiR2_Forest15 uiR2EntryPoint04 22206 -12161 NW -//z1 uiR2_Forest15 uiR2EntryPoint05 22066 -11993 N - -//z1 uiR2_Forest17 uiR2EntryPoint01 23533 -11761 SE -//z1 uiR2_Forest17 uiR2EntryPoint02 23689 -12007 N -//z1 uiR2_Forest17 uiR2EntryPoint03 23688 -12223 N -//z1 uiR2_Forest17 uiR2EntryPoint04 23850 -11791 SW -//z1 uiR2_Forest17 uiR2EntryPoint05 23464 -12000 E -//z1 uiR2_Forest17 uiR2EntryPoint06 23862 -12143 NW - -//z1 uiR2_Forest22 uiR2EntryPoint01 27153 -12009 E -//z1 uiR2_Forest22 uiR2EntryPoint02 27581 -11992 SW -//z1 uiR2_Forest22 uiR2EntryPoint03 27374 -12176 N -//z1 uiR2_Forest22 uiR2EntryPoint04 27381 -11938 S -//z1 uiR2_Forest22 uiR2EntryPoint05 27260 -12085 E -//z1 uiR2_Forest22 uiR2EntryPoint06 27444 -12071 W - -//z1 uiR2_Forest29 uiR2EntryPoint01 22306 -12674 W -//z1 uiR2_Forest29 uiR2EntryPoint02 22404 -12746 N -//z1 uiR2_Forest29 uiR2EntryPoint03 22152 -12719 NE - -//z1 uiR2_Forest36 uiR2EntryPoint01 27800 -12770 E -//z1 uiR2_Forest36 uiR2EntryPoint02 28127 -12573 SW -//z1 uiR2_Forest36 uiR2EntryPoint03 28218 -13020 NW -//z1 uiR2_Forest36 uiR2EntryPoint04 27909 -12736 SW -//z1 uiR2_Forest36 uiR2EntryPoint05 27805 -12614 S -//z1 uiR2_Forest36 uiR2EntryPoint06 27896 -12855 E -//z1 uiR2_Forest36 uiR2EntryPoint07 27794 -13005 NW -//z1 uiR2_Forest36 uiR2EntryPoint08 28058 -12493 SE - -//z1 uiR2_Forest37 uiR2EntryPoint01 28980 -12920 W -//z1 uiR2_Forest37 uiR2EntryPoint02 28880 -12886 SE -//z1 uiR2_Forest37 uiR2EntryPoint03 28879 -13020 NE -//z1 uiR2_Forest37 uiR2EntryPoint04 28522 -12562 E -//z1 uiR2_Forest37 uiR2EntryPoint05 28712 -12686 s -//z1 uiR2_Forest37 uiR2EntryPoint06 28747 -12911 N - -//z1 uiR2_Forest42 uiR2EntryPoint01 22830 -13600 NE -//z1 uiR2_Forest42 uiR2EntryPoint02 23342 -13475 W -//z1 uiR2_Forest42 uiR2EntryPoint03 22853 -13394 SE -//z1 uiR2_Forest42 uiR2EntryPoint04 23099 -13430 S - -//z1 uiR2_Forest43 uiR2EntryPoint01 24000 -13600 N -//z1 uiR2_Forest43 uiR2EntryPoint02 24076 -13838 W -//z1 uiR2_Forest43 uiR2EntryPoint03 23825 -13411 SE -//z1 uiR2_Forest43 uiR2EntryPoint04 24208 -13583 W -//z1 uiR2_Forest43 uiR2EntryPoint05 24000 -13364 S -//z1 uiR2_Forest43 uiR2EntryPoint06 24039 -13492 W - -//z1 uiR2_Forest44 uiR2EntryPoint01 24670 -13600 S -//z1 uiR2_Forest44 uiR2EntryPoint02 24877 -14823 N -//z1 uiR2_Forest44 uiR2EntryPoint03 24959 -14224 W -//z1 uiR2_Forest44 uiR2EntryPoint04 24653 -14092 N -//z1 uiR2_Forest44 uiR2EntryPoint05 24565 -13357 S -//z1 uiR2_Forest44 uiR2EntryPoint06 24642 -14325 E - - - - -// Jungle - -a1 uiR2_Jungle14 uiR2EntryPoint01 40700 -11200 E -a1 uiR2_Jungle14 uiR2EntryPoint02 40876 -11370 W -a1 uiR2_Jungle14 uiR2EntryPoint03 40681 -11376 W -a1 uiR2_Jungle14 uiR2EntryPoint04 40841 -10966 W - -a1 uiR2_Jungle23 uiR2EntryPoint01 38200 -12000 N -a1 uiR2_Jungle23 uiR2EntryPoint02 38163 -11917 W -a1 uiR2_Jungle23 uiR2EntryPoint03 37956 -12037 E -a1 uiR2_Jungle23 uiR2EntryPoint04 38356 -11999 NW -a1 uiR2_Jungle23 uiR2EntryPoint05 38489 -11936 NW -a1 uiR2_Jungle23 uiR2EntryPoint06 38196 -11782 S - -a1 uiR2_Jungle27 uiR2EntryPoint01 31200 -12700 N -a1 uiR2_Jungle27 uiR2EntryPoint02 31207 -12533 S -a1 uiR2_Jungle27 uiR2EntryPoint03 31299 -12813 NW - -j1 uiR2_Jungle06 uiR2EntryPoint01 34426 -11339 NE -j1 uiR2_Jungle06 uiR2EntryPoint02 34698 -11060 W -j1 uiR2_Jungle06 uiR2EntryPoint03 34836 -11243 W -j1 uiR2_Jungle06 uiR2EntryPoint04 34651 -11405 S -j1 uiR2_Jungle06 uiR2EntryPoint05 34372 -11029 E - -j1 uiR2_Jungle07 uiR2EntryPoint01 35300 -11200 SE -j1 uiR2_Jungle07 uiR2EntryPoint02 35534 -11057 SW -j1 uiR2_Jungle07 uiR2EntryPoint03 35424 -11378 N -j1 uiR2_Jungle07 uiR2EntryPoint04 35100 -11026 SE - -j1 uiR2_Jungle15 uiR2EntryPoint01 31300 -12000 N -j1 uiR2_Jungle15 uiR2EntryPoint02 31181 -11823 SE -j1 uiR2_Jungle15 uiR2EntryPoint03 31185 -12211 NE -j1 uiR2_Jungle15 uiR2EntryPoint04 31549 -12148 NW -j1 uiR2_Jungle15 uiR2EntryPoint05 31549 -11920 W - -j1 uiR2_Jungle18 uiR2EntryPoint01 34000 -12000 S -j1 uiR2_Jungle18 uiR2EntryPoint02 34234 -12243 N -j1 uiR2_Jungle18 uiR2EntryPoint03 34161 -11953 E -j1 uiR2_Jungle18 uiR2EntryPoint04 34191 -11792 S -j1 uiR2_Jungle18 uiR2EntryPoint05 33799 -11882 SE -j1 uiR2_Jungle18 uiR2EntryPoint06 33832 -12256 N - -j1 uiR2_Jungle36 uiR2EntryPoint01 37074 -12782 N -j1 uiR2_Jungle36 uiR2EntryPoint02 37071 -12878 SW -j1 uiR2_Jungle36 uiR2EntryPoint03 36896 -12875 E -j1 uiR2_Jungle36 uiR2EntryPoint04 36934 -12737 S -j1 uiR2_Jungle36 uiR2EntryPoint05 36978 -13070 N -j1 uiR2_Jungle36 uiR2EntryPoint06 36800 -13062 NE - -j1 uiR2_Jungle41 uiR2EntryPoint01 40648 -12573 N -j1 uiR2_Jungle41 uiR2EntryPoint02 40696 -12807 E -j1 uiR2_Jungle41 uiR2EntryPoint03 40771 -13042 N - -j1 uiR2_Jungle53 uiR2EntryPoint01 39683 -13678 W -j1 uiR2_Jungle53 uiR2EntryPoint02 39413 -13784 NE -j1 uiR2_Jungle53 uiR2EntryPoint03 39514 -13435 SE -j1 uiR2_Jungle53 uiR2EntryPoint04 39718 -13338 S - -j2 uiR2_Jungle01 uiR2EntryPoint01 31300 -11100 S -j2 uiR2_Jungle01 uiR2EntryPoint02 31257 -10932 E -j2 uiR2_Jungle01 uiR2EntryPoint03 31594 -11118 N -j2 uiR2_Jungle01 uiR2EntryPoint04 31080 -11296 NE - -j2 uiR2_Jungle28 uiR2EntryPoint01 31600 -12550 N -j2 uiR2_Jungle28 uiR2EntryPoint02 31788 -12534 S - -j2 uiR2_Jungle32 uiR2EntryPoint01 33720 -12700 SW -j2 uiR2_Jungle32 uiR2EntryPoint02 33855 -12620 W -j2 uiR2_Jungle32 uiR2EntryPoint03 33646 -12853 SE -j2 uiR2_Jungle32 uiR2EntryPoint04 33757 -12969 NW - -j2 uiR2_Jungle34 uiR2EntryPoint01 35220 -12610 N -j2 uiR2_Jungle34 uiR2EntryPoint02 35030 -12535 SW -j2 uiR2_Jungle34 uiR2EntryPoint03 35028 -12728 SE -j2 uiR2_Jungle34 uiR2EntryPoint04 35304 -12781 W -j2 uiR2_Jungle34 uiR2EntryPoint05 35419 -12726 S - -j2 uiR2_Jungle51 uiR2EntryPoint01 38204 -13916 N -j2 uiR2_Jungle51 uiR2EntryPoint02 38135 -13696 NW -j2 uiR2_Jungle51 uiR2EntryPoint03 38032 -13508 E - -j2 uiR2_Jungle02 uiR2EntryPoint01 32203 -11283 NW -j2 uiR2_Jungle02 uiR2EntryPoint02 32062 -10944 E -j2 uiR2_Jungle02 uiR2EntryPoint03 32396 -11409 N -j2 uiR2_Jungle02 uiR2EntryPoint04 32557 -11107 S -j2 uiR2_Jungle02 uiR2EntryPoint05 32533 -10964 W - -j2 uiR2_Jungle05 uiR2EntryPoint01 33768 -11278 N -j2 uiR2_Jungle05 uiR2EntryPoint02 33981 -11292 W - -j3 uiR2_Jungle38 uiR2EntryPoint01 38290 -12740 E -j3 uiR2_Jungle38 uiR2EntryPoint02 38288 -12905 E -j3 uiR2_Jungle38 uiR2EntryPoint03 38446 -13070 E -j3 uiR2_Jungle38 uiR2EntryPoint04 38665 -12895 NW -j3 uiR2_Jungle38 uiR2EntryPoint05 38475 -12755 S - -j3 uiR2_Jungle49 uiR2EntryPoint01 36953 -13596 N -j3 uiR2_Jungle49 uiR2EntryPoint02 36931 -13379 SW -j3 uiR2_Jungle49 uiR2EntryPoint03 36564 -13630 NE -j3 uiR2_Jungle49 uiR2EntryPoint04 36901 -13803 N - -j3 uiR2_Jungle52 uiR2EntryPoint01 39145 -13665 W -j3 uiR2_Jungle52 uiR2EntryPoint02 39053 -13517 E -j3 uiR2_Jungle52 uiR2EntryPoint03 38963 -13387 N -j3 uiR2_Jungle52 uiR2EntryPoint04 38710 -13477 S -j3 uiR2_Jungle52 uiR2EntryPoint05 38931 -13723 W -j3 uiR2_Jungle52 uiR2EntryPoint06 38915 -13580 N - -j3 uiR2_Jungle03 uiR2EntryPoint01 33100 -11200 NE -j3 uiR2_Jungle03 uiR2EntryPoint02 32837 -11458 E -j3 uiR2_Jungle03 uiR2EntryPoint03 33230 -11343 N -j3 uiR2_Jungle03 uiR2EntryPoint04 33304 -11015 SW - -j3 uiR2_Jungle24 uiR2EntryPoint01 39000 -12000 W -j3 uiR2_Jungle24 uiR2EntryPoint02 39297 -11888 S -j3 uiR2_Jungle24 uiR2EntryPoint03 38832 -11886 SE -j3 uiR2_Jungle24 uiR2EntryPoint04 38847 -12265 NE -j3 uiR2_Jungle24 uiR2EntryPoint05 39289 -12258 NE - -j3 uiR2_Jungle25 uiR2EntryPoint01 39621 -12083 NW -j3 uiR2_Jungle25 uiR2EntryPoint02 39938 -12037 S -j3 uiR2_Jungle25 uiR2EntryPoint03 39916 -12213 SE -j3 uiR2_Jungle25 uiR2EntryPoint04 40114 -11884 W -j3 uiR2_Jungle25 uiR2EntryPoint05 39955 -11803 W -j3 uiR2_Jungle25 uiR2EntryPoint06 39786 -11886 W - -j3 uiR2_Jungle29 uiR2EntryPoint01 31753 -12934 N -j3 uiR2_Jungle29 uiR2EntryPoint02 31766 -13034 W -j3 uiR2_Jungle29 uiR2EntryPoint03 31948 -12894 NW -j3 uiR2_Jungle29 uiR2EntryPoint04 31574 -12918 N - -j4 uiR2_Jungle50 uiR2EntryPoint01 37426 -13620 N -j4 uiR2_Jungle50 uiR2EntryPoint02 37482 -13875 E -j4 uiR2_Jungle50 uiR2EntryPoint03 37596 -13682 E -j4 uiR2_Jungle50 uiR2EntryPoint04 37700 -13544 NE -j4 uiR2_Jungle50 uiR2EntryPoint05 37685 -13388 NW - -j4 uiR2_Jungle08 uiR2EntryPoint01 36200 -11200 SE -j4 uiR2_Jungle08 uiR2EntryPoint02 36390 -11360 W -j4 uiR2_Jungle08 uiR2EntryPoint03 36076 -11069 W - -j4 uiR2_Jungle12 uiR2EntryPoint01 39235 -11288 N -j4 uiR2_Jungle12 uiR2EntryPoint02 39448 -10932 W -j4 uiR2_Jungle12 uiR2EntryPoint03 38946 -11120 E -j4 uiR2_Jungle12 uiR2EntryPoint04 39153 -11467 N -j4 uiR2_Jungle12 uiR2EntryPoint05 39130 -11005 NE -j4 uiR2_Jungle12 uiR2EntryPoint06 39426 -11406 S - -j4 uiR2_Jungle16 uiR2EntryPoint01 32200 -12000 E -j4 uiR2_Jungle16 uiR2EntryPoint02 32017 -11813 S -j4 uiR2_Jungle16 uiR2EntryPoint03 32332 -12242 N -j4 uiR2_Jungle16 uiR2EntryPoint04 32459 -11865 W -j4 uiR2_Jungle16 uiR2EntryPoint05 32047 -12201 N - -j4 uiR2_Jungle22 uiR2EntryPoint01 37400 -12000 N -j4 uiR2_Jungle22 uiR2EntryPoint02 37515 -11789 N -j4 uiR2_Jungle22 uiR2EntryPoint03 37631 -12105 N -j4 uiR2_Jungle22 uiR2EntryPoint04 37530 -12275 NE -j4 uiR2_Jungle22 uiR2EntryPoint05 37339 -12275 NW -j4 uiR2_Jungle22 uiR2EntryPoint06 37167 -11731 S - -j4 uiR2_Jungle42 uiR2EntryPoint01 31103 -13282 E -j4 uiR2_Jungle42 uiR2EntryPoint02 31352 -13419 W -j4 uiR2_Jungle42 uiR2EntryPoint03 31285 -13573 S -j4 uiR2_Jungle42 uiR2EntryPoint04 31307 -13712 N -j4 uiR2_Jungle42 uiR2EntryPoint05 31420 -13639 SW -j4 uiR2_Jungle42 uiR2EntryPoint06 31083 -13691 NE - - -o1 uiR2_Jungle11 uiR2EntryPoint01 38400 -11200 N -o1 uiR2_Jungle11 uiR2EntryPoint02 38565 -11080 W -o1 uiR2_Jungle11 uiR2EntryPoint03 38389 -11029 E - -o1 uiR2_Jungle19 uiR2EntryPoint01 35000 -12000 N -o1 uiR2_Jungle19 uiR2EntryPoint02 34752 -12146 NE -o1 uiR2_Jungle19 uiR2EntryPoint03 34749 -11909 SE -o1 uiR2_Jungle19 uiR2EntryPoint04 35292 -12042 S -o1 uiR2_Jungle19 uiR2EntryPoint05 35320 -12203 S - -o1 uiR2_Jungle21 uiR2EntryPoint01 36600 -12000 N -o1 uiR2_Jungle21 uiR2EntryPoint02 36833 -11757 SW -o1 uiR2_Jungle21 uiR2EntryPoint03 36443 -12055 E -o1 uiR2_Jungle21 uiR2EntryPoint04 36504 -12275 NW -o1 uiR2_Jungle21 uiR2EntryPoint05 36657 -12265 NW - -o1 uiR2_Jungle26 uiR2EntryPoint01 40600 -12000 W -o1 uiR2_Jungle26 uiR2EntryPoint02 40903 -11996 W -o1 uiR2_Jungle26 uiR2EntryPoint03 40429 -12233 NE - -o1 uiR2_Jungle30 uiR2EntryPoint01 32318 -12599 N -o1 uiR2_Jungle30 uiR2EntryPoint02 32444 -12765 N -o1 uiR2_Jungle30 uiR2EntryPoint03 32497 -12629 W - -o1 uiR2_Jungle33 uiR2EntryPoint01 34230 -12745 N -o1 uiR2_Jungle33 uiR2EntryPoint02 34311 -12806 SE -o1 uiR2_Jungle33 uiR2EntryPoint03 34399 -12967 W -o1 uiR2_Jungle33 uiR2EntryPoint04 34221 -12959 E - -o1 uiR2_Jungle35 uiR2EntryPoint01 35800 -13010 N -o1 uiR2_Jungle35 uiR2EntryPoint02 36057 -12912 W -o1 uiR2_Jungle35 uiR2EntryPoint03 35755 -12619 E -o1 uiR2_Jungle35 uiR2EntryPoint04 36228 -12618 W -o1 uiR2_Jungle35 uiR2EntryPoint05 35934 -12714 E - -o1 uiR2_Jungle44 uiR2EntryPoint01 32799 -13439 N -o1 uiR2_Jungle44 uiR2EntryPoint02 32628 -13363 SE -o1 uiR2_Jungle44 uiR2EntryPoint03 32928 -13375 SW -o1 uiR2_Jungle44 uiR2EntryPoint04 32828 -13484 SE -o1 uiR2_Jungle44 uiR2EntryPoint05 32954 -13703 N - -o1 uiR2_Jungle45 uiR2EntryPoint01 33599 -13741 N -o1 uiR2_Jungle45 uiR2EntryPoint02 33422 -13656 NE -o1 uiR2_Jungle45 uiR2EntryPoint03 33762 -13543 NW -o1 uiR2_Jungle45 uiR2EntryPoint04 33521 -13372 SE - -o1 uiR2_Jungle46 uiR2EntryPoint01 34218 -13905 N -o1 uiR2_Jungle46 uiR2EntryPoint02 34374 -13798 NE -o1 uiR2_Jungle46 uiR2EntryPoint03 34517 -13771 S -o1 uiR2_Jungle46 uiR2EntryPoint04 34582 -13541 SE -o1 uiR2_Jungle46 uiR2EntryPoint05 34311 -13491 N -o1 uiR2_Jungle46 uiR2EntryPoint06 34194 -13371 NW - -o1 uiR2_Jungle47 uiR2EntryPoint01 35624 -13369 N -o1 uiR2_Jungle47 uiR2EntryPoint02 35613 -13526 W -o1 uiR2_Jungle47 uiR2EntryPoint03 35446 -13684 E -o1 uiR2_Jungle47 uiR2EntryPoint04 35162 -13683 W -o1 uiR2_Jungle47 uiR2EntryPoint05 35118 -13442 E -o1 uiR2_Jungle47 uiR2EntryPoint06 35379 -13426 SE - -o1 uiR2_Jungle48 uiR2EntryPoint01 35989 -13425 N -o1 uiR2_Jungle48 uiR2EntryPoint02 36122 -13469 SW -o1 uiR2_Jungle48 uiR2EntryPoint03 36107 -13750 N - - - -//z1 uiR2_Jungle04 uiR2EntryPoint01 33840 -11000 N - -//z1 uiR2_Jungle09 uiR2EntryPoint01 36694 -11144 E -//z1 uiR2_Jungle09 uiR2EntryPoint02 36947 -11190 N -//z1 uiR2_Jungle09 uiR2EntryPoint03 36698 -10954 S -//z1 uiR2_Jungle09 uiR2EntryPoint04 36679 -11467 N -//z1 uiR2_Jungle09 uiR2EntryPoint05 36880 -11041 S -//z1 uiR2_Jungle09 uiR2EntryPoint06 36870 -11253 E -//z1 uiR2_Jungle09 uiR2EntryPoint07 37203 -11179 N - -//z1 uiR2_Jungle10 uiR2EntryPoint01 37790 -11080 E -//z1 uiR2_Jungle10 uiR2EntryPoint02 37909 -11413 N -//z1 uiR2_Jungle10 uiR2EntryPoint03 37530 -11208 NE -//z1 uiR2_Jungle10 uiR2EntryPoint04 37588 -11375 N - -//z1 uiR2_Jungle13 uiR2EntryPoint01 40000 -11200 W -//z1 uiR2_Jungle13 uiR2EntryPoint02 40187 -11030 S -//z1 uiR2_Jungle13 uiR2EntryPoint03 39771 -10957 E -//z1 uiR2_Jungle13 uiR2EntryPoint04 39793 -11177 E -//z1 uiR2_Jungle13 uiR2EntryPoint05 40057 -11356 E - -//z1 uiR2_Jungle17 uiR2EntryPoint01 33000 -12000 N -//z1 uiR2_Jungle17 uiR2EntryPoint02 33158 -12149 N -//z1 uiR2_Jungle17 uiR2EntryPoint03 33211 -11895 N -//z1 uiR2_Jungle17 uiR2EntryPoint04 33199 -12007 W -//z1 uiR2_Jungle17 uiR2EntryPoint05 32971 -11754 S -//z1 uiR2_Jungle17 uiR2EntryPoint06 33038 -11926 E - -//z1 uiR2_Jungle20 uiR2EntryPoint01 35650 -12140 N - -//z1 uiR2_Jungle31 uiR2EntryPoint01 33149 -12874 N -//z1 uiR2_Jungle31 uiR2EntryPoint02 33066 -13037 S -//z1 uiR2_Jungle31 uiR2EntryPoint03 33043 -12726 NW - -//z1 uiR2_Jungle37 uiR2EntryPoint01 37929 -12925 N - -//z1 uiR2_Jungle39 uiR2EntryPoint01 38971 -12788 N -//z1 uiR2_Jungle39 uiR2EntryPoint02 39024 -13072 NE -//z1 uiR2_Jungle39 uiR2EntryPoint03 39159 -12877 E -//z1 uiR2_Jungle39 uiR2EntryPoint04 39432 -13045 N -//z1 uiR2_Jungle39 uiR2EntryPoint05 39280 -12841 N -//z1 uiR2_Jungle39 uiR2EntryPoint06 39255 -12682 N -//z1 uiR2_Jungle39 uiR2EntryPoint07 39433 -12707 E - -//z1 uiR2_Jungle40 uiR2EntryPoint01 40132 -12610 N - -//z1 uiR2_Jungle43 uiR2EntryPoint01 31767 -13391 N - - -// Prime Roots - -p1 uiR2_Primes04 uiR2EntryPoint01 33300 -21200 S -p1 uiR2_Primes04 uiR2EntryPoint02 33454 -21456 NW -p1 uiR2_Primes04 uiR2EntryPoint03 33029 -21522 E - -p1 uiR2_Primes06 uiR2EntryPoint01 34700 -21070 SE -p1 uiR2_Primes06 uiR2EntryPoint02 34905 -21093 SW -p1 uiR2_Primes06 uiR2EntryPoint03 34733 -21359 N - -p1 uiR2_Primes22 uiR2EntryPoint01 37500 -21960 S -p1 uiR2_Primes22 uiR2EntryPoint02 37524 -22163 N -p1 uiR2_Primes22 uiR2EntryPoint03 37394 -22286 NE - -p1 uiR2_Primes09 uiR2EntryPoint01 36950 -21200 E -p1 uiR2_Primes09 uiR2EntryPoint02 37532 -21366 W -p1 uiR2_Primes09 uiR2EntryPoint03 37208 -21170 S - -p3 uiR2_Primes29 uiR2EntryPoint01 33140 -22910 W -p3 uiR2_Primes29 uiR2EntryPoint02 33016 -22602 S -p3 uiR2_Primes29 uiR2EntryPoint03 32776 -23057 NE - -p3 uiR2_Primes01 uiR2EntryPoint01 31110 -21520 E -p3 uiR2_Primes01 uiR2EntryPoint02 31198 -21061 S -p3 uiR2_Primes01 uiR2EntryPoint03 31132 -21312 E - -p3 uiR2_Primes05 uiR2EntryPoint01 34250 -21300 W -p3 uiR2_Primes05 uiR2EntryPoint02 33891 -21271 E -p3 uiR2_Primes05 uiR2EntryPoint03 34151 -21558 N - -p5 uiR2_Primes16 uiR2EntryPoint01 32970 -22100 NW -p5 uiR2_Primes16 uiR2EntryPoint02 32763 -21871 SE -p5 uiR2_Primes16 uiR2EntryPoint03 32890 -21990 S - -p5 uiR2_Primes18 uiR2EntryPoint01 34600 -22075 W -p5 uiR2_Primes18 uiR2EntryPoint02 34205 -22078 E -p5 uiR2_Primes18 uiR2EntryPoint03 34651 -21825 S - -p5 uiR2_Primes25 uiR2EntryPoint01 39910 -22320 E -p5 uiR2_Primes25 uiR2EntryPoint02 39757 -22077 E -p5 uiR2_Primes25 uiR2EntryPoint03 39979 -22132 NW - -p6 uiR2_Primes03 uiR2EntryPoint01 32300 -21100 SE -p6 uiR2_Primes03 uiR2EntryPoint02 32288 -21484 N -p6 uiR2_Primes03 uiR2EntryPoint03 32691 -21085 SW - -p6 uiR2_Primes07 uiR2EntryPoint01 35350 -21300 NE -p6 uiR2_Primes07 uiR2EntryPoint02 35519 -21067 S -p6 uiR2_Primes07 uiR2EntryPoint03 35601 -21405 N - -p6 uiR2_Primes13 uiR2EntryPoint01 40330 -21600 N -p6 uiR2_Primes13 uiR2EntryPoint02 40127 -21438 E -p6 uiR2_Primes13 uiR2EntryPoint03 40537 -21438 W - -p7 uiR2_Primes19 uiR2EntryPoint01 35000 -22300 N -p7 uiR2_Primes19 uiR2EntryPoint02 35456 -22007 W -p7 uiR2_Primes19 uiR2EntryPoint03 35022 -21891 SE - -p7 uiR2_Primes26 uiR2EntryPoint01 40500 -22100 N -p7 uiR2_Primes26 uiR2EntryPoint02 40694 -22284 NW -p7 uiR2_Primes26 uiR2EntryPoint03 40426 -22298 NE - -p7 uiR2_Primes08 uiR2EntryPoint01 36200 -21100 E -p7 uiR2_Primes08 uiR2EntryPoint02 36393 -21558 N -p7 uiR2_Primes08 uiR2EntryPoint03 36077 -21345 S - -p8 uiR2_Primes10 uiR2EntryPoint01 38002 -21293 N -p8 uiR2_Primes10 uiR2EntryPoint02 38006 -21532 N -p8 uiR2_Primes10 uiR2EntryPoint03 38094 -21040 S - -p8 uiR2_Primes11 uiR2EntryPoint01 38970 -21520 W -p8 uiR2_Primes11 uiR2EntryPoint02 38721 -21047 S -p8 uiR2_Primes11 uiR2EntryPoint03 38577 -21350 NW - -p8 uiR2_Primes15 uiR2EntryPoint01 31980 -21880 SE -p8 uiR2_Primes15 uiR2EntryPoint02 32365 -22121 NW -p8 uiR2_Primes15 uiR2EntryPoint03 32159 -22032 N - -p11 uiR2_Primes30 uiR2EntryPoint01 33730 -22860 N -p11 uiR2_Primes30 uiR2EntryPoint02 33656 -22604 E -p11 uiR2_Primes30 uiR2EntryPoint03 33843 -22997 E - -p11 uiR2_Primes12 uiR2EntryPoint01 39500 -21280 NE -p11 uiR2_Primes12 uiR2EntryPoint02 39240 -21197 E -p11 uiR2_Primes12 uiR2EntryPoint03 39800 -21352 W - -p11 uiR2_Primes14 uiR2EntryPoint01 31350 -21960 S -p11 uiR2_Primes14 uiR2EntryPoint02 31373 -22074 S -p11 uiR2_Primes14 uiR2EntryPoint03 31166 -22272 NE - -p12 uiR2_Primes17 uiR2EntryPoint01 33660 -22000 SW -p12 uiR2_Primes17 uiR2EntryPoint02 33397 -21879 SE -p12 uiR2_Primes17 uiR2EntryPoint03 33347 -22331 N - -p12 uiR2_Primes21 uiR2EntryPoint01 37000 -22150 W -p12 uiR2_Primes21 uiR2EntryPoint02 36645 -21864 SE -p12 uiR2_Primes21 uiR2EntryPoint03 36964 -21813 SE - -p12 uiR2_Primes27 uiR2EntryPoint01 31530 -22700 SW -p12 uiR2_Primes27 uiR2EntryPoint02 31533 -23080 NW -p12 uiR2_Primes27 uiR2EntryPoint03 31078 -22800 N - - - -o1 uiR2_Primes02 uiR2EntryPoint01 31640 -21140 SE -o1 uiR2_Primes02 uiR2EntryPoint02 31593 -21374 N -o1 uiR2_Primes02 uiR2EntryPoint03 31818 -21204 W - -o1 uiR2_Primes28 uiR2EntryPoint01 32270 -23000 N -o1 uiR2_Primes28 uiR2EntryPoint02 32316 -22662 S -o1 uiR2_Primes28 uiR2EntryPoint03 31933 -22734 SE - - - -//z1 uiR2_Primes20 uiR2EntryPoint01 35790 -22100 N - -//z1 uiR2_Primes23 uiR2EntryPoint01 38360 -21970 N - -//z1 uiR2_Primes24 uiR2EntryPoint02 38906 -21891 SE - -//z1 uiR2_Primes24 uiR2EntryPoint03 39086 -22287 NW diff --git a/code/ryzom/common/data_common/r2/r2_environment.lua b/code/ryzom/common/data_common/r2/r2_environment.lua deleted file mode 100644 index 3764c710d..000000000 --- a/code/ryzom/common/data_common/r2/r2_environment.lua +++ /dev/null @@ -1,203 +0,0 @@ --- main tables of environement & general editor functions - ---------------- --- FUNCTIONS -- ---------------- - ------------------------------------------------------------------------------------------------------------- --- Helper : eval a property in an instance of a class : --- if the property is a value, then that value is returned --- if the property is a function, then the 'this' parameter is passed to the function and the result is returned --- if the property is nil, then the defualt value is returned -function r2:evalProp(prop, this, defaultValue) - if type(prop) == "function" then return prop(this) -- could have been this:prop(), too... - elseif prop ~= nil then return prop - else return defaultValue - end -end - -------------------------------------------------------------------------------------- --- get translation id for a property, followed by a boolean (false if not found) -function r2:getPropertyTranslationId(prop) - local translationId - local found = true - if prop.Translation ~= nil then - translationId = prop.Translation - elseif i18n.hasTranslation('uiR2EDProp_' .. prop.Name) then - translationId = 'uiR2EDProp_' .. prop.Name - elseif i18n.hasTranslation('uiR2ED' .. prop.Name) then - translationId = 'uiR2ED' .. prop.Name - else - translationId = prop.Name - found = false - end - return translationId, found -end - -------------------------------------------------------------------------------------- --- get translation id for a property, as an ucstring -function r2:getPropertyTranslation(prop) - local translationId = r2:getPropertyTranslationId(prop) - if (i18n.hasTranslation(translationId)) then - return i18n.get(translationId) - else - return ucstring(translationId) - end -end - - ------------------------------------------------------------------------------------------------------------- --- return the left quota for the current scenario (called by C++) -function r2:getLeftQuota() - return r2.ScenarioWindow:getLeftQuota() -end - - ------------------------------------------------------------------------------------------------------------- --- retrieve class description of an instance (in the r2.Classes table) -function r2:getClass(instance) - if instance == nil or instance.isNil then - debugInfo("Calling r2:getClass on nil instance") - debugInfo(debug.traceback()) - return - end - if instance.Class == nil then - debugInfo("Calling r2:getClass on class with no 'Class' field") - debugInfo(debug.traceback()) - return - end - return r2.Classes[instance.Class] -end - ------------------------------------------------------------------------------------------------------------- --- get parent instance of an object in the editor (that is an object with an InstanceId) -function r2:getParentInstance(object) - debugInfo(debug.traceback()) - assert(nil) -- deprecated : use special member 'ParentInstance' instead - --if object == nil then return nil end - --local parent = object.Parent - --while parent ~= nil do - -- if parent.InstanceId ~= nil then - -- return parent - -- end - -- parent = parent.Parent - --end - --return nil -end - ------------------------------------------------------------------------------------------------------------- --- get max number of acts in a scenario -function r2:getMaxNumberOfAdditionnalActs() - return getDefine("r2ed_max_num_additionnal_acts") -end - ------------------------------------------------------------------------------------------------------------- --- Explore a tree of instance, each instance that has a sheet id is append to the list -function r2:exploreInstanceTree(obj, destTable) - if obj.InstanceId ~= nil then - table.insert(destTable, obj) - end - for k, v in specPairs(obj) do - if type(v) == "userdata" and v.Size ~= nil then - -- this is a sub array - r2:exploreInstanceTree(v, destTable) - end - end -end - - --- test from a sheet id if an object is a bot object -function r2:isBotObject(sheetClient) - return getCharacterSheetSkel(sheetClient, false) == "" - or string.match(sheetClient, "object_[%w_]*%.creature") -- patch for bot objects (with skeletons -> wind turbine) -end - --- helper function for pasting : relocate the 'Position' field of 'dest' for proper pasting -function r2:relocatePos(dest) - local x, y, z = r2:findEmptyPlace(dest.Position.x, dest.Position.y) - if x ~= nil then - dest.Position.x = x - dest.Position.y = y - dest.Position.z = z - end -end - --- Get a new position were to paste an object -function r2:getPastePosition() - local x, y, z = r2:getUserEntityPosition() - local fx, fy = r2:getUserEntityFront() - x = x + fx * 4 - y = y + fy * 4 - x = x + 3 * math.random(-100, 100) / 100 - y = y + 3 * math.random(-100, 100) / 100 - local nx, ny = r2:findEmptyPlace(x, y) - if nx ~= nil then - return nx, ny, z - else - return r2:getUserEntityPosition() -- no empty place found, paste on user - end -end - - ------------------------------------------------------------------------------------------------------------------- --------------------- --- INIT / GLOBALS -- --------------------- - ---debugInfo("Initializing main tables") -if r2 == nil then - r2 = {} -- for vianney's tests (is initialized by the caller otherwise) -end - ------------------- --- MISC GLOBALS -- ------------------- - -r2.ScratchUCStr = ucstring() -- scratch ucstring, useful to do call from utf8 without to create a new object - ---------------------- --- EDITION GLOBALS -- ---------------------- - -r2.maxId = {} - --- define in r2_features.lua -r2.Features={} - --- define in r2_basic_bricks.lua -r2.BasicBricks = {} - --- define in r2_palette.lua -r2.Palette = {} - --- definition of all R2 classes (contains both basic components and components of features) -r2.Classes = {} - --- current content of the clipboard after the selection has been copied -r2.ClipBoard = nil -r2.ClipBoardSrcInstanceId = nil -r2.ClipBoardDisplayName = nil - - ------------------------ --- ANIMATION GLOBALS -- ------------------------ - --- contains var related to animation -r2.AnimGlobals = -{ - Acts = nil, -- set to nil until received by server, contains - -- the list of acts accessible at runtime by the animator - UserTriggers = nil, -- set to nil until received by server, contains - -- the list of triggers that an animator can fire at runtime - - ------------------------------------------------------------------------------------- - reset = function(this) - this.Acts = nil - this.UserTriggers = nil - end -} - - - - diff --git a/code/ryzom/common/data_common/r2/r2_event_handler_system.lua b/code/ryzom/common/data_common/r2/r2_event_handler_system.lua deleted file mode 100644 index 0eefa056f..000000000 --- a/code/ryzom/common/data_common/r2/r2_event_handler_system.lua +++ /dev/null @@ -1,142 +0,0 @@ --- obsolete ? -local registerFeature = function() - local feature={} - feature.Name = "EventHandler" - - feature.Components = - { - { - Name = "EventHandlerEntry", - Prop= - { - {Name="InstanceId", Type="String"}, - {Name="Who", Type="String"}, - {Name="States", Type="String"}, - {Name="Event", Type="String"}, - {Name="Actions", Type="String"} - } - }, - { - Name = "EventHandler", - Prop= - { - {Name="InstanceId",Type="String"}, - {Name="Name",Type="String", MaxNumChar="32"}, - {Name="Entries", Type="Table"} - } - } - } - - - - feature.createEvent = function(event,who,states) - event = r2.split(event) - --debugInfo("event: "..event[1]) - local toRet = Actions.createEvent(event[1],states) - assert(toRet) - toRet.GroupsByName=who - return toRet - end - - feature.createAction = function(action) - if type (action) == "table" - then - local multi_action = r2.newComponent("RtNpcEventHandlerAction") - multi_action.Name = "multi_actions" - multi_action.Action="multi_actions" - local k,v = next(action, nil) - while k ~= nil - do if (k ~= "Keys") - then - local actionTxt = r2.split(v, "#") - local tmpAction = Actions.createAction(actionTxt[1], actionTxt[2]) - table.insert(multi_action.Children, tmpAction) - end - k,v = next(action, k) - end - return multi_action - end - - if action=="multi_action1" - then - local multi_action = r2.newComponent("RtNpcEventHandlerAction") - multi_action.Name = "multi_actions" - multi_action.Action="multi_actions" - - local action - - action = Actions.createAction("set_timer_t0",100) - action.Name="set end of day timer" - table.insert(multi_action.Children,action) - - action = Actions.createAction("stand_up") - action.Name="stand up" - table.insert(multi_action.Children,action) - return multi_action - end - - if action=="multi_action2" - then - local multi_action = r2.newComponent("RtNpcEventHandlerAction") - multi_action.Name = "multi_actions" - multi_action.Action="multi_actions" - - local action=Actions.createAction("set_timer_t0",100) - action.Name="set end of night timer" - table.insert(multi_action.Children,action) - - action = Actions.createAction("sit_down") - action.Name="sit down" - table.insert(multi_action.Children,action) - return multi_action - end - action = r2.split(action, "#") - toRet = Actions.createAction(action[1],action[2]) - return toRet - end - - - - feature.Translator = function(context) - local eventHandler = context.Feature - local max = table.getn(eventHandler.Entries) - for i=1, max do - context.Feature = eventHandler.Entries[i] - feature.EntryTranslator(context) - end - end - - - feature.EntryTranslator = function(context) - local entry = context.Feature - local states - local eventType - local who = context.Components[entry.Who].InstanceId - --debugInfo("Who: "..who) - if entry.States == "ALL" - then - states = "" - else - states = entry.States - end - --debugInfo("States: "..states) - if entry.Event == "INIT" - then - --add the actions in the group's initial state, - --in the event "start of state" - else - eventType = entry.Event - end - - local event = feature.createEvent(eventType,who,states) - table.insert(context.RtAct.Events,event) - - local action = feature.createAction(entry.Actions) - assert(action) - table.insert(context.RtAct.Actions,action) - table.insert(event.ActionsId,action.Id) - end - return feature -end - -r2.Features["EventHandler"] = registerFeature() diff --git a/code/ryzom/common/data_common/r2/r2_events.lua b/code/ryzom/common/data_common/r2/r2_events.lua deleted file mode 100644 index beb45f75d..000000000 --- a/code/ryzom/common/data_common/r2/r2_events.lua +++ /dev/null @@ -1,1811 +0,0 @@ -r2.classLogicAttributes = {} - -r2.events = { - -uiId = "ui:interface:r2ed_events", -ownCreatedInstances = {}, -openFirst = nil, -elementsIdCounter = 0, -elementOrder = false, -maxAndMin = false, -eltTemplateParams = { - selectElt="r2.events:selectElement()", - openEltEditor="", - maxMinElt="", - removeElt="r2.events:removeElementInst()", - colOver="200 150 0 100", - colPushed="200 150 0 255", - multiMaxLine="" - }, - -elementEditorTemplate = "template_edit_events", -elementInitialName=i18n.get("uiR2EdAction"):toUtf8(), - -currentEltUIID = nil, -- initialisי quand l'editeur est ouvert ou fermי - -logicTranslations = { - ["ApplicableActions"] = {}, - ["Events"] = {}, - ["Conditions"] = {} - }, - -selectedLogicEntity, -selectedEventType, - -eventTypeWithValue = { - ["end of chat"] = "ChatStep", - ["start of chat"] = "ChatStep", - ["starts chat"] = "ChatStep", - ["is in chat"] = "ChatStep", - - ["begin of activity step"] = "ActivityStep", - ["end of activity step"] = "ActivityStep", - ["is in activity step"] = "ActivityStep", - ["is in activity sequence"] = "ActivitySequence", - ["end of activity sequence"] = "ActivitySequence", - ["begin activity sequence"] = "ActivitySequence", - ["begin of activity sequence"] = "ActivitySequence", - ["emits user event"] = "Number", - ["user event emitted"] = "Number", - ["add seconds"] = "Number", - ["sub seconds"] = "Number", - ["add scenario points"] = "Number", - - - - }, - -filteredLogicEntityId = nil, -dismatchWithFilter = 0, - -actionOrConditionUIId = nil, - -keyWordsColor = "@{FFFF}", -communWordsColor = "@{FFFB}", -filterWordColor = "@{FF0F}", -entityWordColor = "@{F90B}", - -maxVisibleLine = 10, - -memberManagement = false, -} - - - - - - --- sequence -------------------------------------------------- -function r2.events:currentSequUI() - return getUI(self.uiId):find("sequence_elts") -end - -function r2.events:currentSequInstId() - return self:currentSequUI().Env.InstanceId -end - --- initialisי quand selection dialog dans menu -function r2.events:setSequUIInstId(sequUI, id) - sequUI.Env.InstanceId = id -end - -function r2.events:currentSequInst() - return r2:getInstanceFromId(self:currentSequInstId()) -end - --- element --------------------------------------------------- -function r2.events:currentEltUIId() - return self.currentEltUIID -end - -function r2.events:currentEltUI() - if self.currentEltUIID then - return getUI(self.currentEltUIID) - end - return nil -end - -function r2.events:setCurrentEltUIId(id) - self.currentEltUIID = id -end - -function r2.events:currentEltInstId() - if self.currentEltUIID then - return self:currentEltUI().Env.InstanceId - end - return nil -end - -function r2.events:currentEltInst() - if self.currentEltUIID and self:currentEltInstId() then - return r2:getInstanceFromId(self:currentEltInstId()) - end - return nil -end - --- updated element and/or sequence (not necessary the same as current sequence or element) -function r2.events:updatedSequUI() - return self:currentSequUI() -end - -function r2.events:setUpdatedSequUIId(sequUIId) -end - -function r2.events:updatedEltUI() - return self:currentEltUI() -end - -function r2.events:setUpdatedEltUIId(eltUIId) -end - - - ------------------- INIT EVENTS EDITOR ------------------------- -function r2.events:initEditor() - self:mergeLogicTranslations() -end - ------------------- TRANSLATION TEXT --------------------------- -function r2.events:getTranslationText(eventCategory, eventType) - if self.logicTranslations[eventCategory][eventType] then - return self.logicTranslations[eventCategory][eventType].text - else - debugInfo(eventType .. " is not translated") - return eventType - end -end - ------------------- TRANSLATION IN MENU ------------------------ -function r2.events:getTranslationMenu(eventCategory, eventType) - if self.logicTranslations[eventCategory][eventType] then - return ucstring(self.logicTranslations[eventCategory][eventType].menu) - else - debugInfo(eventType .. " is not translated") - return ucstring(eventType) - end -end - -------------------------------------------------- --- Another global map containing all logic attributes per class -function r2.events:registerClassLogicAttributes(class, logicTranslations) - if r2.classLogicAttributes[class] then - r2.print("Logic attributes are already registered for class '" ..class.."'") - return - end - - r2.classLogicAttributes[class] = logicTranslations -end - -------------------------------------------------- ---Looks for a logic attribute for a given class. If the attribute isn't in the corresponding map, looks --- in the class's baseclass map -function r2.getLogicAttribute(class, logicCategory, value) - if not class or class == "" then return nil end - - local logicAttributes = r2.classLogicAttributes[class] - - if not logicAttributes then - --look in parent map - local baseclass = r2.Classes[class].BaseClass - r2.print("Attributes not defined for class '"..class.."' looking in '"..baseclass.."' for inherited attributes") - if baseclass then - return r2.getLogicAttribute(baseclass, logicCategory, value) - end - return nil - end - - local attr = logicAttributes[logicCategory][value] - - if not attr then - --look in parent map - local baseclass = r2.Classes[class].BaseClass - if baseclass then - return r2.getLogicAttribute(baseclass, logicCategory, value) - end - return nil - end - - return attr -end ------------------------------------------------- -function r2.events:mergeLogicTranslations() - - registerComponentsLogicTranslations = function(localLogicTranslations) - local k, v = next(localLogicTranslations, nil) - while k do - local k2, v2 = next(v, nil) - while k2 do - - if not self.logicTranslations[k][k2] then - self.logicTranslations[k][k2] = v2 - end - k2, v2 = next(v, k2) - end - k, v = next(localLogicTranslations, k) - end - end - - local k, v = next(r2.Classes, nil) - while k do - if v.getLogicTranslations then - local localLogicTranslations = v:getLogicTranslations() - if localLogicTranslations then - self:registerClassLogicAttributes(k, localLogicTranslations) - --registerComponentsLogicTranslations(localLogicTranslations) - else - debugInfo(colorTag(255,0,0).."No Translation for component "..k) - end - end - k, v = next(r2.Classes, k) - end -end - - ------- OPEN EDITOR ------------------------------------------ -function r2.events:openEditor() - - local ui = getUI(self.uiId) - - if not ui.active then - - self:filterEvents() - - -- active editor - ui.active = true - ui:updateCoords() - - if self.openFirst == nil then - self.openFirst = true - ui:center() - end - else - setTopWindow(ui) - ui:blink(1) - end -end - ------- CLOSE EDITOR ------------------------------------------ -function r2.events:closeEditor() - local ui = getUI(self.uiId) - ui.active = false - r2.logicUI:closeEditor(r2.events) -end - ------- CLEAN EDITOR ------------------------------------------ -function r2.events:cleanEditor() - - -- reset current dialog and current chat - self:setCurrentEltUIId(nil) - self:setUpdatedSequUIId(nil) - self:setUpdatedEltUIId(nil) - self.elementsIdCounter = 0 - - local sequenceUI = self:currentSequUI() - assert(sequenceUI) - local eltsList = sequenceUI:find("elements_list") - assert(eltsList) - eltsList:clear() - - local dismatchFilterMenu = getUI(self.uiId):find("filterMenu"):find("dismatch_filter") - assert(dismatchFilterMenu) - dismatchFilterMenu.active = false - - self.dismatchWithFilter = 0 -end - ---- UPDATE SEQUENCE UI------------------------------------------- -function r2.events:updateSequenceUI() - - local ui = getUI(self.uiId) - assert(ui) - - local filterMenuText = ui:find("filterMenu"):find("menu"):find("text") - assert(filterMenuText) - - local logicEntity = r2:getInstanceFromId(self.filteredLogicEntityId) - assert(logicEntity) - - filterMenuText.uc_hardtext = logicEntity:getDisplayName() - - local currentSequ = self:currentSequUI() - assert(currentSequ) - local eltsList = currentSequ:find("elements_list") - assert(eltsList) - for i=0, eltsList.childrenNb-1 do - local elt = eltsList:getChild(i) - assert(elt) - --not element editor - if r2.logicUI:getEltUIInstId(elt) then - self:updateElementUI(elt) - end - end -end - - -function r2.events:getLogicEntityParent(event) - - local logicEntity = event.Parent.Parent.Parent - - if logicEntity:isGrouped() and logicEntity:isLeader() then - logicEntity = logicEntity:getParentGroup() - end - return logicEntity -end - -function r2.events:filterIsLogicEntityParent(event) - return self.filteredLogicEntityId==self:getLogicEntityParent(event).InstanceId -end - -function r2.events:getBehavior(logicEntity) - return logicEntity.Behavior -end - - ------- SELECT FILTER EVENTS -------------------------------------- -function r2.events:filterEvents(logicEntityId) - - if logicEntityId==nil then - logicEntityId = r2:getSelectedInstance().InstanceId - end - - local logicEntity = r2:getInstanceFromId(logicEntityId) - if logicEntity then - - if not self.memberManagement and logicEntity:isGrouped() then --TEMP - logicEntity = logicEntity:getParentGroup() --TEMP - logicEntityId = logicEntity.InstanceId --TEMP - end --TEMP - - -- clean editor - self:cleanEditor() - - local ui = getUI(self.uiId) - assert(ui) - - -- update filter text - local filterMenuText = ui:find("filterMenu"):find("menu"):find("text") - assert(filterMenuText) - filterMenuText.uc_hardtext = logicEntity:getDisplayName() - - self.filteredLogicEntityId = logicEntityId - - -- recover all events of logic entities in current act - local allEvents = {} - local allLogicEntities = {} - - for i=0, r2.Scenario.Acts.Size-1 do - local act = r2.Scenario.Acts[i] - act:appendInstancesByType(allLogicEntities, "LogicEntity") - table.insert(allLogicEntities, act) - end - - table.insert(allLogicEntities, r2.Scenario) - for k0, entity in pairs(allLogicEntities) do - - local behavior = self:getBehavior(entity) - if not self.memberManagement then -- TEMP - behavior = entity:getBehavior() -- TEMP - end -- TEMP - - for e=0, behavior.Actions.Size-1 do - local event = behavior.Actions[e] - assert(event) - allEvents[event.InstanceId] = event - end - end - - -- recover events which match with filter - local eventsType = {} - local eventsAction = {} - local eventsCondition = {} - - for k, event in pairs(allEvents) do - - local isSelected = false - - local filterIsLogicEntityParentB = self:filterIsLogicEntityParent(event) - if not self.memberManagement then -- TEMP - filterIsLogicEntityParentB = (event:getLogicEntityParent().InstanceId == logicEntityId) -- TEMP - end -- TEMP - -- events type - - if filterIsLogicEntityParentB then - table.insert(eventsType, event.InstanceId) - isSelected = true - end - - -- actions - if not isSelected then - - for a=0, event.Actions.Size-1 do - local action = event.Actions[a] - assert(action) - - if tostring(action.Entity) == logicEntityId then - table.insert(eventsAction, event.InstanceId) - isSelected = true - break - end - end - end - - -- conditions - if not isSelected then - - for a=0, event.Conditions.Size-1 do - local condition = event.Conditions[a] - assert(condition) - - if tostring(condition.Entity) == logicEntityId then - table.insert(eventsCondition, event.InstanceId) - break - end - end - end - end - - -- create event editor - self:createElementEditor() - - -- display "events type" - for k, eventId in pairs(eventsType) do - local event = r2:getInstanceFromId(eventId) - assert(event) - self:newElementUI(event) - end - - -- display "events action" - for k, eventId in pairs(eventsAction) do - local event = r2:getInstanceFromId(eventId) - assert(event) - self:newElementUI(event) - end - - -- display "events condition" - for k, eventId in pairs(eventsCondition) do - local event = r2:getInstanceFromId(eventId) - assert(event) - self:newElementUI(event) - end - - else - - debugInfo("UNKNOWN FILTER EVENTS") - - for k, eventId in pairs(allEvents) do - local event = r2:getInstanceFromId(eventId) - assert(event) - self:newElementUI(event) - end - end - - r2.logicComponents:selectSequence(r2.events) -end - ------- REFRESH FILTER -------------------------------------------- -function r2.events:refreshEvents() - self:filterEvents(self.filteredLogicEntityId) -end - - ------- SELECT ELEMENT -------------------------------------------- -function r2.events:selectElement(selectedButtonElt) - r2.logicComponents:selectElement(r2.events, selectedButtonElt) -end - ------- CREATE EDITOR ----------------------------------------------- -function r2.events:createElementEditor() - - r2.logicComponents:createElementEditor(r2.events) -end - ------- OPEN ELEMENT EDITOR ----------------------------------------------- -function r2.events:updateElementEditor() - - local instanceEvent = self:currentEltInst() - if instanceEvent==nil then return end - - local ui = getUI(self.uiId) - assert(ui) - - local sequenceUI = self:currentSequUI() - assert(sequenceUI) - - local eventEditor = sequenceUI:find("edit_element") - assert(eventEditor) - - -- editor title - local editorTitleText = eventEditor:find("event_name"):find("name") - assert(editorTitleText) - - local logicEntity = self:getLogicEntityParent(instanceEvent) - if not self.memberManagement then --TEMP - logicEntity = instanceEvent:getLogicEntityParent() --TEMP - end --TEMP - assert(logicEntity) - - -- when menu text - local when = eventEditor:find("when") - assert(when) - when.Env.InstanceId = logicEntity.InstanceId - local whenMenuText = when:find("text") - assert(whenMenuText) - - local coloredName = (logicEntity.InstanceId == self.filteredLogicEntityId) - - if coloredName then - eventType = self.filterWordColor - else - eventType = self.communWordsColor - end - - local name = "No name" - if logicEntity.getName then - name = logicEntity:getName() - elseif logicEntity.Name then - name = logicEntity.Name - end - eventType = eventType .. name .. " " - if coloredName then eventType = eventType .. self.communWordsColor end - - - local class = logicEntity.Class - assert(class) - eventType = eventType ..r2.getLogicAttribute(class, "Events", instanceEvent.Event.Type).text - if instanceEvent.Event.Value~="" then - local instance = r2:getInstanceFromId(instanceEvent.Event.Value) - assert(instance) - eventType = eventType .. " '" .. instance:getShortName() .. "'" - end - if instanceEvent.Event.ValueString and instanceEvent.Event.ValueString~="" then - eventType = eventType .. " '" .. instanceEvent.Event.ValueString .. "'" - end - - local uc_when_text = ucstring() - uc_when_text:fromUtf8(eventType) - whenMenuText.uc_hardtext_single_line_format = uc_when_text - editorTitleText.uc_hardtext = whenMenuText.hardtext .. " ..." - - -- actions - local actionsList = eventEditor:find("actions_list") - assert(actionsList) - actionsList:clear() - - if instanceEvent.Actions.Size > 0 then - - for i=0, instanceEvent.Actions.Size-1 do - local actionInst = instanceEvent.Actions[i] - - local actionUI = self:newActionUI() - actionUI.Env.InstanceId = actionInst.InstanceId - - local actionMenuText = actionUI:find("text") - assert(actionMenuText) - - if actionInst.Entity~="" and actionInst.Action.Type~="" then - - local actionLogicEntity = r2:getInstanceFromId(tostring(actionInst.Entity)) - assert(actionLogicEntity) - - coloredName = (actionLogicEntity.InstanceId == self.filteredLogicEntityId) - local actionType - if coloredName then - actionType = self.filterWordColor - else - actionType = self.communWordsColor - end - local name = "No name" - if actionLogicEntity.getName then - name = actionLogicEntity:getName() - elseif actionLogicEntity.Name then - name = actionLogicEntity.Name - end - actionType = actionType .. name .. " " - if coloredName then actionType = actionType .. self.communWordsColor end - - local class = actionLogicEntity.Class - assert(class) - actionType = actionType ..r2.getLogicAttribute(class, "ApplicableActions", actionInst.Action.Type).text - if actionInst.Action.Value~="" then - local instance = r2:getInstanceFromId(actionInst.Action.Value) - assert(instance) - actionType = actionType .. " '" .. instance:getShortName() .. "'" - end - if actionInst.Action.ValueString and actionInst.Action.ValueString ~= "" then - if string.gfind(actionType, "%%1")() then - actionType = string.gsub(actionType, "%%1", "'"..tostring(actionInst.Action.ValueString).."'") - else - actionType = actionType .. " '" .. tostring(actionInst.Action.ValueString).. "'" - end - end - - local uc_action_text = ucstring() - uc_action_text:fromUtf8(actionType) - actionMenuText.uc_hardtext_single_line_format = uc_action_text - end - end - else - self:newActionUI() - end - - -- conditions - local conditionsList = eventEditor:find("conditions_list") - assert(conditionsList) - conditionsList:clear() - - for i=0, instanceEvent.Conditions.Size-1 do - local conditionInst = instanceEvent.Conditions[i] - - local conditionUI = self:newConditionUI() - conditionUI.Env.InstanceId = conditionInst.InstanceId - - local conditionMenuText = conditionUI:find("text") - assert(conditionMenuText) - - if conditionInst.Entity~="" and conditionInst.Condition.Type~="" then - - local conditionLogicEntity = r2:getInstanceFromId(tostring(conditionInst.Entity)) - assert(conditionLogicEntity) - - coloredName = (conditionLogicEntity.InstanceId == self.filteredLogicEntityId) - local conditionType - if coloredName then - conditionType = self.filterWordColor - else - conditionType = self.communWordsColor - end - conditionType = conditionType .. conditionLogicEntity.Name .. " " - if coloredName then conditionType = conditionType .. self.communWordsColor end - - local class = conditionLogicEntity.Class - assert(class) - conditionType = conditionType ..r2.getLogicAttribute(class, "Conditions", conditionInst.Condition.Type).text - if conditionInst.Condition.Value~="" then - local instance = r2:getInstanceFromId(conditionInst.Condition.Value) - assert(instance) - conditionType = conditionType .. " '" .. instance:getShortName() .."'" - end - - local uc_condition_text = ucstring() - uc_condition_text:fromUtf8(conditionType) - conditionMenuText.uc_hardtext_single_line_format = uc_condition_text - end - end - - self:advancedEditor(((instanceEvent.Actions.Size > 1) or (instanceEvent.Conditions.Size > 0))) - - -- match filter? - local matchFilter = self:logicEntityActionMatchFilter(instanceEvent) - - local dismatchFilter = eventEditor:find("dismatch_filter") - assert(dismatchFilter) - dismatchFilter.active = not matchFilter - - -- valid event? - self:updateValiditySymbol(eventEditor, instanceEvent) -end - -function r2.events:updateElementsUI() - - local sequenceUI = self:currentSequUI() - assert(sequenceUI) - - local eltsList = sequenceUI:find("elements_list") - assert(eltsList) - - for i=0,eltsList.childrenNb-1 do - local elementUI = eltsList:getChild(i) - if r2.logicUI:getEltUIInstId(elementUI) then - self:updateElementUI(elementUI) - end - end -end - ------ CLOSE ELEMENT EDITOR --------------------------------------------- -function r2.events:closeElementEditor() - r2.logicComponents:closeElementEditor(r2.events) -end - ------- NEW ELEMENT INST ------------------------------------------ -function r2.events:newElementInst() - - r2.requestNewAction(i18n.get("uiR2EDNewEventAction")) - - local logicEntity - if self.filteredLogicEntityId~=nil then - logicEntity = r2:getInstanceFromId(self.filteredLogicEntityId) - else - logicEntity = r2:getSelectedInstance() - end - assert(logicEntity) - - local logicEvent = r2.newComponent("LogicEntityAction") - - -- default event - local defaultEvent - - if not self.memberManagement or not logicEntity:isGrouped() then - local class = r2.Classes[logicEntity.Class] - assert(class) - if table.getn(class.Events) > 0 then - defaultEvent = class.Events[1] - else - debugInfo("Empty events table of lua class : "..logicEntity.Class) - return - end - else - messageBox(i18n.get("uiR2EDNoEventCreation")) - return - end - - local eventType = r2.newComponent("EventType") - eventType.Type = defaultEvent - logicEvent.Event = eventType - - local behavior = self:getBehavior(logicEntity) - if not self.memberManagement then --TEMP - behavior = logicEntity:getBehavior() --TEMP - end --TEMP - r2.requestInsertNode(behavior.InstanceId, "Actions", -1, "", logicEvent) - - self.ownCreatedInstances[logicEvent.InstanceId] = true - - r2.logicComponents:newElementInst(r2.events) -end - --------- get first event in events list of a class ----------------- -function r2.events:hasApplicableActions(logicEntity) - - local class = r2.Classes[logicEntity.Class] - assert(class) - --- local eventsTable = {} --- if categoryEvent=="ApplicableActions" then --- eventsTable = logicEntity:getApplicableActions() --- else --- eventsTable = class[categoryEvent] --- end - local actionsTable = logicEntity:getApplicableActions() - - if table.getn(actionsTable) > 0 then - - if logicEntity:isGrouped() then - local groupIndependantEvent - for k, eventType in pairs(actionsTable) do - local menuTitle = r2.getLogicAttribute(logicEntity.Class, "ApplicableActions", eventType) - if menuTitle.groupIndependant==true then - groupIndependantEvent = true - break - end - end - - if groupIndependantEvent==nil then - return nil - end - end - else - debugInfo("Empty 'ApplicableActions' table of lua class : "..logicEntity.Class) - return nil - end - - return true -end - ------- NEW ELEMENT UI ------------------------------------------ -function r2.events:newElementUI(newInst) - r2.logicUI:newElementUI(r2.events, newInst, false) -end - ------- REMOVE ELEMENT INST ---------------------------------------- -function r2.events:removeElementInst() - r2.requestNewAction(i18n.get("uiR2EDRemoveLogicElementAction")) - r2.logicComponents:removeElementInst(r2.events) - r2.requestEndAction() -end - ------- REMOVE ELEMENT UI ------------------------------------------- -function r2.events:removeElementUI(removedEltUI) - r2.logicUI:removeElementUI(r2.events, removedEltUI) -end - ------- UPDATE ELEMENT TITLE ------------------------------------------- -function r2.events:updateElementTitle(eventUI) - - r2.logicComponents:updateElementTitle(r2.events, eventUI, false) -end - ------- UPDATE ELEMENT UI ------------------------------------------- -function r2.events:updateElementUI(elementUI) - - r2.logicUI:updateElementUI(r2.events, elementUI) - - local logicEntityAction = r2:getInstanceFromId(r2.logicUI:getEltUIInstId(elementUI)) - assert(logicEntityAction) - - local matchFilter = self:logicEntityActionMatchFilter(logicEntityAction) - - local dismatchFilter = elementUI:find("dismatch_filter") - assert(dismatchFilter) - - if dismatchFilter.active~=not matchFilter then - if matchFilter then - self.dismatchWithFilter = self.dismatchWithFilter-1 - else - self.dismatchWithFilter = self.dismatchWithFilter+1 - end - end - - local dismatchFilterMenu = getUI(self.uiId):find("filterMenu"):find("dismatch_filter") - assert(dismatchFilterMenu) - dismatchFilterMenu.active = (self.dismatchWithFilter>0) - - dismatchFilter.active = not matchFilter - - -- valid event? - self:updateValiditySymbol(elementUI, logicEntityAction) -end - -------------------------------------------------------------------------------- -function r2.events:updateValiditySymbol(elementUI, eventInst) - - local invalidEvent = elementUI:find("invalid_event") - assert(invalidEvent) - - local validEvent = elementUI:find("valid_event") - assert(validEvent) - - local logicAct = eventInst:getLogicAct() - invalidEvent.active = (logicAct==nil) - validEvent.active = (logicAct~=nil and logicAct~=r2:getCurrentAct()) - if validEvent.active then - local uc_other_act = ucstring() - uc_other_act:fromUtf8(i18n.get("uiR2EDEventNotInCurrentAct"):toUtf8() .. "'" .. logicAct.Name .. "'") - validEvent.tooltip = uc_other_act - end -end - -function r2.events:logicEntityActionMatchFilter(logicEntityAction) - - local logicEntity = self:getLogicEntityParent(logicEntityAction) - if not self.memberManagement then --TEMP - logicEntity = logicEntityAction:getLogicEntityParent() --TEMP - end - - local matchFilter = (logicEntity.InstanceId==self.filteredLogicEntityId) - if matchFilter then - return true - end - - for i=0, logicEntityAction.Actions.Size-1 do - local action = logicEntityAction.Actions[i] - if action.Entity==self.filteredLogicEntityId then - return true - end - end - - for i=0, logicEntityAction.Conditions.Size-1 do - local condition = logicEntityAction.Conditions[i] - if condition.Entity==self.filteredLogicEntityId then - return true - end - end - - return false -end - ---- INIT FILTER MENU --------------------------------------------------- -function r2.events:initFilterMenu() - - -- which entity menu initialization - local logicEntityMenu = getUI("ui:interface:r2ed_triggers_menu") - assert(logicEntityMenu) - - local logicEntityMenu = logicEntityMenu:getRootMenu() - assert(logicEntityMenu) - - logicEntityMenu:reset() - - -- entity classes - for k, class in pairs(r2.Classes) do - if class.initLogicEntitiesMenu then class:initLogicEntitiesMenu(logicEntityMenu) end - end - logicEntityMenu:setMaxVisibleLine(self.maxVisibleLine) - - -- for each entity classes, list of instances in current act - for c=0,logicEntityMenu:getNumLine()-1 do - - logicEntityMenu:addSubMenu(c) - local subMenu = logicEntityMenu:getSubMenu(c) - - local entityClass = tostring(logicEntityMenu:getLineId(c)) - local class = r2.Classes[entityClass] - - if class.initLogicEntitiesInstancesMenu then - class:initLogicEntitiesInstancesMenu(subMenu, "r2.events:filterEvents") - end - subMenu:setMaxVisibleLine(self.maxVisibleLine) - end - - r2.logicUI:openLogicMenu(getUICaller()) -end - ------- INIT EVENT TYPE MENU ------------------------------------------- -function r2.events:initEventMenu(categoryEvent) - - - - -- local startTime = nltime.getPreciseLocalTime() - - self.actionOrConditionUIId = getUICaller().parent.parent.id - - -- which entity menu initialization - local logicEntityMenu = getUI("ui:interface:r2ed_triggers_menu") - assert(logicEntityMenu) - - local logicEntityMenu = logicEntityMenu:getRootMenu() - assert(logicEntityMenu) - - logicEntityMenu:reset() - - -- if a logic entity has been already selected, we give a direct access to this one - local caller = getUI(self.actionOrConditionUIId) - assert(caller) - local logicEntity - local firstLine = 0 - if caller.Env.InstanceId ~= nil then - if categoryEvent=="Events" then - logicEntity = r2:getInstanceFromId(caller.Env.InstanceId) - elseif categoryEvent=="ApplicableActions" or categoryEvent=="Conditions" then - local instance = r2:getInstanceFromId(caller.Env.InstanceId) - logicEntity = r2:getInstanceFromId(instance.Entity) - end - end - - - --local endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for 1 is %f", endTime - startTime)) - --startTime = nltime.getPreciseLocalTime() - - - if logicEntity then - - firstLine = 2 - local uc_name = ucstring() - uc_name:fromUtf8(logicEntity.Name) - logicEntityMenu:addLine(uc_name, "lua", "r2.events:setLogicEntity('".. logicEntity.InstanceId .."')", logicEntity.InstanceId) - logicEntityMenu:addSeparator() - - logicEntityMenu:addSubMenu(0) - local subMenuEventType = logicEntityMenu:getSubMenu(0) - - logicEntity:initEventTypeMenu(subMenuEventType, categoryEvent) - - if logicEntity.initEventValuesMenu then - logicEntity:initEventValuesMenu(subMenuEventType, categoryEvent) - end - subMenuEventType:setMaxVisibleLine(self.maxVisibleLine) - end - - --local endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for 2 is %f", endTime - startTime)) - --startTime = nltime.getPreciseLocalTime() - - -- entity classes - for k, class in pairs(r2.Classes) do - if class.initLogicEntitiesMenu and table.getn(class[categoryEvent])~=0 then - class:initLogicEntitiesMenu(logicEntityMenu, (categoryEvent=="ApplicableActions")) - end - end - logicEntityMenu:setMaxVisibleLine(self.maxVisibleLine) - - --local endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for 3 is %f", endTime - startTime)) - --startTime = nltime.getPreciseLocalTime() - - -- for each entity classes, list of instances in current act - for c=firstLine,logicEntityMenu:getNumLine()-1 do - - logicEntityMenu:addSubMenu(c) - local subMenu = logicEntityMenu:getSubMenu(c) - - local entityClass = tostring(logicEntityMenu:getLineId(c)) - local class = r2.Classes[entityClass] - - if class.initLogicEntitiesInstancesMenu then - - class:initLogicEntitiesInstancesMenu(subMenu, "r2.events:setLogicEntity") - - --local endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for 6 is %f", endTime - startTime)) - --startTime = nltime.getPreciseLocalTime() - - -- for each entity, list of its events type - for e=0,subMenu:getNumLine()-1 do - - local entityId = tostring(subMenu:getLineId(e)) - local entity = r2:getInstanceFromId(entityId) - if entity then - - subMenu:addSubMenu(e) - local subMenuEventType = subMenu:getSubMenu(e) - - entity:initEventTypeMenu(subMenuEventType, categoryEvent) - - --local endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for 7 is %f", endTime - startTime)) - --startTime = nltime.getPreciseLocalTime() - - if entity.initEventValuesMenu then - entity:initEventValuesMenu(subMenuEventType, categoryEvent) - end - - --local endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for 9 is %f", endTime - startTime)) - --startTime = nltime.getPreciseLocalTime() - - subMenuEventType:setMaxVisibleLine(self.maxVisibleLine) - - --local endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for 8 is %f", endTime - startTime)) - --startTime = nltime.getPreciseLocalTime() - end - end - end - subMenu:setMaxVisibleLine(self.maxVisibleLine) - end - - --local endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for 4 is %f", endTime - startTime)) - --startTime = nltime.getPreciseLocalTime() - - r2.logicUI:openLogicMenu(getUICaller()) - - --local endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for 5 is %f", endTime - startTime)) - --startTime = nltime.getPreciseLocalTime() - -end - ------ SET LOGIC ENTITY (selected in menu ) ------------------------------------------- -function r2.events:setLogicEntity(entityId) - self.selectedLogicEntity = entityId -end - ------ SET EVENT TYPE ------------------------------------------------ -function r2.events:setEventType(eventType, endRequest, categoryEvent) - - self.selectedEventType = eventType - - if endRequest==tostring(true) then - if categoryEvent=="Events" then self:setEvent("") - elseif categoryEvent=="ApplicableActions" then self:setAction("") - elseif categoryEvent=="Conditions" then self:setCondition("") - end - end -end - ------ SET EVENT VALUE ------------------------------------------------ -function r2.events:setEventValue(instanceId, categoryEvent, optionalValueString) - - if categoryEvent=="Events" then self:setEvent(instanceId, optionalValueString) - elseif categoryEvent=="ApplicableActions" then self:setAction(instanceId, optionalValueString) - elseif categoryEvent=="Conditions" then self:setCondition(instanceId, optionalValueString) - end -end - ----- SET EVENT ----------------------------------------------------------------------- -function r2.events:setEvent(valueInstId, optionalValueString) - - r2.requestNewAction(i18n.get("uiR2EDSetEventAction")) - - local eventInst = self:currentEltInst() - assert(eventInst) - - local oldLogicEntity = self:getLogicEntityParent(eventInst) - if not self.memberManagement then - oldLogicEntity = eventInst:getLogicEntityParent() - end - assert(oldLogicEntity) - - local newLogicEntity = r2:getInstanceFromId(self.selectedLogicEntity) - assert(newLogicEntity) - - if oldLogicEntity~=newLogicEntity then - - local index = r2.logicComponents:searchElementIndex(eventInst) - index = index - 1 - if index >= 0 then - local oldBehavior = self:getBehavior(oldLogicEntity) - local newBehavior = self:getBehavior(newLogicEntity) - if not self.memberManagement then --TEMP - oldBehavior = oldLogicEntity:getBehavior() --TEMP - newBehavior = newLogicEntity:getBehavior() --TEMP - end - r2.requestMoveNode(oldBehavior.InstanceId, "Actions", index, - newBehavior.InstanceId, "Actions", -1) - end - end - - r2.requestSetNode(eventInst.Event.InstanceId, "Type", self.selectedEventType) - - r2.requestSetNode(eventInst.Event.InstanceId, "Value", r2.RefId(valueInstId)) - if optionalValueString then - r2.requestSetNode(eventInst.Event.InstanceId, "ValueString", optionalValueString) - elseif eventInst.ValueString and eventInst.ValueString ~="" then - r2.requestSetNode(eventInst.Event.InstanceId, "ValueString", optionalValueString) - end - - - self.selectedLogicEntity = nil - self.selectedEventType = nil -end - ------- SET ACTION ------------------------------------------------------ -function r2.events:setAction(valueInstId, optionalValueString) - - r2.requestNewAction(i18n.get("uiR2EDSetEventActionAction")) - - local eventInst = self:currentEltInst() - assert(eventInst) - - local actionLogicEntity = r2:getInstanceFromId(self.selectedLogicEntity) - assert(actionLogicEntity) - - local caller = getUI(self.actionOrConditionUIId) - assert(caller) - - local action - if caller.Env.InstanceId == nil then - action = r2.newComponent("ActionStep") - r2.requestInsertNode(eventInst.InstanceId, "Actions",-1,"", action) - caller.Env.InstanceId = action.InstanceId - else - action = r2:getInstanceFromId(caller.Env.InstanceId) - end - assert(action) - - r2.requestSetNode(action.InstanceId, "Entity", r2.RefId(self.selectedLogicEntity)) - r2.requestSetNode(action.Action.InstanceId, "Type", self.selectedEventType) - r2.requestSetNode(action.Action.InstanceId, "Value", r2.RefId(valueInstId)) - if optionalValueString then - r2.requestSetNode(action.Action.InstanceId, "ValueString", optionalValueString) - elseif action.Action.ValueString and action.Action.ValueString ~= "" then - r2.requestSetNode(action.Action.InstanceId, "ValueString", "") - end - - - self.selectedLogicEntity = nil - self.selectedEventType = nil - self.actionOrConditionUIId = nil -end - ------- SET CONDITION ------------------------------------------------------ -function r2.events:setCondition(valueInstId) - - r2.requestNewAction(i18n.get("uiR2EDSetEventConditionAction")) - - local eventInst = self:currentEltInst() - assert(eventInst) - - local actionLogicEntity = r2:getInstanceFromId(self.selectedLogicEntity) - assert(actionLogicEntity) - - local caller = getUI(self.actionOrConditionUIId) - assert(caller) - - local condition - if caller.Env.InstanceId == nil then - condition = r2.newComponent("ConditionStep") - r2.requestInsertNode(eventInst.InstanceId, "Conditions",-1,"", condition) - caller.Env.InstanceId = condition.InstanceId - else - condition = r2:getInstanceFromId(caller.Env.InstanceId) - end - assert(condition) - - r2.requestSetNode(condition.InstanceId, "Entity", r2.RefId(self.selectedLogicEntity)) - r2.requestSetNode(condition.Condition.InstanceId, "Type", self.selectedEventType) - - r2.requestSetNode(condition.Condition.InstanceId, "Value", r2.RefId(valueInstId)) - - self.selectedLogicEntity = nil - self.selectedEventType = nil - self.actionOrConditionUIId = nil -end - ----- EDITOR ELEMENT IN ADVANCED OR EASY MODE -function r2.events:advancedEditor(advancedMode) - - local instanceEvent = self:currentEltInst() - if instanceEvent==nil then return end - - local sequenceUI = self:currentSequUI() - assert(sequenceUI) - - local eventEditor = sequenceUI:find("edit_element") - assert(eventEditor) - - local addActionButton = eventEditor:find("what_happens"):find("add") - assert(addActionButton) - addActionButton.active = advancedMode - - local conditionsGr = eventEditor:find("conditions") - assert(conditionsGr) - conditionsGr.active = advancedMode - - local addConditionButton = conditionsGr:find("add") - assert(addConditionButton) - addConditionButton.active = advancedMode - - local advancedButton = eventEditor:find("advanced") - advancedButton.active = not advancedMode - - local conditionsList = eventEditor:find("conditions_gr") - assert(conditionsList) - conditionsList.active = (instanceEvent.Conditions.Size > 0) -end - --- NEW ACTION ------------------------------------------------- -function r2.events:newActionUI() - - local sequenceUI = self:currentSequUI() - assert(sequenceUI) - - local eventEditor = sequenceUI:find("edit_element") - assert(eventEditor) - - local actionsList = eventEditor:find("actions_list") - assert(actionsList) - - local idActionUI = "action" .. actionsList.childrenNb - - local params = { - id=idActionUI, x="0", y="0", sizeref="w", - posparent="", posref="TL TL", w="0", h="20", - params_l="r2.events:initEventMenu('ApplicableActions')", - remove_menu="r2.events:removeActionInst()", params_over="r2.events:activeTrashButton('true')", - } - - - local newActionUI = createGroupInstance("menu_trash_template", actionsList.id, params) - assert(newActionUI) - actionsList:addChild(newActionUI) - actionsList.parent:updateCoords() - - newActionUI.Env.InstanceId = nil - - return newActionUI -end - --- NEW CONDITION ------------------------------------------------- -function r2.events:newConditionUI() - - local sequenceUI = self:currentSequUI() - assert(sequenceUI) - - local eventEditor = sequenceUI:find("edit_element") - assert(eventEditor) - - local conditionsGr = eventEditor:find("conditions_gr") - assert(conditionsGr) - conditionsGr.active = true - - local conditionsList = eventEditor:find("conditions_list") - assert(conditionsList) - - local idConditionUI = "condition" .. conditionsList.childrenNb - - local params = { - id=idConditionUI, x="0", y="0", sizeref="w", - posparent="", posref="TL TL", w="0", h="20", - params_l="r2.events:initEventMenu('Conditions')", - remove_menu="r2.events:removeConditionInst()", params_over="r2.events:activeTrashButton('false')", - } - - - local newConditionUI = createGroupInstance("menu_trash_template", conditionsList.id, params) - assert(newConditionUI) - conditionsList:addChild(newConditionUI) - conditionsList.parent:updateCoords() - - newConditionUI.Env.InstanceId = nil - - return newConditionUI -end - - ---- ACTIVE TRASH BUTTON ---------------------------------------------------------- -function r2.events:activeTrashButton(actionsList) - - local overMenuTrash = getUICaller().parent.parent - assert(overMenuTrash) - - local trashButtonCaller = overMenuTrash:find("remove_menu") - assert(trashButtonCaller) - - local menuTrashList = overMenuTrash.parent - assert(menuTrashList) - - if actionsList==tostring(true) and menuTrashList.childrenNb==1 then return end - - for i=0, menuTrashList.childrenNb-1 do - local menuTrash = menuTrashList:getChild(i) - assert(menuTrash) - - local trashButton = menuTrash:find("remove_menu") - assert(trashButton) - - if trashButton.active then - if trashButton.id == trashButtonCaller.id then return end - trashButton.active = false - break - end - end - - trashButtonCaller.active = true -end - - ---- REMOVE CONDITION INSTANCE ----------------------------------------------------- -function r2.events:removeConditionInst() - - r2.requestNewAction(i18n.get("uiR2EDRemoveEventConditionAction")) - - local menuTrash = getUICaller().parent.parent.parent.parent - assert(menuTrash) - - local menuTrashList = menuTrash.parent - assert(menuTrashList) - - if menuTrash.Env.InstanceId~=nil then - r2.requestEraseNode(menuTrash.Env.InstanceId, "", -1) - else - menuTrashList:delChild(menuTrash) - end -end - ---- REMOVE ACTION INSTANCE ----------------------------------------------------- -function r2.events:removeActionInst() - - r2.requestNewAction(i18n.get("uiR2EDRemoveEventActionAction")) - - local menuTrash = getUICaller().parent.parent.parent.parent - assert(menuTrash) - - local menuTrashList = menuTrash.parent - assert(menuTrashList) - - if menuTrash.Env.InstanceId~=nil then - r2.requestEraseNode(menuTrash.Env.InstanceId, "", -1) - else - menuTrashList:delChild(menuTrash) - end -end - - - - - - - - --------------------------------------------------------------------------------------------------- --------------------------------- LOGIC ENTITY DisplayerProperties ------------------------- --------------------------------------------------------------------------------------------------- -local logicEntityPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function logicEntityPropertySheetDisplayerTable:onPostCreate(instance) -end ------------------------------------------------- -function logicEntityPropertySheetDisplayerTable:onErase(instance) - - local elementUI = r2.logicUI:findElementUIFromInstance(r2.events, instance) - - if elementUI then - r2.events:removeElementUI(elementUI) - end -end ------------------------------------------------- -function logicEntityPropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function logicEntityPropertySheetDisplayerTable:onPostHrcMove(instance) -end ------------------------------------------------- -function logicEntityPropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function logicEntityPropertySheetDisplayerTable:onSelect(instance, isSelected) - - if not isSelected then - r2.events:closeEditor() - end -end - ------------------------------------------------- -local oldOnAttrModified = logicEntityPropertySheetDisplayerTable.onAttrModified -function logicEntityPropertySheetDisplayerTable:onAttrModified(instance, attributeName) - - if attributeName == "Name" then - local elementUI = r2.logicUI:findElementUIFromInstance(r2.events, instance) - - if elementUI then - r2.events:updateElementUI(elementUI) - end - end - oldOnAttrModified(self, instance, attributeName) -end - ------------------------------------------------- -function r2:logicEntityPropertySheetDisplayer() - return logicEntityPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - - --------------------------------------------------------------------------------------------------- --------------------------------- LOGIC ENTITY ACTION DisplayerProperties ------------------------- --------------------------------------------------------------------------------------------------- -local logicEntityActionPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function logicEntityActionPropertySheetDisplayerTable:onPostCreate(instance) - - local filterIsLogicEntityParentB = r2.events:filterIsLogicEntityParent(instance) - if not r2.events.memberManagement then - filterIsLogicEntityParentB = (instance:getLogicEntityParent().InstanceId==r2.events.filteredLogicEntityId) - end - if filterIsLogicEntityParentB then - r2.events:newElementUI(instance) - end -end ------------------------------------------------- -function logicEntityActionPropertySheetDisplayerTable:onErase(instance) - - instance.User.Deleted = true - - local elementUI = r2.logicUI:findElementUIFromInstance(r2.events, instance) - - if elementUI then - r2.events:removeElementUI(elementUI) - end -end ------------------------------------------------- -function logicEntityActionPropertySheetDisplayerTable:onPreHrcMove(instance) -end - ------------------------------------------------- -function logicEntityActionPropertySheetDisplayerTable:onPostHrcMove(instance) - - local elementUI = r2.logicUI:findElementUIFromInstance(r2.events, instance) - - local filterIsLogicEntityParentB = r2.events:filterIsLogicEntityParent(instance) - if not r2.events.memberManagement then - filterIsLogicEntityParentB = (instance:getLogicEntityParent().InstanceId==r2.events.filteredLogicEntityId) - end - - if elementUI then - r2.events:updateElementUI(elementUI) - elseif filterIsLogicEntityParentB then - r2.events:newElementUI(instance) - end -end ------------------------------------------------- -function logicEntityActionPropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function logicEntityActionPropertySheetDisplayerTable:onSelect(instance, isSelected) -end - ------------------------------------------------- -function logicEntityActionPropertySheetDisplayerTable:onAttrModified(instance, attributeName) - - local elementUI = r2.logicUI:findElementUIFromInstance(r2.events, instance) - - if elementUI then - r2.events:updateElementUI(elementUI) - end -end - ------------------------------------------------- -function r2:logicEntityActionPropertySheetDisplayer() - return logicEntityActionPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - --------------------------------------------------------------------------------------------------- --------------------------------- EVENT TYPE DisplayerProperties ----------------------- --------------------------------------------------------------------------------------------------- -local eventTypePropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function eventTypePropertySheetDisplayerTable:onPostCreate(instance) -end ------------------------------------------------- -function eventTypePropertySheetDisplayerTable:onErase(instance) -end ------------------------------------------------- -function eventTypePropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function eventTypePropertySheetDisplayerTable:onPostHrcMove(instance) -end ------------------------------------------------- -function eventTypePropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function eventTypePropertySheetDisplayerTable:onSelect(instance, isSelected) -end - ------------------------------------------------- -function eventTypePropertySheetDisplayerTable:onAttrModified(instance, attributeName) -end - ------------------------------------------------- -function eventTypePropertySheetDisplayerTable:onTargetInstanceEraseRequested(instance, refIdName, refIdIndexInArray) - r2.requestEraseNode(instance.Parent.InstanceId, "", -1) -end ------------------------------------------------- -function eventTypePropertySheetDisplayerTable:onTargetInstanceAttrModified(instance, refIdName, refIdIndexInArray, targetAttrName, targetAttrIndexInArray) - if targetAttrName == "Name" then - - local eventInst = instance.Parent - assert(eventInst.Class=="LogicEntityAction") - local elementUI = r2.logicUI:findElementUIFromInstance(r2.events, eventInst) - - if elementUI then - r2.events:updateElementUI(elementUI) - end - end -end - ------------------------------------------------- -function r2:eventTypePropertySheetDisplayer() - return eventTypePropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - - --------------------------------------------------------------------------------------------------- --------------------------------- ACTION STEP DisplayerProperties ----------------------- --------------------------------------------------------------------------------------------------- -local actionStepPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function actionStepPropertySheetDisplayerTable:onPostCreate(instance) -end ------------------------------------------------- -function actionStepPropertySheetDisplayerTable:onErase(instance) -end ------------------------------------------------- -function actionStepPropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function actionStepPropertySheetDisplayerTable:onPostHrcMove(instance) -end ------------------------------------------------- -function actionStepPropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function actionStepPropertySheetDisplayerTable:onSelect(instance, isSelected) -end - ------------------------------------------------- -function actionStepPropertySheetDisplayerTable:onAttrModified(instance, attributeName) -end - ------------------------------------------------- -function actionStepPropertySheetDisplayerTable:onTargetInstanceEraseRequested(instance, refIdName, refIdIndexInArray) - - if refIdName == "Entity" then - r2.requestEraseNode(instance.InstanceId, "", -1) - end -end ------------------------------------------------- -function actionStepPropertySheetDisplayerTable:onTargetInstanceAttrModified(instance, refIdName, refIdIndexInArray, targetAttrName, targetAttrIndexInArray) - if targetAttrName == "Name" then - - local eventInst = instance.Parent.Parent - assert(eventInst.Class=="LogicEntityAction") - local elementUI = r2.logicUI:findElementUIFromInstance(r2.events, eventInst) - - if elementUI then - r2.events:updateElementUI(elementUI) - end - end -end - ------------------------------------------------- -function actionStepPropertySheetDisplayerTable:onTargetInstancePostHrcMove(instance, refIdName, refIdIndexInArray) - - if refIdName=="Entity" then - r2.requestSetNode(instance.InstanceId, "Entity", r2.RefId("")) - r2.requestSetNode(instance.Action.InstanceId, "Type", "") - r2.requestSetNode(instance.Action.InstanceId, "Value", r2.RefId("")) - end -end - - ------------------------------------------------- -function r2:actionStepPropertySheetDisplayer() - return actionStepPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - - --------------------------------------------------------------------------------------------------- --------------------------------- ACTION TYPE DisplayerProperties ----------------------- --------------------------------------------------------------------------------------------------- -local actionTypePropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function actionTypePropertySheetDisplayerTable:onPostCreate(instance) -end ------------------------------------------------- -function actionTypePropertySheetDisplayerTable:onErase(instance) -end ------------------------------------------------- -function actionTypePropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function actionTypePropertySheetDisplayerTable:onPostHrcMove(instance) -end ------------------------------------------------- -function actionTypePropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function actionTypePropertySheetDisplayerTable:onSelect(instance, isSelected) -end - ------------------------------------------------- -function actionTypePropertySheetDisplayerTable:onAttrModified(instance, attributeName) -end - ------------------------------------------------- -function actionTypePropertySheetDisplayerTable:onTargetInstanceEraseRequested(instance, refIdName, refIdIndexInArray) - r2.requestSetNode(instance.InstanceId, "Type", "") - r2.requestSetNode(instance.InstanceId, "Value", r2.RefId("")) -end ------------------------------------------------- -function actionTypePropertySheetDisplayerTable:onTargetInstanceAttrModified(instance, refIdName, refIdIndexInArray, targetAttrName, targetAttrIndexInArray) - if targetAttrName == "Name" then - - local eventInst = instance.Parent.Parent.Parent - assert(eventInst.Class=="LogicEntityAction") - local elementUI = r2.logicUI:findElementUIFromInstance(r2.events, eventInst) - - if elementUI then - r2.events:updateElementUI(elementUI) - end - end -end - ------------------------------------------------- -function r2:actionTypePropertySheetDisplayer() - return actionTypePropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - - --------------------------------------------------------------------------------------------------- --------------------------------- CONDITION STEP DisplayerProperties ----------------------- --------------------------------------------------------------------------------------------------- -local conditionStepPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function conditionStepPropertySheetDisplayerTable:onPostCreate(instance) -end ------------------------------------------------- -function conditionStepPropertySheetDisplayerTable:onErase(instance) -end ------------------------------------------------- -function conditionStepPropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function conditionStepPropertySheetDisplayerTable:onPostHrcMove(instance) -end ------------------------------------------------- -function conditionStepPropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function conditionStepPropertySheetDisplayerTable:onSelect(instance, isSelected) -end - ------------------------------------------------- -function conditionStepPropertySheetDisplayerTable:onAttrModified(instance, attributeName) -end - ------------------------------------------------- -function conditionStepPropertySheetDisplayerTable:onTargetInstanceEraseRequested(instance, refIdName, refIdIndexInArray) - - if refIdName == "Entity" then - r2.requestEraseNode(instance.InstanceId, "", -1) - end -end ------------------------------------------------- -function conditionStepPropertySheetDisplayerTable:onTargetInstanceAttrModified(instance, refIdName, refIdIndexInArray, targetAttrName, targetAttrIndexInArray) - if targetAttrName == "Name" then - - local eventInst = instance.Parent.Parent - assert(eventInst.Class=="LogicEntityAction") - local elementUI = r2.logicUI:findElementUIFromInstance(r2.events, eventInst) - - if elementUI then - r2.events:updateElementUI(elementUI) - end - end -end - ------------------------------------------------- -function r2:conditionStepPropertySheetDisplayer() - return conditionStepPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - - - --------------------------------------------------------------------------------------------------- --------------------------------- CONDITION TYPE DisplayerProperties ----------------------- --------------------------------------------------------------------------------------------------- -local conditionTypePropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function conditionTypePropertySheetDisplayerTable:onPostCreate(instance) -end ------------------------------------------------- -function conditionTypePropertySheetDisplayerTable:onErase(instance) -end ------------------------------------------------- -function conditionTypePropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function conditionTypePropertySheetDisplayerTable:onPostHrcMove(instance) -end ------------------------------------------------- -function conditionTypePropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function conditionTypePropertySheetDisplayerTable:onSelect(instance, isSelected) -end - ------------------------------------------------- -function conditionTypePropertySheetDisplayerTable:onAttrModified(instance, attributeName) -end - ------------------------------------------------- -function conditionTypePropertySheetDisplayerTable:onTargetInstanceEraseRequested(instance, refIdName, refIdIndexInArray) - r2.requestSetNode(instance.InstanceId, "Type", "") - r2.requestSetNode(instance.InstanceId, "Value", r2.RefId("")) -end ------------------------------------------------- -function conditionTypePropertySheetDisplayerTable:onTargetInstanceAttrModified(instance, refIdName, refIdIndexInArray, targetAttrName, targetAttrIndexInArray) - if targetAttrName == "Name" then - - local eventInst = instance.Parent.Parent.Parent - assert(eventInst.Class=="LogicEntityAction") - local elementUI = r2.logicUI:findElementUIFromInstance(r2.events, eventInst) - - if elementUI then - r2.events:updateElementUI(elementUI) - end - end -end - ------------------------------------------------- -function r2:conditionTypePropertySheetDisplayer() - return conditionTypePropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features.lua b/code/ryzom/common/data_common/r2/r2_features.lua deleted file mode 100644 index 9ef14c1a6..000000000 --- a/code/ryzom/common/data_common/r2/r2_features.lua +++ /dev/null @@ -1,1205 +0,0 @@ - --- for client : register a component into C using the 'registerGenerator' function and add --- it into the list of classes - - --- copy class properties & methods -local reservedMembers = { Prop = true, - BaseClass = true, - NameToProp = true, - -- native properties - Parent = true, - ParentInstance= true, - IndexInParent = true, - User = true, - Size = true, - DisplayerUI = true, - DisplayerVisual = true, - DisplayerProperties = true, - Selectable = true, - SelectableFromRoot = true - } - --- check is a string is a valid identifier (e.g begin with an alphabetic letter followed by alpha numeric letters) -local function isValidIdentifier(id) - return string.match(id, "[%a_][%w_]*") -end - --- register a new class (features, components ...) -r2.registerComponent = function(generator, package) - -- check that all identifiers are correct - local badProps = {} - if generator.Prop == nil then - generator.Prop = {} - end - -- serach invalid identifiers - for k, prop in pairs(generator.Prop) do - - if (type(prop) ~= "table") then - debugWarning("Invalid property found in ".. generator.Name) - end - - if not isValidIdentifier( prop.Name ) then - debugWarning("Invalid property name found : '" .. tostring(prop.Name) .. - "' in class " .. tostring(generator.Name) .. ". Property is ignored") - table.insert(badProps, k) - end - if reservedMembers[prop.Name] then - debugWarning("Invalid property name found : '" .. tostring(prop.Name) .. - "' in class " .. tostring(generator.Name) .. ". This is the name of a native poperty, and can't be redefined") - table.insert(badProps, k) - end - end - -- check that no identifier is duplicated - local propName = {} - for k, prop in pairs(generator.Prop) do - if propName[prop.Name] ~= nil then - debugWarning("Duplicated property found when registering class " .. tostring(generator.Name) .. ", property = " .. tostring(prop.Name)) - debugWarning("Aborting class registration.") - return - end - propName[prop.Name] = true - end - -- remove bad properties from the class - for k, prop in pairs(badProps) do - generator.Prop[prop] = nil - end - - local name = nil - - if package then - name = generator.Name - --name = package:getUniqId() .. "|" .. generator.Name TODO - else - name = generator.Name; - end - - if r2.Classes[name] ~= nil then - debugWarning("Component registered twice : " .. generator.Name) - return - end - if type(name) ~= "string" then - debugWarning("Can't register class, 'Name' field not found or bad type") - assert(false) - end - r2.Classes[name] = generator -end - --- private : perform subclassing by copying properties / methods of the base class into the class passed as a parameter --- only methods / props that are present in the base class and not in the derived class are copied --- subclass is done recursively so after calling 'subclass' on a class definition it will be complete -function r2.Subclass(classDef) - assert(classDef) - assert(type(classDef) == "table") - if classDef.BaseClass ~= "" and classDef.BaseClass ~= nil then - local baseClass = r2.Classes[classDef.BaseClass] - if baseClass == nil then - debugInfo("Cant found base class " .. strify(classDef.BaseClass) .. " of class " .. strify(classDef.Name)) - return - end - --debugInfo("sub classing " .. tostring(classDef.Name) .. " from " .. tostring(baseClass.Name)) - -- make sure that base class is complete, too - r2.Subclass(baseClass) - for key, value in pairs(baseClass) do - if classDef[key] == nil then - -- if property or method not defined in derived class then copy from the base class - -- if this is a method, then just replace with a function that will delegate - -- the call to the parent class - --if type(value) == "function" and key ~= "delegate" then - -- assert(type(key) == "string") - -- local localKey = key -- apparently, closure are not supported with locals from the enclosing 'for' loop - -- local function delegator(this, ...) - --debugInfo("Calling parent version in parent class '" .. tostring(baseClass.Name) .. "' for " .. tostring(localKey)) - -- TODO nico : here if would be much faster to call the - -- first parent class where function is defined instead - -- of chaining the calls to 'delegate' - -- There are 1 thing to rememeber however : - -- * The this pointer could be a delegated one, - -- so when doing the call directly this should be with the non-delgated this (to have a polymorphic call) - - -- local delegated = this:delegate() - -- return delegated[localKey](delegated, unpack(arg)) - -- end - -- classDef[key] = delegator - --else - classDef[key] = value - --end - end - end - -- copy instances properties - assert(classDef.NameToProp) - assert(baseClass.NameToProp) - for key, prop in pairs(baseClass.Prop) do - -- if property not declared in derived class then add it - if classDef.NameToProp[prop.Name] == nil then - -- its okay to make a reference here because classes definitions are read-only - classDef.NameToProp[prop.Name] = prop - table.insert(classDef.Prop, prop) - end - end - end - -- else no-op -end - -function r2.getLoadedFeaturesStatic() - local loadedFeatures = - { - --Mob Spawners - {"r2_features_boss_spawner.lua", "BossSpawnerFeature", "uiR2EdMobSpawnersCategory"}, - {"r2_features_timed_spawn.lua", "TimedSpawner", "uiR2EdMobSpawnersCategory"}, - {"r2_features_scenery_object_remover.lua", "SceneryObjectRemoverFeature", "uiR2EdMobSpawnersCategory"}, - - --Chests - {"r2_features_easter_egg.lua", "EasterEggFeature", "uiR2EdChestsCategory"}, - {"r2_features_random_chest.lua", "RandomChest", "uiR2EdChestsCategory"}, - {"r2_features_get_item_from_scenery.lua", "GetItemFromSceneryObject", "uiR2EdChestsCategory"}, - - - --Tasks - {"r2_features_give_item.lua", "GiveItemFeature", "uiR2EdTaskStepCategory"}, - {"r2_features_talk_to.lua", "TalkToFeature", "uiR2EdTaskStepCategory"}, - {"r2_features_request_item.lua", "RequestItemFeature", "uiR2EdTaskStepCategory"}, - {"r2_features_visit_zone.lua", "VisitZone", "uiR2EdTasksCategory"}, - {"r2_features_target_mob.lua", "TargetMob", "uiR2EdTasksCategory"}, - {"r2_features_kill_npc.lua", "KillNpc", "uiR2EdTasksCategory"}, - {"r2_features_hunt_task.lua", "HuntTask", "uiR2EdTasksCategory"}, - {"r2_features_delivery_task.lua", "DeliveryTask", "uiR2EdTasksCategory"}, - {"r2_features_get_item_from_scenery_task.lua", "GetItemFromSceneryObjectTaskStep", "uiR2EdTaskStepCategory"}, - {"r2_features_scenery_object_interaction_task.lua", "SceneryObjectInteractionTaskStep", "uiR2EdTaskStepCategory"}, - - - --Triggers - {"r2_features_timer.lua", "TimerFeature", "uiR2EdTriggersCategory"}, - {"r2_features_zone_triggers.lua", "ZoneTrigger", "uiR2EdTriggersCategory"}, - {"r2_features_user_trigger.lua", "UserTriggerFeature", "uiR2EdTriggersCategory"}, - {"r2_features_man_hunt.lua", "ManHuntFeature", "uiR2EdTriggersCategory"}, - {"r2_features_scenery_object_interaction.lua", "SceneryObjectInteractionFeature", "uiR2EdTriggersCategory"}, - {"r2_features_proximity_dialog.lua", "ChatSequence", "uiR2EdTriggersCategory"}, - --{"r2_features_reward_provider.lua", "RewardProvider", "uiR2EdTriggersCategory"}, - - --MacroComponents - {"r2_features_ambush.lua", "Ambush", "uiR2EdMacroComponentsCategory"}, - {"r2_features_loot_spawner.lua", "LootSpawnerFeature", "uiR2EdMacroComponentsCategory"}, - {"r2_features_hidden_chest.lua", "HiddenChest", "uiR2EdMacroComponentsCategory"}, - {"r2_features_proximity_dialog.lua", "ProximityDialog", "uiR2EdMacroComponentsCategory"}, - {"r2_features_bandits_camp.lua", "BanditCampFeature", "uiR2EdMacroComponentsCategory"}, - {"r2_features_fauna.lua", "FaunaFeature", "uiR2EdMacroComponentsCategory"}, - - } - return loadedFeatures -end - -function r2.doFileProtected(filename) - local ok, msg = pcall(r2.doFile, filename) - if not ok then - debugInfo("Error while loading component '"..filename.."' err: "..msg) - end -end - - -r2.loadFeatures = function() - - r2.doFileProtected("r2_features_default.lua") - - r2.doFileProtected("r2_features_npc_groups.lua") - r2.doFileProtected("r2_features_counter.lua") - r2.doFileProtected("r2_features_reward_provider.lua") - - --Loading features - r2.doFileProtected("r2_features_loaded.lua") - - local loadedFeatures = r2.getLoadedFeaturesStatic() - local k, v = next(loadedFeatures, nil) - while k do - if v and v[1] then - r2.doFileProtected(v[1]) - end - k, v = next(loadedFeatures, k) - end - - if config.R2EDLoadDynamicFeatures == 1 then - local loadedFeatures = r2.getLoadedFeaturesDynamic() - local k, v = next(loadedFeatures, nil) - while k do - if v and v[1] then - r2.doFileProtected(v[1]) - end - k, v = next(loadedFeatures, k) - end - end - - r2.doFileProtected("r2_texts.lua") - r2.doFileProtected("r2_logic.lua") - r2.doFileProtected("r2_logic_entities.lua") - r2.doFileProtected("r2_event_handler_system.lua") - r2.doFileProtected("r2_unit_test.lua") - - r2.doFileProtected("r2_core_user_component_manager.lua") - --r2_core.UserComponentManager:init() - - --debugInfo("REGISTERING FEATURES") - r2.UserComponentsManager:updateUserComponents() - - local featureId, feature = next(r2.Features, nil) - while (featureId ~= nil) - do - --debugInfo("Registering feature " .. feature.Name) - local componentId, component = next(feature.Components, nil) - while (component ~= nil) - do - --debugInfo(" Registering feature component " .. component.Name) - r2.registerComponent(component) - componentId, component = next(feature.Components, componentId) - end - - featureId, feature = next(r2.Features, featureId); - end -end - --- Function to init default scenario stuffs, with the given client ID --- tmp : returns ids for the scenario, the first act, and the default group -r2.initBaseScenario = function() - - local function ici(index) - -- debugInfo(colorTag(255, 255, 0) .. "ICI " .. tostring(index)) - end - -- create scenario - ici(1) - local scenario= r2.newComponent("Scenario") - if (scenario == nil) then - debugWarning("Failed to create Scenario"); - return - end - ici(2) - --debugInfo("Scenario created with id " .. scenario.InstanceId) - scenario.title = "TestMap" - scenario.shortDescription = "TestMap" - scenario.optimalNumberOfPlayer = 1 - -- create first act & default feature group - - do - local act =r2.newComponent("Act") - act.States = {} - if (act == nil) then - debugWarning("Failed to create first 'Act'"); - return - end - - local features = act.Features - local tmpDefault = r2.newComponent("DefaultFeature") - if (tmpDefault == nil) then - debugWarning("Failed to create default feature"); - return - end - table.insert(features, tmpDefault) - table.insert(scenario.Acts, act) - - end - - -- By default create act I and have it selected - - do - local act =r2.newComponent("Act") - -- force to select the act 1 at display - r2.ActUIDisplayer.LastSelfCreatedActInstanceId = act.InstanceId - act.States = {} - if (act == nil) then - debugWarning("Failed to create secondary 'Act'"); - return - end - - - act.Name = i18n.get("uiR2EDAct1"):toUtf8() - act.Title = i18n.get("uiR2EDAct1"):toUtf8() -- obsolete - - local features = act.Features - local tmpDefault = r2.newComponent("DefaultFeature") - if (tmpDefault == nil) then - debugWarning("Failed to create default feature"); - return - end - table.insert(features, tmpDefault) - table.insert(scenario.Acts, act) - end - r2.requestCreateScenario(scenario) - -end - --- called by the frame work to reset the current scenario --- function r2.resetScenario() --- --- do --- --- r2.requestEraseNode(r2.ScenarioInstanceId, "Acts" ) --- --- --- local acts= {} --- --- do --- local act =r2.newComponent("Act") --- local features = act.Features --- local tmpDefault = r2.newComponent("DefaultFeature") --- table.insert(features, tmpDefault) --- table.insert(acts, act) --- end --- do --- local act =r2.newComponent("Act") --- local features = act.Features --- local tmpDefault = r2.newComponent("DefaultFeature") --- r2.ActUIDisplayer.LastSelfCreatedActInstanceId = act.InstanceId --- act.Title = i18n.get("uiR2EDAct1"):toUtf8() --- table.insert(features, tmpDefault) --- table.insert(acts, act) --- -- table.insert(scenario.Acts, act) --- end --- --- --- r2.requestInsertNode(r2.ScenarioInstanceId, "", -1, "Acts", acts) --- r2.requestReconnection() --- end ---end - - --- called when a gm/ai has do a scheduleStartAct (Animation or test time) -function r2.onScheduleStartAct(errorId, actId, nbSeconds) - if (r2.Mode == "DM" or r2.Mode == "AnimationModeDm") then - if errorId == 0 then - local ucStringMsg = ucstring() - - local str = "Act " .. actId - if nbSeconds ~= 0 then - str = str .. " will start in " .. nbSeconds .. " seconds" - end - ucStringMsg:fromUtf8(str) - displaySystemInfo(ucStringMsg, "BC") - elseif errorId == 1 then - messageBox("Act ".. actId .." can not be started because another act is already starting.") - elseif errorId == 2 then - messageBox("Act ".. actId .." can not be started because this act does not exist.") - end - end -end - -function r2.onDisconnected() - local str = "You have been disconnected by the server." - local ucStringMsg = ucstring() - messageBox(str) - ucStringMsg:fromUtf8(str) - displaySystemInfo(ucStringMsg, "BC") -end - -function r2.onKicked(timeBeforeDisconnection, kicked) - if kicked then - local str = "You have been kicked. You must come back to mainland or leave this session otherwise you will be disconnected in " - .. tostring(timeBeforeDisconnection) .. " secondes." - local ucStringMsg = ucstring() - messageBox(str) - ucStringMsg:fromUtf8(str) - displaySystemInfo(ucStringMsg, "BC") - else - local str = "You have been unkicked." - local ucStringMsg = ucstring() - messageBox(str) - ucStringMsg:fromUtf8(str) - displaySystemInfo(ucStringMsg, "BC") - end - -end - --- called in start mode of a dm -function r2.onRuntimeActUpdated(runtimeAct) - -- use runtimeAct or r2.getRunTimeActs() - r2.AnimGlobals.Acts = runtimeAct - -- update the ui - r2.ui.AnimBar:update() -end - -function r2.onTalkingAsListUpdated() - r2.ui.AnimBar:updateDMControlledEntitiesWindow() -end - - - -function r2.onIncarnatingListUpdated() - r2.ui.AnimBar:updateDMControlledEntitiesWindow() -end - - -function r2.onScenarioHeaderUpdated(scenario) - local ui=getUI('ui:interface:r2ed_scenario_control') - if ui.active == true then - ui.active = false - ui.active = true - end - - -- inspect(scenario) - -- or use r2.getScenarioHeader(); -end - -function r2.onSystemMessageReceived(msgType, msgWho, msg) - - local ucStringMsg = ucstring() - ucStringMsg:fromUtf8(msg) - if string.len(msg) > 2 and string.sub(msg, 1, 2) == "ui" then - ucStringMsg = i18n.get(msg) - msg = ucStringMsg:toString() - end - if msgType == "BC" or msgType == "BC_ML" then - printMsgML(msg) - elseif msgType == "SYS" or msgType == "DM" then - - local str = "" - if msgType == "DM" then - str = "(AM ONLY)"..str - if (r2.Mode ~= "DM" and r2.Mode ~= "AnimationModeDm") then return end - - end - if string.len(msgWho) ~= 0 then - str = str .. msgWho .. ": " - end - - str = str.. msg - printMsgML(msg) - elseif msgType == "ERR" then - printMsgML(msg) - messageBox(msg) - end -end - - - - --- TMP : place holder function to know the current act -if not r2.getCurrentActIndex then - debugInfo("Creating place holder for r2.getCurrentActIndex") - function r2.getCurrentActIndex() - return 1 - end -end - -function r2.onUserTriggerDescriptionUpdated(userTrigger) - -- use userTrigger or r2.getUserTriggers() - r2.AnimGlobals.UserTriggers = userTrigger - r2.ui.AnimBar:update() -end - -function r2.onCurrentActIndexUpdated( actIndex) - -- actIndex==r2.getCurrentActIndex()) -end - --- called when a session has begin but no scenario has been created -function r2.onEmptyScenarioUpdated() - if r2.Mode == "AnimationModeLoading" then - UnitTest.testLoadAnimationScenarioUi() - - elseif r2.Mode == "AnimationModeWaitingForLoading" then - UnitTest.testWaitAnimationScenarioLoadingUi() - else - --UnitTest.testCreateScenarioUi() - r2.acts:openScenarioActEditor(true, true) - end -end - --- called by the framework when the scenario has been updated -function r2.onScenarioUpdated(scenario, startingActIndex) - - --luaObject(scenario) - --breakPoint() - - if (scenario == nil) then - r2.onEmptyScenarioUpdated() - return - else - hide('ui:interface:r2ed_form_CreateNewAdventureStep2') - end - - r2.Scenario = r2:getInstanceFromId(scenario.InstanceId) - r2.ScenarioInstanceId = scenario.InstanceId - - -- add permanent nodes to act node - r2:defaultUIDisplayer():addPermanentNodes() - - if r2.Version.updateVersion() then - r2.setScenarioUpToDate(true) - else - r2.setScenarioUpToDate(false) - end - - local currentAct = nil - - assert(startingActIndex); - assert( type(startingActIndex) == "number"); - - if startingActIndex < table.getn(scenario.Acts) then - r2.DefaultActInstanceId = scenario.Acts[startingActIndex].InstanceId - r2.ActUIDisplayer.LastSelfCreatedActInstanceId = scenario.Acts[startingActIndex].InstanceId - if scenario.Acts[startingActIndex].Features.Size > 0 then - r2.DefaultFeatureInstanceId = scenario.Acts[startingActIndex].Features[0].InstanceId - end - currentAct=scenario.Acts[startingActIndex] - - r2.ScenarioWindow:setAct(currentAct) - else - r2.DefaultActInstanceId = scenario.Acts[0].InstanceId - r2.ActUIDisplayer.LastSelfCreatedActInstanceId = scenario.Acts[0].InstanceId - if scenario.Acts[0].Features.Size > 0 then - r2.DefaultFeatureInstanceId = scenario.Acts[0].Features[0].InstanceId - end - currentAct=scenario.Acts[0] - end - - - if scenario ~= nil and currentAct ~= nil then - r2.Scenario.User.SelectedActInstanceId = tostring(currentAct.InstanceId) - r2.Scenario.User.SelectedLocationInstanceId = tostring(currentAct.LocationId) - end - - r2.ScenarioWindow:updateScenarioProperties() - -- usefull to know if the scenario is updating - ld.lock = 0 - - if not r2.RingAccess.LoadAnimation and not r2.getIsAnimationSession() then - local ok, level, err = r2.RingAccess.verifyScenario() - r2.updateScenarioAck(ok, level, err.What) - return - end - - r2.acts.deleteOldScenario = false - - if r2.getUseVerboseRingAccess() then - r2.RingAccess.dumpRingAccess() - end - -end - -function r2.verifyScenario() - local ok, level, err = r2.RingAccess.verifyScenario() - local msg="" - if not ok then - printMsg(err.What) - msg = err.What - end - return ok, msg -end - -function r2.printMsg(msg) - r2.printMsg(msg) -end - --- assign default menu for each classes -function r2.initDefaultMenuSetup() - forEach(r2.Classes, - function(k, v) - if v.Menu ~= nil and v.onSetupMenu == nil then - v.onSetupMenu = r2.defaultMenuSetup - end - end - ) -end - --- assign default menu for each classes -function r2.initDefaultPropertyDisplayer() - for k, class in pairs(r2.Classes) do - if class.BuildPropertySheet == true then - if class.DisplayerProperties == nil then - class.DisplayerProperties = "R2::CDisplayerLua" - class.DisplayerPropertiesParams = "propertySheetDisplayer" - end - end - end -end - --- setup the classes -function r2.setupClasses() - -- first build a table that gives access to a property from its name - for k, class in pairs(r2.Classes) do - class.NameToProp = {} - for k, prop in pairs(class.Prop) do - if prop.Name == nil then - debugInfo("Found a property in class " .. tostring(class.Name) .. " with no field 'Name'") - end - class.NameToProp[prop.Name] = prop - end - end - -- perform subclassing - for k, class in pairs(r2.Classes) do - r2.Subclass(class) - end - -- register into C - for k, class in pairs(r2.Classes) do - r2.registerGenerator(class) - end - - -end - --- returns a table which map each instanceId of the scenario component's to each component -r2.createComponentsMap = function (scenario) - function createComponentsMapImpl (t, components) - if ( type(t) == "table") - then - if (t.InstanceId ~= nil) - then - components[t.InstanceId] = t - end - for key, value in pairs(t) do - createComponentsMapImpl(value, components) - end - end - end - local components = {} - createComponentsMapImpl(scenario, components) - return components -end - - - - -r2.updateActCost = function(act) - assert(act) - local cost = 0 - local staticCost = 0 - local features = act.Features - assert(features ~= nil ) - local featureId, feature = next(features, nil) - while (featureId ~= nil) - do - -- feature:getCost() is obsolete - if feature.User.GhostDuplicate ~= true then - if feature and feature.getAiCost then - local added = feature:getAiCost() - if added then - cost = cost + added - end - end - if feature and feature.getStaticObjectCost then - local added = feature:getStaticObjectCost() - if added then - staticCost = staticCost + added - end - end - end - featureId, feature = next(features, featureId) - end - - -- NB nico : removed cost from the real object and put is in the 'User' table (interfere with undo redo, because considered - -- as an action) - - act:setLocalCost(cost) - --if (act.Cost ~= cost) then - -- r2.requestSetLocalNode(act.InstanceId, "Cost", cost) - -- r2.requestCommitLocalNode(act.InstanceId, "Cost") - --end - - act:setLocalStaticCost(staticCost) - --if (act.StaticCost ~= staticCost) then - -- r2.requestSetLocalNode(act.InstanceId, "StaticCost", staticCost) - -- r2.requestCommitLocalNode(act.InstanceId, "StaticCost") - --end - -end - - - - -r2.registerText = function(text) - - --TODO : when several texts are registered "at the same time", the local scenario - --has not the time to receive the changes, and a new entry is created. - - local checkText = r2.Features["TextManager"].checkText - local textMgr = getTextMgr() - if(textMgr==nil) - then - debugInfo("text mgr nil!!") - end - local result = checkText(textMgr,text) - if result.Count ~= 0 - then - - --the entry already exist, just increment the counter - r2.requestSetNode(result.InstanceId,"Count",result.Count+1) - --temporaire - --result.Count = result.Count + 1 - --/temporaire - debugInfo("Entry already exist") - else - --the entry don't exist, insert it - result.Count=1 - -- debugInfo("New entry created") - r2.requestInsertNode(r2.Scenario.Texts.InstanceId,"Texts",-1,"",result) - - --temporaire - --table.insert(r2.TextMgr.Texts,result) - --temporaire - end - return result -end - -getTextMgr = function() - --return r2.TextMgr - return r2.Scenario.Texts -end - -r2.unregisterText = function(text) - - local removeText = r2.Features["TextManager"].removeText - removeText(r2.Scenario.Texts,text) -end - -r2.unregisterTextFromId = function(id) - - local text = r2.getText(id) - if text ~= nil - then - r2.unregisterText(text) - end -end - -r2.getText = function(id) - local textMgr = getTextMgr() - return r2.Features["TextManager"].getText(textMgr, id) -end - -r2.split = function(str, sep) - assert( type(str) == "string") - local ret = {} - local start=0 - if sep == nil then sep = "\n" end - local fin=string.find(str, sep) - - while fin ~= nil do - local tmp = string.sub(str,start,fin-1) - if string.len(tmp)~=0 - then - table.insert(ret,tmp) - end - start = fin+1 - fin = string.find(str,sep,start) - end - - if start scrH then - -- localH = scrH - --end - --uiInfo.h = localH - --uiInfo.pop_min_h= localH - --uiInfo.pop_max_h= localH - - uiInfo:invalidateCoords() - uiInfo:updateCoords() - uiInfo:center() - - setTopWindow(uiInfo) -end - - -function r2.setFeatureDisplayHelp() - - local checkBox = getUI("ui:interface:feature_help:content:custom_bbox_enabled") - assert(checkBox) - local isChecked = checkBox.pushed - debugInfo("checked: " ..tostring(isChecked)) - - local ui = getUI("ui:interface:feature_help") - local name = ui.Env.uc_title - local len = string.len(name) - 10 - 6 - local className = string.sub(name, -10-len, 6+len) --removing uiR2Ed and _HelpTitle - --formName = formName .."Form" - - assert(className) - --debugInfo("Form name: " ..formName) - - if isChecked == false then - r2.setDisplayInfo(className, 1) - else r2.setDisplayInfo(className, 0) end - -end - -function r2.getDisplayButtonHeader(func, buttonText) - local header = - string.format( - [[ - - ]], func, buttonText) - - return header -end - -function r2.updateLogicEvents(this, invalidEvents) - assert(invalidEvents) - assert(this) - - local actions = this.Behavior.Actions - assert(actions) - - - local function updateLogicEvent(k, action) - - local event = action.Event - assert(event) - if invalidEvents[event.Type] then - local instanceId = tostring(event.InstanceId) - r2.requestSetNode(instanceId, "Type", tostring(invalidEvents[event.Type])) - end - end - - forEach(actions, updateLogicEvent) - -end - -function r2.updateLogicActions(this, invalidActions, entityClass) - assert(invalidActions) - assert(this) - assert(entityClass) - - local instance = r2:getInstanceFromId(this.Entity) - if not instance or not instance:isKindOf(entityClass) then - return - end - - local action = this.Action - assert(action) - - if invalidActions[action.Type] then - r2.requestSetNode(action.InstanceId, "Type", invalidActions[action.Type]) - end -end - - -function r2.onRingAccessUpdated(access) - r2:buildPaletteUI() - r2.acts:initActsEditor() - updateBanditCampEnum() - -- also available by r2.getRingAccess() -end - -function r2:checkAiQuota(size) - - if not size then size = 1 end - local leftQuota, leftAIQuota, leftStaticQuota = r2:getLeftQuota() - - if leftAIQuota < size then - displaySystemInfo(i18n.get("uiR2EDMakeRoomAi"), "BC") - - return false - end - return true -end - -function r2:checkStaticQuota(size) - if not size then size = 1 end - local leftQuota, leftAIQuota, leftStaticQuota = r2:getLeftQuota() - if leftStaticQuota < size then - displaySystemInfo(i18n.get("uiR2EDMakeRoomStaticObject"), "BC") - return false - end - return true -end - -function r2.DisplayNpcHeader() - local npc = r2:getSelectedInstance() - if not npc then - return "" - end - - if npc:isGrouped() then - local header = - [[ - - ]] - return header - else - return "" - end -end - - -function r2.mustDisplayProp(prop) -end diff --git a/code/ryzom/common/data_common/r2/r2_features_ambush.lua b/code/ryzom/common/data_common/r2/r2_features_ambush.lua deleted file mode 100644 index 7d8087f61..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_ambush.lua +++ /dev/null @@ -1,470 +0,0 @@ - -r2.Features.Ambush = {} - -local feature = r2.Features.Ambush - -feature.Name="Ambush" - - -feature.Description="" - -feature.Components = {} - -local classAmbushVersion = 1 - -feature.Components.Ambush = - { - --PropertySheetHeader = r2.getDisplayButtonHeader("r2.events:openEditor()", "uiR2EdEditEventsButton"), - BaseClass="LogicEntity", - Name="Ambush", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - Version=classAmbushVersion , - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "ambushDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - Parameters = {}, - ApplicableActions = {"activate", "deactivate", "trigger"}, - Events = {"activation", "deactivation", "trigger"}, - Conditions = {"is active", "is inactive"}, - TextContexts = {}, - TextParameters = {}, - LiveParameters = {}, - ----------------------------------------------------------------------------------------------- - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="MobNumber", Type="Number", Category="uiR2EDRollout_Mobs", WidgetStyle="EnumDropDown", Enum={"1", "2", "3", "4", "5"}, - }, - {Name="Mob1Id", Type="RefId", Category="uiR2EDRollout_Mobs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", - Visible= function(this) return this:displayRefId(1) end}, - {Name="Mob2Id", Type="RefId", Category="uiR2EDRollout_Mobs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", - Visible= function(this) return this:displayRefId(2) end}, - {Name="Mob3Id", Type="RefId", Category="uiR2EDRollout_Mobs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", - Visible= function(this) return this:displayRefId(3) end}, - {Name="Mob4Id", Type="RefId", Category="uiR2EDRollout_Mobs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", - Visible= function(this) return this:displayRefId(4) end}, - {Name="Mob5Id", Type="RefId", Category="uiR2EDRollout_Mobs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", - Visible= function(this) return this:displayRefId(5) end}, - {Name="TriggerOn", Type="Number", WidgetStyle="EnumDropDown", - Enum={"Leaves the zone", "Enters the zone"}, - }, - {Name="Components", Type="Table"}, - - }, - ----------------------------------------------------------------------------------------------- - -- from base class - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - getSelectBarSons = function(this) - return Components - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - - translate = function(this, context) - r2.Translator.translateAiGroup(this, context) - r2.Translator.translateFeatureActivation(this, context) - end, - - updateVersion = function(this, scenarioValue, currentValue ) - - end, - - - } - -local component = feature.Components.Ambush - -function component:displayRefId(index) - local nbMobs = self.MobNumber + 1 - if index <= nbMobs then - return true - end - return false -end ------------------------------------------------------------------------------------------------------------------- -local ambushDisplayerTable = clone(r2:propertySheetDisplayer()) - --- --- If the message is received by a client that didn't request the modification, we must make sure this client --- doesn't modify the data because it has already been performed by the initial client. --- -local function checkPickedEntity(this, instanceId, attributeName) - if instanceId == "" then - return false - end - local tmpInstance = r2:getInstanceFromId(instanceId) - assert(tmpInstance) - local i = 1 - while i < 6 do - local attrName = "Mob" ..i.. "Id" - if attrName ~= attributeName and this[attrName] == tmpInstance.InstanceId then - return false - end - i = i + 1 - end - return true -end - - - -function ambushDisplayerTable:onAttrModified(instance, attributeName) - - if attributeName == "MobNumber" then - local propertySheet = r2:getPropertySheet(instance) - local nbMobs = instance.MobNumber + 1 - local i = 1 - while i <= 5 do - if i > nbMobs then - local name = "Mob"..tostring(i).."Id" - local refId = propertySheet:find(name) - local refIdName = refId:find("name") - refIdName.hardtext = "NONE" - r2.requestSetNode(instance.InstanceId, name, "") - end - i = i + 1 - end - propertySheet.Env.updatePropVisibility() - return - end - if string.find(attributeName, "Id") == nil or attributeName == "InstanceId" then return end - - local propertySheet = r2:getPropertySheet(instance) - local refId = propertySheet:find(attributeName) - if refId == nil then return end - local refIdName = refId:find("name") - - local instanceId = instance[attributeName] - if instanceId == "" then - refIdName.hardtext = "NONE" - return - end - - local inserted = checkPickedEntity(instance, instanceId, attributeName) - if inserted == true then - local tmpInstance = r2:getInstanceFromId(instanceId) - refIdName.hardtext = tmpInstance.Name - else - r2.requestSetNode(instance.InstanceId, attributeName, "") - end - instance.User.onHrcMove = false -end - -function ambushDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true - -end - - -local function reattributeIdOnHrcMove(ambush, group, targetAttr) - local propertySheet = r2:getPropertySheet(ambush) - local refId = propertySheet:find(targetAttr) - local refIdName = refId:find("name") - - r2.requestSetNode(ambush.InstanceId, targetAttr, group.InstanceId) - refIdName.hardtext = group.Name - ambush.User.onHrcMove = true - -end - - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - local group = tmpInstance.ParentInstance - if group:isKindOf("NpcGrpFeature") then - reattributeIdOnHrcMove(self, group, targetAttr) - end - tmpInstance.User.SelfModified = false - end - -end - - -function r2:ambushDisplayer() - return ambushDisplayerTable -- returned shared displayer to avoid wasting memory -end --------------------------------------------------------------------------------------------------------------------- - - - -component.getLogicAction = function(entity, context, action) - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if (action.Action.Type == "trigger") then - local i = 1 - local spawnActions = {} - while i <= 5 do - local attrName = "Mob"..i.."Id" - if component[attrName] ~= "" then - local rtMobGrp = r2.Translator.getRtGroup(context, component[attrName]) - local actionSpawn = r2.Translator.createAction("spawn", rtMobGrp.Id) - table.insert(spawnActions, actionSpawn) - end - i = i + 1 - end - - if table.getn(spawnActions) ~= 0 then - local actionTrigger = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 6) - table.insert(spawnActions, actionTrigger) - local retAction = r2.Translator.createAction("condition_if", r2:getNamespace()..rtNpcGrp.Id..".Active == 1", - r2.Translator.createAction("multi_actions", spawnActions) - ) - return retAction, retAction - end - return nil, nil - end - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationCondition(condition, rtNpcGrp) -end - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if tostring(event.Event.Type) == "trigger" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 6) - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.createGhostComponents= function(this, act) - - local comp = this - local nbMob = 0 - - for id = 1, 5 do - local propertyName = "Mob"..id.."Id" - if comp[propertyName] ~= nil and comp[propertyName] ~= "" then - local mob = r2:getInstanceFromId(comp[propertyName]) - if mob then - nbMob = nbMob + 1 - if mob:isKindOf("NpcGrpFeature") then - local instanceId = mob.Components[0].InstanceId - r2.requestSetGhostNode(instanceId, "AutoSpawn", 0) - else - r2.requestSetGhostNode(mob.InstanceId, "AutoSpawn", 0) - end - end - end - end - - if nbMob == 0 then - return - end - local zoneTrigger = r2:getInstanceFromId(comp._ZoneId) - assert(zoneTrigger) - - do - local type = "On Player Left" - if comp.TriggerOn == 1 then - type = "On Player Arrived" - end - - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = type - eventHandler.Event.Value = "" - eventHandler.Name = type - - local action = r2.newComponent("ActionStep") - - action.Entity = r2.RefId(comp.InstanceId) - action.Action.Type = "trigger" - action.Action.Value = "" - - table.insert(eventHandler.Actions, action) - - local behaviorId = zoneTrigger.Behavior.InstanceId - assert(behaviorId) - r2.requestInsertGhostNode(behaviorId, "Actions", -1, "", eventHandler) - - end - - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = "activation" - eventHandler.Event.Value = "" - eventHandler.Name = "activation" - - local action = r2.newComponent("ActionStep") - - action.Entity = r2.RefId(zoneTrigger.InstanceId) - action.Action.Type = "activate" - action.Action.Value = "" - - table.insert(eventHandler.Actions, action) - - local behaviorId = this.Behavior.InstanceId - assert(behaviorId) - r2.requestInsertGhostNode(behaviorId, "Actions", -1, "", eventHandler) - end - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = "deactivation" - eventHandler.Event.Value = "" - eventHandler.Name = "deactivation" - - local action = r2.newComponent("ActionStep") - - action.Entity = r2.RefId(zoneTrigger.InstanceId) - action.Action.Type = "deactivate" - action.Action.Value = "" - - table.insert(eventHandler.Actions, action) - - local behaviorId = this.Behavior.InstanceId - assert(behaviorId) - r2.requestInsertGhostNode(behaviorId, "Actions", -1, "", eventHandler) - end - - - -end - - -component.createComponent = function(x, y) - - local comp = r2.newComponent("Ambush") - assert(comp) - assert(comp.Position) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.user_event") - comp.Name = r2:genInstanceName(i18n.get("uiR2EdAmbush")):toUtf8() - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - local zoneTrigger = r2.Features["ZoneTrigger"].Components.ZoneTrigger.createComponent(x + 3, y + 3) - zoneTrigger.Name = comp.Name.." "..i18n.get("uiR2EDZoneTrigger"):toUtf8()--r2:genInstanceName(i18n.get("uiR2EdZoneTrigger")):toUtf8() - zoneTrigger.InheritPos = 0 - zoneTrigger.Deletable = false - table.insert(comp.Components, zoneTrigger) - comp._ZoneId = zoneTrigger.InstanceId - - return comp -end - -component.create = function() - if not r2:checkAiQuota() then return end - - local function posOk(x, y, z) - debugInfo("Validate creation of an Ambush.") - if r2.mustDisplayInfo("Ambush") == 1 then - r2.displayFeatureHelp("Ambush") - end - r2.requestNewAction(i18n.get("uiR2EDNewAmbushFeatureAction")) - local component = feature.Components.Ambush.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function posCancel() end - - local creature = r2.Translator.getDebugCreature("object_component_user_event.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureAmbush") -end - ------------------------------------------ ---- register the curent Feature to menu - -function component:getLogicTranslations() - -- register trad - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - ["trigger"] = { menu=i18n.get( "uiR2AA0Trigger" ):toUtf8(), - text=i18n.get( "uiR2AA1Trigger" ):toUtf8()}, - }, - ["Events"] = { - ["trigger"] = { menu=i18n.get( "uiR2Event0Trigger" ):toUtf8(), - text=i18n.get( "uiR2Event1Trigger" ):toUtf8()}, - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()} - } - } - - return logicTranslations -end - -r2.Features["Ambush"] = feature - - diff --git a/code/ryzom/common/data_common/r2/r2_features_bandits_camp.lua b/code/ryzom/common/data_common/r2/r2_features_bandits_camp.lua deleted file mode 100644 index 87058269d..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_bandits_camp.lua +++ /dev/null @@ -1,900 +0,0 @@ - -r2.Features.BanditCampFeature = {} - -local feature = r2.Features.BanditCampFeature - -feature.Name = "BanditCampFeature" - -feature.BanditCount = 0 - -feature.Description = "A bandits camp feature" - -feature.Components = {} - -local BanditZoneRadius = 5 -local BanditZoneNumCorners = 6 - -local BanditCampVersion = 2 -feature.Components.BanditCamp = - { - BaseClass = "LogicEntity", - Name = "BanditCamp", - InEventUI = true, - Menu = "ui:interface:r2ed_feature_menu", - Version = BanditCampVersion, - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - Parameters = { - }, - ApplicableActions = { - "activate", - "deactivate", "Wander", "Sit Down", - "Kill" - }, - Events = { - "activation", - "deactivation", - "member death", "group death", - "head to wander zone", "arrive at wander zone", "head to camp", - "arrive at camp" - }, - Conditions = { - "is active", "is inactive",--"is dead", - "is wandering", "is sitting", - "is heading to wander zone", "is heading to camp" - }, - TextContexts = { - }, - TextParameters = { - "max bandits number", "still alive bandits number" - }, - LiveParameters = { - "is active", "alive bandits number", - "max bandits number", state = {"sitting", "heading to wander", "wandering or heading home"} - }, - ----------------------------------------------------------------------------------------------- - --Category = "uiR2EDRollout_BanditsCamp", - Prop = - { - {Name = "InstanceId", Type = "String", WidgetStyle = "StaticText", Visible = false}, - {Name = "Components", Type = "Table"}, - {Name = "Name", Type="String", MaxNumChar="32"}, - {Name = "BanditsCount", Type = "String", WidgetStyle = "StaticText"}, - {Name = "Race", Type = "String", WidgetStyle = "StaticText"}, - {Name = "BanditsLevel", Type = "String", WidgetStyle = "StaticText"}, - --{Name = "Cycle", Type = "Number", Min = "10", Max = "999999", DefaultValue = "30"}, - {Name = "SitDuration", Type = "Number", Min = "10", Max = "999999", DefaultValue = "20"}, - {Name = "WanderDuration", Type = "Number", Min = "10", Max = "999999", DefaultValue = "20"}, - --{Name = "Behavior", Type = "Table"}, - {Name = "Cost", Type = "Number", Visible = false }, - {Name = "Ghosts", Type = "Table", Visible = false }, - {Name = "Active", Type = "Number", WidgetStyle="Boolean", DefaultValue="1" }, - {Name = "NoRespawn", Type ="Number", WidgetStyle = "Boolean", DefaultValue="0"}, - - }, - ----------------------------------------------------------------------------------------------- - -- from base class - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - getSelectBarSons = function(this) - return Components - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - translate = function(this, context) - r2.Translator.translateAiGroup(this, context) - r2.Translator.translateFeatureActivation(this, context) - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - - updateVersion = function(this, scenarioValue, currentValue ) - local patchValue = scenarioValue - if patchValue < 1 then - r2.requestEraseNode(this.InstanceId, "Cost", -1) - patchValue = 1 - end - if patchValue < 2 then - local invalidEvents = {} - invalidEvents["desactivation"] = "deactivation" - r2.updateLogicEvents(this, invalidEvents) - r2.requestSetNode(this.InstanceId, "BanditsLevel", "22") - patchValue = 2 - end - - if patchValue == currentValue then return true end - return false - end, - - } -local component = feature.Components.BanditCamp - - -function component.onPostCreate(this) - - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - - this:setLocalCost(_BanditCount) - local comp = this - if comp._Seed then math.randomseed(comp._Seed) end - do - local x = comp.Position.x - local y = comp.Position.y - local n = comp._BanditsCount - local pas = (2 * math.pi)/n - local r = (n/(2*math.pi))+2 - for i = 1, n do - local npc = r2:randomNPC( component.getBanditPaletteId(comp), component.Races[comp._Race + 1]) - npc.Position.x = (r-1) * math.cos((i-1)*pas) -- make position relative to the feature positio - npc.Position.y = (r-1) * math.sin((i-1)*pas) - npc.Position.z = 0 - npc.Angle = (i-1)*pas + math.pi - - r2.requestInsertGhostNode(this.InstanceId, "Ghosts", -1, "", npc) - local comp = r2:getInstanceFromId(npc.InstanceId) - comp.Selectable = false - end - end -end - - -function component.onPostHrcMove(this) - - for i=0, this.Ghosts.Size-1 do - local entity = this.Ghosts[i] - entity.DisplayerVisual:updateName() - entity:updatePermanentStatutIcon() - end - r2.events:updateElementsUI() -end - -function component:getLogicTranslations() - - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Spawn" ):toUtf8(), - text=i18n.get( "uiR2AA1Spawn" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Despawn" ):toUtf8(), - text=i18n.get( "uiR2AA1Despawn" ):toUtf8()}, - ["Wander"] = { menu=i18n.get( "uiR2AA0BanditWander" ):toUtf8(), - text=i18n.get( "uiR2AA1BanditWander" ):toUtf8()}, - ["Sit Down"] = { menu=i18n.get( "uiR2AA0BanditSitDown" ):toUtf8(), - text=i18n.get( "uiR2AA1BanditSitDown" ):toUtf8()}, - ["Kill"] = { menu=i18n.get( "uiR2AA0BanditKill" ):toUtf8(), - text=i18n.get( "uiR2AA1BanditKill" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Spawn" ):toUtf8(), - text=i18n.get( "uiR2Event1Spawn" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Despawn" ):toUtf8(), - text=i18n.get( "uiR2Event1Despawn" ):toUtf8()}, - ["member death"] = { menu=i18n.get( "uiR2Event0MemberDeath" ):toUtf8(), - text=i18n.get( "uiR2Event1MemberDeath" ):toUtf8()}, - ["group death"] = { menu=i18n.get( "uiR2Event0GroupDeath" ):toUtf8(), - text=i18n.get( "uiR2Event1GroupDeath" ):toUtf8()}, - ["head to wander zone"] = { menu=i18n.get( "uiR2Event0BanditHeadWander" ):toUtf8(), - text=i18n.get( "uiR2Event1BanditHeadWander" ):toUtf8()}, - ["arrive at wander zone"] = { menu=i18n.get( "uiR2Event0BanditArriveWander" ):toUtf8(), - text=i18n.get( "uiR2Event1BanditArriveWander" ):toUtf8()}, - ["head to camp"] = { menu=i18n.get( "uiR2Event0BanditHeadCamp" ):toUtf8(), - text=i18n.get( "uiR2Event1BanditHeadCamp" ):toUtf8()}, - ["arrive at camp"] = { menu=i18n.get( "uiR2Event0BanditArriveCamp" ):toUtf8(), - text=i18n.get( "uiR2Event1BanditArriveCamp" ):toUtf8()}, - - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Spawned" ):toUtf8(), - text=i18n.get( "uiR2Test1Spawned" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Despawned" ):toUtf8(), - text=i18n.get( "uiR2Test1Despawned" ):toUtf8()}, - ["is dead"] = { menu=i18n.get( "uiR2Test0BanditDead" ):toUtf8(), - text=i18n.get( "uiR2Test1BanditDead" ):toUtf8()}, - ["is wandering"] = { menu=i18n.get( "uiR2Test0BanditPatrolZone" ):toUtf8(), - text=i18n.get( "uiR2Test1BanditPatrolZone" ):toUtf8()}, - ["is sitting"] = { menu=i18n.get( "uiR2Test0BanditAtCamp" ):toUtf8(), - text=i18n.get( "uiR2Test1BanditAtCamp" ):toUtf8()}, - ["is heading to wander zone"]= {menu=i18n.get( "uiR2Test0BanditHeadPatrolZone" ):toUtf8(), - text=i18n.get( "uiR2Test1BanditHeadPatrolZone" ):toUtf8()}, - ["is heading to camp"] = { menu=i18n.get( "uiR2Test0BanditHeadCamp" ):toUtf8(), - text=i18n.get( "uiR2Test1BanditHeadCamp" ):toUtf8()}, - } - } - return logicTranslations -end - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local banditEntity = r2:getInstanceFromId(component.User._BanditGroup) - BOMB_IF(banditEntity, "In feature '".. component.Name .. "' associated bandit camp not found.") - local banditRtNpcGrp = r2.Translator.getRtGroup( context, banditEntity.InstanceId) - BOMB_IF(banditEntity, "In feature '" .. component.Name .. "' associated bandit camp rtGroup not found.") - - if action.Action.Type == "deactivate" then - local action1 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Active", 0) - local action2 = r2.Translator.getNpcLogicActionDeactivate(banditEntity, context, action, banditRtNpcGrp) - local action3 = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 5) - local multiaction = r2.Translator.createAction("multi_actions", {action1, action2, action3}) - return multiaction, multiaction - elseif action.Action.Type == "activate" then - local action1 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Active", 1) - local action2 = r2.Translator.getNpcLogicActionActivate(banditEntity, context, action, banditRtNpcGrp) - local action3 = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 4) - local multiaction = r2.Translator.createAction("multi_actions", {action1, action2, action3}) - return multiaction, multiaction - elseif action.Action.Type == "Kill" then - return r2.Translator.getNpcLogicActionKill(banditEntity, context, action, banditRtNpcGrp) - elseif action.Action.Type == "Sit Down" then - return r2.Translator.getGenericLogicActionBeginActivitySequence(entity.User._SequenceHeadToFire, banditRtNpcGrp) - elseif action.Action.Type == "Wander" then - return r2.Translator.getGenericLogicActionBeginActivitySequence(entity.User._SequenceHeadToWander, banditRtNpcGrp) - end - - local firstAction, lastAction = nil,nil - - return firstAction, lastAction -end - - - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local banditEntity = r2:getInstanceFromId(component.User._BanditGroup) - BOMB_IF(banditEntity, "In feature '".. component.Name .. "' associated bandit camp not found.") - local banditRtNpcGrp = r2.Translator.getRtGroup( context, banditEntity.InstanceId) - BOMB_IF(banditEntity, "In feature '" .. component.Name .. "' associated bandit camp rtGroup not found.") - - local conditionType = condition.Condition.Type - if conditionType == "is wandering" then - return r2.Translator.getGenericLogicConditionIsInActivitySequence(banditEntity, component.User._SequenceWander, banditRtNpcGrp) - elseif conditionType == "is sitting" then - return r2.Translator.getGenericLogicConditionIsInActivitySequence(banditEntity, component.User._SequenceStayNearFire, banditRtNpcGrp) - elseif conditionType == "is heading to wander zone" then - return r2.Translator.getGenericLogicConditionIsInActivitySequence(banditEntity, component.User._SequenceHeadToWander, banditRtNpcGrp) - elseif conditionType == "is heading to camp" then - return r2.Translator.getGenericLogicConditionIsInActivitySequence(banditEntity, component.User._SequenceHeadToFire, banditRtNpcGrp) - end - return r2.Translator.getFeatureActivationCondition(condition, rtNpcGrp) - -end - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local banditEntity = r2:getInstanceFromId(component.User._BanditGroup) - BOMB_IF(banditEntity, "In feature '".. component.Name .. "' associated bandit camp not found.") - local banditRtNpcGrp = r2.Translator.getRtGroup( context, banditEntity.InstanceId) - BOMB_IF(banditEntity, "In feature '" .. component.Name .. "' associated bandit camp rtGroup not found.") - - local eventType = event.Event.Type - if eventType == "activation" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 4) - elseif eventType == "deactivation" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 5) - elseif eventType == "member death" or eventType == "group death" then - return r2.Translator.getNpcLogicEvent(banditEntity, context, event) - elseif eventType == "head to wander zone" then - return r2.Translator.getNpcLogicEventBeginOfActivityStepImpl(this.User._StepHeadToWander, banditRtNpcGrp) - elseif eventType == "arrive at wander zone" then - return r2.Translator.getNpcLogicEventEndOfActivityStepImpl(this.User._StepHeadToWander, banditRtNpcGrp) - elseif eventType == "head to camp" then - return r2.Translator.getNpcLogicEventBeginOfActivityStepImpl(this.User._StepHeadToFire, banditRtNpcGrp) - elseif eventType == "arrive at camp" then - return r2.Translator.getNpcLogicEventEndOfActivityStepImpl(this.User._StepHeadToFire, banditRtNpcGrp) - end - - local eventHandler, firsCondition, lastCondition = nil, nil, nil - return eventHandler, firsCondition, lastCondition -end - -component.Races = { [1] = "Fyros", [2] = "Matis", [3] = "Tryker", [4] = "Zorai"} - -component.RacesId = { [1] = "f", [2] = "m", [3] = "t", [4] = "z"} - -component.LevelsId = { [1] = "20", [2] = "70", [3] = "120", [4] = "170", [5] = "220"} - -component.RolesId = { - [1] = "melee_dd", [2] = "melee_tank", [3] = "light_melee", [4] = "mage_damage_dealer", - [5] = "mage_aoe", [6] = "mage_atysian_curser", [7] = "mage_celestial_curser" -} - ---component.createComponent = function(x, y, banditsCount, race, banditsLevel, cycle, ZoneSize) -component.createComponent = function(x, y, banditsCount, race, banditsLevel, ZoneSize) - - r2.requestNewAction(i18n.get("uiR2EDCreateBanditCampAction")) - local comp = r2.newComponent("BanditCamp") - assert(comp) - - -- base is the camp fire, to display the bandit camp as a camp fire - comp.Base = "palette.entities.botobjects.campfire" - - --feature.BanditCount = feature.BanditCount + 1 - --comp.Name = "BanditCampFeature[".. feature.BanditCount .."]" - comp.Name = r2:genInstanceName(i18n.get("uiR2EDNameBanditCampFeature")):toUtf8() - - local fire = comp.Fire - - --do - -- fire.Base = "palette.entities.botobjects.campfire" - -- fire.Name = "Camp Fire" - -- local tmpPosition = fire.Position - -- tmpPosition.x = x - -- tmpPosition.y = y - -- tmpPosition.z = r2:snapZToGround(x, y) - --end - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - comp._BanditsCount = banditsCount - comp._Race = race - comp._BanditsLevel = banditsLevel - comp.BanditsCount = tostring(banditsCount) - comp.Race = component.Races[race+1] - comp.BanditsLevel = component.LevelsId[banditsLevel + 1] - --comp.Cycle = cycle - comp.WanderDuration = 20 - comp.SitDuration = 20 - comp.ZoneSize = tostring(ZoneSize) - - local zone = r2.newComponent("Region") - r2.Utils.createNonDeleteableRegion(zone, 0, 0, BanditZoneRadius, BanditZoneNumCorners) -- the region doesn't inherit the feature position, so must give its pos - zone.Deletable = 0 - zone.Position.x = comp.Position.x - zone.Position.y = comp.Position.y - zone.Position.z = comp.Position.z - zone.InheritPos = 0 -- don't inherit position of parents - zone.Name = r2:genInstanceName(i18n.get("uiR2EDNameWanderRegion")):toUtf8() - comp._Zone = zone.InstanceId - table.insert(comp.Components, zone) - comp._Seed = os.time() - --- r2.registerText("Pas fachי que cette journיe se termine !") --- r2.registerText("On rentre a la maison!") --- r2.registerText("Asseyez vous mes frטres!") --- r2.registerText("Allons detrousser les honnetes gens!") --- r2.registerText("Allez, au boulot!") --- r2.registerText("A l'attaque!!") - - return comp -end --- Global function are bad -function updateBanditCampEnum() - local currentForm = r2.CurrentForm - if (currentForm == nil) then - return - end - - local formRace = currentForm:find("Race") - if not formRace then - return - end - local formLevel = currentForm:find("BanditsLevel") - if not formLevel then - return - end - local previousLevel = formLevel.selection - formLevel:resetTexts() - local k, v = next(component.LevelsId, nil) - while k do - local race = component.RacesId[formRace.selection + 1] - local level = v - local elementName = "palette.entities.npcs.bandits."..race.."_melee_dd_"..tostring(level) - local ok = false - if r2.isInPalette(elementName) then - - local paletteElt = r2.getPaletteElement(elementName) - if paletteElt and paletteElt.RingAccess and r2.RingAccess.testAccess(paletteElt.RingAccess) then - formLevel:addText(ucstring(tostring(level))) - ok = true - -- local levelEnum = currentForm:find(creature.."Level") - - end - end - if k == previousLevel and not ok then - formLevel.selection = 0 - end - k, v = next(component.LevelsId, k) - end - - -end - - local function initValue() - - local toRet = {} - - local k, v = next(component.LevelsId, nil) - while k do - local race = component.RacesId[0+ 1] - local level = v - local elementName = "palette.entities.npcs.bandits."..race.."_melee_dd_"..tostring(level) - - if r2.isInPalette(elementName) then - local paletteElt = r2.getPaletteElement(elementName) - if paletteElt and paletteElt.RingAccess and r2.RingAccess.testAccess(paletteElt.RingAccess) then - table.insert(toRet, level) - - end - end - k, v = next(component.LevelsId, k) - end - return toRet - end - - -function feature.registerForms() - r2.Forms.BanditCamp_Form = - { - Caption = "uiR2EDBanditCamp", - Prop = - { - -- following field are tmp for property sheet building testing - {Name = "BanditsCount", Type = "Number", Category = "uiR2EDRollout_BanditsCamp", Min = "1", Max = "12", Default = "6"}, - - {Name = "Race", Type = "Number", WidgetStyle = "EnumDropDown", Category = "uiR2EDRollout_BanditsCamp", - Enum = component.Races, - onChange = updateBanditCampEnum - }, - - {Name = "BanditsLevel", Type = "Number", WidgetStyle = "EnumDropDown", Category = "uiR2EDRollout_BanditsCamp", - Enum = initValue(), - onChange = updateBanditCampEnum - }, - - --{Name = "Cycle", Type = "Number", Category = "uiR2EDRollout_BanditsCamp", Min = "0", Max = "999999", Default = "30"}, - } - } -end - - - - - - - - --- read values from a BanditsComp and get Sheet Id -component.getBanditPaletteId = function(comp) --- local tmpId = "palette.entities.npcs.cuthroats.cuthroat_b_melee_a_z_f" --- return tmpId - local id = "palette.entities.npcs.bandits." .. - component.RacesId[comp._Race + 1] .."_" .. - component.RolesId[math.random(0,5) + 1] .."_" .. - component.LevelsId[comp._BanditsLevel + 1] - - return id -end - -component.init = function() - math.randomseed( os.time() ) -- To remove -end - -component.createGhostComponents = function(comp, act) - local bandits - local npcGroup = r2.newComponent("NpcGrpFeature") - assert(npcGroup) - - - local leader = nil - local sequences = {} - local stepSitDown = nil - local stepStandUp = nil - - - do - - local fire = r2.newComponent("Npc") - fire.Name = "Fire" - fire.Base = "palette.entities.botobjects.campfire" - fire.Position.x = comp.Position.x - fire.Position.y = comp.Position.y - fire.Position.z = 0 - fire.Angle = 0 - r2.requestInsertGhostNode(act.Features[0].InstanceId, "Components", -1, "", fire) - end - - if comp._Seed then math.randomseed(comp._Seed) end - do - local x = comp.Position.x - local y = comp.Position.y - local n = comp._BanditsCount - - local pas = (2 * math.pi)/n - local r = (n/(2*math.pi))+2 - for i = 1, n do - local npc = r2:randomNPC( component.getBanditPaletteId(comp), component.Races[comp._Race + 1]) - npc.Position.x = (r-1) * math.cos((i-1)*pas) -- make position relative to the feature positio - npc.Position.y = (r-1) * math.sin((i-1)*pas) - npc.Position.z = 0 - npc.Angle = (i-1)*pas + math.pi - - if comp.Active == 1 then npc.AutoSpawn = 1 else npc.AutoSpawn = 0 end - if i == 1 then leader = npc end - - if comp.NoRespawn then --- debugInfo("setting no respawn for a bandit -- value : " ..comp.NoRespawn) - npc.NoRespawn = comp.NoRespawn - end - - table.insert(npcGroup.Components, npc) - end - npcGroup.Name = r2:genInstanceName(i18n.get("uiR2EDNameBanditCamp")):toUtf8() - bandits = npcGroup - bandits.Position.x = x - bandits.Position.y = y - bandits.InheritPos = 0 - end - - -- Sequence1 standUp -> Wander - do - local sequence = r2.newComponent("ActivitySequence") - - - table.insert(leader.Behavior.Activities, sequence) - table.insert(bandits.ActivitiesId, sequence.InstanceId) - sequences[1] = sequence - - sequence.Name = "Head to Wander" - sequence.Repeating = 0 - - -- Initial wait - do - - local step = r2.newComponent("ActivityStep") - table.insert(sequence.Components, step) - step.Type = "None" - step.Name = "Stand Up" - - step.Activity = "Stand Up" - step.ActivityZoneId = r2.RefId("") - - step.TimeLimit = "Few Sec" - step.TimeLimitValue = "5" - end - - - -- head to Wander - do - local step = r2.newComponent("ActivityStep") - comp.User._StepHeadToWander = step.InstanceId - table.insert(sequence.Components, step) - step.Type = "None" - - - step.Activity = "Go To Zone" - step.ActivityZoneId = r2.RefId(comp._Zone) - - step.TimeLimit = "No Limit" - -- step.TimeLimitValue = "" - -- step.Chat = r2.RefId("") - end - - -- Go to zone until arrived - end - - -- Sequence2 Wander - do - local sequence = r2.newComponent("ActivitySequence") - - - table.insert(leader.Behavior.Activities, sequence) - table.insert(bandits.ActivitiesId, sequence.InstanceId) - sequences[2] = sequence - - sequence.Name = "Wander" - sequence.Repeating = 0 - -- Stand up - do - local step = r2.newComponent("ActivityStep") - table.insert(sequence.Components, step) - step.Type = "None" - step.Name = "Wander" - - step.Activity = "Wander" - step.ActivityZoneId = r2.RefId(comp._Zone) - - --if comp.Cycle ~= 0 then - if comp.WanderDuration ~= 0 then - step.TimeLimit = "Few Sec" - step.TimeLimitValue = tostring( math.ceil(comp.WanderDuration) ) - else - step.TimeLimit = "No Limit" - end - -- step.TimeLimitValue = "" - -- step.Chat = r2.RefId("") - - end - -- Go to zone until arrived - end - - - -- Sequence3 wander - >sit - do - local sequence = r2.newComponent("ActivitySequence") - sequence.Name = "Head to Fire" - sequence.Repeating = 0 - table.insert(leader.Behavior.Activities, sequence) - table.insert(bandits.ActivitiesId, sequence.InstanceId) - - sequences[3] = sequence - - - - -- to fire - do - local step = r2.newComponent("ActivityStep") - comp.User._StepHeadToFire = step.InstanceId - table.insert(sequence.Components, step) - step.Type = "None" - step.Name = "head to fire" - - step.Activity = "Go To Start Point" - step.ActivityZoneId = r2.RefId("") - - step.TimeLimit = "No Limit" - stepSitDown = step - -- step.TimeLimitValue = "" - -- step.Chat = r2.RefId("") - end - - do - local step = r2.newComponent("ActivityStep") - table.insert(sequence.Components, step) - step.Type = "None" - step.Name = "Sit Down" - - step.Activity = "Sit Down" - step.ActivityZoneId = r2.RefId("") - - step.TimeLimit = "Few Sec" - step.TimeLimitValue = "5" - end - - end - -- Sequence3 wander - >sit - do - local sequence = r2.newComponent("ActivitySequence") - sequence.Name = "Head to Fire" - sequence.Repeating = 0 - table.insert(leader.Behavior.Activities, sequence) - table.insert(bandits.ActivitiesId, sequence.InstanceId) - - sequences[4] = sequence - -- stand up : go to start point - do - local step = r2.newComponent("ActivityStep") - - table.insert(sequence.Components, step) - step.Type = "None" - step.Name = "Initial Wait" - - step.Activity = "Stand On Start Point" - step.ActivityZoneId = r2.RefId("") - - --if comp.Cycle ~= 0 then - if comp.SitDuration ~= 0 then - step.TimeLimit = "Few Sec" - step.TimeLimitValue = tostring( math.ceil(comp.SitDuration) ) - else - step.TimeLimit = "No Limit" - end - -- step.Chat = r2.RefId("") - end - - - - end - - -- activitySequence1 -> activitySequence2 - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Name = "Heading to wander" - table.insert(leader.Behavior.Actions, eventHandler) - - local action = r2.newComponent("ActionStep") - table.insert(eventHandler.Actions, action) - action.Entity = r2.RefId(leader.InstanceId) - action.Action.Type = "begin activity sequence" - action.Action.Value = r2.RefId(sequences[2].InstanceId) - - - eventHandler.Event.Type = "end of activity sequence" - eventHandler.Event.Value = r2.RefId(sequences[1].InstanceId) - end - - -- activitySequence3 -> activitySequence4 - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Name = "Wander" - table.insert(leader.Behavior.Actions, eventHandler) - - local action = r2.newComponent("ActionStep") - table.insert(eventHandler.Actions, action) - action.Entity = r2.RefId(leader.InstanceId) - action.Action.Type = "begin activity sequence" - action.Action.Value = r2.RefId(sequences[4].InstanceId) - eventHandler.Event.Type = "end of activity sequence" - eventHandler.Event.Value = r2.RefId(sequences[3].InstanceId) - end - - --if comp.Cycle ~= 0 then - if comp.WanderDuration ~= 0 then - -- activitySequence2 -> activitySequence3 - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Name = "Heading to Fire" - table.insert(leader.Behavior.Actions, eventHandler) - - local action = r2.newComponent("ActionStep") - table.insert(eventHandler.Actions, action) - action.Entity = r2.RefId(leader.InstanceId) - action.Action.Type = "begin activity sequence" - action.Action.Value = r2.RefId(sequences[3].InstanceId) - - - eventHandler.Event.Type = "end of activity sequence" - eventHandler.Event.Value = r2.RefId(sequences[2].InstanceId) - end - end - - -- activitySequence4 -> activitySequence1 - if comp.SitDuration ~= 0 then - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Name = "Stay around fire" - table.insert(leader.Behavior.Actions, eventHandler) - - local action = r2.newComponent("ActionStep") - table.insert(eventHandler.Actions, action) - action.Entity = r2.RefId(leader.InstanceId) - action.Action.Type = "begin activity sequence" - action.Action.Value = r2.RefId(sequences[1].InstanceId) - eventHandler.Event.Type = "end of activity sequence" - eventHandler.Event.Value = r2.RefId(sequences[4].InstanceId) - end - end - - - r2.requestInsertGhostNode(act.InstanceId, "Features", -1, "", bandits) --- r2.requestInsertGhostNode(this.InstanceId, "Ghost", -1, "", ghostNpc) --- r2.requestInsertGhostNode(r2:getCurrentAct().InstanceId, "Features", -1, "", bandits) --- - local k, sequence = next(sequences, nil) - while k do - r2.requestInsertGhostNode(act.InstanceId, "ActivitiesIds", -1, "", sequence.InstanceId) - k, sequence = next(sequences, k) - end - - local k, bandit = next(npcGroup.Components, nil) - while k do - r2:getInstanceFromId(bandit.InstanceId).Selectable = true -- for debug - k, bandit = next(npcGroup.Components, k) - end - - comp.User._BanditGroup = npcGroup.InstanceId - comp.User._SequenceHeadToWander = sequences[1].InstanceId - comp.User._SequenceWander = sequences[2].InstanceId - comp.User._SequenceHeadToFire = sequences[3].InstanceId - comp.User._SequenceStayNearFire = sequences[4].InstanceId - -end - -component.create = function() - if not r2:checkAiQuota() then return end - - local function paramsOk(resultTable) - - local banditsCount = tonumber( resultTable["BanditsCount"] ) - if not r2:checkAiQuota(banditsCount) then return end - - local race = tonumber( resultTable["Race"] ) - local banditsLevel = tonumber( resultTable["BanditsLevel"] ) - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - --local cycle = tonumber( resultTable["Cycle"] ) - --local sitDuration = tonumber( resultTable["SitDuration"] ) - --local wanderDuration= tonumber( resultTable["WanderDuration"] ) - local ZoneSize = tonumber(resultTable["ZoneSize"]) - if banditsCount == nil or race == nil or banditsLevel == nil - then - debugInfo("Can't create Feature") - return - end - - --local component = feature.Components.BanditCamp.createComponent( x, y, banditsCount, race, banditsLevel, cycle,ZoneSize) - local component = feature.Components.BanditCamp.createComponent( x, y, banditsCount, race, banditsLevel, ZoneSize) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - --- feature.createContent(component) - - end - - local function paramsCancel() - debugInfo("Cancel form for bandit camp creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of bandit camp at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("BanditCamp") == 1 then - r2.displayFeatureHelp("BanditCamp") - end - r2:doForm("BanditCamp_Form", {X = x, Y = y}, paramsOk, paramsCancel) - updateBanditCampEnum() - end - local function posCancel() - debugInfo("Cancel choice of bandit camp position") - end - local poly = {} - local step = 2 * math.pi / BanditZoneNumCorners - for k = 0, BanditZoneNumCorners - 1 do - table.insert(poly, CVector2f(BanditZoneRadius * math.cos(k * step), BanditZoneRadius * math.sin(k * step))) - end - r2:choosePos("object_campfire.creature", posOk, posCancel, "createFeatureBanditCamp", - "curs_create.tga", - "curs_stop.tga", - { poly }, r2.PrimRender.ComponentRegionLook, r2.PrimRender.ComponentRegionInvalidLook) -end - - - - - -function feature.hasScenarioCost(this) - return true -end - -component.init() -r2.Features["BanditCampFeature"] = feature - - diff --git a/code/ryzom/common/data_common/r2/r2_features_boss_spawner.lua b/code/ryzom/common/data_common/r2/r2_features_boss_spawner.lua deleted file mode 100644 index 92538bdb9..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_boss_spawner.lua +++ /dev/null @@ -1,557 +0,0 @@ - -r2.Features.BossSpawnerFeature = {} - -local feature = r2.Features.BossSpawnerFeature - -feature.Name="BossSpawnerFeature" - -feature.Description="Spawns a boss after the death of a chosen number of kitin workers" - -feature.Components = {} - -feature.Components.BossSpawner = - { - BaseClass="LogicEntity", - Name="BossSpawner", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "bossSpawnerDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - Parameters = {}, - - ApplicableActions = { "activate", "deactivate"}, - - Events = { "activation", "deactivation", "trigger"}, - - Conditions = { "is active", "is inactive"}, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - ----------------------------------------------------------------------------------------------- - --Category="uiR2EDRollout_Guards" - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table", Visible= false}, - {Name= "Ghosts", Type = "Table", Visible = false }, - {Name= "Name", Type="String", MaxNumChar="32"}, - {Name= "Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="TriggerValue", Type="Number", Min="0", DefaultValue="0", Translation="uiR2EDProp_TriggerValue"}, - {Name="BossId", Type="RefId", PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", Translation="uiR2EDProp_BossId"}, - {Name="GuardNumber", Type="Number", Category="uiR2EDRollout_Guards", WidgetStyle="EnumDropDown", - Enum={"1", "2", "3", "4", "5"}, DefaultValue="5"}, - {Name="Guard1Id", Type="RefId", Category="uiR2EDRollout_Guards", PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", Translation="uiR2EDProp_Guard1Id", Visible= function(this) return this:displayRefId(1) end}, - {Name="Guard2Id", Type="RefId", Category="uiR2EDRollout_Guards", PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", Translation="uiR2EDProp_Guard2Id", Visible= function(this) return this:displayRefId(2) end}, - {Name="Guard3Id", Type="RefId", Category="uiR2EDRollout_Guards", PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", Translation="uiR2EDProp_Guard3Id", Visible= function(this) return this:displayRefId(3) end}, - {Name="Guard4Id", Type="RefId", Category="uiR2EDRollout_Guards", PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", Translation="uiR2EDProp_Guard4Id", Visible= function(this) return this:displayRefId(4) end}, - {Name="Guard5Id", Type="RefId", Category="uiR2EDRollout_Guards", PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", Translation="uiR2EDProp_Guard5Id", Visible= function(this) return this:displayRefId(5) end}, - - }, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - --r2.Translator.pretranslateDefaultFeature(this, context) - end, - - translate = function(this, context) - r2.Translator.translateAiGroup(this, context) - - r2.Translator.translateFeatureActivation(this, context) - --r2.Translator.translateDefaultFeature(this, context) - end - } - -------------------------------------------------------------------------------------------------------------------------- - - - - -local component = feature.Components.BossSpawner - -function component:getMaxTriggerValue() - return tostring(this.GuardNumber) -end - -function component:displayRefId(index) - local nbGuards = self.GuardNumber + 1 - if index <= nbGuards then - return true - end - return false -end - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local rtBossGrp = r2.Translator.getRtGroup(context, component.BossId) - - if (action.Action.Type == "spawnEntity") then - if rtBossGrp then - local actionTrigger = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 6) - local actionSpawn = r2.Translator.createAction("spawn", rtBossGrp.Id) - local retAction = r2.Translator.createAction("condition_if", r2:getNamespace()..rtNpcGrp.Id..".Active == 1", - r2.Translator.createAction("multi_actions", {actionTrigger, actionSpawn}) - ) - return retAction, retAction - end - return nil, nil - end - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationCondition(condition, rtNpcGrp) -end - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if tostring(event.Event.Type) == "trigger" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 6) - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) - -end - ------------------------------------------------------------------------------------------------------------------- -local bossSpawnerDisplayerTable = clone(r2:propertySheetDisplayer()) - --- --- If the message is received by a client that didn't request the modification, we must make sure this client --- doesn't modify the data because it has already been performed by the initial client. --- -local function checkPickedEntity(this, instanceId, attributeName) - if instanceId == "" then - return false - end - local tmpInstance = r2:getInstanceFromId(instanceId) - assert(tmpInstance) - local i = 1 - while i < 6 do - local attrName = "Guard" ..i.. "Id" - if attrName ~= attributeName and this[attrName] == tmpInstance.InstanceId then - return false - end - i = i + 1 - end - if attributeName ~= "BossId" and tmpInstance.InstanceId == this.BossId then - return false - end - return true -end - - -local oldOnAttrModified = bossSpawnerDisplayerTable.onAttrModified -function bossSpawnerDisplayerTable:onAttrModified(instance, attributeName) - -- call base version - oldOnAttrModified(self, instance, attributeName) - - if attributeName == "GuardNumber" then - local propertySheet = r2:getPropertySheet(instance) - local nbGuards = instance.GuardNumber + 1 - local i = 1 - while i <= 5 do - if i > nbGuards then - local name = "Guard"..tostring(i).."Id" - local refId = propertySheet:find(name) - local refIdName = refId:find("name") - refIdName.hardtext = "NONE" - r2.requestSetNode(instance.InstanceId, name, "") - end - i = i + 1 - end - if instance.TriggerValue >= nbGuards then - messageBox("Trigger value was exceeding the number of picked guards and was reset to 0") - displaySystemInfo(i18n.get("uiR2EdInvalidTriggerValue"), "BC") - r2.requestSetNode(instance.InstanceId, "TriggerValue", 0) - end - propertySheet.Env.updatePropVisibility() - return - end - - - --check if the trigger value doesn't exceed the number of picked guards (or groups) - --if it does, reset the value to 0 - if attributeName == "TriggerValue" then - local propertySheet = r2:getPropertySheet(instance) - local i = 1 - local nbPickedGuards = 0 - - while i <= 5 do - local guardId = "Guard"..tostring(i).."Id" - local refId = instance[guardId] - r2.print("refId = " ..tostring(refId)) - if refId ~= "" then - nbPickedGuards = nbPickedGuards + 1 - end - i = i + 1 - end - - if instance.TriggerValue ~= 0 and tonumber(instance.TriggerValue) >= nbPickedGuards then - r2.requestSetNode(instance.InstanceId, attributeName, 0) - displaySystemInfo(i18n.get("uiR2EdInvalidTriggerValue"), "BC") - messageBox("The trigger value shouldn't exceed the number of picked guards (or picked groups)") - end - - return - end - - if string.find(attributeName, "Id") == nil or attributeName == "InstanceId" then return end - - local propertySheet = r2:getPropertySheet(instance) - local refId = propertySheet:find(attributeName) - if refId == nil then return end - local refIdName = refId:find("name") - - local instanceId = instance[attributeName] - if instanceId == "" then - - local i = 1 - local nbPickedGuards = 0 - - --when clearing a refId, check if the trigger value is still valid - while i <= 5 do - local guardId = "Guard"..tostring(i).."Id" - local refId = instance[guardId] - - if refId ~= "" then - nbPickedGuards = nbPickedGuards + 1 - end - i = i + 1 - end - - if instance.TriggerValue ~= 0 and tonumber(instance.TriggerValue) >= nbPickedGuards then - r2.requestSetNode(instance.InstanceId, "TriggerValue", 0) - displaySystemInfo(i18n.get("uiR2EdInvalidTriggerValue"), "BC") - messageBox("The trigger value shouldn't exceed the number of picked guards (or picked groups)") - end - - - refIdName.hardtext = "NONE" - return - end - - local inserted = checkPickedEntity(instance, instanceId, attributeName) - if inserted == true then - local tmpInstance = r2:getInstanceFromId(instanceId) - refIdName.hardtext = tmpInstance.Name - else - r2.requestSetNode(instance.InstanceId, attributeName, "") - end - instance.User.onHrcMove = false -end - - -function bossSpawnerDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true - -end - - -local function reattributeIdOnHrcMove(bSpawner, group, targetAttr) - local propertySheet = r2:getPropertySheet(bSpawner) - local refId = propertySheet:find(targetAttr) - local refIdName = refId:find("name") - - r2.requestSetNode(bSpawner.InstanceId, targetAttr, group.InstanceId) - refIdName.hardtext = group.Name - bSpawner.User.onHrcMove = true - -end - - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - local group = tmpInstance.ParentInstance - if group:isKindOf("NpcGrpFeature") then - reattributeIdOnHrcMove(self, group, targetAttr) - end - tmpInstance.User.SelfModified = false - end - -end - - - - -function r2:bossSpawnerDisplayer() - return bossSpawnerDisplayerTable -- returned shared displayer to avoid wasting memory -end --------------------------------------------------------------------------------------------------------------------- - - -component.createGhostComponents= function(this, act) - - local comp = this - local boss = r2:getInstanceFromId(comp.BossId) - - if boss == nil then - debugInfo("BossSpawner: Can't spawn a nil boss. You have to pick one.") - --assert(boss) - return - end - - local counter = r2.newComponent("Counter") - assert(counter) - - counter.Base = "palette.entities.botobjects.milestone" - counter.Name = "Guards Counter" - counter.Position.x = comp.Position.x - counter.Position.y = comp.Position.y - counter.Position.z = 0 - - - - local nbGuard = 0 - local eventType = "" --depends on the instance type (groupe or npc) - local eventName = "" - - -- Add to each guard a 'OnDeath EventHandler' which decrements the counter - for id = 1, 5 do - local propertyName = "Guard"..tonumber(id).."Id" - if comp[propertyName] ~= nil and comp[propertyName] ~= "" then - local guardInstance = r2:getInstanceFromId(comp[propertyName]) - if guardInstance then - - if guardInstance:isKindOf("Npc") then - eventType = "death" - eventName = "On Death" - elseif guardInstance:isKindOf("NpcGrpFeature") then - eventType = "group death" - eventName = "On Group Death" - end - - local eventHandler = r2.newComponent("LogicEntityAction") - --eventHandler.Event.Type = "death" - eventHandler.Event.Type = eventType - eventHandler.Event.Value = "" - --eventHandler.Name = "On Death" - eventHandler.Event.Name = eventName - - local action = r2.newComponent("ActionStep") - table.insert(eventHandler.Actions, action) - action.Entity = r2.RefId(counter.InstanceId) - action.Action.Type = "Decrement" - action.Action.Value = "" - - if guardInstance:isKindOf("Npc") then - r2.requestInsertGhostNode(guardInstance.Behavior.InstanceId, "Actions", -1, "", eventHandler) - elseif guardInstance:isKindOf("NpcGrpFeature") then - r2.requestInsertGhostNode(guardInstance.Components[0].Behavior.InstanceId, "Actions", -1, "", eventHandler) - end - --r2.requestInsertGhostNode(guardInstance.Behavior.InstanceId, "Actions", -1, "", eventHandler) - - nbGuard = nbGuard + 1 - end - end - end - - if nbGuard == 0 then - r2.print("BossSpawner: No guard has been picked.") - return - end - - counter.Value = tonumber(nbGuard) - counter.TriggerValue = comp.TriggerValue - - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = "On Trigger" - eventHandler.Event.Value = "" - eventHandler.Name = "On Trigger" - - local action = r2.newComponent("ActionStep") - - action.Entity = r2.RefId(comp.InstanceId) --r2.RefId(boss.InstanceId) - action.Action.Type = "spawnEntity" - action.Action.Value = "" - - table.insert(eventHandler.Actions, action) - - table.insert(counter.Behavior.Actions, eventHandler) - - end - - r2.requestInsertGhostNode(comp.InstanceId, "Components", -1, "", counter) - --r2.requestInsertGhostNode(r2:getCurrentAct().InstanceId, "Features", -1, "", counter) - - if boss:isKindOf("NpcGrpFeature") then - local instanceId = boss.Components[0].InstanceId - --debugInfo("setting autospawn for: " ..instanceId) - r2.requestSetGhostNode(instanceId, "AutoSpawn", 0) - else - r2.requestSetGhostNode(boss.InstanceId, "AutoSpawn", 0) - end - -end - -component.createComponent = function(x, y) - - local comp = r2.newComponent("BossSpawner") - assert(comp) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.user_event") - comp.Name = r2:genInstanceName(i18n.get("uiR2EdBossSpawner")):toUtf8() - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - comp.TriggerValue = 0 - - comp.GuardNumber = 0 - - comp._Seed = os.time() - - comp.Guard1Id = r2.RefId("") - comp.Guard2Id = r2.RefId("") - comp.Guard3Id = r2.RefId("") - comp.Guard4Id = r2.RefId("") - comp.Guard5Id = r2.RefId("") - comp.BossId = r2.RefId("") - - return comp -end - - -component.create = function() - - if not r2:checkAiQuota() then return end - - local function paramsOk(resultTable) - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - --debugInfo("Show again: "..tostring(showAgain)) - if not x or not y - then - debugInfo("Can't create Component") - return - end - - if showAgain == 1 then - r2.setDisplayInfo("BossSpawnerForm", 0) - else r2.setDisplayInfo("BossSpawnerForm", 1) end - - local component = feature.Components.BossSpawner.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'BossSpawnerFeature' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'BossSpawnerFeature' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("BossSpawner") == 1 then - r2.displayFeatureHelp("BossSpawner") - end - r2.requestNewAction(i18n.get("uiR2EDNewBossSpawnerAction")) - local component = feature.Components.BossSpawner.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'BossSpawnerFeature' position") - end - local creature = r2.Translator.getDebugCreature("object_component_user_event.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureBossSpawner") - end - --- --- Registers the feature creation form used as a creation menu in the editor --- - - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdBossSpawner") - logicEntityMenu:addLine(ucstring(name), "lua", "", "BossSpawner") -end - - -function component:getLogicTranslations() - local logicTranslations = {} - r2.Translator.addActivationToTranslations(logicTranslations) - return logicTranslations -end - - -r2.Features["BossSpawnerFeature"] = feature - diff --git a/code/ryzom/common/data_common/r2/r2_features_counter.lua b/code/ryzom/common/data_common/r2/r2_features_counter.lua deleted file mode 100644 index 30a7153e0..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_counter.lua +++ /dev/null @@ -1,291 +0,0 @@ - --- In Translation file --- Category : uiR2EdCounter -- --- CreationFrom : uiR2EdCounterParameters - - -r2.Features.CounterFeature = {} - -local feature = r2.Features.CounterFeature - -feature.Name="Counter" - -feature.Description="A Counter" - - -function feature.registerForms() - r2.Forms.CounterFeatureForm = - { - Caption = "uiR2EdCounterParameters", - Prop = - { - -- following field are tmp for property sheet building testing - {Name="TriggerValue", Type="Number", Category="uiR2EDRollout_CounterFeature", Min="0", Default="0"}, - {Name="Value", Type="Number", Category="uiR2EDRollout_CounterFeature", Min="1", Default="1"} - } - } - -end - -feature.Components = {} - -feature.Components.Counter = - { - BaseClass="LogicEntity", - Name="Counter", - Menu="ui:interface:r2ed_feature_menu", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - Parameters = {}, - - ApplicableActions = { "Activate", "Deactivate", "Increment", "Decrement", "Trigger"}, - - Events = { "On Trigger", "On Activation", "On Deactivation"}, - - Conditions = { "is active"}, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText"}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="Components", Type="Table"}, - {Name="Value", Type="Number"}, - {Name="TriggerValue", Type="Number", Min="0", Default="0"} - }, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --feature.createFeatureLocally(this) - end, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - translate = function(this, context) - local initValue = this.Value - local trigValue = this.TriggerValue - - r2.Translator.translateAiGroup(this, context) - - local rtNpcGrp = r2.Translator.getRtGroup(context, this.InstanceId) - - local action1 = r2.Translator.createAction("counter_init", rtNpcGrp.Id, initValue, trigValue) - local action2 = r2.Translator.createAction("generic_event_trigger", rtNpcGrp.Id, 0) - local action = r2.Translator.createAction("multi_actions", {action1, action2}) - - r2.Translator.translateAiGroupInitialState(this, context, action) - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - } - -local component = feature.Components.Counter - - -function component.getLogicActionTrigger(entity, context, action, rtNpcGrp) - local retAction = r2.Translator.createAction("generic_event_trigger", rtNpcGrp.Id, 3) - assert(retAction) - return retAction, retAction -end - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if (action.Action.Type == "Activate") then - local action1 = r2.Translator.createAction("counter_enable", rtNpcGrp.Id, 0) - local action2 = r2.Translator.createAction("generic_event_trigger", rtNpcGrp.Id, 0) - local retAction = r2.Translator.createAction("multi_actions", {action1, action2}) - return retAction, retAction - elseif (action.Action.Type == "Deactivate") then - local action1 = r2.Translator.createAction("counter_disable", rtNpcGrp.Id, 0) - local action2 = r2.Translator.createAction("generic_event_trigger", rtNpcGrp.Id, 1) - local retAction = r2.Translator.createAction("multi_actions", {action1, action2}) - return retAction, retAction - elseif (action.Action.Type == "Increment") then - local action1 = r2.Translator.createAction("counter_inc", rtNpcGrp.Id, 0) - return action1, action1 - elseif (action.Action.Type == "Decrement") then - local action1 = r2.Translator.createAction("counter_dec", rtNpcGrp.Id, 0) - return action1, action1 - elseif (action.Action.Type == "Trigger") then - local retAction = r2.Translator.createAction("generic_event_trigger", rtNpcGrp.Id, 3) - assert(retAction) - return retAction, retAction - end - - local firstAction, lastAction = nil, nil - return firstAction, lastAction -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("counter_is_enable", rtNpcGrp.Id, 0); - return action1, action1 - else - assert(nil) - end - return nil,nil -end - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "On Trigger" then - return r2.Translator.getComponentGenericEvent(rtNpcGrp, 3) - elseif eventType == "On Activation" then - return r2.Translator.getComponentGenericEvent(rtNpcGrp, 0) - elseif eventType == "On Deactivation" then - return r2.Translator.getComponentGenericEvent(rtNpcGrp, 1) - end - - return eventHandler, firstCondition, lastCondition -end - - --- feature part - -component.createComponent = function(x, y, value, tvalue) - - local comp = r2.newComponent("Counter") - assert(comp) - - comp.Base = "palette.entities.botobjects.milestone" - comp.Name = r2:genInstanceName(i18n.get("uiR2EDRollout_CounterFeature")):toUtf8() - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - comp.TriggerValue = tvalue - comp.Value = value - - comp._Seed = os.time() - - return comp -end - -component.create = function() - r2.requestNewAction(i18n.get("uiR2EDCreateCounterFeatureAction")) - - - if not r2:checkAiQuota() then return end - - - local function paramsOk(resultTable) - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local tvalue = tonumber( resultTable["TriggerValue"] ) - local value = tonumber( resultTable["Value"] ) - - if not x or not y or not tvalue or not value - then - debugInfo("Can't create Component") - return - end - local component = feature.Components.CounterFeature.createComponent( x, y, value, tvalue) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - --component.TriggerValue = tvalue - end - - local function paramsCancel() - debugInfo("Cancel form for 'CounterFeature' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'CounterFeature' at pos (%d, %d, %d)", x, y, z)) - r2:doForm("CounterFeatureForm", {X=x, Y=y}, paramsOk, paramsCancel) - end - local function posCancel() - debugInfo("Cancel choice 'CounterFeature' position") - end - r2:choosePos("object_milestone.creature", posOk, posCancel, "createFeatureBanditCamp") -end - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EDRollout_CounterFeature") - logicEntityMenu:addLine(ucstring(name), "lua", "", "CounterFeature") -end - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["Activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["Desactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - ["Increment"] = { menu=i18n.get( "uiR2AA0CounterIncrement" ):toUtf8(), - text=i18n.get( "uiR2AA1CounterIncrement" ):toUtf8()}, - ["Decrement"] = { menu=i18n.get( "uiR2AA0CounterDecrement" ):toUtf8(), - text=i18n.get( "uiR2AA1CounterDecrement" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["desactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["trigger"] = { menu=i18n.get( "uiR2Event0Trigger" ):toUtf8(), - text=i18n.get( "uiR2Event1Trigger" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()} - } - } - return logicTranslations -end - -r2.Features["CounterFeature"] = feature - diff --git a/code/ryzom/common/data_common/r2/r2_features_default.lua b/code/ryzom/common/data_common/r2/r2_features_default.lua deleted file mode 100644 index 70d129380..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_default.lua +++ /dev/null @@ -1,2101 +0,0 @@ -local registerFeature = function () - local feature={} - - feature.Name="DefaultFeature" - - feature.Description="The default feature" - - feature.Components= - { - ActiveLogicEntity = { - Name="ActiveLogicEntity", - BaseClass="LogicEntity", - DisplayerVisual = "R2::CDisplayerVisualEntity", - DisplayerVisualParams = { InheritDisplayMode = true }, - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "activeLogicEntityPropertySheetDisplayer", - Menu="ui:interface:r2ed_entity_menu", - - Prop= - { - {Name="Behavior", Type="Behavior"}, - {Name="ActivitiesId",Type="Table" }, - }, - isNextSelectable = function(this) - return true - end, - --------------------------------------------------------------------------------------------------------- - -- get list of command for display in the mini toolbar - getAvailableMiniCommands = function(this, result) - -- OBSOLETE - --local result = this:delegate():getAvailableMiniCommands(this) - r2.Classes.LogicEntity.getAvailableMiniCommands(this, result) - end, - -------------------------------------------------------------------------------------------- - -- Test if this entity is a bot object - isBotObject = function(this) - return false - end, - -------------------------------------------------------------------------------------------- - -- Test if thisentity is a plant - isPlant = function(this) - return false - end, - -------------------------------------------------------------------------------------------- - -- is it a named entity ? - isNamed = function(this) - if this.IsNamed and this.IsNamed == 1 then return true end - return false - end, - -------------------------------------------------------------------------------------------- - addPrimitiveActivities = function (this, dest, activityWnd) - if activityWnd then - table.insert(dest, "Wander") - table.insert(dest, "Follow Route") - table.insert(dest, "Patrol") - table.insert(dest, "Repeat Road") - table.insert(dest, "Stand Still") - else - table.insert(dest, this:buildActivityCommand(this.onPickWanderZone, "wander_zone", "uimR2EDMenuPickZone", "r2_toolbar_wander_zone.tga", true)) - table.insert(dest, this:buildActivityCommand(this.onPickFollowRoute, "follow_route", "uimR2EDMenuFollowRoute", "r2_toolbar_follow_road.tga", false)) - table.insert(dest, this:buildActivityCommand(this.onPickPatrolRoute, "patrol_route", "uimR2EDMenuPatrolRoute", "r2_toolbar_patrol_road.tga", false)) - table.insert(dest, this:buildActivityCommand(this.onPickRepeatRoute, "repeat_route", "uimR2EDMenuRepeatRoute", "r2_toolbar_repeat_road.tga", false)) - table.insert(dest, this:buildActivityCommand(this.onStandStill, "stand_still", "uimR2EDMenuStandInPlace", "r2_toolbar_stand_still.tga", false)) - end - end, - - -- from 'BaseClass' - getAvailableCommands = function(this, dest, activityWnd) - - --local result = this:delegate():getAvailableCommands(this) - if not activityWnd then - r2.Classes.LogicEntity.getAvailableCommands(this, dest) - end - local category = this:getCategory() - - if category == "Herbivore" then - if this:isNamed() then - - if activityWnd then - table.insert(dest, "Guard Zone") - table.insert(dest, "Follow Route") - table.insert(dest, "Patrol") - table.insert(dest, "Repeat Road") - table.insert(dest, "Stand Still") - else - table.insert(dest, this:buildActivityCommand(this.onPickGuardZone, "guard_zone", "uimR2EDMenuPickGuardZone", "r2ed_toolbar_guard_zone.tga", true)) - table.insert(dest, this:buildActivityCommand(this.onPickFollowRoute, "follow_route", "uimR2EDMenuFollowRoute", "r2_toolbar_follow_road.tga", false)) - table.insert(dest, this:buildActivityCommand(this.onPickPatrolRoute, "patrol_route", "uimR2EDMenuPatrolRoute", "r2_toolbar_patrol_road.tga", false)) - table.insert(dest, this:buildActivityCommand(this.onPickRepeatRoute, "repeat_route", "uimR2EDMenuRepeatRoute", "r2_toolbar_repeat_road.tga", false)) - table.insert(dest, this:buildActivityCommand(this.onStandStill, "stand_still", "uimR2EDMenuStandInPlace", "r2_toolbar_stand_still.tga", false)) - end - else - - if activityWnd then - table.insert(dest, "Rest In Zone") - table.insert(dest, "Feed In Zone") - else - table.insert(dest, this:buildActivityCommand(this.onPickRestZone, "rest_zone", "uimR2EDMenuPickRestZone", "r2ed_toolbar_rest_zone.tga", true)) - table.insert(dest, this:buildActivityCommand(this.onPickFeedZone, "feed_zone", "uimR2EDMenuPickFeedZone", "r2ed_toolbar_feed_zone.tga", false)) - end - end - elseif category == "Carnivore" then - if this:isNamed() then - - if activityWnd then - table.insert(dest, "Guard Zone") - table.insert(dest, "Follow Route") - table.insert(dest, "Patrol") - table.insert(dest, "Repeat Road") - table.insert(dest, "Stand Still") - else - table.insert(dest, this:buildActivityCommand(this.onPickGuardZone, "guard_zone", "uimR2EDMenuPickGuardZone", "r2ed_toolbar_guard_zone.tga", true)) - table.insert(dest, this:buildActivityCommand(this.onPickFollowRoute, "follow_route", "uimR2EDMenuFollowRoute", "r2_toolbar_follow_road.tga", false)) - table.insert(dest, this:buildActivityCommand(this.onPickPatrolRoute, "patrol_route", "uimR2EDMenuPatrolRoute", "r2_toolbar_patrol_road.tga", false)) - table.insert(dest, this:buildActivityCommand(this.onPickRepeatRoute, "repeat_route", "uimR2EDMenuRepeatRoute", "r2_toolbar_repeat_road.tga", false)) - table.insert(dest, this:buildActivityCommand(this.onStandStill, "stand_still", "uimR2EDMenuStandInPlace", "r2_toolbar_stand_still.tga", false)) - end - else - - if activityWnd then - table.insert(dest, "Rest In Zone") - table.insert(dest, "Hunt In Zone") - else - table.insert(dest, this:buildActivityCommand(this.onPickRestZone, "rest_zone", "uimR2EDMenuPickRestZone", "r2ed_toolbar_rest_zone.tga", true)) - table.insert(dest, this:buildActivityCommand(this.onPickHuntZone, "hunt_zone", "uimR2EDMenuPickHuntZone", "r2ed_toolbar_hunt_zone.tga", false)) - end - end - --table.insert(dest, this:buildActivityCommand(this.onPickGuardZone, "guard_zone", "uimR2EDMenuPickGuardZone", "r2ed_toolbar_guard_zone.tga", true)) - elseif category == "WorkerKitin" then - - if activityWnd then - table.insert(dest, "Feed In Zone") - table.insert(dest, "Follow Route") - table.insert(dest, "Patrol") - table.insert(dest, "Repeat Road") - table.insert(dest, "Stand Still") - --table.insert(dest, "Guard Zone") - else - table.insert(dest, this:buildActivityCommand(this.onPickFeedZone, "feed_zone", "uimR2EDMenuPickWorkZone", "r2ed_toolbar_work_zone.tga", true)) - table.insert(dest, this:buildActivityCommand(this.onPickFollowRoute, "follow_route", "uimR2EDMenuFollowRoute", "r2_toolbar_follow_road.tga", false)) - table.insert(dest, this:buildActivityCommand(this.onPickPatrolRoute, "patrol_route", "uimR2EDMenuPatrolRoute", "r2_toolbar_patrol_road.tga", false)) - table.insert(dest, this:buildActivityCommand(this.onPickRepeatRoute, "repeat_route", "uimR2EDMenuRepeatRoute", "r2_toolbar_repeat_road.tga", false)) - table.insert(dest, this:buildActivityCommand(this.onStandStill, "stand_still", "uimR2EDMenuStandInPlace", "r2_toolbar_stand_still.tga", false)) - --table.insert(dest, this:buildActivityCommand(this.onPickGuardZone, "guard_zone", "uimR2EDMenuPickGuardZone", "r2ed_toolbar_guard_zone.tga", true)) - end - elseif category == "SoldierKitin" then - if activityWnd then - table.insert(dest, "Guard Zone") - table.insert(dest, "Follow Route") - table.insert(dest, "Patrol") - table.insert(dest, "Repeat Road") - table.insert(dest, "Stand Still") - else - table.insert(dest, this:buildActivityCommand(this.onPickGuardZone, "guard_zone", "uimR2EDMenuPickGuardZone", "r2ed_toolbar_guard_zone.tga", true)) - table.insert(dest, this:buildActivityCommand(this.onPickFollowRoute, "follow_route", "uimR2EDMenuFollowRoute", "r2_toolbar_follow_road.tga", false)) - table.insert(dest, this:buildActivityCommand(this.onPickPatrolRoute, "patrol_route", "uimR2EDMenuPatrolRoute", "r2_toolbar_patrol_road.tga", false)) - table.insert(dest, this:buildActivityCommand(this.onPickRepeatRoute, "repeat_route", "uimR2EDMenuRepeatRoute", "r2_toolbar_repeat_road.tga", false)) - table.insert(dest, this:buildActivityCommand(this.onStandStill, "stand_still", "uimR2EDMenuStandInPlace", "r2_toolbar_stand_still.tga", false)) - end - elseif not this:isBotObject() and not this:isPlant() then - -- activity (only if not a plant) - this:addPrimitiveActivities(dest, activityWnd) - end - end, - - -- for activities UI - getAvailableActivities = function(this, dest) - r2.Classes.ActiveLogicEntity.getAvailableCommands(this, dest, true) - end, - -------------------------------------------------------------------------------------------- - -- Called when the menu is displayed - onSetupMenu = function(this) - - --this:delegate():onSetupMenu() - r2.Classes.LogicEntity.onSetupMenu(this) - local class = r2:getClass(this) - local isBO = this:isBotObject() - local isPlant = this:isPlant() - getUI(class.Menu .. ":activities").active = not isBO and not isPlant - - if not isBO and not isPlant then - getUI(class.Menu .. ":activities").uc_hardtext = i18n.get("uimR2EDNewActivity") - end - end, - -------------------------------------------------------------------------------------------- - -- function to change activity - onStandStill = function(this) - r2:setNPCStandInPlace(this) - end, - onPickWanderZone = function(this) - runAH(nil, "r2ed_picker_lua", "CursCanPickPos=curs_create.tga|CursCannotPickPos=curs_stop.tga|TestFunc=r2:testCanPickZoneForNPC|PickFunc=r2:affectZoneToSelectedNPC|PickPosFunc=r2:createZoneAndAffectZoneToNPC|WantMouseUp=true|IgnoreInstances=Npc,Road") - r2.ContextualCommands:highlightCommandButton("wander_zone") - end, - onPickRestZone = function(this) - runAH(nil, "r2ed_picker_lua", "CursCanPickPos=curs_create.tga|CursCannotPickPos=curs_stop.tga|TestFunc=r2:testCanPickZoneForNPC|PickFunc=r2:affectRestZoneToSelectedNPC|PickPosFunc=r2:createRestZoneAndAffectZoneToNPC|WantMouseUp=true|IgnoreInstances=Npc,Road") - r2.ContextualCommands:highlightCommandButton("rest_zone") - end, - onPickFeedZone = function(this) - runAH(nil, "r2ed_picker_lua", "CursCanPickPos=curs_create.tga|CursCannotPickPos=curs_stop.tga|TestFunc=r2:testCanPickZoneForNPC|PickFunc=r2:affectFeedZoneToSelectedNPC|PickPosFunc=r2:createFeedZoneAndAffectZoneToNPC|WantMouseUp=true|IgnoreInstances=Npc,Road") - r2.ContextualCommands:highlightCommandButton("feed_zone") - end, - onPickHuntZone = function(this) - runAH(nil, "r2ed_picker_lua", "CursCanPickPos=curs_create.tga|CursCannotPickPos=curs_stop.tga|TestFunc=r2:testCanPickZoneForNPC|PickFunc=r2:affectHuntZoneToSelectedNPC|PickPosFunc=r2:createHuntZoneAndAffectZoneToNPC|WantMouseUp=true|IgnoreInstances=Npc,Road") - r2.ContextualCommands:highlightCommandButton("hunt_zone") - end, - onPickGuardZone = function(this) - runAH(nil, "r2ed_picker_lua", "CursCanPickPos=curs_create.tga|CursCannotPickPos=curs_stop.tga|TestFunc=r2:testCanPickZoneForNPC|PickFunc=r2:affectGuardZoneToSelectedNPC|PickPosFunc=r2:createGuardZoneAndAffectZoneToNPC|WantMouseUp=true|IgnoreInstances=Npc,Road") - r2.ContextualCommands:highlightCommandButton("guard_zone") - end, - onPickFollowRoute = function(this) - runAH(nil, "r2ed_picker_lua", "CursCanPickPos=curs_create.tga|CursCannotPickPos=curs_stop.tga|TestFunc=r2:testCanPickRoadForNPC|PickFunc=r2:setBehaviorFollowRouteToNPC|PickPosFunc=r2:createRouteAndSetBehaviorFollowRouteToNPC|WantMouseUp=true|IgnoreInstances=Npc, Region ") - r2.ContextualCommands:highlightCommandButton("follow_route") - end, - onPickPatrolRoute = function(this) - runAH(nil, "r2ed_picker_lua", "CursCanPickPos=curs_create.tga|CursCannotPickPos=curs_stop.tga|TestFunc=r2:testCanPickRoadForNPC|PickFunc=r2:setBehaviorPatrolRouteToNPC|PickPosFunc=r2:createRouteAndSetBehaviorPatrolRouteToNPC|WantMouseUp=true|IgnoreInstances=Npc,Region") - r2.ContextualCommands:highlightCommandButton("patrol_route") - end, - onPickRepeatRoute = function(this) - runAH(nil, "r2ed_picker_lua", "CursCanPickPos=curs_create.tga|CursCannotPickPos=curs_stop.tga|TestFunc=r2:testCanPickRoadForNPC|PickFunc=r2:setBehaviorRepeatRoadToNPC|PickPosFunc=r2:createRoadAndSetBehaviorRepeatRoadToNPC|WantMouseUp=true|IgnoreInstances=Npc,Region") - r2.ContextualCommands:highlightCommandButton("repeat_route") - end, - --------------------------------------------------------------------------------------------------------- - -- From base class - isSequencable = function(this) - return not this:isPlant() and not this:isBotObject() - end, - - --------------------------------------------------------------------------------------------------------- - -- From base class - getActivityVerbLookupName = function (this, activityName) - if this.Category == "WorkerKitin" and activityName == "Feed In Zone" then - return "Work In Zone" - end - return activityName - end, - initEventValuesMenu = function(this, menu, categoryEvent) - - -- activity sequences - for ev=0,menu:getNumLine()-1 do - - local eventType = tostring(menu:getLineId(ev)) - - if r2.events.eventTypeWithValue[eventType] == "Number" then - menu:addSubMenu(ev) - local subMenu = menu:getSubMenu(ev) - local func = "" - for i=0, 9 do - local uc_name = ucstring() - uc_name:fromUtf8( tostring(i) ) - func = "r2.events:setEventValue('','" .. categoryEvent .."','".. tostring(i).."')" - subMenu:addLine(uc_name, "lua", func, tostring(i)) - end - - elseif r2.events.eventTypeWithValue[eventType]~=nil then - menu:addSubMenu(ev) - local subMenu = menu:getSubMenu(ev) - - for s=0, this:getBehavior().Activities.Size-1 do - local sequence = this:getBehavior().Activities[s] - local func = "" - if r2.events.eventTypeWithValue[eventType]=="ActivitySequence" then - func = "r2.events:setEventValue('".. sequence.InstanceId .."','" .. categoryEvent .."')" - end - - local uc_name = ucstring() - uc_name:fromUtf8(sequence:getName()) - subMenu:addLine(uc_name, "lua", func, sequence.InstanceId) - end - - if this:getBehavior().Activities.Size==0 then - subMenu:addLine(i18n.get("uiR2EdNoSelelection"), "", "", "") - - -- activity steps - elseif r2.events.eventTypeWithValue[eventType]=="ActivityStep" then - - for s=0,subMenu:getNumLine()-1 do - local sequenceId = tostring(subMenu:getLineId(s)) - local sequence = r2:getInstanceFromId(sequenceId) - assert(sequence) - - subMenu:addSubMenu(s) - local activitiesMenu = subMenu:getSubMenu(s) - - for a=0, sequence.Components.Size-1 do - local activity = sequence.Components[a] - local uc_name = ucstring() - uc_name:fromUtf8(activity:getShortName()) - activitiesMenu:addLine(uc_name, "lua", - "r2.events:setEventValue('".. activity.InstanceId .."','" .. categoryEvent .."')", activity.InstanceId) - end - - -- no activity in the sequence - if sequence.Components.Size==0 then - activitiesMenu:addLine(i18n.get("uiR2EdNoSelelection"), "", "", "") - end - end - end - end - end - end, - }, - - Behavior = { - Name="Behavior", - BaseClass="LogicEntityBehavior", - Prop= - { - {Name="Type", Type="String",DefaultValue=""},--TEMP - {Name="ZoneId", Type="String"},--TEMP - {Name="Activities",Type="Table"}, - {Name="ChatSequences",Type="Table"} - - }, - }, - ------------------------------------------------------------------------------------------------------ - Npc = { - PropertySheetHeader = r2.DisplayNpcHeader(), - Name="Npc", - InEventUI = true, - BaseClass="ActiveLogicEntity", - DisplayerVisual = "R2::CDisplayerVisualEntity", - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "npcPropertySheetDisplayer", - ----------------------------------------------------------------------------------------------- - Parameters = { - }, - ApplicableActions = { - "Activate", - "Deactivate", "Kill", "begin activity sequence", - "Sit Down", "Stand Up", - "Fight with player", "Fight with Npcs", - "Dont fight with player", "Dont fight with Npcs", - "Run", "Dont run", - -- "emits user event", - }, - Events = { - "activation", - "desactivation", "death", - "end of activity step", "end of activity sequence", - "begin of activity step", "begin of activity sequence", - -- "user event emitted", - - "targeted by player" - }, - Conditions = { - --"is dead", "is alive", "is active", "is inactive", - "is dead", "is alive", - "is in activity sequence", - "is in activity step", - }, - TextContexts = { - "NPC is dead", "NPC is alive" - }, - TextParameters = { - }, - LiveParameters = { - "is active", "current activity sequence and activity step", - "current chat sequence and chat step" - }, - ----------------------------------------------------------------------------------------------- - Prop= - { - {Name="Base", Type="String", WidgetStyle="StaticText", Category="Advanced", Visible=false}, - {Name="Name", Type="String", DefaultInBase=1, MaxNumChar="32"}, - {Name="Angle", Type="Number", - WidgetStyle="Slider", Min="0", Max="360", - -------------------- - convertToWidgetValue = - function(value) - local result = math.fmod(math.floor(180 * value / math.pi), 360) - if result < 0 then result = 360 + result end - return result - end, - -------------------- - convertFromWidgetValue = - function(value) - return math.pi * math.min(359, value) / 180 - end, - }, - { Name="PlayerAttackable", Type="Number", WidgetStyle="Boolean", Default="0", DefaultInBase=1, - Visible=function(this) return this:isGroupedAndLeader() or not this:isGrouped() and not this:isBotObject() and this:canUpdatePlayerAttackable() end - }, - { - Name="BotAttackable", Type="Number", WidgetStyle="Boolean", Default="0", DefaultInBase=1, - Visible=function(this) return this:isGroupedAndLeader() or not this:isGrouped() and not this:isBotObject() and this:canUpdateBotAttackable() end - }, --- { --- Name="UseFame", Type="Number", WidgetStyle="Boolean", Default="0", DefaultInBase=1, --- Visible=function(this) return this.SubCategory and ( this.SubCategory == "Kami" or this.SubCategory == "Karavan") end --- }, - - { - Name="AutoSpawn", Type="Number", WidgetStyle="Boolean", Default="0", DefaultInBase=1, - --Visible=function(this) return not this:isBotObject() end - Visible = function(this) return this:isGroupedAndLeader() or not this:isGrouped() and not this:isBotObject() end - }, - { - Name="NoRespawn", Type="Number", WidgetStyle="Boolean", Default="0", DefaultInBase=1, - Visible=function(this) return this:isGroupedAndLeader() or not this:isGrouped() and not this:isBotObject() end - }, - {Name="Aggro", Type="Number", Min="0", Max="120", DefaultValue="30", DefaultInBase=1, - Visible=function(this) return this:isGroupedAndLeader() or not this:isGrouped() and not this:isBotObject() end - }, - {Name="TypeNPC", Type="Number", WidgetStyle="EnumDropDown", SecondRequestFunc=r2.updateType, - Enum= {}, Visible=true, DefaultValue="-1", - }, - - -- - -- - --{Name="TestRefId", Type="RefId", Category="uiR2EDRollout_Test"}, - }, - - - - - isGroupedAndLeader = function(this) - if this:isGrouped() and this:isLeader() then return true end - return false - end, - - TreeIcon= function(this) - - if this:isKindOf("NpcCreature") or this:isKindOf("NpcPlant") then - return "r2ed_icon_creatures.tga" - elseif not this:isBotObject() then - return "r2ed_icon_npc.tga" - end - - return "" - end, - - PermanentTreeIcon= function(this) - if this:isKindOf("NpcCreature") or this:isKindOf("NpcPlant") then - return "r2ed_icon_permanent_creatures.tga" - elseif not this:isBotObject() then - return "r2ed_permanent_node.tga" - end - - return "" - end, - - --------------------------------------------------------------------------------------------------------- - -- get select bar type - SelectBarType = function(this) - if not this:isBotObject() then - return i18n.get("uiR2EDScene"):toUtf8() - else - return i18n.get("uiR2EDbotObjects"):toUtf8() - end - end, - - --------------------------------------------------------------------------------------------------------- - -- from base class - getContextualTreeIcon = function(this) - if this:getParentAct():isBaseAct() then - return this:getPermanentTreeIcon() - end - return "" - end, - - getSelectBarIcon = function(this) - if this:isBotObject() then - return "r2ed_icon_botobject.tga" - else - return r2.Classes.BaseClass.getContextualTreeIcon(this) - end - end, - - ---------------------------------------------- - updatePermanentStatutIcon = function(this) - --this.DisplayerVisual:updatePermanentStatutIcon(this:getContextualTreeIcon()) - this.DisplayerVisual:updatePermanentStatutIcon(this:getPermanentStatutIcon()) - end, - - -------------------------------------------------------------------------------------------- - onPostCreate= function(this) - if this.BoxSelection == 1 and this.DisplayerVisual ~= nil then -- read in palette - this.DisplayerVisual.SelectionDisplayMode = 1 - end - if this:isBotObject() then - this.DisplayerVisual.DisplayMode = select(r2.BotObjectsFrozen, 2, 0) - end - end, - onActChanged = function(this) - if this:isBotObject() then - this.DisplayerVisual.DisplayMode = select(r2.BotObjectsFrozen, 2, 0) - end - end, - -------------------------------------------------------------------------------------------- - -- from WorldObject - isDisplayModeToggleSupported = function(this, displayMode) - if not this:isBotObject() then - return displayMode == 3 - end - return false - end, - -------------------------------------------------------------------------------------------- - -- Test if this entity is a bot object - isBotObject = function(this) - return r2:isBotObject(this.SheetClient) - end, - - - canUpdatePlayerAttackable = function(this) - if this.CanUpdatePlayerAttackable == 0 then return false end - if this.CanUpdatePlayerAttackable == 1 then return true end - return this:isBotObject() == false - end, - - canUpdateBotAttackable = function(this) - return this:isBotObject() == false - end, - - -------------------------------------------------------------------------------------------- - -- Test if this entity is a plant - isPlant = function(this) - return string.match(this.SheetClient, "cp[%w_]*%.creature") - end, - -------------------------------------------------------------------------------------------- - -- check if that npc is the leader of its group - isLeader = function(this) - if not this:isGrouped() then - return false - end - return this.IndexInParent == 0 - end, - -------------------------------------------------------------------------------------------- - -- return the group of this npc if it has one, else return nil - getParentGroup = function(this) - if this.ParentInstance:isKindOf("NpcGrpFeature") - then - return this.ParentInstance - else - return nil - end - end, - -------------------------------------------------------------------------------------------- - -- change the mouse to choose a new group to group with - onChooseGroup = function(this) - if this:isGrouped() then return end - runAH(nil, "r2ed_picker_lua", "TestFunc=r2:testCanGroupSelectedInstance|PickFunc=r2:groupSelectedInstance") - r2.ContextualCommands:highlightCommandButton("group") - end, - -------------------------------------------------------------------------------------------- - -- if this npc was part of a group, ungroup it - onUngroup = function(this) - r2:ungroup(this) - end, - -------------------------------------------------------------------------------------------- - -- If this npc is part of a group, make it the leader of its group - onSetAsLeader = function(this) - if this:isLeader() then return end - r2:setAsGroupLeader(this) - end, - -------------------------------------------------------------------------------------------- - -- from 'BaseClass' - getAvailableCommands = function(this, dest) - --local result = this:delegate():getAvailableCommands(this) - r2.Classes.ActiveLogicEntity.getAvailableCommands(this, dest) - - if not this:isBotObject() and not this:isPlant() then - if not this:isGrouped() then - table.insert(dest, this:buildCommand(this.onChooseGroup, "group", "uimR2EDMenuGroup", "r2_toolbar_group.tga", true)) - else - table.insert(dest, this:buildCommand(this.onUngroup, "ungroup", "uimR2EDMenuUngroup", "r2_toolbar_ungroup.tga", true)) - if not this:isLeader() then - table.insert(dest, this:buildCommand(this.onSetAsLeader, "set_as_leader", "uimR2EDMenuSetAsGroupLeader", "r2_toolbar_set_as_leader.tga", false)) - end - end - --debugInfo(this.SheetClient) - end - - this:getAvailableDisplayModeCommands(dest) - end, - -------------------------------------------------------------------------------------------- - -- from 'BaseClass' - getParentTreeNode = function(this) - if not this:isInDefaultFeature() then - return r2.Classes.ActiveLogicEntity.getParentTreeNode(this) - end - if this:isBotObject() then - local container = getUI("ui:interface:r2ed_scenario") - --return {container:find("content_tree_list"):getRootNode():getNodeFromId("scenery_objects")} - return {container:find("content_tree_list"):getRootNode()} - elseif ( this:isKindOf("NpcCreature") or this:isKindOf("NpcPlant") ) then - return this:getParentAct():getContentTreeNodes("creatures") - else - return this:getParentAct():getContentTreeNodes("people") - end - end, - -------------------------------------------------------------------------------------------- - -- special handler for deletion : this method is called when the user click on 'delete' in the - -- context menu and should perform the actual deletion - onDelete = function(this) - if this.User.DeleteInProgress == true then return end - this.User.DeleteInProgress = true - this:setDeleteActionName() - -- if deleted object is not in the default group, and was the last of its group, then - -- its parent group should be removed - if not this:isInDefaultFeature() then - if this.Parent.Size <= 2 then - local parentTable = this.Parent - local parentGroup = this.ParentInstance - local defaultFeature = this:getParentAct():getDefaultFeature() - for i = parentTable.Size - 1, 0, -1 do - if parentTable[i].InstanceId ~= this.InstanceId then - parentTable[i]:requestMakePosRelativeTo(defaultFeature) - r2:setSelectedInstanceId(parentTable[i].InstanceId) - r2.requestMoveNode(parentTable[i].InstanceId, "", -1, defaultFeature.InstanceId, "Components", -1) - break - end - end - r2.requestEraseNode(parentGroup.InstanceId, "", -1) - r2.requestEndAction() - return - end - end - this:selectNext() - r2.requestEraseNode(this.InstanceId, "", -1) - r2.requestEndAction() - end, - -------------------------------------------------------------------------------------------- - -- return the behavior object, depending on wether this npc is grouped or not - getBehavior = function(this) - if this:isGrouped() and this.ParentInstance:isKindOf("NpcGrpFeature") then - return this.ParentInstance.Components[0].Behavior - else - return this.Behavior - end - end, - ----------------------------------------------------------------------------------------------- - -- from base class - hasScenarioCost = function(this) - return true - end, - ----------------------------------------------------------------------------------------------- - -- from base class - isCopyable = function(this) - return true - end, - ----------------------------------------------------------------------------------------------- - -- from base class - paste = function(src, newPlace, srcInstanceId) - - local Q, leftQ, leftStaticQ = r2:getLeftQuota() - local quota = leftQ - if r2:isBotObject(r2.getPropertyValue(src, "SheetClient")) then quota = leftStaticQ end - if quota <= 0 then - r2:makeRoomMsg() - return - end - local options = - { - CopyEvents = 0, - CopyActivities = 0, - -- CopyChatSequences = 0 - DuplicateGroup = -1 - } - - -- if component is the leader and original group is still present, then give the option to duplicate the whole group - local srcInstance - if srcInstanceId then - srcInstance = r2:getInstanceFromId(srcInstanceId) - end - local groupCopy = nil - if srcInstance and srcInstance:isLeader() then - groupCopy = srcInstance.ParentInstance:copy() - groupCopy = r2.Classes[groupCopy.Class].newCopy(groupCopy) - options.DuplicateGroup = 0 -- offer option to do the copy - end - if srcInstance and srcInstance.isBotObject then - if srcInstance:isBotObject() then - if not r2:checkStaticQuota() then return end - else - if not r2:checkAiQuota() then return end - end - - end - -- - local function paramsOk(options) - if options.DuplicateGroup == 1 then - r2.Classes[groupCopy.Class].paste(groupCopy, src.Position, nil, options) - return - end - if options.CopyActivities == 0 then - src.ActivitiesId = {} - src.Behavior.Activities = {} - end - if options.CopyEvents == 0 then - src.Behavior.Actions = {} - end - --if options.CopyChatSequences == 0 then - -- src.Behavior.ChatSequences = {} - -- end - if newPlace then - src.Position.x, src.Position.y, src.Position.z = r2:getPastePosition() - end - r2:setCookie(src.InstanceId, "Select", true) - if r2:isBotObject(r2.getPropertyValue(src, "SheetClient")) then -- not already an object, so can't call a method yet ... - -- add to permanent content - r2.requestInsertNode(r2.Scenario:getBaseAct():getDefaultFeature().InstanceId , "Components",-1,"", src) - else - -- insert in current act - r2.requestInsertNode(r2:getCurrentAct():getDefaultFeature().InstanceId , "Components", -1,"", src) - end - end - local function paramsCancel() - debugInfo('paste was cancelled') - end - if table.getn(src.Behavior.Activities) == 0 then - options.CopyActivities = -1 - end - if table.getn(src.Behavior.Actions) == 0 then - options.CopyEvents = -1 - end - --if table.getn(src.Behavior.ChatSequences) == 0 then - -- options.CopyChatSequences = -1 - -- end - if options.CopyActivities >= 0 or - options.CopyEvents >= 0 - --or options.CopyChatSequences >= 0 - then - r2:doForm("SpecialPaste", options, paramsOk, paramsCancel) - else - -- nothing specific to copy, do direct paste - paramsOk(options) - end - end, - ----------------------------------------------------------------------------------------------- - -- from base class - pasteGhost = function(src) - - local target - if r2:isBotObject(r2.getPropertyValue(src, "SheetClient")) then -- not already an object, so can't call a method yet ... - -- insert in current act - target = r2.Scenario:getBaseAct():getDefaultFeature() - if not r2:checkStaticQuota() then return end - else - -- insert in current act - target = r2:getCurrentAct():getDefaultFeature() - if not r2:checkAiQuota() then return end - end - -- create the 'Ghosts' entry locally if it doesn't already exists - if target.Ghosts == nil then - r2.requestInsertGhostNode(target.InstanceId, "", -1, "Ghosts", {}) - end - -- - r2.requestInsertGhostNode(target.InstanceId, "Ghosts",-1,"", src) - -- insertion should have been done right now - return r2:getInstanceFromId(src.InstanceId) - end, - - getAiCost = function(this) - if this.User.GhostDuplicate then return 0 end - assert(this) - if this.IsBotObject == 0 then - return 1 - end - return 0 - end, - - getStaticObjectCost = function(this) - if this.User.GhostDuplicate then return 0 end - assert(this) - if this.IsBotObject == 1 then - return 1 - end - return 0 - end, - - -- from 'ActiveLogicEntity' - getApplicableActions = function(this) - local actions = r2.Classes[this.Class].ApplicableActions - - if not this:canUpdateBotAttackable() then - local actionsTemp = {} - for k, v in pairs(actions) do - if v~="Fight with Npcs" and v~="Dont fight with Npcs" then --and v~="Sit Down" and v~="Stand Up" then - table.insert(actionsTemp, v) - end - end - actions = actionsTemp - end - - if not this:canUpdatePlayerAttackable() then - local actionsTemp = {} - for k, v in pairs(actions) do - if v~="Fight with player" and v~="Dont fight with player" then -- and v~="Sit Down" and v~="Stand Up" then - table.insert(actionsTemp, v) - end - end - actions = actionsTemp - end - - return actions - end, - - }, - ------------------------------------------------------------------------------------------------------ - -- a 'custom' npc : this is a npc that is customizable - NpcCustom = { - Name="NpcCustom", - BaseClass="Npc", - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "npcCustomPropertySheetDisplayer", - Prop= - { - -- Look (all widgets have Visible=false because they are edited in the npc editor, not in the property sheet) - - { Name="GabaritHeight", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="GabaritTorsoWidth", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="GabaritArmsWidth", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="GabaritLegsWidth", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="GabaritBreastSize", Type="Number", Visible=false, DefaultInBase=1 }, - - { Name="HairType", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="HairColor", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="Tattoo", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="EyesColor", Type="Number", Visible=false, DefaultInBase=1 }, - - { Name="MorphTarget1", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="MorphTarget2", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="MorphTarget3", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="MorphTarget4", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="MorphTarget5", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="MorphTarget6", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="MorphTarget7", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="MorphTarget8", Type="Number", Visible=false, DefaultInBase=1 }, - - --{ Name="Sex", Type="Number", Visible=false, DefaultInBase=1 }, - - { Name="JacketModel", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="TrouserModel", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="FeetModel", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="HandsModel", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="ArmModel", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="WeaponRightHand", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="WeaponLeftHand", Type="Number", Visible=false, DefaultInBase=1 }, - - { Name="JacketColor", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="ArmColor", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="HandsColor", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="TrouserColor", Type="Number", Visible=false, DefaultInBase=1 }, - { Name="FeetColor", Type="Number", Visible=false, DefaultInBase=1 }, - - { Name="LinkColor", Type="Number", Visible=false, DefaultInBase=0 }, - - --{ Name="Notes", Type="String", Visible=false, DefaultInBase=1 }, - { Name="Function", Type="String", Visible=false, DefaultInBase=1 }, - --{ Name="Level", Type="String", Visible=false, DefaultInBase=1 }, - { Name="Profile", Type="String", Visible=false, DefaultInBase=1 }, - {Name="Speed", Type="Number", WidgetStyle="EnumDropDown", Category="uiR2EDRollout_NpcCustom", - Enum= { "uiR2EDWalk", "uiR2EDRun"}, - Visible=true - }, - {Name="Level", Type="Number", WidgetStyle="EnumDropDown", Category="uiR2EDRollout_NpcCustom", - Enum= { "uiR2EDLowLevel", "uiR2EDAverageLevel", "uiR2EDHighLevel", "uiR2EDVeryHighLevel"}, SecondRequestFunc=r2.updateLevel, - Visible=function(this) return this:isGroupedAndLeader() or not this:isGrouped() and not this:isBotObject() end - }, - }, - -- from "BaseClass" - getAvailableCommands = function(this, dest) - --local result = this:delegate():getAvailableCommands() - r2.Classes.Npc.getAvailableCommands(this, dest) - end, - -- Additionnal property sheet header to access npc customisation - PropertySheetHeader = - [[ - - ]], - -- Pop the npc editor - customizeLook = function(this) - -- if the npc edition window is not shown, display it - local npcEditionWnd = getUI("ui:interface:r2ed_npc") - if not npcEditionWnd.active then - npcEditionWnd.active = true - npcEditionWnd:updateCoords() - npcEditionWnd:center() - -- update the npc window content - this.DisplayerProperties:updateAll(this) - else - setTopWindow(npcEditionWnd) - npcEditionWnd:blink(1) - end - end, - ----------------------------------------------------------------------------------------------- - -- from base class - hasScenarioCost = function(this) - return true - end, - ----------------------------------------------------------------------------------------------- - -- special paste with renaming - paste = function(src, newPlace, srcInstanceId) - local base = r2.getPaletteElement(src.Base) - local sex = r2.getPropertyValue(base, "Sex") - - r2.Classes.Npc.paste(src, newPlace, srcInstanceId) - end, - }, - - ------------------------------------------------------------------------------------------------------ - -- NPC CREATURE - NpcCreature = { - Name="NpcCreature", - InEventUI = true, - BaseClass="Npc", - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "npcPropertySheetDisplayer", - Prop= - { - {Name="Speed", Type="Number", WidgetStyle="EnumDropDown", Category="uiR2EDRollout_Default", - Enum= { "uiR2EDWalk", "uiR2EDRun"}, - Visible=function(this) return not this:isKindOf("NpcPlant") end, - }, - }, - - getApplicableActions = function(this) - local actions = r2.Classes[this.Class].ApplicableActions - - local actionsTemp = {} - for k, v in pairs(actions) do - if v~="Sit Down" and v~="Stand Up" then - table.insert(actionsTemp, v) - end - end - - return actionsTemp - end, - }, - - ------------------------------------------------------------------------------------------------------ - -- NPC PLANT - NpcPlant = { - Name="NpcPlant", - InEventUI = true, - BaseClass="NpcCreature", - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "npcPropertySheetDisplayer", - Prop= - { - - }, - - ApplicableActions = { - "Activate", - "Deactivate", "Kill", - }, - Events = { - "activation", - "desactivation", "death", - }, - Conditions = {}, - }, - - - - -- base class for primitives, include copy-paste code - { - BaseClass="WorldObject", - Name="BasePrimitive", - Prop= - { - {Name="Name", Type="String", MaxNumChar="32"} - }, - -------------------------------------------------------------------------------------------- - onPostCreate = function(this) - this.DisplayerVisual.DisplayMode = r2:getPrimDisplayMode() - this.DisplayerVisual.ContextualVisibilityActive = r2.PrimDisplayContextualVisibility - end, - onActChanged = function(this) - this.DisplayerVisual.ContextualVisibilityActive = r2.PrimDisplayContextualVisibility - end, - -------------------------------------------------------------------------------------------- - onPostCreate = function(this) - this.DisplayerVisual.DisplayMode = r2:getPrimDisplayMode() - this.DisplayerVisual.ContextualVisibilityActive = r2.PrimDisplayContextualVisibility - end, - onActChanged = function(this) - this.DisplayerVisual.ContextualVisibilityActive = r2.PrimDisplayContextualVisibility - end, - -------------------------------------------------------------------------------------------- - -- from WorldObject - canChangeDisplayMode = function(this) - return true - end, - ----------------------------------------------------------------------------------------------- - -- from base class - isCopyable = function(this) - return true - end, - isNextSelectable = function(this) - return true - end, - ----------------------------------------------------------------------------------------------- - -- from base class - getAvailableCommands = function(this, dest) - r2.Classes.WorldObject.getAvailableCommands(this, dest) -- fill by ancestor - table.insert(dest, this:buildCommand(this.onNewVertexTool, "new_vertex", "uimR2EDAddNewVertices", "r2ed_tool_new_vertex.tga")) - end, - ----------------------------------------------------------------------------------------------- - onNewVertexTool = function(this) - r2:setCurrentTool('R2::CToolNewVertex') - r2.ContextualCommands:highlightCurrentCommandButton("new_vertex") - end, - ----------------------------------------------------------------------------------------------- - -- from base class - paste = function(src, newPlace, srcInstanceId) - --if r2:getLeftQuota() <= 0 then - -- r2:makeRoomMsg() - -- return - --end - if newPlace then - --if r2.Classes[src.Class].isCopyInsideCurrIsland(src) then - -- src.Position.x = src.Position.x + 4 * (math.random() - 0.5) - -- src.Position.y = src.Position.y + 4 * (math.random() - 0.5) - -- src.Position.z = src.Position.z + 4 * (math.random() - 0.5) - --else - local mx, my, mz = r2.Classes[src.Class].getCopyCenter(src) - -- express in world - mx = mx + src.Position.x - my = my + src.Position.y - mz = mz + src.Position.z - -- get player pos in world - local px, py, pz = getPlayerPos() - - -- add delta to have primitive center in world over player pos - src.Position.x = src.Position.x + px - mx + 4 * (math.random() - 0.5) - src.Position.y = src.Position.y + py - my + 4 * (math.random() - 0.5) - src.Position.z = src.Position.z + pz - mz + 4 * (math.random() - 0.5) - --end - end - r2.requestInsertNode(r2.Scenario:getBaseAct():getDefaultFeature().InstanceId, "Components", -1, "", src) - r2:setCookie(src.InstanceId, "Select", true) - end, - ----------------------------------------------------------------------------------------------- - -- Function (not method) : test if the passed primitive copy (obtained - -- with BasePrimitive:copy is inside the current island - -- The default behavior is to test each vertices inside the 'Points' array - -- are inside the current island rectangle. If a derivers is not defined - -- as a set of points, it should provide the good test here - isCopyInsideCurrIsland = function(src) - for k, v in pairs(src.Points) do - if not r2:isInIslandRect(v.Position.x, v.Position.y) then return false end - end - return true - end, - ----------------------------------------------------------------------------------------------- - -- Function (not method) : return the center a a copמed primitive obtained with - -- BasePrimitive:copy - getCopyCenter = function(src) - local x = 0 - local y = 0 - local z = 0 - local count = 0 - for k, v in pairs(src.Points) do - x = x + v.Position.x - y = y + v.Position.y - z = z + v.Position.z - count = count + 1 - end - if count ~= 0 then - x = x / count - y = y / count - z = z / count - end - return x, y, z - end, - ----------------------------------------------------------------------------------------------- - -- from base class - pasteGhost = function(src) - --if r2:getLeftQuota() <= 0 then - -- r2:makeRoomMsg() - -- return - --end - target = r2.Scenario:getBaseAct():getDefaultFeature() - if target.Ghosts == nil then - r2.requestInsertGhostNode(target.InstanceId, "", -1, "Ghosts", {}) - end - r2.requestInsertNode(target.InstanceId, "Ghosts", -1, "", src) - return r2:getInstanceFromId(src.InstanceId) - end, - }, - ------------------------------------------------------------------------------------------------------ - { - BaseClass="BasePrimitive", - Name="Region", - Menu="ui:interface:r2ed_base_menu", - TreeIcon= function(this) - if this:isInDefaultFeature() then return "" else return "r2ed_icon_region.tga" end - end, - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualGroup", - DisplayerVisualParams = - { - Look = r2.PrimRender.RegionLook, - InvalidLook = r2.PrimRender.RegionInvalidLook, - -- - ArrayName = "Points" - }, - Prop= - { --- {Name="Base", Type="String", WidgetStyle="StaticText", Category="Advanced"}, - {Name="Points", Type="Table"}, - }, - -------------------------------------------------------------------------------------------- - getSelectBarIcon = function(this) - return "r2ed_icon_region.tga" - end, - getAvailableCommands = function(this, dest) - r2.Classes.BasePrimitive.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - --------------------------------------------------------------------------------------------------------- - -- get select bar type - SelectBarType = function(this) - return i18n.get("uiR2EDbotObjects"):toUtf8() - end, - -------------------------------------------------------------------------------------------- - -- from 'BaseClass' - getParentTreeNode = function(this) --- if not this:isInDefaultFeature() then --- return r2.Classes.WorldObject.getParentTreeNode(this) --- end --- local tree = getUI("ui:interface:r2ed_scenario") --- return tree:find("content_tree_list"):getRootNode():getNodeFromId("places") - - return {} - end, - ----------------------------------------------------------------------------------------------- - -- from base class - --getUsedQuota = function(this) - -- return 1 - --end - }, - ------------------------------------------------------------------------------------------------------ - { - BaseClass="BasePrimitive", - Name="Road", - --DisplayerVisual = "R2::CDisplayerVisualRoad", - DisplayerVisual = "R2::CDisplayerVisualGroup", - TreeIcon= function(this) - if this:isInDefaultFeature() then return "" else return "r2ed_icon_road.tga" end - end, - DisplayerVisualParams = - { - Look = r2.PrimRender.RoadLook, - InvalidLook = r2.PrimRender.RoadLookInvalid, - -- - ArrayName = "Points" - }, - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - Menu="ui:interface:r2ed_base_menu", - Prop= - { --- {Name="Base", Type="String", WidgetStyle="StaticText", Category="Advanced"}, - {Name="Points", Type="Table"} - }, - -------------------------------------------------------------------------------------------- - getSelectBarIcon = function(this) - return "r2ed_icon_road.tga" - end, - - --------------------------------------------------------------------------------------------------------- - -- get select bar type - SelectBarType = function(this) - return i18n.get("uiR2EDbotObjects"):toUtf8() - end, - -------------------------------------------------------------------------------------------- - -- from 'BaseClass' - getParentTreeNode = function(this) --- if not this:isInDefaultFeature() then --- return r2.Classes.WorldObject.getParentTreeNode(this) --- end --- local tree = getUI("ui:interface:r2ed_scenario") --- return tree:find("content_tree_list"):getRootNode():getNodeFromId("routes") - - return {} - end, - ----------------------------------------------------------------------------------------------- - -- from base class - getAvailableCommands = function(this, dest) - r2.Classes.BasePrimitive.getAvailableCommands(this, dest) -- fill by ancestor - table.insert(dest, this:buildCommand(this.onExtendRoad, "extend_road", "uiR2EDExtendRoad", "r2ed_tool_extend_prim.tga")) - this:getAvailableDisplayModeCommands(dest) - end, - ----------------------------------------------------------------------------------------------- - onExtendRoad = function(this) - r2:setCurrentTool('R2::CToolDrawPrim', - { - Look = r2.PrimRender.RoadCreateLook, - InvalidLook = r2.PrimRender.RoadCreateInvalidLook, - Type="Road", - ExtendedPrimitiveId = this.InstanceId - } - ) - r2.ContextualCommands:highlightCurrentCommandButton("extend_road") - end, - ----------------------------------------------------------------------------------------------- - -- from base class - --getUsedQuota = function(this) - -- return 1 - --end - }, - ------------------------------------------------------------------------------------------------------ - { - BaseClass="WorldObject", - Name="WayPoint", - BuildPropertySheet = false, - DisplayerVisual = "R2::CDisplayerVisualShape", - DisplayerVisualParams = { ShapeName = r2.PrimRender.RoadCreateLook.VertexShapeName, - Scale = r2.PrimRender.RoadCreateLook.VertexShapeScale, - InheritDisplayMode = true - }, - DisplayerUI = "", - Menu="ui:interface:r2ed_base_menu", - Prop= - { - -- NOTE : position inherit from 'WorldObject' - }, - onDelete = function(this) - if this.User.DeleteInProgress == true then return end - this.User.DeleteInProgress = true - this:setDeleteActionName() - -- if I'm the last in the array, then delete my parent - if this.Parent.Size <= 2 then - this.ParentInstance:selectNext() - r2.requestEraseNode(this.ParentInstance.InstanceId, "", -1) - else - -- just delete my self - this:selectNext() - r2.requestEraseNode(this.InstanceId, "", -1) - end - r2.requestEndAction() - end, - setDeleteActionName = function(this) - r2.requestNewAction(i18n.get("uiR2EDDeletingWayPoint")) - end, - isNextSelectable = function(this) - return true - end - }, - ------------------------------------------------------------------------------------------------------ - { - BaseClass="WorldObject", - Name="RegionVertex", - BuildPropertySheet = false, - DisplayerVisual = "R2::CDisplayerVisualShape", - DisplayerVisualParams = { ShapeName = r2.PrimRender.RegionCreateLook.VertexShapeName, - Scale = r2.PrimRender.RegionCreateLook.VertexShapeScale, - InheritDisplayMode = true - }, - DisplayerUI = "", - Menu="ui:interface:r2ed_base_menu", - Prop= - { - -- NOTE : position inherit from 'WorldObject' - }, - setDeleteActionName = function(this) - r2.requestNewAction(i18n.get("uiR2EDDeletingRegionVertex")) - end, - onDelete = function(this) - if this.User.DeleteInProgress == true then return end - this.User.DeleteInProgress = true - this:setDeleteActionName() - -- if I'm the last in the array, then delete my parent - if this.Parent.Size <= 3 then - this.ParentInstance:selectNext() - r2.requestEraseNode(this.ParentInstance.InstanceId, "", -1) - else - -- just delete my self - this:selectNext() - r2.requestEraseNode(this.InstanceId, "", -1) - end - r2.requestEndAction() - end, - isNextSelectable = function(this) - return true - end - }, - ------------------------------------------------------------------------------------------------------ - { - BaseClass="BasePrimitive", - Name="Place", - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - Menu="ui:interface:r2ed_base_menu", - Prop= - { - {Name="Radius", Type="Number"} - }, - -- from BasePrimitive - isCopyInsideCurrIsland = function(src) - return r2:isInIslandRect(src.Position.x, src.Position.y) - end, - -- from BasePrimitive - getCopyCenter = function(src) - return src.Position.x, src.Position.y, src.Position.z - end, - -- - getAvailableCommands = function(this, dest) - r2.Classes.BasePrimitive.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - }, - ------------------------------------------------------------------------------------------------------ - { - BaseClass="BaseClass", - Name="Position", - DisplayerUI = "", - Prop= - { - {Name="x", Type="Number"}, - {Name="y", Type="Number"}, - {Name="z", Type="Number"} - }, - -- test if this position is equal to another position (not necessarily an instance, - -- may be any table with the { x = ..., y = ..., z = ... } format - equals = function(this, other) - return this.x == other.x and this.y == other.y and this.z == other.z - end, - -- return string version of position - toString = function(this) - return "(" .. tostring(this.x) .. ", " .. tostring(this.y) .. ", " .. tostring(this.z) .. ")" - end - }, - UserComponentHolder = - { - BaseClass="LogicEntity", - Name="UserComponentHolder", - - Menu="ui:interface:r2ed_feature_menu", - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - - Parameters = {}, - - ApplicableActions = {}, - - Events = {}, - - Conditions = {}, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Name", Type="String"}, - {Name="Description", Type="String"}, - {Name="Components", Type="Table", Visible=false}, - }, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - r2.Translator.pretranslateDefaultFeature(this, context) - end, - - translate = function(this, context) - r2.Translator.translateDefaultFeature(this, context, true) - end, - - getActivitiesIds = r2.Translator.getDefaultFeatureActivitiesIds, - -- TODO use sexy images - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) - table.insert(dest, this:buildActivityCommand(this.onPickAddEntity, "add_entity", "uimR2EDMenuPickAddEntity", "r2_toolbar_customize_look.tga", true)) - table.insert(dest, this:buildActivityCommand(this.onPickRemoveEntity, "remove_entity", "uimR2EDMenuPickRemoveEntity", "r2_toolbar_delete.tga", false)) - table.insert(dest, this:buildActivityCommand(this.onPickExport, "export", "uimR2EDMenuPickExport", "r2_toolbar_properties.tga", false)) - end, - - }, - - } - -- !feature.Components - ------------------------------------------------------------------------------------------------------ - classLogicEntityBehaviorVersion = 1 - - feature.Components.LogicEntityBehavior = { - Name="LogicEntityBehavior", - BaseClass="BaseClass", - Version = classLogicEntityBehaviorVersion, - Prop= - { - {Name="Actions", Type="Table"}, --- {Name="Reactions", Type="Table"} - - }, - updateVersion = function(this, scenarioValue, currentValue) - local patchValue = scenarioValue - if patchValue < 1 then - -- Patch only for old save (not the 0.0.3) - if this.Reactions ~= nil then - -- TODO use identifier instead - r2.requestEraseNode(this.InstanceId, "Reactions", -1) - end - patchValue = 1 - end - - if patchValue == currentValue then return true end - return false - end - } - - - ------------------------------------------------------------------------------------------------------ - local userComponentHolder = feature.Components.UserComponentHolder - - userComponentHolder.getLogicAction = function(entity, context, action) - local firstAction, lastAction = nil,nil - return firstAction, lastAction - end - - - userComponentHolder.getLogicCondition = function(this, context, condition) - return nil,nil - end - - - userComponentHolder.getLogicEvent = function(this, context, event) - local eventHandler, firstCondition, lastCondition = nil, nil, nil - return eventHandler, firstCondition, lastCondition - end - - function userComponentHolder:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdUserComponent") - logicEntityMenu:addLine(ucstring(name), "lua", "", "uiR2EdUserComponent") - end - - - function userComponentHolder:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = {}, - ["Events"] = {}, - } - return logicTranslations - end - function userComponentHolder.onPickExport(this) - local refX = this.Position.x - local refY = this.Position.y - local refZ = this.Position.z - - local components = this.Components - r2_core.UserComponentManager.CurrentDesc = this.Description - local exportList = {} - local k, v = next(components, nil) - while k do - if v.InstanceId then - table.insert(exportList, v.InstanceId) - end - k, v = next(components, k) - end - r2_core.UserComponentManager:export(exportList, refX, refY, refZ) - end - - function userComponentHolder.create() - if not r2:checkAiQuota() then return end - - local function paramsCancel() - debugInfo("Cancel form for 'User Component' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'User Component' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("UserComponent") == 1 then - r2.displayFeatureHelp("UserComponent") - end - local component = r2.newComponent("UserComponentHolder") - component.Base = r2.Translator.getDebugBase("palette.entities.botobjects.user_event") - component.Name = r2:genInstanceName(i18n.get("uiR2EdUserComponent")):toUtf8() - - component.Position.x = x - component.Position.y = y - component.Position.z = r2:snapZToGround(x, y) - - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - - end - local function posCancel() - debugInfo("Cancel choice 'User Component' position") - end - local creature = r2.Translator.getDebugCreature("object_component_user_event.creature") - r2:choosePos(creature, posOk, posCancel, "createUserComponent") - end - - function userComponentHolder:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdUserComponent") - logicEntityMenu:addLine(ucstring(name), "lua", "", "uiR2EdUserComponent") - end - - function userComponentHolder.onPickAddEntity(this) - r2_core.CurrentHolderId = this.InstanceId - runAH(nil, "r2ed_picker_lua", "CursCanPickPos=curs_create.tga|CursCannotPickPos=curs_stop.tga|TestFunc=r2_core:testIsExportable|PickFunc=r2_core:addEntityToExporter|PickPosFunc=r2_core:doNothing|WantMouseUp=true") - r2.ContextualCommands:highlightCommandButton("add_entity") - end - - function userComponentHolder.onPickRemoveEntity(this) - r2_core.CurrentHolderId = this.InstanceId - runAH(nil, "r2ed_picker_lua", "CursCanPickPos=curs_create.tga|CursCannotPickPos=curs_stop.tga|TestFunc=r2_core:testCanPickUserComponentElement|PickFunc=r2_core:removeUserComponentElement|PickPosFunc=r2_core:doNothing|WantMouseUp=true") - r2.ContextualCommands:highlightCommandButton("remove_entity") - end - - function userComponentHolder.onPostCreate(this) - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end - - function userComponentHolder.onPickExport(this) - local refX = this.Position.x - local refY = this.Position.y - local refZ = this.Position.z - - local components = this.Components - r2_core.UserComponentManager.CurrentDesc = this.Description - local exportList = {} - local k, v = next(components, nil) - while k do - if v.InstanceId then - table.insert(exportList, v.InstanceId) - end - k, v = next(components, k) - end - r2_core.UserComponentManager:export(exportList, refX, refY, refZ) - end - - function userComponentHolder.create() - if not r2:checkAiQuota() then return end - - local function paramsCancel() - debugInfo("Cancel form for 'User Component' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'User Component' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("UserComponent") == 1 then - r2.displayFeatureHelp("UserComponent") - end - local component = r2.newComponent("UserComponentHolder") - component.Base = r2.Translator.getDebugBase("palette.entities.botobjects.user_event") - component.Name = r2:genInstanceName(i18n.get("uiR2EdUserComponent")):toUtf8() - - component.Position.x = x - component.Position.y = y - component.Position.z = r2:snapZToGround(x, y) - - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - - end - local function posCancel() - debugInfo("Cancel choice 'User Component' position") - end - local creature = r2.Translator.getDebugCreature("object_component_user_event.creature") - r2:choosePos(creature, posOk, posCancel, "createUserComponent") - end - - feature.Components.DefaultFeature = { - BaseClass="BaseClass", - Name="DefaultFeature", - --TreeIcon="r2ed_icon_default_feature.tga", - DisplayerUI = "", - Menu="ui:interface:r2ed_base_menu", - Prop= - { - {Name="Components", Type="Table"}, - }, - --------------------------------------------------------------------------------------------------------- - getFirstSelectableSon = function(this) - for k = 0, this.Components.Size - 1 do - if this.Components[k].Selectable then - return this.Components[k] - end - end - return nil - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.BaseClass.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - ----------------------------------------------------------------------------------------------- - -- from base class - hasScenarioCost = function(this) - return true - end, - ----------------------------------------------------------------------------------------------- - -- from base class - displayInSelectBar = function(this) - return false - end, - - pretranslate = r2.Translator.pretranslateDefaultFeature, - pretranslate2 = r2.Translator.pretranslateDefaultFeature2, - - translate = r2.Translator.translateDefaultFeature, - - getAiCost = function(this) - return r2.getAiCost(this) - 1 - end, - - getStaticObjectCost = function(this) - return r2.getStaticObjectCost(this) - end - - } - - function feature.Components.DefaultFeature.getActivitiesIds(this) - return r2.Translator.getDefaultFeatureActivitiesIds(this) - end - - --- Npc - local componentNpc = feature.Components.Npc - - ---------------------------------------------------------------------------- - -- add a line to the event menu - function componentNpc.initLogicEntitiesMenu(this, logicEntityMenu, testApplicableAction) - local name = i18n.get("uiR2EDnpc") - local existPeople = nil - - local enumerator = r2:enumInstances("Npc") - while 1 do - local inst = enumerator:next() - if not inst then break end - local condExistPeople = not (inst:isKindOf("NpcCreature") or inst:isBotObject() or inst:isPlant()) - if not r2.events.memberManagement then --TEMP - condExistPeople = not (inst:isKindOf("NpcCreature") or inst:isBotObject() or inst:isPlant() or inst:isGrouped()) --TEMP - end --TEMP - if condExistPeople then - existPeople = inst - break - end - end - - if existPeople and (not r2.events.memberManagement or testApplicableAction==nil or (testApplicableAction==true and r2.events:hasApplicableActions(existPeople))) then - logicEntityMenu:addLine(name, "lua", "", "Npc") - end - end - - ---------------------------------------------------------------------------- - -- add a line to the event sub menu - function componentNpc.initLogicEntitiesInstancesMenu(this, subMenu, calledFunction) - local empty = true - local enumerator = r2:enumInstances("Npc") - while 1 do - local entity = enumerator:next() - if not entity then break end - local addLine = not (entity:isKindOf("NpcCreature") or entity:isBotObject() or entity:isPlant()) - if not r2.events.memberManagement then --TEMP - addLine = not (entity:isKindOf("NpcCreature") or entity:isBotObject() or entity:isPlant() or entity:isGrouped()) --TEMP - end --TEMP - if addLine then - local uc_name = ucstring() - uc_name:fromUtf8(entity.Name) - subMenu:addLine(uc_name, "lua", calledFunction.."('".. entity.InstanceId .."')", entity.InstanceId) - empty = false - end - end - - if empty==true then - subMenu:addLine(i18n.get("uiR2EdNoSelelection"), "", "", "") - end - end - - ---------------------------------------------------------------------------- - -- add a line to the event menu - function componentNpc:getLogicTranslations() - - local logicTranslations = { - ["ApplicableActions"] = { - ["Activate"] = {menu=i18n.get("uiR2EdActivates"):toUtf8(), - text=r2:lowerTranslate("uiR2EdActivates")}, - ["Deactivate"] = {menu=i18n.get("uiR2EdDeactivates"):toUtf8(), - text=r2:lowerTranslate("uiR2EdDeactivates")}, - ["Sit Down"] = {menu=i18n.get("uiR2EdSitDown"):toUtf8(), - text=r2:lowerTranslate("uiR2EdSitsDown")}, - ["Stand Up"] = {menu=i18n.get("uiR2EdStandUp"):toUtf8(), - text=r2:lowerTranslate("uiR2EdStandsUp")}, - ["Kill"] = {menu=i18n.get("uiR2EdKill"):toUtf8(), - text=r2:lowerTranslate("uiR2EdKills")}, - ["begin activity sequence"] = {menu=i18n.get("uiR2EdBeginActivitySequ"):toUtf8(), - text=r2:lowerTranslate("uiR2EdSequenceStarts")}, - ["Fight with player"] = {menu=i18n.get("uiR2EdFightWithPlayer"):toUtf8(), - text=r2:lowerTranslate("uiR2EdFightWithPlayer")}, - ["Fight with Npcs"] = {menu=i18n.get("uiR2EdFightWithNpcs"):toUtf8(), - text=r2:lowerTranslate("uiR2EdFightWithNpcs")}, - ["Dont fight with player"] = {menu=i18n.get("uiR2EdDontFightWithPlayer"):toUtf8(), - text=r2:lowerTranslate("uiR2EdDontFightWithPlayer")}, - ["Dont fight with Npcs"] = {menu=i18n.get("uiR2EdDontFightWithNpcs"):toUtf8(), - text=r2:lowerTranslate("uiR2EdDontFightWithNpcs")}, - ["Run"] = {menu=i18n.get("uiR2EdRun"):toUtf8(), - text=r2:lowerTranslate("uiR2EdRun")}, - ["Dont run"] = {menu=i18n.get("uiR2EdDontRun"):toUtf8(), - text=r2:lowerTranslate("uiR2EdDontRun")}, - }, - - ["Events"] = { - ["activation"] = {menu=i18n.get("uiR2EdActivation"):toUtf8(), - text=r2:lowerTranslate("uiR2EdActivation")}, - ["desactivation"] = {menu=i18n.get("uiR2EdDeactivation"):toUtf8(), - text=r2:lowerTranslate("uiR2EdDeactivation")}, - ["death"] = {menu=i18n.get("uiR2EdDeath"):toUtf8(), - text=r2:lowerTranslate("uiR2EdDeath")}, - ["end of activity step"] = {menu=i18n.get("uiR2EdEndActivityStep"):toUtf8(), - text=r2:lowerTranslate("uiR2EdEndActivityStep")}, - ["end of activity sequence"] = {menu=i18n.get("uiR2EdEndActivitySequ"):toUtf8(), - text=r2:lowerTranslate("uiR2EdEndActivitySequ")}, - ["begin of activity step"] = {menu=i18n.get("uiR2EdBeginActivityStep"):toUtf8(), - text=r2:lowerTranslate("uiR2EdBeginActivityStep")}, - ["begin of activity sequence"] = {menu=i18n.get("uiR2EdBeginOfActivitySequ"):toUtf8(), - text=r2:lowerTranslate("uiR2EdBeginOfActivitySequ")}, - ["targeted by player"] = {menu=i18n.get("uiR2EdTargetedByplayer"):toUtf8(), - text=r2:lowerTranslate("uiR2EdTargetedByplayer")} - - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Spawned" ):toUtf8(), - text=i18n.get( "uiR2Test1Spawned" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Despawned" ):toUtf8(), - text=i18n.get( "uiR2Test1Despawned" ):toUtf8()}, - ["is dead"] = { menu=i18n.get( "uiR2Test0Dead" ):toUtf8(), - text=i18n.get( "uiR2Test1Dead" ):toUtf8()}, - ["is alive"] = { menu=i18n.get( "uiR2Test0Alive" ):toUtf8(), - text=i18n.get( "uiR2Test1Alive" ):toUtf8()}, - ["is in activity sequence"] = { menu=i18n.get( "uiR2Test0Seq" ):toUtf8(), - text=i18n.get( "uiR2Test1Seq" ):toUtf8()}, - ["is in activity step"] = { menu=i18n.get( "uiR2Test0Step" ):toUtf8(), - text=i18n.get( "uiR2Test1Step" ):toUtf8()}, - } - } - return logicTranslations - end - - componentNpc.getLogicCondition = r2.Translator.getNpcLogicCondition - componentNpc.getLogicAction = r2.Translator.getNpcLogicAction - componentNpc.getLogicEvent = r2.Translator.getNpcLogicEvent - - -- obsolete - feature.getCost = function (featureInstance) - local cost = 0 - local components = featureInstance.Components - - local key,comp = next(components,nil) - while(key ~= nil) - do - - if (comp.Class == "Npc" or comp.Class == "NpcCustom") - then - cost = cost +1 - end - key,comp = next(components,key) - end - return cost - end - - -- obsolete - feature.Translator = function (context) - - local components = context.Feature.Components - --luaObject(context.Feature) - local key,comp = next(components,nil) - while(key ~= nil) - do - -- Npc case (npc alone not object) - if (comp.isKindOf and comp:isKindOf( "Npc")) - then - local hlNpc = comp - - context.Feature = hlNpc - - -- create and set rtNpc - local rtNpc = r2.Translator.translateNpc(hlNpc, context) - table.insert(context.RtAct.Npcs, rtNpc) - - -- create or get rtGrp - -- set rtGrp.GroupParameter by reading hlNpc (Aggro, Player attackable..) - local rtNpcGrp = r2.Translator.getRtGroup(context,hlNpc.InstanceId) - r2.Translator.setGroupParameters(hlNpc, rtNpcGrp) - --table.insert(context.RtAct.NpcGrps, rtNpcGrp) - table.insert(rtNpcGrp.Children, rtNpc.Id) - - -- set activity - local aiActivity = r2.Translator.getAiActivity(hlNpc) - r2.Translator.translateActivities(context, hlNpc, hlNpc:getBehavior(), rtNpcGrp, aiActivity) - - -- set eventHandlers - r2.Translator.translateEventHandlers(context, hlNpc, hlNpc:getBehavior().Actions, rtNpcGrp) - end - - key,comp = next(components,key) - end - end - - -- NpcCustom - local componentNpcCustom = feature.Components.NpcCustom - - ---------------------------------------------------------------------------- - -- add no line to the event menu - function componentNpcCustom.initLogicEntitiesMenu(this, logicEntityMenu) - end - - ---------------------------------------------------------------------------- - -- add a line to the event sub menu - function componentNpcCustom.initLogicEntitiesInstancesMenu(this, subMenu, calledFunction) - end - - ---------------------------------------------------------------------------- - -- add a line to the event menu - --function componentNpcCustom:getLogicTranslations() - -- return { - --end - - function componentNpcCustom.newCopy(this) - local result = r2.Classes.BaseClass.newCopy(this) - - local sex - if isR2PlayerMale(result.SheetClient) then - sex = r2.male - else - sex = r2.female - end - local race = getR2PlayerRace(result.SheetClient) - - result.Name = r2:randomNPCName2(race, sex) - - return result - end - - --------------------------------------------------------------------------------------------------------- - -- Show the property window for this instance - function componentNpcCustom.onShowProperties(this) - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - if npcUI.active then - r2:updateName() - end - - r2.Classes.BaseClass.onShowProperties(this) - end - - - -- NpcCreature - local componentNpcCreature = feature.Components.NpcCreature - - ---------------------------------------------------------------------------- - -- add no line to the event menu - function componentNpcCreature.initLogicEntitiesMenu(this, logicEntityMenu, testApplicableAction) - - local name = i18n.get("uiR2EDCreatures") - local existCreature = nil - local enumerator = r2:enumInstances("NpcCreature") - while 1 do - local inst = enumerator:next() - if not inst then break end - local condExistCreature = not inst:isKindOf("NpcPlant") - if not r2.events.memberManagement then --TEMP - condExistCreature = not (inst:isKindOf("NpcPlant") or inst:isGrouped()) --TEMP - end --TEMP - if condExistCreature then - existCreature = inst - break - end - end - - if existCreature and (not r2.events.memberManagement or testApplicableAction==nil or (testApplicableAction==true and r2.events:hasApplicableActions(existCreature))) then - logicEntityMenu:addLine(name, "lua", "", "NpcCreature") - end - end - - ---------------------------------------------------------------------------- - -- add a line to the event sub menu - function componentNpcCreature.initLogicEntitiesInstancesMenu(this, subMenu, calledFunction) - local empty = true - local enumerator = r2:enumInstances("NpcCreature") - while 1 do - local entity = enumerator:next() - if not entity then break end - local addLine = not entity:isKindOf("NpcPlant") - if not r2.events.memberManagement then - addLine = not (entity:isKindOf("NpcPlant") or entity:isGrouped()) - end - if addLine then - local uc_name = ucstring() - uc_name:fromUtf8(entity.Name) - subMenu:addLine(uc_name, "lua", calledFunction.."('".. entity.InstanceId .."')", entity.InstanceId) - empty = false - end - end - - if empty==true then - subMenu:addLine(i18n.get("uiR2EdNoSelelection"), "", "", "") - end - end - - - -- NpcPlant - local componentNpcPlant = feature.Components.NpcPlant - - ---------------------------------------------------------------------------- - -- add no line to the event menu - function componentNpcPlant.initLogicEntitiesMenu(this, logicEntityMenu) - r2.Classes.LogicEntity.initLogicEntitiesMenu(this, logicEntityMenu) - end - - ---------------------------------------------------------------------------- - -- add a line to the event sub menu - function componentNpcPlant.initLogicEntitiesInstancesMenu(this, subMenu, calledFunction) - r2.Classes.LogicEntity.initLogicEntitiesInstancesMenu(this, subMenu, calledFunction) - end - - ---------------------------------------------------------------------------- - -- add a line to the event menu - function componentNpcPlant:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["Activate"] = {menu=i18n.get("uiR2EdActivates"):toUtf8(), - text=r2:lowerTranslate("uiR2EdActivates")}, - ["Deactivate"] = {menu=i18n.get("uiR2EdDeactivates"):toUtf8(), - text=r2:lowerTranslate("uiR2EdDeactivates")}, - ["Kill"] = {menu=i18n.get("uiR2EdKill"):toUtf8(), - text=r2:lowerTranslate("uiR2EdKills")}, - }, - - ["Events"] = { - ["activation"] = {menu=i18n.get("uiR2EdActivation"):toUtf8(), - text=r2:lowerTranslate("uiR2EdActivation")}, - ["desactivation"] = {menu=i18n.get("uiR2EdDeactivation"):toUtf8(), - text=r2:lowerTranslate("uiR2EdDeactivation")}, - ["death"] = {menu=i18n.get("uiR2EdDeath"):toUtf8(), - text=r2:lowerTranslate("uiR2EdDeath")}, - ["targeted by player"] = {menu=i18n.get("uiR2EdTargetedByplayer"):toUtf8(), - text=r2:lowerTranslate("uiR2EdTargetedByplayer")} - }, - ["Conditions"] = { - ["is active"] = {menu=i18n.get("uiR2EdIsActive"):toUtf8(), - text=r2:lowerTranslate("uiR2EdIsActive")}, - ["is dead"] = {menu=i18n.get("uiR2EdIsDead"):toUtf8(), - text=r2:lowerTranslate("uiR2EdIsDead")}, - ["is alive"] = {menu=i18n.get("uiR2EdIsAlive"):toUtf8(), - text=r2:lowerTranslate("uiR2EdIsAlive")}, - ["is inactive"] = {menu=i18n.get("uiR2EdIsInactive"):toUtf8(), - text=r2:lowerTranslate("uiR2EdIsInactive")}, - } - } - return logicTranslations - end - - - - - - return feature -end - -r2.Features["DefaultFeature"] = registerFeature() - - - - - - --------------------------------------------------------------------------------------------------- --------------------------- ACTIVE LOGIC ENTITY DisplayerProperties ----------------------------------------- --------------------------------------------------------------------------------------------------- - -local activeLogicEntityPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function activeLogicEntityPropertySheetDisplayerTable:onPostCreate(instance) -end ------------------------------------------------- -function activeLogicEntityPropertySheetDisplayerTable:onErase(instance) - r2:logicEntityPropertySheetDisplayer():onErase(instance) -end ------------------------------------------------- -function activeLogicEntityPropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function activeLogicEntityPropertySheetDisplayerTable:onPostHrcMove(instance) -end ------------------------------------------------- -function activeLogicEntityPropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -r2.activitiesAndChatsUIUpdate = false -function activeLogicEntityPropertySheetDisplayerTable:onSelect(instance, isSelected) - - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) - - if not isSelected or (instance.Ghost == true) then - - r2.activities:closeEditor() - r2.miniActivities:closeEditor() - else - if instance:isKindOf("Npc") then - local helpButton = getUI("ui:interface:r2ed_property_sheet_Npc:header_opened:help") - assert(helpButton) - if instance:isBotObject() then - debugInfo("1") - helpButton.active = false - helpButton.parent.parent.title_delta_max_w = r2.DefaultPropertySheetTitleClampSize - else - debugInfo("2") - helpButton.active = true - helpButton:updateCoords() - helpButton.parent.parent.title_delta_max_w = r2.DefaultPropertySheetTitleClampSize - helpButton.w_real - 4 - end - end - r2.activities.isInitialized = false - r2.miniActivities:openEditor() - end -end - ------------------------------------------------- -function activeLogicEntityPropertySheetDisplayerTable:onAttrModified(instance, attributeName) - - r2:logicEntityPropertySheetDisplayer():onAttrModified(instance, attributeName) - - if attributeName == "Name" then - - if r2.events.filteredLogicEntityId == instance.InstanceId then - r2.events:updateSequenceUI() - end - - if not r2.activitiesAndChatsUIUpdate or instance ~= r2:getSelectedInstance() then - return - end - - local activitiesUI = getUI(r2.activities.uiId) - assert(activitiesUI) - local dialogsUI = getUI(r2.dialogs.uiId) - assert(dialogsUI) - - activitiesUI.uc_title = i18n.get("uiR2EDActivitySequenceEditor"):toUtf8() .. instance[attributeName] - dialogsUI.uc_title = i18n.get("uiR2EDChatSequenceEditor"):toUtf8() .. instance[attributeName] - end -end - ------------------------------------------------- -function r2:activeLogicEntityPropertySheetDisplayer() - return activeLogicEntityPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - - - - - - - - - - - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_delivery_task.lua b/code/ryzom/common/data_common/r2/r2_features_delivery_task.lua deleted file mode 100644 index 5205e716b..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_delivery_task.lua +++ /dev/null @@ -1,625 +0,0 @@ - -r2.Features.DeliveryTask = {} - -local feature = r2.Features.DeliveryTask - -feature.Name="DeliveryTask" - -feature.Description="" - -feature.Components = {} - -feature.Components.DeliveryTask = - { - BaseClass="LogicEntity", - Name="DeliveryTask", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "deliveryTaskDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - - ApplicableActions = { "activate", "deactivate"}, - - Events = { "activation", "deactivation", "mission asked", "succeeded", "delivered"}, - - Conditions = { "is active", "is inactive", "is succeeded" }, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table"}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="MissionGiver", Type="RefId", PickFunction="r2:canPickTalkingNpc", SetRefIdFunction="r2:setTalkingNpc"}, - {Name="MissionTarget", Type="RefId", PickFunction="r2:canPickTalkingNpc", SetRefIdFunction="r2:setTalkingNpc"}, - {Name="ItemNumber", Type="Number", Category="uiR2EDRollout_ItemsToDeliver", WidgetStyle="EnumDropDown", - Enum={"1", "2", "3"}, }, - {Name="Item1Qty", Type="Number", Category="uiR2EDRollout_ItemsToDeliver", Min="0", DefaultValue="1", Visible= function(this) return this:displayRefId(1) end}, - {Name="Item1Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_ItemsToDeliver", Visible= function(this) return this:displayRefId(1) end}, - - {Name="Item2Qty", Type="Number", Category="uiR2EDRollout_ItemsToDeliver", Min="0", DefaultValue="0", Visible= function(this) return this:displayRefId(2) end}, - {Name="Item2Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_ItemsToDeliver", Visible= function(this) return this:displayRefId(2) end}, - - {Name="Item3Qty", Type="Number", Category="uiR2EDRollout_ItemsToDeliver", Min="0", DefaultValue="0", Visible= function(this) return this:displayRefId(3) end}, - {Name="Item3Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_ItemsToDeliver", Visible= function(this) return this:displayRefId(3) end}, - {Name="ValidationNeeded", Category="uiR2EDRollout_TextToSay", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="ContextualText", Type="String", Category="uiR2EDRollout_TextToSay", MaxNumChar="100"}, - {Name="MissionText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="MissionSucceedText", Type="String", Category="uiR2EDRollout_TextToSay", Visible= function(this) - return this:IsValidationNeeded() end }, - {Name="BroadcastText", Type="String", Category="uiR2EDRollout_TextToSay", DefaultValue="", DefaultInBase = 1}, - {Name="WaitValidationText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="Repeatable", Type="Number", WidgetStyle="Boolean", DefaultValue="0"}, - - - }, - - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - - - } - - -local component = feature.Components.DeliveryTask - -function component:IsValidationNeeded() - local validationNeeded = self.ValidationNeeded - if validationNeeded == 1 then - return true - end - return false -end - -function component:displayRefId(index) - local nbItems = self.ItemNumber + 1 - if index <= nbItems then - return true - end - return false -end - -function component:getItems() - local str = "" - - local id = 1 - while id <= 3 do - local item = self["Item"..tostring(id).."Id"] - local item2 = self.Item1Id - if (item) then - - local qt = tonumber(self["Item"..tostring(id).."Qty"]) - - local plotItem = r2:getInstanceFromId(item) - if plotItem then - local plotItemSheetId = plotItem.SheetId - if str ~= "" then str = str ..";" end - local name = r2.getSheetIdName(plotItemSheetId) - str = str .. tostring(name)..":"..qt - end - end - id = id + 1 - end - return str -end - -function component:textAdapter(text) - local str = "" - local items = {} - local qts = {} - - local id = 1 - while id <= 3 do - local item = self["Item"..tostring(id).."Id"] - local item2 = self.Item1Id - if (item) then - - local qt = tonumber(self["Item"..tostring(id).."Qty"]) - qts[id] = qt - - local plotItem = r2:getInstanceFromId(item) - if plotItem then - items[id] = plotItem.Name - else - items[id] = "" - end - end - id = id + 1 - end - local str = text - str=string.gsub (str, "", tostring(qts[1])) - str=string.gsub (str, "", tostring(qts[2])) - str=string.gsub (str, "", tostring(qts[3])) - str=string.gsub (str, "", tostring(items[1])) - str=string.gsub (str, "", tostring(items[2])) - str=string.gsub (str, "", tostring(items[3])) - - local mission_giver = "" - if self.MissionGiver == nil then return end - local npc = r2:getInstanceFromId(self.MissionGiver) - if npc then - mission_giver = npc.Name - end - str=string.gsub(str, "", tostring(mission_giver)) - - local mission_target = "" - if self.MissionTarget == nil then return end - local npc = r2:getInstanceFromId(self.MissionTarget) - if npc then - mission_target = npc.Name - end - str=string.gsub(str, "", tostring(mission_target)) - - return str -end - -local deliveryTaskDisplayerTable = clone(r2:propertySheetDisplayer()) - -local oldOnAttrModified = deliveryTaskDisplayerTable.onAttrModified -function deliveryTaskDisplayerTable:onAttrModified(instance, attributeName) - - oldOnAttrModified(self, instance, attributeName) - - local propertySheet = r2:getPropertySheet(instance) - - if attributeName == "ItemNumber" then - local nbRefId = instance.ItemNumber + 1 - local i = 1 - while i <= 3 do - if i > nbRefId then - local name = "Item"..tostring(i).."Id" - local qty = "Item"..tostring(i).."Qty" - r2.requestSetNode(instance.InstanceId, name, r2.RefId("")) - r2.requestSetNode(instance.InstanceId, qty, 0) - end - i = i + 1 - end - propertySheet.Env.updatePropVisibility() - return - end - if attributeName == "ValidationNeeded" then - propertySheet.Env.updatePropVisibility() - return - end - - local targetRefId = propertySheet:find("MissionTarget") - local targetName = targetRefId:find("name") - - local giverRefId = propertySheet:find("MissionGiver") - local giverName = propertySheet:find("MissionGiver"):find("name") - - if attributeName == "MissionGiver" then - - local instanceId = instance[attributeName] - if instanceId == "" then - giverName.hardtext = "NONE" - return - end - - if instance["MissionTarget"] == instance[attributeName] then - giverName.hardtext = "NONE" - r2.requestSetNode(instance.InstanceId, "MissionGiver", "") - else - giverName.hardtext = r2:getInstanceFromId(instance[attributeName]).Name - end - return - end - - if attributeName == "MissionTarget" then - local instanceId = instance[attributeName] - if instanceId == "" then - targetName.hardtext = "NONE" - return - end - - if instance["MissionGiver"] == instance[attributeName] then - targetName.hardtext = "NONE" - r2.requestSetNode(instance.InstanceId, "MissionTarget", "") - else - targetName.hardtext = r2:getInstanceFromId(instance[attributeName]).Name - end - return - end - - - r2:propertySheetDisplayer():onAttrModified(instance, attributeName) - return -end - -function deliveryTaskDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true -end - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - if tmpInstance.ParentInstance and tmpInstance.ParentInstance:isKindOf("NpcGrpFeature") then - r2.requestSetNode(self.InstanceId, targetAttr, r2.RefId("")) - end - end - -end - -function r2:deliveryTaskDisplayer() - return deliveryTaskDisplayerTable -- returned shared displayer to avoid wasting memory -end - - --- EVENTS----------------------------------------------------------------------- --- we don't use events 1 to 3 anymore because they were bypassed by the events --- emitted by "request_item" and "give_item" actions --- 4 : activation --- 5 : deactivation --- 6 : mission given --- 8 : items delivered --- 9 : mission completed ---------------------------------------------------------------------------------- -function component:translate(context) - r2.Translator.translateAiGroup(self, context) - - local validationNeeded = self.ValidationNeeded - debugInfo("VALIDATION VALUE : " ..self.ValidationNeeded) - - if self.MissionGiver == nil then return end - local giver = r2:getInstanceFromId(self.MissionGiver) - if not giver then return end - local rtGiverGrp = r2.Translator.getRtGroup(context, giver.InstanceId) - assert(rtGiverGrp) - - if self.MissionTarget == nil then return end - local target = r2:getInstanceFromId(self.MissionTarget) - if not target then return end - local rtTargetGrp = r2.Translator.getRtGroup(context, target.InstanceId) - assert(rtTargetGrp) - - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - local items = self:getItems() - - -- Start of state - do - local action = r2.Translator.createAction("user_event_trigger", rtGrp.Id, 7) - r2.Translator.translateAiGroupEvent("start_of_state" , self, context, action) - end - - do - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", self.Active) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) - local rtAction4 = r2.Translator.createAction("set_value", rtGrp.Id, "v3", 0) - local rtAction5 = r2.Translator.createAction("set_value", rtGrp.Id, "Validation", self.ValidationNeeded) - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3, rtAction4, rtAction5 } ) - r2.Translator.translateAiGroupEvent("user_event_7", self, context, rtAction) - end - - -- (re)activation - do - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3, } ) - r2.Translator.translateAiGroupEvent("user_event_4", self, context, rtAction) - end - - - -- giver propose la mission - do - local actionSuccessText = r2.Translator.createAction("npc_say", self:textAdapter(self.MissionSucceedText), rtGiverGrp.Id ..":"..giver.Name) - local actionEvent = r2.Translator.createAction("user_event_trigger", rtGrp.Id, 9) - - local multiActions = r2.Translator.createAction("multi_actions", {actionSuccessText, actionEvent}) - local action = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Validation", 1, - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 3, multiActions)) - - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, -- Active - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 0, - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("npc_say", self:textAdapter(self.MissionText), rtGiverGrp.Id ..":"..giver.Name), - r2.Translator.createAction("give_item", rtGrp.Id, items, self:textAdapter(self.ContextualText)), - }) - )) - - local fullAction = r2.Translator.createAction("multi_actions", {rtAction, action}) - - r2.Translator.translateAiGroupEvent("player_target_npc", giver, context, fullAction) - end - - --when player takes item from giver - do - local actionItemGiven = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 0, --and if the scenery object has been selected once by the player - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 6), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 1 )})) - - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1,actionItemGiven) - - r2.Translator.translateAiGroupEvent("user_event_1", self, context, rtAction) - end - - - -- When player talks to target - do - local actionSay = r2.Translator.createAction("npc_say", self:textAdapter(self.WaitValidationText), rtTargetGrp.Id ..":"..target.Name) - local actionRequest = r2.Translator.createAction("request_item", rtGrp.Id, items, self:textAdapter(self.ContextualText)) - - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, -- Active - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 1, -- if items have been taken from giver - r2.Translator.createAction("multi_actions", {actionSay, actionRequest}) - )) - r2.Translator.translateAiGroupEvent("player_target_npc", target, context, rtAction) - end - - --when player gives item to target - do - local actionItemTaken = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 1, - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 2), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 8), - }) - ) - - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, actionItemTaken) - - r2.Translator.translateAiGroupEvent("user_event_3", self, context, rtAction) - end - - --when receiving ItemsDelivered event - do - local baseAct = r2.Scenario:getBaseAct() - local baseActRtGrp = r2.Translator.getRtGroup(context, baseAct.InstanceId) - - local actionBroadcast = r2.Translator.createAction("broadcast_msg",baseActRtGrp.Id, self:textAdapter(self.BroadcastText) ) - local actionSet = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 3) - - local actionEventSuccess = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Validation", 0, - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 9)) - - local multiaction = r2.Translator.createAction("multi_actions", {actionBroadcast, actionSet, actionEventSuccess}) - - r2.Translator.translateAiGroupEvent("user_event_8", self, context, multiaction) - - end - - -- when receiving user_event_9, which means success, reset mission values. - do - local action2 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 1, --if Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1 ), - }) - ); - local action3 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 0, -- if not Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0 ) , - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 3 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1 ), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 5), - }) - ); - local actions = r2.Translator.createAction("multi_actions", { action2, action3, }) - - - local action = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 3, actions) - - r2.Translator.translateAiGroupEvent("user_event_9", self, context, action) - end - - --r2.Translator.translateFeatureActivation(self, context) -end - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1); - return action1, action1 - elseif condition.Condition.Type == "is inactive" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0); - return action1, action1 - elseif condition.Condition.Type == "is succeeded" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v3", 1); - return action1, action1 - - else - assert(nil) - end - return nil,nil -end - - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "mission asked" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 6) - elseif eventType == "delivered" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 8) - elseif eventType == "succeeded" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 9) - - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.createComponent = function(x, y) - - local comp = r2.newComponent("DeliveryTask") - assert(comp) - - local contextualText = i18n.get("uiR2EdDeliveryTask_ContextualText"):toUtf8() - local missionText = i18n.get("uiR2EdDeliveryTask_MissionText"):toUtf8() - local missionSucceedText = i18n.get("uiR2EdDeliveryTask_MissionSucceededText"):toUtf8() - local waitValidationText = i18n.get("uiR2EdDeliveryTask_WaitValidationText"):toUtf8() - local broadcastText = i18n.get("uiR2EdDeliveryTask_BroadcastText"):toUtf8() - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.bot_request_item") - comp.Name = r2:genInstanceName(i18n.get("uiR2EDDeliveryTask")):toUtf8() - - comp.ContextualText = contextualText - comp.MissionText = missionText - comp.MissionSucceedText = missionSucceedText - comp.WaitValidationText = waitValidationText - comp.BroadcastText = broadcastText - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - comp._Seed = os.time() - - return comp -end - -component.create = function() - - if not r2:checkAiQuota() then return end - - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'DeliveryTask' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("DeliveryTask") == 1 then - r2.displayFeatureHelp("DeliveryTask") - end - r2.requestNewAction(i18n.get("uiR2EDNewDeliveryTaskFeature")) - local component = feature.Components.DeliveryTask.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'DeliveryTask' position") - end - local creature = r2.Translator.getDebugCreature("object_component_bot_request_item.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureDeliveryTask") -end - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdDeliveryTask") - logicEntityMenu:addLine(ucstring(name), "lua", "", "DeliveryTask") -end - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()} - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["mission asked"] = { menu=i18n.get( "uiR2Event0MissionGiven" ):toUtf8(), - text=i18n.get( "uiR2Event1MissionGiven" ):toUtf8()}, --- ["wait validation"] = { menu=i18n.get( "uiR2Event0TaskWaitValidation" ):toUtf8(), --- text=i18n.get( "uiR2Event1TaskWaitValidation" ):toUtf8()}, - ["delivered"] = { menu=i18n.get( "uiR2Event0Delivered" ):toUtf8(), - text=i18n.get( "uiR2Event1Delivered" ):toUtf8()}, - ["succeeded"] = { menu=i18n.get( "uiR2Event0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskSuccess" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - - ["is succeeded"] = { menu=i18n.get( "uiR2Test0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Test1TaskSuccess" ):toUtf8()}, - - } - } - return logicTranslations -end - - -r2.Features["DeliveryTask"] = feature - diff --git a/code/ryzom/common/data_common/r2/r2_features_easter_egg.lua b/code/ryzom/common/data_common/r2/r2_features_easter_egg.lua deleted file mode 100644 index 76b185f8b..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_easter_egg.lua +++ /dev/null @@ -1,489 +0,0 @@ - --- In Translation file --- Category : uiR2EdEasterEgg -- --- CreationFrom : uiR2EdEasterEggParameters - - -r2.Features.EasterEggFeature = {} - -local feature = r2.Features.EasterEggFeature - -feature.Name="EasterEggFeature" - -feature.Description="A feature that allows a NPC to take some item(s) from easter eggs" - -feature.Components = {} - - - -feature.Components.EasterEgg = - { - BaseClass="LogicEntity", - Name="EasterEgg", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "itemChestDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - -- - -- Supposed to be the specific attributes of the feature (ex: for a banditcamp, number of bandits, - -- race, etc.) but apparently not used.. - -- - Parameters = {}, - -- - -- The different actions that can be performed by the feature (activate, wander, spawn etc.) - -- - ApplicableActions = { "activate", "deactivate"}, - -- - -- Events are what happen to the feature and may trigger actions on the feature. (ex: "on activation", - -- "on arrive at camp" etc.) - -- - Events = { "activation", "deactivation", "opened"}, - -- - -- Conditions are what can be tested on the feature, giving information about its state (ex: "is wandering", "is active" etc.) - -- - Conditions = { "is active", "is inactive" }, - -- - -- TextContexts is what the feature might say upon events (2 different kinds: spontaneous & interrogation texts) - -- - TextContexts = {}, - -- - -- Not quite clear.. - -- - TextParameters = {}, - -- - -- Feature's parameters which can be modified by the GM at runtime. - -- - LiveParameters = {}, - ----------------------------------------------------------------------------------------------- - -- - -- Properties define the feature's parameters like this: - -- {Name="Parameter_Name", Type="Param_Type", Category="??", WidgetStyle="UI_WidgetStyle", Min="min_value", Max="max_value", Default="defalut_value" - -- Categories can be found in data_common/r2/r2.uxt?? - -- - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table", Visible = false}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="Angle", Type="Number", - WidgetStyle="Slider", Min="0", Max="360", - -------------------- - convertToWidgetValue = - function(value) - local angle = value - if angle == nil then angle = 0 end - local result = math.fmod(math.floor(180 * angle / math.pi), 360) - if result < 0 then result = 360 + result end - return result - end, - -------------------- - convertFromWidgetValue = - function(value) - local angle = value - if angle == nil then angle = 0 end - return math.pi * math.min(359, angle) / 180 - end, - }, - {Name="ItemNumber", Type="Number", Category="uiR2EDRollout_Items", WidgetStyle="EnumDropDown", - Enum={"1", "2", "3"}, DefaultValue="3"}, - {Name="Item1Qty", Type="Number", Category="uiR2EDRollout_Items", Min="1", Max="50", DefaultValue="1", Visible= function(this) return this:displayRefId(1) end}, - {Name="Item1Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_Items", Visible= function(this) return this:displayRefId(1) end}, - {Name="Item2Qty", Type="Number", Category="uiR2EDRollout_Items", Min="0",Max="50", DefaultValue="0", Visible= function(this) return this:displayRefId(2) end}, - {Name="Item2Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_Items", Visible= function(this) return this:displayRefId(2) end}, - {Name="Item3Qty", Type="Number", Category="uiR2EDRollout_Items", Min="0",Max="50", DefaultValue="0", Visible= function(this) return this:displayRefId(3) end}, - {Name="Item3Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_Items", Visible= function(this) return this:displayRefId(3) end}, - {Name="Active", Type="Number", WidgetStyle="Boolean", Min="0", DefaultValue="1"}, --- {Name="Look", Type="String", DefaultValue="object_bones.creature"}, TODO use an enem / tree to select an object - - - - }, - - -- - -- from base class - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - -- - -- from base class - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - -- - -- from base class - getSelectBarSons = function(this) - return Components - end, - - -- - -- from base class - canHaveSelectBarSons = function(this) - return false; - end, - - -- - -- Called when running EditMode to create locally the feature without sending anything into the act (speed purpose). - -- - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - local eggId = this:getEggId(context) - end, - - translate = function(this, context) - local entity = this - - r2.Translator.translateAiGroup(this, context) - - local rtNpcGrp = r2.Translator.getRtGroup(context, this.InstanceId) - - if (this.Active == 1) - then - local eggId = this:getEggId(context) - local intialAction = this:createActionActivateEasterEgg(context) - r2.Translator.translateAiGroupInitialState(this, context, intialAction) - end - r2.Translator.translateFeatureActivation(this, context) - end - - } - -------------------------------------------------------------------------------------------------------------------------- - -local component = feature.Components.EasterEgg - -function component:displayRefId(index) - local nbItems = self.ItemNumber + 1 - if index <= nbItems then - return true - end - return false -end - - -local itemChestDisplayerTable = clone(r2:propertySheetDisplayer()) - -function itemChestDisplayerTable:onAttrModified(instance, attributeName) - if attributeName == "ItemNumber" then - local propertySheet = r2:getPropertySheet(instance) - local nbRefId = instance.ItemNumber + 1 - local i = 1 - while i <= 3 do - if i > nbRefId then - local name = "Item"..tostring(i).."Id" - local qty = "Item"..tostring(i).."Qty" - r2.requestSetNode(instance.InstanceId, name, r2.RefId("")) - r2.requestSetNode(instance.InstanceId, qty, 0) - end - i = i + 1 - end - propertySheet.Env.updatePropVisibility() - return - end - r2:propertySheetDisplayer():onAttrModified(instance, attributeName) -end - -function itemChestDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function r2:itemChestDisplayer() - return itemChestDisplayerTable -- returned shared displayer to avoid wasting memory -end - --- --- Create the logic actions relative to the feature via the translator. --- - -function getPlotItemIdByInstance(missionItem) - local container = r2.Scenario.PlotItems - local k, v = next(container) - local id = 0 - while k do - if tostring(v.InstanceId) == tostring(missionItem.InstanceId) then return id end - id = id + 1 - k, v = next(container, k) - end - assert(nil) - return nil -end - - -function component:getItems() - local str = "" - - local id = 1 - while id <= 3 do - local item = self["Item"..tostring(id).."Id"] - local item2 = self.Item1Id - if (item) then - - local qt = tonumber(self["Item"..tostring(id).."Qty"]) - - local plotItem = r2:getInstanceFromId(item) - if plotItem then - local plotItemId = getPlotItemIdByInstance(plotItem) - if str ~= "" then str = str ..";" end - - str = str .. tostring(plotItemId)..":"..qt - end - end - id = id + 1 - end - return str -end - -function component:createActionActivateEasterEgg(context) - local eggId = self:getEggId(context) - - local str = self:getItems() - - local pos = r2.getWorldPos(self) - local x = pos.x - local y = pos.y - local z = r2:snapZToGround(x, y) - local heading = 0 - if self.Angle then - heading = self.Angle - end - - local name = self.Name - local clientSheet = self.Look - - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - local multiActions = r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("easter_egg_activate", rtGrp.Id, eggId, r2:getActId(context.Act), str, x, y, z, heading, name, clientSheet), - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1)}) - return multiActions, multiActions -end - -function component:createActionDeactivateEasterEgg(context) - local eggId = self:getEggId(context) - - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - - local multiActions = r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("easter_egg_deactivate", rtGrp.Id, eggId, r2:getActId(context.Act)), - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0)}) - return multiActions, multiActions -end - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if (action.Action.Type == "activate") then - local retAction = component:createActionActivateEasterEgg(context) - return retAction, retAction - elseif (action.Action.Type == "deactivate") then - local retAction = component:createActionDeactivateEasterEgg(context) - return retAction, retAction - end - - local firstAction, lastAction = nil, nil - return firstAction, lastAction -end - --- --- Checks the conditions defined for this feature --- -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationCondition(condition, rtNpcGrp) -end - - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "opened" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 2) - elseif eventType == "activation" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 4) - elseif eventType == "deactivation" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 5) - end - return eventHandler, firstCondition, lastCondition -end - - --- feature part - - --- --- Creates an instance of the feature with attributes retrieved from the creation form --- -function component.createComponent(x, y) - - local comp = r2.newComponent("EasterEgg") - assert(comp) - - comp.Base = "palette.entities.botobjects.chest_wisdom_std_sel" - comp.Name = r2:genInstanceName(i18n.get("uiR2EdEasterEgg")):toUtf8() - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - comp.ItemNumber = 0 - - comp._Seed = os.time() - - return comp -end - - -function component:getEggId(context) - assert(context) - local n = 0 - - if context.EasterEggUniqId == nil then - context.EasterEggUniqId = {} - context.EasterEggMaxId = 0 - end - - local rtNpcGrp = r2.Translator.getRtGroup(context, self.InstanceId) - if context.EasterEggUniqId[rtNpcGrp.Id] == nil then - local n = context.EasterEggMaxId + 1 - context.EasterEggUniqId[rtNpcGrp.Id] = n - context.EasterEggMaxId = n - end - - return context.EasterEggUniqId[rtNpcGrp.Id] - -end - - - --- from ihm --- Displays the creation form of the feature and calls CreateComponent with the user input values --- -function component.create() - - if not r2:checkAiQuota() then return end - - - - local function paramsOk(resultTable) - - - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - if showAgain == 1 then - r2.setDisplayInfo("EasterEggForm", 0) - else r2.setDisplayInfo("EasterEggForm", 1) end - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local comp = component.createComponent( x, y) - r2:setCookie(comp.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", comp) - end - - local function paramsCancel() - debugInfo("Cancel form for 'EasterEggFeature' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'EasterEggFeature' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("EasterEgg") == 1 then - r2.displayFeatureHelp("EasterEgg") - end - r2.requestNewAction(i18n.get("uiR2EDNewEasterEggAction")) - local comp = component.createComponent( x, y) - r2:setCookie(comp.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", comp) - end - local function posCancel() - debugInfo("Cancel choice 'EasterEggFeature' position") - end - r2:choosePos("object_chest_wisdom_std_sel.creature", posOk, posCancel, "createFeatureEasterEgg") -end - ------------------------------------------ ---- register the current Feature to menu - - ----------------------------------------------------------------------------- --- add a line to the event menu -function component:getLogicTranslations() - - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Spawn" ):toUtf8(), - text=i18n.get( "uiR2AA1Spawn" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Despawn" ):toUtf8(), - text=i18n.get( "uiR2AA1Despawn" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Spawn" ):toUtf8(), - text=i18n.get( "uiR2Event1Spawn" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Despawn" ):toUtf8(), - text=i18n.get( "uiR2Event1Despawn" ):toUtf8()}, - ["opened"] = { menu=i18n.get( "uiR2Event0ChestOpened" ):toUtf8(), - text=i18n.get( "uiR2Event1ChestOpened" ):toUtf8()}, - - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Spawned" ):toUtf8(), - text=i18n.get( "uiR2Test1Spawned" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Despawned" ):toUtf8(), - text=i18n.get( "uiR2Test1Despawned" ):toUtf8()} - } - } - return logicTranslations -end - -r2.Features["EasterEggFeature"] = feature - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_empty.lua b/code/ryzom/common/data_common/r2/r2_features_empty.lua deleted file mode 100644 index 07f934bad..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_empty.lua +++ /dev/null @@ -1,268 +0,0 @@ - --- In Translation file --- Category : uiR2EdEmptyFeature -- --- CreationFrom : uiR2EdEmptyParameters - - -r2.Features.EmptyFeature = {} - -local feature = r2.Features.EmptyFeature - -feature.Name="EmptyFeature" - -feature.Description="An empty feature" - -feature.Components = {} - - --- ######################### --- # FEATURE FUNCTIONS # --- ######################### - --- --- Registers the feature creation form used as a creation menu in the editor --- -function feature.registerForms() - r2.Forms.EmptyFeatureForm = - { - Caption = "uiR2EdEmptyParameters", - Prop = - { - -- The creation form's fields are defined here - {Name="Property1", Type="String", Category="UI Subsection"} - } - } - -end - - - -feature.Components.EmptyFeature = - { - BaseClass="LogicEntity", - Name="EmptyFeature", - Menu="ui:interface:r2ed_feature_menu", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - - -- - -- The different actions that can be performed by the feature ("activate", "wander", "spawn" etc.) - -- - ApplicableActions = {}, - - -- - -- Events are the feature's states that may trigger actions on the feature. (ex: "on activation", - -- "on arrive at camp" etc.) - -- - Events = {}, - - -- - -- Conditions can be tested on the feature, giving information about its state (ex: "is wandering", "is active" etc.) - -- - Conditions = {}, - - -- - -- TextContexts is what the feature might say upon events (2 different kinds: spontaneous & interrogation texts) - -- - TextContexts = {}, - - -- - -- Not quite clear.. - -- - TextParameters = {}, - - -- - -- Feature's parameters which can be modified by the GM at runtime. - -- - LiveParameters = {}, - - -- - -- Properties define the attributes of the feature. - -- They're all displayed in the properties window of the feature. - -- - -- -Name: define the name of the property - -- - -- -Type: define the type of the property and can be "String", "Number", "Table", "RefId" etc. - -- - -- -Category: Define a subsection of the property window displayed within the editor, so that different properties - -- refering to the same feature's aspect can be grouped, and not added randomly in the window - -- - -- WidgetStyle: define the type of UI widget that will be used to display the property. If not specified, - -- the property is displayed in a textBox. - -- - Prop = - { - {Name="InstanceId", Type="String", Category="uiR2EDRollout_UISubsection", WidgetStyle="StaticText"} - }, - - -- - -- from base class - -- - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - -- - -- from base class - -- - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - -- - -- from base class - -- - getSelectBarSons = function(this) - return Components - end, - - -- - -- from base class - -- - canHaveSelectBarSons = function(this) - return false; - end, - - -- - -- Called when running EditMode to create the feature locally without sending anything into the act (speed purpose). - -- - onPostCreate = function(this) - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - - translate = function(this, context) - r2.Translator.translateAiGroup(this, context) - end, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - } - --- ########################### --- # COMPONENT FUNCTIONS # --- ########################### - -local component = feature.Components.EmptyFeature - --- --- Called when running test mode to create the feature and insert it into the current act. --- -component.createGhostComponents = function(act, comp) -end - --- --- Creates an instance of the feature with attributes retrieved from the creation form -component.createComponent = function(x, y) - - local comp = r2.newComponent("EmptyFeature") - assert(comp) - - comp.Base = "palette.entities.botobjects.milestone" - comp.Name = r2:genInstanceName(i18n.get("uiR2EdEmptyFeature")):toUtf8() - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - - return comp -end - --- --- Displays the creation form of the feature and calls CreateComponent with the user input values --- -component.create = function() - - if not r2:checkAiQuota() then return end - - local function paramsOk(resultTable) - r2.requestNewAction(i18n.get("uiR2EDNewEmptyFeatureAction")) - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local component = feature.Components.EmptyFeature.createComponent( x, y) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'EmptyFeature' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'EmptyFeature' at pos (%d, %d, %d)", x, y, z)) - r2:doForm("EmptyFeatureForm", {X=x, Y=y}, paramsOk, paramsCancel) - end - local function posCancel() - debugInfo("Cancel choice 'EmptyFeature' position") - end - r2:choosePos("object_milestone.creature", posOk, posCancel, "createFeatureBanditCamp") -end - - --- -function feature.registerForms() - r2.Forms.EmptyFeatureForm = - { - Caption = "uiR2EdEmptyParameters", - Prop = - { - -- The creation form's fields are defined here - {Name="Property1", Type="String", Category="uiR2EDRollout_UISubsection"} - } - } -end - --- --- The following functions are specific to the Feature --- -local component = feature.Components.EmptyFeature - -component.getLogicAction = function(entity, context, action) - local firstAction, lastAction = nil,nil - return firstAction, lastAction -end - -component.getLogicCondition = function(this, context, condition) - return nil,nil -end - -component.getLogicEvent = function(this, context, event) - local eventHandler, firsCondition, lastCondition = nil, nil, nil - return eventHandler, firsCondition, lastCondition - -end - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdEmptyFeature") - logicEntityMenu:addLine(ucstring(name), "lua", "", "EmptyFeature") -end - -function component:getLogicTranslations() - - local logicTranslations = { - ["ApplicableActions"] = {}, - ["Events"] = {}, - } - return logicTranslations -end - -r2.Features["EmptyFeature"] = feature - diff --git a/code/ryzom/common/data_common/r2/r2_features_fauna.lua b/code/ryzom/common/data_common/r2/r2_features_fauna.lua deleted file mode 100644 index 3ebc561a3..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_fauna.lua +++ /dev/null @@ -1,840 +0,0 @@ --- --- ***************** --- * FAUNA FEATURE * --- ***************** --- --- The fauna feature contains 2 herds of creatures (herbivores and carnivores) that wander between 2 life zones (sleep zone and --- food zone).There are 2 differents kinds of components in this feature: fauna system and creature. --- The fauna system component is some kind of manager for the feature. It creates the creatures and their life zones, and then --- store them in its components table, so that their createChostComponents call and translation are automatically done by --- the translator. --- The created life zones are affected to each of the creature components. But the properties panel of the creature components allows --- the DM to choose other zones in the scenario through RefId picking. - - -r2.Features.FaunaFeature = {} - -local feature = r2.Features.FaunaFeature - -feature.Name="FaunaFeature" - -feature.Description="Generates a pack of carnivores and a herd of herbivores that will wander between two life zones (sleep zone, food zone) each." - -feature.Components = {} - - --- ********************* --- * FEATURE FUNCTIONS * --- ********************* - - ---Form functions - --- Reinit makes sure the enums are reinitialized, ie contain all creatures (respectively herbivores or carnivores) from --- the desert ecosystem and with a level between 1 and 50. -local function reinit(form, creature) - if form == nil then - debugInfo("Reinit impossible: nil form") - return - end - - local creatureEnum = form:find(creature.."Race") - if creatureEnum == nil then - debugInfo("Reinit impossible: can't find "..creature.."Race enum") - return - end - creatureEnum:resetTexts() - - local creaturePalette = {} - if creature == "Carnivore" then - creaturePalette = r2.Palette.Entries.creature.creatures_predators.instances - else - creaturePalette = r2.Palette.Entries.creature.creatures_passive.instances - end - - local k, v = next(creaturePalette, nil) - while k do - if r2.isInPalette(v.Id) then - local paletteElt = r2.getPaletteElement(v.Id) - if paletteElt and paletteElt.RingAccess and - r2.RingAccess.testAccess(paletteElt.RingAccess) then - - if paletteElt.Ecosystem == "Desert" and paletteElt.Level >= 1 and paletteElt.Level <= 50 then - creatureEnum:addText(ucstring(i18n.get(v.Translation))) - end - end - end - k, v = next(creaturePalette, k) - end -end - --- Returns the chosen bases from the form before creating the components. -local function getBase(creature, form) - if (form == nil) then - debugInfo("getBase: form is nil") - return - end - - local creaturePalette = {} - if creature == "Carnivore" then - creaturePalette = r2.Palette.Entries.creature.creatures_predators.instances - else - creaturePalette = r2.Palette.Entries.creature.creatures_passive.instances - end - - local creatureEnum = form:find(creature.."Race") - local race = creatureEnum.selection_text - - local k, v = next(creaturePalette, nil) - while k do - local name = i18n.get(v.Translation):toUtf8() - if name == race then - return v.Id, name - end - k, v = next(creaturePalette, k) - end -end - - -- When the selected ecosystem or level changes, the corresponding creature combobox is updated. - local function updateEnum(creature) - local currentForm = r2.CurrentForm - if (currentForm == nil) then - debugInfo("UpdatePredators: r2.CurrentForm is nil") - return - end - - local creatureEnum = currentForm:find(creature.."Race") - local ecoEnum = currentForm:find(creature.."Ecosystem") - local currentEco = ecoEnum.selection_text - if currentEco == "Lakes" then - currentEco = "Lacustre" - end - - local levelEnum = currentForm:find(creature.."Level") - local levelRange = levelEnum.selection + 1 - local levelMin - local levelMax - if levelRange == 0 then - levelMin = 1 - levelMax = 250 - else - levelMin = (levelRange - 1) * 50 + 1 - levelMax = levelMin + 49 - end - - creatureEnum:resetTexts() - - local creaturePalette = {} - if creature == "Carnivore" then - creaturePalette = r2.Palette.Entries.creature.creatures_predators.instances - else - creaturePalette = r2.Palette.Entries.creature.creatures_passive.instances - end - - local k, v = next(creaturePalette, nil) - while k do - if r2.isInPalette(v.Id) then - local paletteElt = r2.getPaletteElement(v.Id) - if paletteElt and paletteElt.RingAccess and - r2.RingAccess.testAccess(paletteElt.RingAccess) then - if paletteElt.Ecosystem == currentEco and paletteElt.Level >= levelMin and paletteElt.Level <= levelMax then - creatureEnum:addText(ucstring(i18n.get(v.Translation))) - end - end - end - k, v = next(creaturePalette, k) - end - end - - -- Calls update function for the carnivores combobox. - local function updateCarnivores(form) - updateEnum("Carnivore") - end - - -- Calls update function for the herbivores combobox. - local function updateHerbivores(form) - updateEnum("Herbivore") - end - - local function resetForm() - - local currentForm = r2:getForm("Fauna_Form") - assert(currentForm) - - do - local creature = "Carnivore" - local ecoEnum = currentForm:find(creature.."Ecosystem") - ecoEnum.selection_text= "Desert" - local levelEnum = currentForm:find(creature.."Level") - levelEnum.selection = 0 - updateCarnivores(form) - end - do - local creature = "Herbivore" - local ecoEnum = currentForm:find(creature.."Ecosystem") - ecoEnum.selection_text= "Desert" - local levelEnum = currentForm:find(creature.."Level") - levelEnum.selection = 0 - updateHerbivores(form) - end - - end --- --- The creation form lets the DM choose the type of creatures and their number. --- Like the palette tree, the available creatures are filtered by their ecosystems and level. --- Each life cycle duration is defined in the properties panel of the creature component. --- The creation form will return the chosen creature base when ok button is pressed. --- The form is reinitialized each time the ok or cancel button is pressed. --- -feature.registerForms = function() - - -- Initializes the creature comboboxes. Default ecosystem is desert and default level range is 1-50. - local function init(creature) - local initEnum = {} - - local creaturePalette = {} - if not r2.Palette.Entries.creature then - return -- special case for the 'light' palette - end - if creature == "Carnivore" then - creaturePalette = r2.Palette.Entries.creature.creatures_predators.instances - else - creaturePalette = r2.Palette.Entries.creature.creatures_passive.instances - end - local k, v = next(creaturePalette, nil) - while k do - if r2.isInPalette(v.Id) then - local paletteElt = r2.getPaletteElement(v.Id) - if paletteElt then - if paletteElt.Ecosystem == "Desert" and paletteElt.Level >= 1 and paletteElt.Level <= 50 then - table.insert(initEnum, i18n.get(v.Translation)) - end - end - end - k, v = next(creaturePalette, k) - end - - return initEnum - end - - r2.Forms.Fauna_Form = - { - Caption = "uiR2EdFauna", - Prop = - { - {Name="CarnivoresCount", Type="Number", Category="uiR2EDRollout_Carnivores", Min="1", Max="12", Default="3", Translation="uiR2EDProp_Count"}, - {Name="CarnivoreRace", Type="Number", Category="uiR2EDRollout_Carnivores", WidgetStyle="EnumDropDown", Translation="uiR2EDProp_Race", - Enum= init("Carnivore") - }, - {Name="CarnivoreEcosystem", Type="Number", Category="uiR2EDRollout_Carnivores", WidgetStyle="EnumDropDown", Translation="uiR2EDProp_Ecosystem", - Enum={"Desert", "Forest", "Jungle", "Lakes", "PrimeRoots", "Goo"}, - onChange = updateCarnivores - }, - {Name="CarnivoreLevel", Type="Number", Category="uiR2EDRollout_Carnivores", WidgetStyle="EnumDropDown", Translation="uiR2EDProp_Level", - Enum={"1-50", "51-100", "101-150", "151-200", "201-250"}, - onChange = updateCarnivores - }, - {Name="HerbivoresCount", Type="Number", Category="uiR2EDRollout_Herbivores", Min="1", Max="12", Default="7", Translation="uiR2EDProp_Count"}, - {Name="HerbivoreRace", Type="Number", Category="uiR2EDRollout_Herbivores", WidgetStyle="EnumDropDown", Translation="uiR2EDProp_Race", - Enum= init("Herbivore") - }, - {Name="HerbivoreEcosystem", Type="Number", Category="uiR2EDRollout_Herbivores", WidgetStyle="EnumDropDown", Translation="uiR2EDProp_Ecosystem", - Enum={"Desert", "Forest", "Jungle", "Lakes", "PrimeRoots", "Goo"}, - onChange = updateHerbivores - }, - {Name="HerbivoreLevel", Type="Number", Category="uiR2EDRollout_Herbivores", WidgetStyle="EnumDropDown", Translation="uiR2EDProp_Level", - Enum={"1-50", "51-100", "101-150", "151-200", "201-250"}, - onChange = updateHerbivores - }, - } - } - -end - --- ************** --- * COMPONENTS * --- ************** - -local FaunaRegionRadius = 5 - - - ----------------------------------------------------------------------------------------------- - -- CREATURE COMPONENT - -feature.Components.Creature = -{ - BaseClass="LogicEntity", - Name="Creature", - Menu="ui:interface:r2ed_feature_menu", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - Parameters = {}, - - ApplicableActions = {}, - - Events = {}, - - Conditions = {}, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - ----------------------------------------------------------------------------------------------- - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table", Visible= false}, - {Name="Ghosts", Type = "Table", Visible = false }, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="CrittersCount", Type="String", WidgetStyle="StaticText", Translation="uiR2EDProp_CrittersCount"}, - {Name="RaceBase", Type="String", WidgetStyle="StaticText", Visible=false}, - {Name="RaceName", Type="String", WidgetStyle="StaticText", Translation="uiR2EDProp_Race"}, - {Name="SleepZone", Type="RefId", PickFuntion = "r2:canPickZone", SetRefIdFunction = "r2:setZoneRefIdTarget", Translation="uiR2EDProp_SleepZone"}, - {Name="FoodZone", Type="RefId", PickFuntion = "r2:canPickZone", SetRefIdFunction = "r2:setZoneRefIdTarget", Translation="uiR2EDProp_FoodZone"}, - {Name="FoodDuration", Type="Number", Category="uiR2EDRollout_LifeCyclesInSeconds", Min="1", Max="40000", Default="30", Translation="uiR2EDProp_FoodDuration"}, - {Name="SleepDuration", Type="Number", Category="uiR2EDRollout_LifeCyclesInSeconds", Min="1", Max="40000", Default="30", Translation="uiR2EDProp_SleepDuration"}, - }, - - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - this:createGhostComponents() - end, - - translate = function(this, context) - --local rtNpcGrp = r2.Translator.getRtGroup(context, context.Feature.InstanceId) - --local aiState = r2.newComponent("RtAiState") - --aiState.AiActivity = "normal" - --table.insert(context.RtAct.AiStates, aiState) - --table.insert(aiState.Children, rtNpcGrp.Id) - --local rtNpcGrp = r2.Translator.getRtGroup(context, this.InstanceId) - --r2.Translator.translateEventHandlers( context, this, this.Behavior.Actions, rtNpcGrp) - r2.Translator.translateAiGroup(this, context) - - end, - - pretranslate = function(this, context) - --local instance = r2:getInstanceFromId(context.Feature.InstanceId); - --r2.Translator.registerManager(context, context.Feature) - - r2.Translator.createAiGroup(this, context) - end -} - -local component = feature.Components.Creature - -component.getLogicAction = function(entity, context, action) - return nil, nil -end - -component.getLogicCondition = function(this, context, condition) - return nil,nil -end - -component.getLogicEvent = function(this, context, event) - return nil, nil, nil -end - -function component:getLogicTranslations() - - local logicTranslations = { - ["ApplicableActions"] = {}, - ["Events"] = {} - } - return nil--logicTranslations -end - -component.createGhostComponents= function(this, act) - local comp = this - local leader = nil - local herd = nil - local isHerbivore - - if act then - herd = r2.newComponent("NpcGrpFeature") - end - - if comp._Seed then math.randomseed(comp._Seed) end - - do - local x = comp.Position.x - local y = comp.Position.y - local n = comp._CrittersCount - local pas = (2 * math.pi)/n - local r = (n/(2*math.pi))+2 - for i = 1, n do - local npc = r2.newComponent("Npc") - npc.Name = comp.RaceName - npc.Base = comp.RaceBase --"palette.entities.creatures.cbadc1" - - - local rr = FaunaRegionRadius - 1--r + math.random() * 5 - npc.Position.x = (rr-1) * math.cos((i-1)*pas) - npc.Position.y = (rr-1) * math.sin((i-1)*pas) - npc.Position.z = 0 - npc.Angle = 2 * math.pi * math.random(0, 100)/100.0 - - if i == 1 then - local manager = r2:getInstanceFromId(comp.ManagerId) - assert(manager) - if manager.Active == 1 then npc.AutoSpawn = 1 else npc.AutoSpawn = 0 end - leader = npc - r2.requestSetGhostNode(comp.InstanceId, "_LeaderId",npc.InstanceId) - isHerbivore = r2.getPropertyValue(npc, "IsHerbivore") - end - - if act then -- TestMode -- - table.insert(herd.Components, npc) - else - r2.requestInsertGhostNode(this.InstanceId, "Ghosts", -1, "", npc) - r2:getInstanceFromId(npc.InstanceId).Selectable = false - end - end - end - - -- 2 wander sequences corresponding to the activities in both life zones attached to the herd - do - local sequence = r2.newComponent("ActivitySequence") - - - table.insert(leader.Behavior.Activities, sequence) - - sequence.Name = "Life Cycle" - sequence.Repeating = 1 - - -- Wander in sleep zone - local step = r2.newComponent("ActivityStep") - table.insert(sequence.Components, step) - step.Type = "None" - step.Name = "Rest In Zone" - step.Activity = "Rest In Zone" - step.ActivityZoneId = r2.RefId(comp.SleepZone) - - step.TimeLimit = "Few Sec" - step.TimeLimitValue = tostring(comp.SleepDuration) - - -- Wander in food zone - local step = r2.newComponent("ActivityStep") - table.insert(sequence.Components, step) - step.Type = "None" - - if isHerbivore == 1 then - step.Name = "Feed In Zone" - step.Activity = "Feed In Zone" - else - step.Name = "Hunt In Zone" - step.Activity = "Hunt In Zone" - end - step.ActivityZoneId = r2.RefId(comp.FoodZone) - - step.TimeLimit = "Few Sec" - step.TimeLimitValue = tostring(comp.FoodDuration) - - end - - if act then - comp.User._Herd = herd.InstanceId - --herd.Name = r2:genInstanceName(i18n.get("uiR2EdFaunaFeature")):toUtf8() - herd.InheritPos = 0 - herd.Position.x = comp.Position.x - herd.Position.y = comp.Position.y - r2.requestInsertGhostNode(act.InstanceId, "Features", -1, "", herd) - end -end - - -component.createComponent = function(x, y, nbcritters, raceBase, raceName, - sleepZoneId, foodZoneId) - - - local comp = r2.newComponent("Creature") - assert(comp) - - --comp.Base = "palette.entities.botobjects.user_event" - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.user_event") - - comp.Name = r2:genInstanceName(i18n.get("uiR2EdCreatureComponent")):toUtf8() - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - comp._CrittersCount= nbcritters - comp.CrittersCount = tostring(nbcritters) - comp.RaceBase = raceBase - comp.RaceName = raceName - - comp.SleepDuration = 30 - comp.FoodDuration = 30 - - comp._Seed = os.time() - - comp.SleepZone = sleepZoneId - comp.FoodZone = foodZoneId - - return comp -end - - ----------------------------------------------------------------------------------------------- - -- FAUNA SYSTEM COMPONENT - -- Fauna system containing 2 Creature components (herbivores & carnivores) and 3 life zones. -feature.Components.Fauna = -{ - BaseClass="LogicEntity", - Name="Fauna", - Menu="ui:interface:r2ed_feature_menu", - InEventUI = true, - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - Parameters = {}, - - ApplicableActions = {"activate", "deactivate"}, - - Events = {"deactivation", "activation"}, - - Conditions = {"is active", "is inactive"}, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - ----------------------------------------------------------------------------------------------- - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table", Visible = false}, - {Name="Ghosts", Type = "Table", Visible = false }, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="Active", Type = "Number", WidgetStyle="Boolean", DefaultValue="1" }, - {Name="CarnivoresCount", Type="String", Category="uiR2EDRollout_Carnivores", WidgetStyle="StaticText", Translation="uiR2EDProp_Count"}, - {Name="CarnivoreBase", Type="String", Category="uiR2EDRollout_Carnivores", WidgetStyle="StaticText", Visible = false}, - {Name="CarnivoreRace", Type="String", Category="uiR2EDRollout_Carnivores", WidgetStyle="StaticText", Translation="uiR2EDProp_Race"}, - {Name="HerbivoresCount", Type="String", Category="uiR2EDRollout_Herbivores", WidgetStyle="StaticText",Translation="uiR2EDProp_Count"}, - {Name="HerbivoreBase", Type="String", Category="uiR2EDRollout_Herbivores", WidgetStyle="StaticText", Visible = false}, - {Name="HerbivoreRace", Type="String", Category="uiR2EDRollout_Herbivores", WidgetStyle="StaticText", Translation="uiR2EDProp_Race"}, - }, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - translate = function(this, context) - r2.Translator.translateAiGroup(this, context) - r2.Translator.translateFeatureActivation(this, context) - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end -} - -component = feature.Components.Fauna - - -local FaunaRegionNumCorners = 6 ---local FaunaRegionRadius = 5 -local FaunaRegionOffsets = { { x = 10, y = 0 }, { x = -7, y = -7}, { x = 0, y = 10} } - - -component.create = function() - if not r2:checkAiQuota() then return end - - local function paramsOk(resultTable, form) - - - local carnivoreBase, carnivoreName = getBase("Carnivore", form) - local herbivoreBase, herbivoreName = getBase("Herbivore", form) - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - - local carnCount = tonumber(resultTable["CarnivoresCount"]) - local herbCount = tonumber(resultTable["HerbivoresCount"]) - - - if not r2:checkAiQuota(carnCount + herbCount + 1) then return end - - - if not x or not y or not carnivoreBase or not carnivoreName or not carnCount or not herbivoreBase - or not herbivoreName or not herbCount - then - r2:doForm("Fauna_Form", resultTable , paramsOk, paramsCancel) - resetForm() - - printMsg("FaunaSystem: Failed to create component either because your scenario is full or because you don't yet have access to creatures of the level and ecosystem that you have selected") - - return - end - r2.requestNewAction(i18n.get("uiR2EDNewFaunaFeatureAction")) - local component = feature.Components.Fauna.createComponent(x, y, carnCount, carnivoreBase, carnivoreName, - herbCount, herbivoreBase, herbivoreName) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - resetForm() - end - - local function paramsCancel(data, form) - resetForm() - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'FaunaFeature' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("Fauna") == 1 then - r2.displayFeatureHelp("Fauna") - end - r2:doForm("Fauna_Form", {X=x, Y=y}, paramsOk, paramsCancel) - resetForm() - end - local function posCancel() - debugInfo("Cancel choice 'FaunaFeature' position") - end - --r2:choosePos("object_component_user_event.creature", posOk, posCancel, "createFeatureFauna") - local creature = r2.Translator.getDebugCreature("object_component_user_event.creature") - --r2:choosePos(creature, posOk, posCancel, "createFeatureFauna") - - local polys = {} - for p = 1, table.getn(FaunaRegionOffsets) do - local poly = {} - local step = 2 * math.pi / FaunaRegionNumCorners - for k = 0, FaunaRegionNumCorners - 1 do - table.insert(poly, CVector2f(FaunaRegionOffsets[p].x + FaunaRegionRadius * math.cos(k * step), - FaunaRegionOffsets[p].y + FaunaRegionRadius * math.sin(k * step))) - end - table.insert(polys, poly) - end - r2:choosePos(creature, posOk, posCancel, "createFeatureFauna", - "curs_create.tga", - "curs_stop.tga", - polys, r2.PrimRender.ComponentRegionLook, r2.PrimRender.ComponentRegionInvalidLook) -end - -function component.getAiCost(this) - if this.User.GhostDuplicate then return 0 end - return r2.getAiCost(this) - 2 -end - - - - --- --- create the fauna system component by creating and inserting zones and creature component into its own components table. --- Generates a sleep zone and a food zone for the herbivores, and a sleep zone for the carnivores. The carnivore hunt zone is --- one of the herbivore zones (default is herbivore sleep zone). --- -component.createComponent = function(x, y, carnCount, carnivoreBase, carnivoresName, - herbCount, herbivoreBase, herbivoresName) - - local comp = r2.newComponent("Fauna") - assert(comp) - - --TODO: replace this milestone base by some default feature base - comp.Base = "palette.entities.botobjects.user_event" - - comp.Name = r2:genInstanceName(i18n.get("uiR2EdFaunaFeature")):toUtf8() - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - comp._CarnCount= carnCount - comp.CarnivoresCount = tostring(carnCount) - comp.CarnivoreBase = carnivoreBase - comp.CarnivoreRace = tostring(carnivoresName) - - comp._HerbCount= herbCount - comp.HerbivoresCount = tostring(herbCount) - comp.HerbivoreBase = herbivoreBase - comp.HerbivoresName = herbivoresName - comp.HerbivoreRace = tostring(herbivoresName) - - comp._Seed = os.time() - - -- Herbivore sleep zone - local zoneSleep1 = r2.newComponent("Region") - r2.Utils.createRegion(zoneSleep1, 0, 0, FaunaRegionRadius, FaunaRegionNumCorners) - zoneSleep1.Deletable = 1 - zoneSleep1.Position.x = comp.Position.x + FaunaRegionOffsets[1].x - zoneSleep1.Position.y = comp.Position.y + FaunaRegionOffsets[1].y - zoneSleep1.Position.z = comp.Position.z - zoneSleep1.InheritPos = 0 - zoneSleep1.Name = r2:genInstanceName(i18n.get("uiR2EDNameSleepRegion")):toUtf8() - table.insert(comp.Components, zoneSleep1) - - -- Carnivore sleep zone - local zoneSleep2 = r2.newComponent("Region") - r2.Utils.createRegion(zoneSleep2, 0, 0, FaunaRegionRadius, FaunaRegionNumCorners) - zoneSleep2.Deletable = 1 - zoneSleep2.Position.x = comp.Position.x + FaunaRegionOffsets[2].x - zoneSleep2.Position.y = comp.Position.y + FaunaRegionOffsets[2].y - zoneSleep2.Position.z = comp.Position.z - zoneSleep2.InheritPos = 0 - zoneSleep2.Name = r2:genInstanceName(i18n.get("uiR2EDNameSleepRegion")):toUtf8() - table.insert(comp.Components, zoneSleep2) - - --Herbivore sleep zone - local zoneFood = r2.newComponent("Region") - r2.Utils.createRegion(zoneFood, 0, 0, FaunaRegionRadius, FaunaRegionNumCorners) - zoneFood.Deletable = 1 - zoneFood.Position.x = comp.Position.x + FaunaRegionOffsets[3].x - zoneFood.Position.y = comp.Position.y + FaunaRegionOffsets[3].y - zoneFood.Position.z = comp.Position.z - zoneFood.InheritPos = 0 - zoneFood.Name = r2:genInstanceName(i18n.get("uiR2EDNameFoodRegion")):toUtf8() - table.insert(comp.Components, zoneFood) - - -- Herd of herbivores - local herbivores = feature.Components.Creature.createComponent(zoneSleep1.Position.x, zoneSleep1.Position.y, herbCount, herbivoreBase, - herbivoresName, zoneSleep1.InstanceId, zoneFood.InstanceId) - herbivores.Name = i18n.get("uiR2EdHerbivores"):toUtf8() - --herbivores.Position.x = zoneSleep1.Position.x--comp.Position.x + 10 - --herbivores.Position.y = zoneSleep1.Position.y--comp.Position.y + 10 - herbivores.InheritPos = 0 - --herbivores.Active = comp.Active - herbivores.ManagerId = comp.InstanceId - table.insert(comp.Components, herbivores) - comp._HerbId = herbivores.InstanceId - - -- Pack of carnivores - local carnivores = feature.Components.Creature.createComponent(zoneSleep2.Position.x, zoneSleep2.Position.y, carnCount, carnivoreBase, - carnivoresName, zoneSleep2.InstanceId, zoneSleep1.InstanceId) - carnivores.Name = i18n.get("uiR2EdCarnivores"):toUtf8() - carnivores.InheritPos = 0 - carnivores.ManagerId = comp.InstanceId - table.insert(comp.Components, carnivores) - comp._CarnId = carnivores.InstanceId - - return comp -end - -component.getLogicAction = function(entity, context, action) - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local herbi = r2:getInstanceFromId(component._HerbId) - assert(herbi) - local herbivores = r2:getInstanceFromId(herbi.User._Herd) - assert(herbivores) - local rtHerbiGrp = r2.Translator.getRtGroup(context, herbivores.InstanceId) - assert(rtHerbiGrp) - - local carni = r2:getInstanceFromId(component._CarnId) - assert(carni) - local carnivores = r2:getInstanceFromId(carni.User._Herd) - assert(carnivores) - local rtCarniGrp = r2.Translator.getRtGroup(context, carnivores.InstanceId) - assert(rtCarniGrp) - - - if action.Action.Type == "deactivate" then - local action1 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Active", 0) - local action2 = r2.Translator.getNpcLogicActionDeactivate(herbivores, context, action, rtHerbiGrp) - local action3 = r2.Translator.getNpcLogicActionDeactivate(carnivores, context, action, rtCarniGrp) - local action4 = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 5) - local multiaction = r2.Translator.createAction("multi_actions", {action1, action2, action3, action4}) - return multiaction, multiaction - elseif (action.Action.Type == "activate") then - local action1 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Active", 1) - local action2 = r2.Translator.getNpcLogicActionActivate(herbivores, context, action, rtHerbiGrp) - local action3 = r2.Translator.getNpcLogicActionActivate(carnivores, context, action, rtCarniGrp) - local action4 = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 4) - local multiaction = r2.Translator.createAction("multi_actions", {action1, action2, action3, action4}) - return multiaction, multiaction - end - - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - local component = this - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.getLogicCondition = function(this, context, condition) - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationCondition(condition, rtNpcGrp) -end - -function component:getLogicTranslations() - local logicTranslations = {} - r2.Translator.addActivationToTranslations(logicTranslations) - return logicTranslations -end - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdFaunaFeature") - logicEntityMenu:addLine(ucstring(name), "lua", "", "FaunaFeature") -end - -r2.Features["FaunaFeature"] = feature - diff --git a/code/ryzom/common/data_common/r2/r2_features_get_item_from_scenery.lua b/code/ryzom/common/data_common/r2/r2_features_get_item_from_scenery.lua deleted file mode 100644 index b0237ee9a..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_get_item_from_scenery.lua +++ /dev/null @@ -1,487 +0,0 @@ - -r2.Features.GetItemFromSceneryObjectFeature = {} - -local feature = r2.Features.GetItemFromSceneryObjectFeature - -feature.Name="GetItemFromSceneryObjectFeature" - -feature.Description="" - -feature.Components = {} - -feature.Components.GetItemFromSceneryObject = - { - --PropertySheetHeader = r2.getHelpButtonHeader("GetItemFromSceneryObject") , - BaseClass="LogicEntity", - Name="GetItemFromSceneryObject", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "getItemFromSceneryObjectDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - - ApplicableActions = { "activate", "deactivate"}, - - Events = {"activation", "deactivation", "trigger"}, - - Conditions = { "is active", "is inactive", "has triggered", "has not triggered" }, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table"}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="SceneryObject", Type="RefId", PickFunction="r2:canPickSceneryObject", SetRefIdFunction="r2:setSceneryObjectTarget"}, - - {Name="ItemNumber", Type="Number", Category="uiR2EDRollout_ItemsToGive", WidgetStyle="EnumDropDown", - Enum={"1", "2", "3"}, DefaultValue="3" }, - {Name="Item1Qty", Type="Number", Category="uiR2EDRollout_ItemsToGive", Min="0", DefaultValue="1", Visible= function(this) return this:displayRefId(1) end}, - {Name="Item1Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_ItemsToGive", Visible= function(this) return this:displayRefId(1) end}, - - - {Name="Item2Qty", Type="Number", Category="uiR2EDRollout_ItemsToGive", Min="0", DefaultValue="0", Visible= function(this) return this:displayRefId(2) end}, - {Name="Item2Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_ItemsToGive", Visible= function(this) return this:displayRefId(2) end}, - - {Name="Item3Qty", Type="Number", Category="uiR2EDRollout_ItemsToGive", Min="0", DefaultValue="0", Visible= function(this) return this:displayRefId(3) end}, - {Name="Item3Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_ItemsToGive", Visible= function(this) return this:displayRefId(3) end}, - - - {Name="ContextualText", Type="String", Category="uiR2EDRollout_TextToSay"}, - - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="Repeatable", Type="Number", WidgetStyle="Boolean", DefaultValue="0"} - - }, - - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - --pretranslate = function(this, context) - -- r2.Translator.createAiGroup(this, context) - --end, - - } - - -local component = feature.Components.GetItemFromSceneryObject - -function component:displayRefId(index) - local nbItems = self.ItemNumber + 1 - if index <= nbItems then - return true - end - return false -end - -function component:pretranslate(context) - if context.InteractingSceneryObjects then - if self.SceneryObject and self.SceneryObject ~= "" then - local scObj = r2:getInstanceFromId(self.SceneryObject) - if scObj then - --assert(scObj) - table.insert(context.InteractingSceneryObjects, scObj.InstanceId) - end - end - end - r2.Translator.createAiGroup(self, context) -end - - -local getItemFromSceneryObjectDisplayerTable = clone(r2:propertySheetDisplayer()) - -local oldOnAttrModified = getItemFromSceneryObjectDisplayerTable.onAttrModified - -function getItemFromSceneryObjectDisplayerTable:onAttrModified(instance, attributeName) - oldOnAttrModified(self, instance, attributeName) - r2:propertySheetDisplayer():onAttrModified(instance, attributeName) - if attributeName == "ItemNumber" then - local propertySheet = r2:getPropertySheet(instance) - local nbRefId = instance.ItemNumber + 1 - local i = 1 - while i <= 3 do - if i > nbRefId then - local name = "Item"..tostring(i).."Id" - local qty = "Item"..tostring(i).."Qty" - r2.requestSetNode(instance.InstanceId, name, r2.RefId("")) - r2.requestSetNode(instance.InstanceId, qty, 0) - end - i = i + 1 - end - propertySheet.Env.updatePropVisibility() - return - end - -end - -function getItemFromSceneryObjectDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function r2:getItemFromSceneryObjectDisplayer() - return getItemFromSceneryObjectDisplayerTable -- returned shared displayer to avoid wasting memory -end - - -function component:getItems() - local str = "" - - local id = 1 - while id <= 3 do - local item = self["Item"..tostring(id).."Id"] - local item2 = self.Item1Id - if (item) then - - local qt = tonumber(self["Item"..tostring(id).."Qty"]) - - local plotItem = r2:getInstanceFromId(item) - if plotItem then - local plotItemSheetId = plotItem.SheetId - if str ~= "" then str = str ..";" end - local name = r2.getSheetIdName(plotItemSheetId) - str = str .. tostring(name)..":"..qt - end - end - id = id + 1 - end - return str -end - -function component:textAdapter(text) - local str = "" - local items = {} - local qts = {} - - local id = 1 - while id <= 3 do - local item = self["Item"..tostring(id).."Id"] - local item2 = self.Item1Id - if (item) then - - local qt = tonumber(self["Item"..tostring(id).."Qty"]) - qts[id] = qt - - local plotItem = r2:getInstanceFromId(item) - if plotItem then - items[id] = plotItem.Name - else - items[id] = "" - end - end - id = id + 1 - end - local str = text - str=string.gsub (str, "", tostring(qts[1])) - str=string.gsub (str, "", tostring(qts[2])) - str=string.gsub (str, "", tostring(qts[3])) - str=string.gsub (str, "", tostring(items[1])) - str=string.gsub (str, "", tostring(items[2])) - str=string.gsub (str, "", tostring(items[3])) - - local sceneryObjectName = "" - if self.SceneryObject == nil then return end - local sceneryObject = r2:getInstanceFromId(self.SceneryObject) - if sceneryObject then - sceneryObjectName = sceneryObject.Name - end - str=string.gsub(str, "", tostring(sceneryObjectName)) - return str -end - - - -function component:translate(context) - r2.Translator.translateAiGroup(self, context) - - if self.SceneryObject == nil then return end - local sceneryObject = r2:getInstanceFromId(self.SceneryObject) - if not sceneryObject then return end - - local sceneryObjectGrp = r2.Translator.getRtGroup(context, sceneryObject.InstanceId) - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - local items = self:getItems() - - ----------------- - --Contextual text - do - if sceneryObject then - local actionContextual = r2.Translator.createAction("give_item", rtGrp.Id, items, self:textAdapter(self.ContextualText)) - --local actionSetSelectStatus = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 1) - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, -- Active - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 0, -- giver has been spoken to - --r2.Translator.createAction("multi_actions", {actionContextual, actionSetSelectStatus}) ) - actionContextual)) - r2.Translator.translateAiGroupEvent("player_target_npc", sceneryObject, context, rtAction) - end - end - - ------------------- - --Trigger - if sceneryObject then - --local rtSceneryObjectGrp = r2.Translator.getRtGroup(context, sceneryObject.InstanceId) - - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, --if active - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 0, --and if the scenery object has been selected once by the player - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 1 ), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 6), - r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1 ) }) - )) - - --r2.Translator.translateAiGroupEvent("player_target_npc", sceneryObject, context, rtAction) - r2.Translator.translateAiGroupEvent("user_event_1", self, context, rtAction) - end - - ------------------- - --Start of state - - do - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", self.Active) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) -- the scenery object hasn't been selected yet - local rtAction4 = r2.Translator.createAction("set_value", rtGrp.Id, "v3", 0 ) - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3,rtAction4 } ) - r2.Translator.translateAiGroupEvent("start_of_state" , self, context, rtAction) - end - - - do - local action2 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 1, -- Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0 ), - }) - ); - local action3 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 0, -- Not Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0 ) , - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 1 ), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 5) - }) - ); - - local rtAction = r2.Translator.createAction("multi_actions", {action2, action3}) - --Autodeactivate after having triggered? - r2.Translator.translateAiGroupEvent("user_event_6", self, context, rtAction) - end - - r2.Translator.translateFeatureActivation(self, context) -end - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - local prefix = "" - - if rtNpcGrp.Id and rtNpcGrp.Id ~= "" then - prefix = r2:getNamespace() .. rtNpcGrp.Id.."." - end - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1); - return action1, action1 - elseif condition.Condition.Type == "is inactive" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0); - return action1, action1 - elseif condition.Condition.Type == "has triggered" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v3", 1 ); - return action1, action1 - elseif condition.Condition.Type == "has not triggered" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v3", 0 ); - return action1, action1 - else - assert(nil) - end - return nil,nil -end - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if event.Event.Type == "trigger" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 6) - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.createComponent = function(x, y) - - local comp = r2.newComponent("GetItemFromSceneryObject") - assert(comp) - - local contextualText = i18n.get("uiR2EdGetItemFromSceneryObject_ContextualText"):toUtf8() - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.bot_request_item") - comp.Name = r2:genInstanceName(i18n.get("uiR2EDGetItemFromSceneryObject")):toUtf8() - comp.ItemNumber = 0 - - comp.ContextualText = contextualText - - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) --- comp.ItemQty = 1 - - comp._Seed = os.time() - - return comp -end - -component.create = function() - - if not r2:checkAiQuota() then return end - - - local function paramsOk(resultTable) - - r2.requestNewAction(i18n.get("uiR2EDNewGetItemFromSceneryObjectFeature")) - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - if showAgain == 1 then - r2.setDisplayInfo("GetItemFromSceneryObject", 0) - else r2.setDisplayInfo("GetItemFromSceneryObject", 1) end - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local component = feature.Components.GetItemFromSceneryObject.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'GetItemFromSceneryObject' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'GetItemFromSceneryObject' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("GetItemFromSceneryObject") == 1 then - r2.displayFeatureHelp("GetItemFromSceneryObject") - end - r2.requestNewAction(i18n.get("uiR2EDNewGetItemFromSceneryObjectFeature")) - local component = feature.Components.GetItemFromSceneryObject.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'GetItemFromSceneryObject' position") - end - local creature = r2.Translator.getDebugCreature("object_component_bot_request_item.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureGetItemFromSceneryObject") -end - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdGetItemFromSceneryObject") - logicEntityMenu:addLine(ucstring(name), "lua", "", "GetItemFromSceneryObject") -end - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["trigger"] = { menu=i18n.get( "uiR2Event0Trigger" ):toUtf8(), - text=i18n.get( "uiR2Event1Trigger" ):toUtf8()}, - - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - ["has triggered"] = { menu=i18n.get( "uiR2Test0Trigger" ):toUtf8(), - text=i18n.get( "uiR2Test1Trigger" ):toUtf8()}, - ["has not triggered"] = { menu=i18n.get( "uiR2Test0NotTrigger" ):toUtf8(), - text=i18n.get( "uiR2Test1NotTrigger" ):toUtf8()}, - } - } - return logicTranslations -end - - -r2.Features["GetItemFromSceneryObject"] = feature - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_get_item_from_scenery_task.lua b/code/ryzom/common/data_common/r2/r2_features_get_item_from_scenery_task.lua deleted file mode 100644 index e28e2fa77..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_get_item_from_scenery_task.lua +++ /dev/null @@ -1,543 +0,0 @@ - -r2.Features.GetItemFromSceneryObjectTaskStep = {} - -local feature = r2.Features.GetItemFromSceneryObjectTaskStep - -feature.Name="GetItemFromSceneryObjectTaskStep" - -feature.Description="" - -feature.Components = {} - -feature.Components.GetItemFromSceneryObjectTaskStep = - { - --PropertySheetHeader = r2.getHelpButtonHeader("getItemFromSceneryObjectTaskStep") , - BaseClass="LogicEntity", - Name="GetItemFromSceneryObjectTaskStep", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "getItemFromSceneryObjectDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - - ApplicableActions = { "activate", "deactivate"}, - - Events = {"activation", "deactivation", "success"}, - - Conditions = { "is active", "is inactive", "is succeeded", "in progress" }, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table"}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="SceneryObject", Type="RefId", PickFunction="r2:canPickSceneryObject", SetRefIdFunction="r2:setSceneryObjectTarget"}, - {Name="MissionGiver", Type="RefId", PickFunction="r2:canPickTalkingNpc", SetRefIdFunction="r2:setTalkingNpc"}, - - {Name="ItemNumber", Type="Number", Category="uiR2EDRollout_ItemsToGive", WidgetStyle="EnumDropDown", - Enum={"1", "2", "3"}, DefaultValue="3" }, - {Name="Item1Qty", Type="Number", Category="uiR2EDRollout_ItemsToGive", Min="0", DefaultValue="1", Visible= function(this) return this:displayRefId(1) end}, - {Name="Item1Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_ItemsToGive", Visible= function(this) return this:displayRefId(1) end}, - - - {Name="Item2Qty", Type="Number", Category="uiR2EDRollout_ItemsToGive", Min="0", DefaultValue="0", Visible= function(this) return this:displayRefId(2) end}, - {Name="Item2Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_ItemsToGive", Visible= function(this) return this:displayRefId(2) end}, - - {Name="Item3Qty", Type="Number", Category="uiR2EDRollout_ItemsToGive", Min="0", DefaultValue="0", Visible= function(this) return this:displayRefId(3) end}, - {Name="Item3Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_ItemsToGive", Visible= function(this) return this:displayRefId(3) end}, - - - {Name="ContextualText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="MissionText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="NotValidatedText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="BroadcastText", Type="String", Category="uiR2EDRollout_TextToSay", DefaultValue="", DefaultInBase = 1}, - - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="Repeatable", Type="Number", WidgetStyle="Boolean", DefaultValue="0"} - - }, - - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - --pretranslate = function(this, context) - -- r2.Translator.createAiGroup(this, context) - --end, - - } - - -local component = feature.Components.GetItemFromSceneryObjectTaskStep - -function component:displayRefId(index) - local nbItems = self.ItemNumber + 1 - if index <= nbItems then - return true - end - return false -end - -function component:pretranslate(context) - if context.InteractingSceneryObjects then - if self.SceneryObject and self.SceneryObject ~= "" then - local scObj = r2:getInstanceFromId(self.SceneryObject) - if scObj then - table.insert(context.InteractingSceneryObjects, scObj.InstanceId) - end - end - end - r2.Translator.createAiGroup(self, context) -end - - -local getItemFromSceneryObjectDisplayerTable = clone(r2:propertySheetDisplayer()) - -local oldOnAttrModified = getItemFromSceneryObjectDisplayerTable.onAttrModified - -function getItemFromSceneryObjectDisplayerTable:onAttrModified(instance, attributeName) - oldOnAttrModified(self, instance, attributeName) - r2:propertySheetDisplayer():onAttrModified(instance, attributeName) - if attributeName == "ItemNumber" then - local propertySheet = r2:getPropertySheet(instance) - local nbRefId = instance.ItemNumber + 1 - local i = 1 - while i <= 3 do - if i > nbRefId then - local name = "Item"..tostring(i).."Id" - local qty = "Item"..tostring(i).."Qty" - r2.requestSetNode(instance.InstanceId, name, r2.RefId("")) - r2.requestSetNode(instance.InstanceId, qty, 0) - end - i = i + 1 - end - propertySheet.Env.updatePropVisibility() - return - end - -end - -function getItemFromSceneryObjectDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true -end - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - if tmpInstance.ParentInstance and tmpInstance.ParentInstance:isKindOf("NpcGrpFeature") then - r2.requestSetNode(self.InstanceId, targetAttr, r2.RefId("")) - end - end - -end - - -function r2:getItemFromSceneryObjectDisplayer() - return getItemFromSceneryObjectDisplayerTable -- returned shared displayer to avoid wasting memory -end - - -function component:getItems() - local str = "" - - local id = 1 - while id <= 3 do - local item = self["Item"..tostring(id).."Id"] - local item2 = self.Item1Id - if (item) then - - local qt = tonumber(self["Item"..tostring(id).."Qty"]) - - local plotItem = r2:getInstanceFromId(item) - if plotItem then - local plotItemSheetId = plotItem.SheetId - if str ~= "" then str = str ..";" end - local name = r2.getSheetIdName(plotItemSheetId) - str = str .. tostring(name)..":"..qt - end - end - id = id + 1 - end - return str -end - -function component:textAdapter(text) - local str = "" - local items = {} - local qts = {} - - local id = 1 - while id <= 3 do - local item = self["Item"..tostring(id).."Id"] - local item2 = self.Item1Id - if (item) then - - local qt = tonumber(self["Item"..tostring(id).."Qty"]) - qts[id] = qt - - local plotItem = r2:getInstanceFromId(item) - if plotItem then - items[id] = plotItem.Name - else - items[id] = "" - end - end - id = id + 1 - end - local str = text - str=string.gsub (str, "", tostring(qts[1])) - str=string.gsub (str, "", tostring(qts[2])) - str=string.gsub (str, "", tostring(qts[3])) - str=string.gsub (str, "", tostring(items[1])) - str=string.gsub (str, "", tostring(items[2])) - str=string.gsub (str, "", tostring(items[3])) - - local sceneryObjectName = "" - if self.SceneryObject == nil then return end - local sceneryObject = r2:getInstanceFromId(self.SceneryObject) - if sceneryObject then - sceneryObjectName = sceneryObject.Name - end - str=string.gsub(str, "", tostring(sceneryObjectName)) - - local giverName = "" - if self.MissionGiver == nil then return end - local missionGiver = r2:getInstanceFromId(self.MissionGiver) - if missionGiver then - giverName = missionGiver.Name - end - str=string.gsub(str, "", tostring(giverName)) - return str -end - - - -function component:translate(context) - r2.Translator.translateAiGroup(self, context) - - if not self.SceneryObject or self.SceneryObject == "" then return end - if not self.MissionGiver or self.MissionGiver == "" then return end - - local sceneryObject = r2:getInstanceFromId(self.SceneryObject) - if not sceneryObject then return end - - local sceneryObjectGrp = r2.Translator.getRtGroup(context, sceneryObject.InstanceId) - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - local items = self:getItems() - - local giver = r2:getInstanceFromId(self.MissionGiver) - local rtGiverGrp = r2.Translator.getRtGroup(context, giver.InstanceId) - - ----------------- - --Contextual text - do - if sceneryObject then - local actionContextual = r2.Translator.createAction("give_item", rtGrp.Id, items, self:textAdapter(self.ContextualText)) - --local actionSetSelectStatus = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 2) - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, -- Active - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 1, -- giver has been spoken to - actionContextual))--r2.Translator.createAction("multi_actions", {actionContextual, actionSetSelectStatus}) ) - - r2.Translator.translateAiGroupEvent("player_target_npc", sceneryObject, context, rtAction) - end - end - - ------------------- - --Mission text - if giver then - local actionValidation = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 1, --giver already said mission text - r2.Translator.createAction("npc_say", self:textAdapter(self.NotValidatedText), rtGiverGrp.Id ..":"..giver.Name)) - - local actionMission = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 0, --giver didn't say mission text yet - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("npc_say", self:textAdapter(self.MissionText), rtGiverGrp.Id ..":"..giver.Name), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 1 ), })) - - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, - r2.Translator.createAction("multi_actions", {actionValidation, actionMission})) - - - r2.Translator.translateAiGroupEvent("player_target_npc", giver, context, rtAction) - end - - ------------------- - --Succcess - if sceneryObject then - local rtSceneryObjectGrp = r2.Translator.getRtGroup(context, sceneryObject.InstanceId) - local baseAct = r2.Scenario:getBaseAct() - local baseActRtGrp = r2.Translator.getRtGroup(context, baseAct.InstanceId) - - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, --if active - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 1, --and if the scenery object has been selected once by the player - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 2 ), - r2.Translator.createAction("broadcast_msg",baseActRtGrp.Id, self:textAdapter(self.BroadcastText) ), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 6), - }) - )) - - - - --r2.Translator.translateAiGroupEvent("player_target_npc", sceneryObject, context, rtAction) - r2.Translator.translateAiGroupEvent("user_event_1", self, context, rtAction) - end - - ------------------- - --Start of state - do - local action = r2.Translator.createAction("user_event_trigger", rtGrp.Id, 7) - r2.Translator.translateAiGroupEvent("start_of_state" , self, context, action) - end - - do - - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", self.Active) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) -- the scenery object hasn't been selected yet - local rtAction4 = r2.Translator.createAction("set_value", rtGrp.Id, "v3", 0 ) - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3,rtAction4 } ) - r2.Translator.translateAiGroupEvent("user_event_7", self, context, rtAction) - end - - --activation - do - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) -- the scenery object hasn't been selected yet - local rtAction4 = r2.Translator.createAction("set_value", rtGrp.Id, "v3", 0 ) - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3,rtAction4 } ) - r2.Translator.translateAiGroupEvent("user_event_4", self, context, rtAction) - end - - - --trigger (if not repeatable, deactivation) - do - local action2 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 1, -- Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0 ), - }) - ); - local action3 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 0, -- Not Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0 ) , - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 2 ), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 5) - }) - ); - - local rtAction = r2.Translator.createAction("multi_actions", {action2, action3}) - - r2.Translator.translateAiGroupEvent("user_event_6", self, context, rtAction) - end - - r2.Translator.translateFeatureActivation(self, context) -end - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - local prefix = "" - - if rtNpcGrp.Id and rtNpcGrp.Id ~= "" then - prefix = r2:getNamespace() .. rtNpcGrp.Id.."." - end - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1); - return action1, action1 - elseif condition.Condition.Type == "is inactive" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0); - return action1, action1 - elseif condition.Condition.Type == "in progress" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v2", 1 ); - return action1, action1 - elseif condition.Condition.Type == "is succeeded" then - local action1 = r2.Translator.createAction("dynamic_if", prefix.."v3 == 1"); - return action1, action1 - else - assert(nil) - end - return nil,nil -end - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if event.Event.Type == "success" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 6) - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.createComponent = function(x, y) - - local comp = r2.newComponent("GetItemFromSceneryObjectTaskStep") - assert(comp) - - local contextualText = i18n.get("uiR2EdGetItemFromSceneryObjectTaskStep_ContextualText"):toUtf8() - local missionText = i18n.get("uiR2EdGetItemFromSceneryObjectTaskStep_MissionText"):toUtf8() - local notValidatedText = i18n.get("uiR2EdGetItemFromSceneryObjectTaskStep_NotValidatedText"):toUtf8() - local broadcastText = i18n.get("uiR2EdGetItemFromSceneryObjectTaskStep_BroadcastText"):toUtf8() - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.bot_request_item") - comp.Name = r2:genInstanceName(i18n.get("uiR2EDGetItemFromSceneryObjectTaskStep")):toUtf8() - comp.ItemNumber = 0 - - comp.ContextualText = contextualText - comp.MissionText = missionText - comp.NotValidatedText = notValidatedText - comp.BroadcastText = broadcastText - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - comp.ItemNumber = 0 - - comp._Seed = os.time() - - return comp -end - -component.create = function() - - if not r2:checkAiQuota() then return end - - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'getItemFromSceneryObjectTaskStep' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("GetItemFromSceneryObjectTaskStep") == 1 then - r2.displayFeatureHelp("GetItemFromSceneryObjectTaskStep") - end - r2.requestNewAction(i18n.get("uiR2EDNewGetItemFromSceneryObjectTaskStep")) - local component = feature.Components.GetItemFromSceneryObjectTaskStep.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'getItemFromSceneryObjectTaskStep' position") - end - local creature = r2.Translator.getDebugCreature("object_component_bot_request_item.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureGetItemFromSceneryObject") -end - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdGetItemFromSceneryObjectTaskStep") - logicEntityMenu:addLine(ucstring(name), "lua", "", "GetItemFromSceneryObjectTaskStep") -end - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["success"] = { menu=i18n.get( "uiR2Event0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskSuccess" ):toUtf8()}, - - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - ["is succeeded"] = { menu=i18n.get( "uiR2Test0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Test1TaskSuccess" ):toUtf8()}, - ["in progress"] = { menu=i18n.get( "uiR2Test0InProgress" ):toUtf8(), - text=i18n.get( "uiR2Test1InProgress" ):toUtf8()}, - } - } - return logicTranslations -end - - -r2.Features["GetItemFromSceneryObjectTaskStep"] = feature - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_give_item.lua b/code/ryzom/common/data_common/r2/r2_features_give_item.lua deleted file mode 100644 index ce43e67f8..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_give_item.lua +++ /dev/null @@ -1,516 +0,0 @@ - --- In Translation file --- Category : uiR2EdGiveItem -- --- CreationFrom : uiR2EdGiveItemParameters - - -r2.Features.GiveItemFeature = {} - -local feature = r2.Features.GiveItemFeature - -feature.Name="GiveItemFeature" - -feature.Description="A feature that allows a NPC to give some item(s) to the player" - -feature.Components = {} - -feature.Components.GiveItem = - { - --PropertySheetHeader = r2.getHelpButtonHeader("GiveItem") , - BaseClass="LogicEntity", - Name="GiveItem", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "giveItemDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - - ApplicableActions = { "activate", "deactivate"}, - - Events = { "activation", "deactivation", "mission asked", "succeeded"}, - - Conditions = { "is active", "is inactive", "is succeeded" }, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table"}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="MissionGiver", Type="RefId", PickFunction="r2:canPickTalkingNpc", SetRefIdFunction="r2:setTalkingNpc"}, - - {Name="ItemNumber", Type="Number", Category="uiR2EDRollout_ItemsToGive", WidgetStyle="EnumDropDown", - Enum={"1", "2", "3"}, DefaultValue="3" }, - {Name="Item1Qty", Type="Number", Category="uiR2EDRollout_ItemsToGive", Min="0", DefaultValue="1", Visible= function(this) return this:displayRefId(1) end}, - {Name="Item1Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_ItemsToGive", Visible= function(this) return this:displayRefId(1) end}, - - - {Name="Item2Qty", Type="Number", Category="uiR2EDRollout_ItemsToGive", Min="0", DefaultValue="0", Visible= function(this) return this:displayRefId(2) end}, - {Name="Item2Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_ItemsToGive", Visible= function(this) return this:displayRefId(2) end}, - - {Name="Item3Qty", Type="Number", Category="uiR2EDRollout_ItemsToGive", Min="0", DefaultValue="0", Visible= function(this) return this:displayRefId(3) end}, - {Name="Item3Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_ItemsToGive", Visible= function(this) return this:displayRefId(3) end}, - - - {Name="ContextualText", Type="String", Category="uiR2EDRollout_TextToSay", MaxNumChar="100"}, - {Name="MissionText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="MissionSucceedText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="BroadcastText", Type="String", Category="uiR2EDRollout_TextToSay", DefaultValue="", DefaultInBase = 1}, - - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="Repeatable", Type="Number", WidgetStyle="Boolean", DefaultValue="0"} - - }, - - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - - } - - -local component = feature.Components.GiveItem - -function component:displayRefId(index) - local nbItems = self.ItemNumber + 1 - if index <= nbItems then - return true - end - return false -end - - -local giveItemDisplayerTable = clone(r2:propertySheetDisplayer()) - -local oldOnAttrModified = giveItemDisplayerTable.onAttrModified - -function giveItemDisplayerTable:onAttrModified(instance, attributeName) - oldOnAttrModified(self, instance, attributeName) - r2:propertySheetDisplayer():onAttrModified(instance, attributeName) - if attributeName == "ItemNumber" then - local propertySheet = r2:getPropertySheet(instance) - local nbRefId = instance.ItemNumber + 1 - local i = 1 - while i <= 3 do - if i > nbRefId then - local name = "Item"..tostring(i).."Id" - local qty = "Item"..tostring(i).."Qty" - r2.requestSetNode(instance.InstanceId, name, r2.RefId("")) - r2.requestSetNode(instance.InstanceId, qty, 0) - end - i = i + 1 - end - propertySheet.Env.updatePropVisibility() - return - end - -end - -function giveItemDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true -end - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - if tmpInstance.ParentInstance and tmpInstance.ParentInstance:isKindOf("NpcGrpFeature") then - r2.requestSetNode(self.InstanceId, targetAttr, r2.RefId("")) - end - end - -end - - -function r2:giveItemDisplayer() - return giveItemDisplayerTable -- returned shared displayer to avoid wasting memory -end - - -function component:getItems() - local str = "" - - local id = 1 - while id <= 3 do - local item = self["Item"..tostring(id).."Id"] - local item2 = self.Item1Id - if (item) then - - local qt = tonumber(self["Item"..tostring(id).."Qty"]) - - local plotItem = r2:getInstanceFromId(item) - if plotItem then - local plotItemSheetId = plotItem.SheetId - if str ~= "" then str = str ..";" end - local name = r2.getSheetIdName(plotItemSheetId) - str = str .. tostring(name)..":"..qt - end - end - id = id + 1 - end - return str -end - -function component:textAdapter(text) - local str = "" - local items = {} - local qts = {} - - local id = 1 - while id <= 3 do - local item = self["Item"..tostring(id).."Id"] - local item2 = self.Item1Id - if (item) then - - local qt = tonumber(self["Item"..tostring(id).."Qty"]) - qts[id] = qt - - local plotItem = r2:getInstanceFromId(item) - if plotItem then - items[id] = plotItem.Name - else - items[id] = "" - end - end - id = id + 1 - end - local str = text - str=string.gsub (str, "", tostring(qts[1])) - str=string.gsub (str, "", tostring(qts[2])) - str=string.gsub (str, "", tostring(qts[3])) - str=string.gsub (str, "", tostring(items[1])) - str=string.gsub (str, "", tostring(items[2])) - str=string.gsub (str, "", tostring(items[3])) - - local mission_giver = "" - if self.MissionGiver == nil then return end - local npc = r2:getInstanceFromId(self.MissionGiver) - if npc then - mission_giver = npc.Name - end - str=string.gsub(str, "", tostring(mission_giver)) - return str -end - - - -function component:translate(context) - r2.Translator.translateAiGroup(self, context) - - if self.MissionGiver == nil then return end - local npc = r2:getInstanceFromId(self.MissionGiver) - if not npc then return end - - local npcGrp = r2.Translator.getRtGroup(context, npc.InstanceId) - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - local items = self:getItems() - - do - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, -- Active - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("npc_say", self:textAdapter(self.MissionText), npcGrp.Id ..":"..npc.Name); - r2.Translator.createAction("give_item", rtGrp.Id, items, self:textAdapter(self.ContextualText)), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 2) - }) - ) - r2.Translator.translateAiGroupEvent("player_target_npc", npc, context, rtAction) - end - - do - local action = r2.Translator.createAction("user_event_trigger", rtGrp.Id, 7) - r2.Translator.translateAiGroupEvent("start_of_state" , self, context, action) - end - - do - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", self.Active) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) -- Success - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3, } ) - r2.Translator.translateAiGroupEvent("user_event_7", self, context, rtAction) - end - - - do - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) -- Success - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3, } ) - r2.Translator.translateAiGroupEvent("user_event_4", self, context, rtAction) - end - - - do - local action1 = r2.Translator.createAction("npc_say", self:textAdapter(self.MissionSucceedText), npcGrp.Id ..":"..npc.Name); - - local action2 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 1, -- Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1 ) , - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0 ) - }) - ); - local action3 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 0, -- Not Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0 ) , - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 1 ), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 5) - }) - ); - - local baseAct = r2.Scenario:getBaseAct() - local baseActRtGrp = r2.Translator.getRtGroup(context, baseAct.InstanceId) - local actionBroadcast = r2.Translator.createAction("broadcast_msg",baseActRtGrp.Id, self:textAdapter(self.BroadcastText) ) - - local rtAction = r2.Translator.createAction("multi_actions", {action1, action2, action3, actionBroadcast}) - r2.Translator.translateAiGroupEvent("user_event_1", self, context, rtAction) - - end - r2.Translator.translateFeatureActivation(self, context) - - - - --- ()receiveMissionItems("system_mp.sitem:2;system_mp_choice.sitem:1;system_mp_supreme.sitem:3", "Give some stuff hי!", @groupToNotify); - - - - -end - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1); - return action1, action1 - elseif condition.Condition.Type == "is inactive" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0); - return action1, action1 - elseif condition.Condition.Type == "is succeeded" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v2", 1); - return action1, action1 - - else - assert(nil) - end - return nil,nil -end - - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "mission asked" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 2) - elseif eventType == "succeeded" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 1) - - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.createComponent = function(x, y) - - local comp = r2.newComponent("GiveItem") - assert(comp) - - local contextualText = i18n.get("uiR2EdGiveItem_ContextualText"):toUtf8() - local missionText = i18n.get("uiR2EdGiveItem_MissionText"):toUtf8() - local missionSucceedText = i18n.get("uiR2EdGiveItem_MissionSucceededText"):toUtf8() - local broadcastText = i18n.get("uiR2EdGiveItem_BroadcastText"):toUtf8() - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.bot_request_item") - comp.Name = r2:genInstanceName(i18n.get("uiR2EDGiveItem")):toUtf8() - - comp.ItemNumber = 0 - - comp.ContextualText = contextualText - comp.MissionText = missionText - comp.MissionSucceedText = missionSucceedText - comp.BroadcastText = broadcastText - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) --- comp.ItemQty = 1 - - comp._Seed = os.time() - - return comp -end - -component.create = function() - - if not r2:checkAiQuota() then return end - - - local function paramsOk(resultTable) - - r2.requestNewAction(i18n.get("uiR2EDNewGiveItemFeature")) - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - if showAgain == 1 then - r2.setDisplayInfo("GiveItemForm", 0) - else r2.setDisplayInfo("GiveItemForm", 1) end - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local component = feature.Components.GiveItem.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'GiveItem' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'GiveItem' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("GiveItem") == 1 then - r2.displayFeatureHelp("GiveItem") - end - r2.requestNewAction(i18n.get("uiR2EDNewGiveItemFeature")) - local component = feature.Components.GiveItem.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'GiveItem' position") - end - local creature = r2.Translator.getDebugCreature("object_component_bot_request_item.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureGiveItem") -end - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdGiveItem") - logicEntityMenu:addLine(ucstring(name), "lua", "", "GiveItem") -end - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()} - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["mission asked"] = { menu=i18n.get( "uiR2Event0MissionGiven" ):toUtf8(), - text=i18n.get( "uiR2Event1MissionGiven" ):toUtf8()}, - ["wait validation"] = { menu=i18n.get( "uiR2Event0TaskWaitValidation" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskWaitValidation" ):toUtf8()}, - ["succeeded"] = { menu=i18n.get( "uiR2Event0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskSuccess" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - ["is succeeded"] = { menu=i18n.get( "uiR2Test0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Test1TaskSuccess" ):toUtf8()}, - - } - } - return logicTranslations -end - - -r2.Features["GiveItem"] = feature - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_hidden_chest.lua b/code/ryzom/common/data_common/r2/r2_features_hidden_chest.lua deleted file mode 100644 index 55ce70b03..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_hidden_chest.lua +++ /dev/null @@ -1,290 +0,0 @@ - -r2.Features.HiddenChest = {} - -local feature = r2.Features.HiddenChest - -feature.Name="HiddenChest" - - -feature.Description="" - -feature.Components = {} - -local classHiddenChestVersion = 1 - -feature.Components.HiddenChest = - { - --PropertySheetHeader = r2.getDisplayButtonHeader("r2.events:openEditor()", "uiR2EdEditEventsButton"), - BaseClass="EasterEgg", - Name="HiddenChest", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - Version=classHiddenChestVersion , - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - Parameters = {}, - ApplicableActions = {"activate", "deactivate", "trigger"}, - Events = {"activation", "deactivation", "trigger"}, - Conditions = {"is active", "is inactive"}, - TextContexts = {}, - TextParameters = {}, - LiveParameters = {}, - ----------------------------------------------------------------------------------------------- - Prop = - { - {Name="TriggerOn", Type="Number", WidgetStyle="EnumDropDown", Translation="uiR2EdProp_TriggerOn", - Enum={"Leaves the zone", "Enters the zone"}, - }, - }, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - local eggId = this:getEggId(context) - end, - - translate = function(this, context) - local eggId = this:getEggId(context) - r2.Translator.translateAiGroup(this, context) - r2.Translator.translateFeatureActivation(this, context) - end, - - updateVersion = function(this, scenarioValue, currentValue ) - - end, - - - } - -local component = feature.Components.HiddenChest - - -component.getLogicAction = function(entity, context, action) - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if action.Action.Type == "trigger" then - local actionTrigger = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 6) - local actionSpawn = component:createActionActivateEasterEgg(context) - local retAction = r2.Translator.createAction("condition_if", r2:getNamespace()..rtNpcGrp.Id..".Active == 1", - r2.Translator.createAction("multi_actions", {actionTrigger, actionSpawn}) - ) - return retAction, retAction - elseif (action.Action.Type == "activate") then - local action1 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Active", 1) - local action2 = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 4) - local retAction = r2.Translator.createAction("multi_actions", {action1, action2}) - assert(retAction) - return retAction, retAction - elseif (action.Action.Type == "deactivate") then - local action1 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Active", 0) - local action2 = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 5) - --local action3 = component:createActionDeactivateEasterEgg(context) - --local retAction = r2.Translator.createAction("multi_actions", {action1, action2, action3}) - local retAction = r2.Translator.createAction("multi_actions", {action1, action2}) - assert(retAction) - return retAction, retAction - end - return nil, nil -end - -component.getLogicCondition = function(this, context, condition) - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationCondition(condition, rtNpcGrp) -end - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if tostring(event.Event.Type) == "trigger" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 6) - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.createGhostComponents= function(this, act) - - local comp = this - - local zoneTrigger = r2:getInstanceFromId(comp._ZoneId) - assert(zoneTrigger) - - do - local type = "On Player Left" - if comp.TriggerOn == 1 then - type = "On Player Arrived" - end - - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = type - eventHandler.Event.Value = "" - eventHandler.Name = type - - local action = r2.newComponent("ActionStep") - - action.Entity = r2.RefId(comp.InstanceId) - action.Action.Type = "trigger" - action.Action.Value = "" - - table.insert(eventHandler.Actions, action) - - local behaviorId = zoneTrigger.Behavior.InstanceId - assert(behaviorId) - r2.requestInsertGhostNode(behaviorId, "Actions", -1, "", eventHandler) - - end - - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = "activation" - eventHandler.Event.Value = "" - eventHandler.Name = "activation" - - local action = r2.newComponent("ActionStep") - - action.Entity = r2.RefId(zoneTrigger.InstanceId) - action.Action.Type = "activate" - action.Action.Value = "" - - table.insert(eventHandler.Actions, action) - - local behaviorId = this.Behavior.InstanceId - assert(behaviorId) - r2.requestInsertGhostNode(behaviorId, "Actions", -1, "", eventHandler) - end - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = "deactivation" - eventHandler.Event.Value = "" - eventHandler.Name = "deactivation" - - local action = r2.newComponent("ActionStep") - - action.Entity = r2.RefId(zoneTrigger.InstanceId) - action.Action.Type = "deactivate" - action.Action.Value = "" - - table.insert(eventHandler.Actions, action) - - local behaviorId = this.Behavior.InstanceId - assert(behaviorId) - r2.requestInsertGhostNode(behaviorId, "Actions", -1, "", eventHandler) - end - - - -end - - -component.createComponent = function(x, y) - - local comp = r2.newComponent("HiddenChest") - assert(comp) - assert(comp.Position) - - comp.Name = r2:genInstanceName(i18n.get("uiR2EdHiddenChest")):toUtf8() - comp.Base = "palette.entities.botobjects.chest_wisdom_std_sel" - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - comp.CompareClass = true - - comp.ItemNumber = 0 - - local zoneTrigger = r2.Features["ZoneTrigger"].Components.ZoneTrigger.createComponent(x + 3, y + 3) - zoneTrigger.Name = comp.Name.." "..i18n.get("uiR2EdZoneTrigger"):toUtf8()--r2:genInstanceName(i18n.get("uiR2EdZoneTrigger")):toUtf8() - zoneTrigger.InheritPos = 0 - zoneTrigger.Deletable = false - table.insert(comp.Components, zoneTrigger) - comp._ZoneId = zoneTrigger.InstanceId - - return comp -end - -component.create = function() - if not r2:checkAiQuota() then return end - - local function posOk(x, y, z) - debugInfo("Validate creation of an HiddenChest.") - if r2.mustDisplayInfo("HiddenChest") == 1 then - r2.displayFeatureHelp("HiddenChest") - end - r2.requestNewAction(i18n.get("uiR2EDNewHiddenChestFeatureAction")) - local component = feature.Components.HiddenChest.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function posCancel() end - - local creature = r2.Translator.getDebugCreature("object_component_user_event.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureHiddenChest") -end - - -component.initLogicEntitiesInstancesMenu = function(this, subMenu, calledFunction) - - local entitiesTable = r2.Scenario:getAllInstancesByType(this.Name) - for key, entity in pairs(entitiesTable) do - local uc_name = ucstring() - uc_name:fromUtf8(entity.Name) - subMenu:addLine(uc_name, "lua", calledFunction.."('".. entity.InstanceId .."')", entity.InstanceId) - end - - if table.getn(entitiesTable)==0 then - subMenu:addLine(i18n.get("uiR2EdNoSelelection"), "", "", "") - end -end ------------------------------------------ ---- register the curent Feature to menu - -function component:getLogicTranslations() - -- register trad - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - ["trigger"] = { menu=i18n.get( "uiR2AA0Trigger" ):toUtf8(), - text=i18n.get( "uiR2AA1Trigger" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["trigger"] = { menu=i18n.get( "uiR2Event0Trigger" ):toUtf8(), - text=i18n.get( "uiR2Event1Trigger" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()} - } - } - - return logicTranslations -end - -r2.Features["HiddenChest"] = feature - - diff --git a/code/ryzom/common/data_common/r2/r2_features_hunt_task.lua b/code/ryzom/common/data_common/r2/r2_features_hunt_task.lua deleted file mode 100644 index e2f965e04..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_hunt_task.lua +++ /dev/null @@ -1,708 +0,0 @@ - -r2.Features.HuntTask = {} - -local feature = r2.Features.HuntTask - -feature.Name="HuntTask" - -feature.Description="" - -feature.Components = {} - -feature.Components.HuntTask = - { - BaseClass="LogicEntity", - Name="HuntTask", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "huntTaskDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - - ApplicableActions = { "activate", "deactivate", "succeed", "succeedStep"}, - - Events = {"activation", "deactivation", "wait validation", "mission asked", "succeeded"}, - - Conditions = { "is active", "is inactive", "is succeeded" }, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table"}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="MissionGiver", Type="RefId", PickFunction="r2:canPickTalkingNpc", SetRefIdFunction="r2:setTalkingNpc"}, - {Name="TargetNumber", Type="Number", Min="1", Default="1"}, - {Name="IdNumber", Type="Number", Category="uiR2EDRollout_Targets", WidgetStyle="EnumDropDown", Enum={"1", "2", "3", "4"},}, - {Name="Target1Id", Type="RefId", Category="uiR2EDRollout_Targets", PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget",Visible= function(this) return this:displayRefId(1) end}, - {Name="Target2Id", Type="RefId", Category="uiR2EDRollout_Targets", PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget",Visible= function(this) return this:displayRefId(2) end}, - {Name="Target3Id", Type="RefId", Category="uiR2EDRollout_Targets", PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget",Visible= function(this) return this:displayRefId(3) end}, - {Name="Target4Id", Type="RefId", Category="uiR2EDRollout_Targets", PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget",Visible= function(this) return this:displayRefId(4) end}, - {Name="ValidationNeeded", Category="uiR2EDRollout_TextToSay", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="ContextualText", Type="String", Category="uiR2EDRollout_TextToSay", MaxNumChar="100" }, - {Name="MissionText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="WaitValidationText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="MissionSucceedText", Type="String", Category="uiR2EDRollout_TextToSay", Visible= function(this) - return this:IsValidationNeeded() end }, - {Name="BroadcastText", Type="String", Category="uiR2EDRollout_TextToSay", DefaultValue="", DefaultInBase = 1}, - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="Repeatable", Type="Number", WidgetStyle="Boolean", DefaultValue="0"}, - - - }, - - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - - - } - - -local component = feature.Components.HuntTask - -function component:IsValidationNeeded() - local validationNeeded = self.ValidationNeeded - if validationNeeded == 1 then - return true - end - return false -end - -function component:displayRefId(index) - local nbRefId = self.IdNumber + 1 - if index <= nbRefId then - return true - end - return false -end ---------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------- -function component:textAdapter(text) - - assert(self) - assert(type(text) == "string") - local str = text - local mission_giver = "" - local nbTargets = "" - - if tostring(self.MissionGiver) ~= "" then - local giver = r2:getInstanceFromId(self.MissionGiver) - if giver then mission_giver = giver.Name end - end - - if tostring(self.TargetNumber) ~= "" then - nbTargets = tostring(self.TargetNumber) - end - - str=string.gsub(str, "", mission_giver) - str=string.gsub(str, "", nbTargets) - return str -end - -local huntTaskDisplayerTable = clone(r2:propertySheetDisplayer()) - --- --- If the message is received by a client that didn't request the modification, we must make sure this client --- doesn't modify the data because it has already been done by the initial client. --- -local function checkPickedEntity(this, instanceId, attributeName) - if instanceId == "" then - return false - end - local tmpInstance = r2:getInstanceFromId(instanceId) - assert(tmpInstance) - local i = 1 - while i < 5 do - local attrName = "Target" ..i.. "Id" - if attrName ~= attributeName and this[attrName] == tmpInstance.InstanceId then - return false - end - if attributeName ~= "MissionGiver" and this["MissionGiver"] == tmpInstance.InstanceId then - return false - end - i = i + 1 - end - return true -end - - -local oldOnAttrModified = huntTaskDisplayerTable.onAttrModified -function huntTaskDisplayerTable:onAttrModified(instance, attributeName) - - oldOnAttrModified(self, instance, attributeName) - if attributeName == "ValidationNeeded" then - local propertySheet = r2:getPropertySheet(instance) - propertySheet.Env.updatePropVisibility() - return - end - if attributeName == "IdNumber" then - local propertySheet = r2:getPropertySheet(instance) - local nbRefId = instance.IdNumber + 1 - local i = 1 - while i <= 4 do - if i > nbRefId then - local name = "Target"..tostring(i).."Id" - local refId = propertySheet:find(name) - local refIdName = refId:find("name") - refIdName.hardtext = "NONE" - r2.requestSetNode(instance.InstanceId, name, "") - end - i = i + 1 - end - propertySheet.Env.updatePropVisibility() - return - end - - if (string.find(attributeName, "Id") == nil or attributeName == "InstanceId") and not attributeName == "MissionGiver" then return end - - local propertySheet = r2:getPropertySheet(instance) - local refId = propertySheet:find(attributeName) - if refId == nil then return end - local refIdName = refId:find("name") - local instanceId = instance[attributeName] - if not instanceId then - return - end - - if instanceId == "" then - refIdName.hardtext = "NONE" - return - end - - local inserted = checkPickedEntity(instance, instanceId, attributeName) - if inserted == true then - local tmpInstance = r2:getInstanceFromId(instanceId) - refIdName.hardtext = tmpInstance.Name - else - r2.requestSetNode(instance.InstanceId, attributeName, "") - end - instance.User.onHrcMove = false -end - -function huntTaskDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true - -end - - -local function reattributeIdOnHrcMove(hunt, group, targetAttr) - local propertySheet = r2:getPropertySheet(hunt) - local refId = propertySheet:find(targetAttr) - local refIdName = refId:find("name") - - r2.requestSetNode(hunt.InstanceId, targetAttr, group.InstanceId) - refIdName.hardtext = group.Name - hunt.User.onHrcMove = true - -end - - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - if targetAttr == "MissionGiver" then - r2.requestSetNode(self.InstanceId, targetAttr, "") - return - end - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - local group = tmpInstance.ParentInstance - if group:isKindOf("NpcGrpFeature") then - reattributeIdOnHrcMove(self, group, targetAttr) - end - tmpInstance.User.SelfModified = false - end - -end - - -function r2:huntTaskDisplayer() - return huntTaskDisplayerTable -- returned shared displayer to avoid wasting memory -end - ---------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------- - -function component:createGhostComponents(act) - local comp = self - - local counter = r2.newComponent("Counter") - assert(counter) - - counter.Base = "palette.entities.botobjects.milestone" - counter.Name = "TargetCounter" - counter.Position.x = comp.Position.x - counter.Position.y = comp.Position.y - counter.Position.z = 0 - - local counterId = counter.InstanceId - assert(counterId) - r2.requestSetGhostNode(comp.InstanceId, "_CounterId", counterId) - local nbTarget = 0 - local eventType = "" --depends on the instance type (groupe or npc) - local eventName = "" - - -- Add to each guard a 'OnDeath EventHandler' which decrements the counter - for id = 1, 4 do - local propertyName = "Target"..tonumber(id).."Id" - if comp[propertyName] ~= nil and comp[propertyName] ~= "" then - local targetInstance = r2:getInstanceFromId(comp[propertyName]) - if targetInstance then - - if targetInstance:isKindOf("Npc") then - eventType = "death" - eventName = "On Death" - elseif targetInstance:isKindOf("NpcGrpFeature") then - eventType = "member death" - eventName = "On Member Death" - end - - local eventHandler = r2.newComponent("LogicEntityAction") - --eventHandler.Event.Type = "death" - eventHandler.Event.Type = eventType - eventHandler.Event.Value = "" - --eventHandler.Name = "On Death" - eventHandler.Event.Name = eventName - - local action = r2.newComponent("ActionStep") - table.insert(eventHandler.Actions, action) - action.Entity = r2.RefId(comp.InstanceId) - action.Action.Type = "succeedStep" - action.Action.Value = "" - - if targetInstance:isKindOf("Npc") then - r2.requestInsertGhostNode(targetInstance.Behavior.InstanceId, "Actions", -1, "", eventHandler) - elseif targetInstance:isKindOf("NpcGrpFeature") then - r2.requestInsertGhostNode(targetInstance.Components[0].Behavior.InstanceId, "Actions", -1, "", eventHandler) - end - --r2.requestInsertGhostNode(guardInstance.Behavior.InstanceId, "Actions", -1, "", eventHandler) - - nbTarget = nbTarget + 1 - end - end - end - - if nbTarget == 0 then - debugInfo("hunt task: No target has been picked.") - return - end - - counter.Value = tonumber(comp.TargetNumber) - counter.TriggerValue = 0 - - do - local validationNeeded = tonumber(comp.ValidationNeeded) - - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = "On Trigger" - eventHandler.Event.Value = "" - eventHandler.Name = "On Trigger" - - local action = r2.newComponent("ActionStep") - action.Entity = r2.RefId(comp.InstanceId) - - if validationNeeded == 1 then - action.Action.Type = "validateTask" - else - action.Action.Type = "succeed" - end - - action.Action.Value = "" - - - table.insert(eventHandler.Actions, action) - - table.insert(counter.Behavior.Actions, eventHandler) - - end - - r2.requestInsertGhostNode(comp.InstanceId, "Components", -1, "", counter) - -end - - - -function component:translate(context) - r2.Translator.translateAiGroup(self, context) - - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - - local validationNeeded = self.ValidationNeeded - - local giver = r2:getInstanceFromId(self.MissionGiver) - if not giver then return end - local rtGiverGrp = r2.Translator.getRtGroup(context, giver.InstanceId) - - -- Start of state - do - local action = r2.Translator.createAction("user_event_trigger", rtGrp.Id, 7) - r2.Translator.translateAiGroupEvent("start_of_state" , self, context, action) - end - - do - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", self.Active) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) -- Success - local rtAction4 = r2.Translator.createAction("set_value", rtGrp.Id, "v3", 0) - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3,rtAction4 } ) - r2.Translator.translateAiGroupEvent("user_event_7", self, context, rtAction) - end - - do - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) -- Success - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3, } ) - r2.Translator.translateAiGroupEvent("user_event_4", self, context, rtAction) - end - - - - -- when player targets mission giver - do - local action1 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, -- Active - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 1, -- giver has been spoken to - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 2), - r2.Translator.createAction("npc_say", self:textAdapter(self.WaitValidationText), rtGiverGrp.Id ..":"..giver.Name)}) ) - ) - - local multiActions = r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 1 ), - r2.Translator.createAction("npc_say", self:textAdapter(self.MissionText), rtGiverGrp.Id ..":"..giver.Name), - r2.Translator.createAction("talk_to", rtGrp.Id, self:textAdapter(self.ContextualText)), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 1)}) - - local action2 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, -- Active - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 0, multiActions)) - - local rtAction = r2.Translator.createAction("multi_actions", {action1, action2}) - - r2.Translator.translateAiGroupEvent("player_target_npc", giver, context, rtAction) - end - - if validationNeeded == 1 then - do - local actionEvent = r2.Translator.createAction("user_event_trigger", rtGrp.Id, 9) - local actionSuccessTxt = r2.Translator.createAction("npc_say", self:textAdapter(self.MissionSucceedText), rtGiverGrp.Id ..":"..giver.Name) - - local action = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 2, - r2.Translator.createAction("condition_if", r2:getNamespace()..rtGrp.Id..".Active == 1", - r2.Translator.createAction("multi_actions", {actionEvent, actionSuccessTxt}))) - - r2.Translator.translateAiGroupEvent("player_target_npc", giver, context, action) - end - - do - local baseAct = r2.Scenario:getBaseAct() - local baseActRtGrp = r2.Translator.getRtGroup(context, baseAct.InstanceId) - local actionBroadcast = r2.Translator.createAction("broadcast_msg",baseActRtGrp.Id, self:textAdapter(self.BroadcastText) ) - - r2.Translator.translateAiGroupEvent("user_event_8", self, context, actionBroadcast) - end - end - - do - local action2 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 1, --if Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1 ), - }) - ); - local action3 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 0, -- if not Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0 ) , - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 2 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1 ), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 5) - }) - ); - - local actions = {} - if validationNeeded == 1 then - actions = {action2, action3} - else - local baseAct = r2.Scenario:getBaseAct() - local baseActRtGrp = r2.Translator.getRtGroup(context, baseAct.InstanceId) - local actionBroadcast = r2.Translator.createAction("broadcast_msg",baseActRtGrp.Id, self:textAdapter(self.BroadcastText) ) - - actions = {action2, action3, actionBroadcast} - end - local multiActions = r2.Translator.createAction("multi_actions", actions) - - local action = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 2, - r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, multiActions)) - r2.Translator.translateAiGroupEvent("user_event_9", self, context, action) - end - - --deactivate - do - local rtAction = r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0 ), - }) - r2.Translator.translateAiGroupEvent("user_event_5", self, context, rtAction) - end - r2.Translator.translateFeatureActivation(self, context) -end - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtGrp) - local rtGrpCounter = r2.Translator.getRtGroup(context, component._CounterId) - assert(rtGrpCounter) - - if action.Action.Type == "validateTask" then - local action = r2.Translator.createAction("validate_task", rtGrp.Id) - return action, action - elseif action.Action.Type == "succeed" then - local action = r2.Translator.createAction("complete_mission", rtGrp.Id) - return action, action - elseif action.Action.Type == "succeedStep" then - local actionDec = r2.Translator.createAction("counter_dec", rtGrpCounter.Id) - local actionIf = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 1, - r2.Translator.createAction("condition_if", r2:getNamespace()..rtGrp.Id..".Active == 1",actionDec)) - return actionIf, actionIf - end - - return r2.Translator.getFeatureActivationLogicAction(rtGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1); - return action1, action1 - elseif condition.Condition.Type == "is inactive" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0); - return action1, action1 - elseif condition.Condition.Type == "is succeeded" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v3", 1); - return action1, action1 - - else - assert(nil) - end - return nil,nil -end - - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local rtNpcGrp = r2.Translator.getRtGroup(context, this.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "mission asked" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 1) - elseif eventType == "wait validation" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 2) - elseif eventType == "succeeded" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 9) - - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.createComponent = function(x, y) - - local contextualText = i18n.get("uiR2EdHuntTask_ContextualText"):toUtf8() - local missionText = i18n.get("uiR2EdHuntTask_MissionText"):toUtf8() - local waitValidationText = i18n.get("uiR2EdHuntTask_WaitValidationText"):toUtf8() - local missionSucceededText = i18n.get("uiR2EdHuntTask_MissionSucceededText"):toUtf8() - local broadcastText = i18n.get("uiR2EdHuntTask_BroadcastText"):toUtf8() - - - local comp = r2.newComponent("HuntTask") - assert(comp) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.bot_chat") - comp.Name = r2:genInstanceName(i18n.get("uiR2EdHuntTask")):toUtf8() - - comp.ContextualText = contextualText - comp.MissionText = missionText - comp.WaitValidationText = waitValidationText - comp.MissionSucceedText = missionSucceededText - comp.BroadcastText= broadcastText - comp.TargetNumber = 1 - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - comp._Seed = os.time() - - return comp -end - -component.create = function() - if r2:getLeftQuota() <= 0 then - r2:makeRoomMsg() - return - end - local function paramsOk(resultTable) - - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - - if showAgain == 1 then - r2.setDisplayInfo("HuntTask", 0) - else r2.setDisplayInfo("HuntTask", 1) end - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local component = feature.Components.HuntTask.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'HuntTask' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'HuntTask' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("HuntTask") == 1 then - r2.displayFeatureHelp("HuntTask") - end - r2.requestNewAction(i18n.get("uiR2EDNewHuntTaskFeatureAction")) - local component = feature.Components.HuntTask.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'HuntTask' position") - end - local creature = r2.Translator.getDebugCreature("object_component_bot_chat.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureHuntTask") -end - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdHuntTask") - logicEntityMenu:addLine(ucstring(name), "lua", "", "HuntTask") -end - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - ["succeed"] = { menu=i18n.get( "uiR2AA0SucceedTask" ):toUtf8(), - text=i18n.get( "uiR2AA1SucceedTask" ):toUtf8()}, - ["succeedStep"] = { menu=i18n.get( "uiR2AA0SucceedStep" ):toUtf8(), - text=i18n.get( "uiR2AA1SucceedStep" ):toUtf8()} - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["mission asked"] = { menu=i18n.get( "uiR2Event0MissionGiven" ):toUtf8(), - text=i18n.get( "uiR2Event1MissionGiven" ):toUtf8()}, - ["wait validation"] = { menu=i18n.get( "uiR2Event0TaskWaitValidation" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskWaitValidation" ):toUtf8()}, - ["succeeded"] = { menu=i18n.get( "uiR2Event0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskSuccess" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - ["is succeeded"] = { menu=i18n.get( "uiR2Test0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Test1TaskSuccess" ):toUtf8()}, - } - } - return logicTranslations -end - - -r2.Features["HuntTask"] = feature - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_kill_npc.lua b/code/ryzom/common/data_common/r2/r2_features_kill_npc.lua deleted file mode 100644 index 07bbdd0e5..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_kill_npc.lua +++ /dev/null @@ -1,479 +0,0 @@ - -r2.Features.KillNpc = {} - -local feature = r2.Features.KillNpc - -feature.Name="KillNpc" - -feature.Description="" - -feature.Components = {} - -feature.Components.KillNpc = - { - BaseClass="LogicEntity", - Name="KillNpc", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "killNpcDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - - ApplicableActions = { "activate", "deactivate"}, - - Events = {"activation", "deactivation", "wait validation", "mission asked", "succeeded"}, - - Conditions = { "is active", "is inactive", "is completed" }, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table"}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="MissionGiver", Type="RefId", PickFunction="r2:canPickTalkingNpc", SetRefIdFunction="r2:setTalkingNpc"}, - {Name="MissionTarget", Type="RefId", PickFunction="r2:canPickNotGroupedNpc", SetRefIdFunction="r2:setNotGroupedNpcRefIdTarget"}, - {Name="ValidationNeeded", Category="uiR2EDRollout_TextToSay", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="ContextualText", Type="String", Category="uiR2EDRollout_TextToSay", MaxNumChar="100" }, - {Name="MissionText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="WaitValidationText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="MissionSucceedText", Type="String", Category="uiR2EDRollout_TextToSay", Visible= function(this) - return this:IsValidationNeeded() end }, - {Name="BroadcastText", Type="String", Category="uiR2EDRollout_TextToSay", DefaultValue="", DefaultInBase = 1}, - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - - }, - - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - - - } - - -local component = feature.Components.KillNpc - -function component:IsValidationNeeded() - local validationNeeded = self.ValidationNeeded - if validationNeeded == 1 then - return true - end - return false -end - -local killNpcDisplayerTable = clone(r2:propertySheetDisplayer()) -local oldOnAttrModified = killNpcDisplayerTable.onAttrModified - -function killNpcDisplayerTable:onAttrModified(instance, attributeName) - oldOnAttrModified(self, instance, attributeName) - - local propertySheet = r2:getPropertySheet(instance) - - if attributeName == "ValidationNeeded" then - propertySheet.Env.updatePropVisibility() - return - end - - local targetRefId = propertySheet:find("MissionTarget") - local targetName = targetRefId:find("name") - - local giverRefId = propertySheet:find("MissionGiver") - local giverName = propertySheet:find("MissionGiver"):find("name") - - if attributeName == "MissionGiver" then - - local instanceId = instance[attributeName] - if instanceId == "" then - giverName.hardtext = "NONE" - return - end - - if instance["MissionTarget"] == instance[attributeName] then - giverName.hardtext = "NONE" - r2.requestSetNode(instance.InstanceId, "MissionGiver", "") - else - giverName.hardtext = r2:getInstanceFromId(instance[attributeName]).Name - end - return - end - - if attributeName == "MissionTarget" then - local instanceId = instance[attributeName] - if instanceId == "" then - targetName.hardtext = "NONE" - return - end - - if instance["MissionGiver"] == instance[attributeName] then - targetName.hardtext = "NONE" - r2.requestSetNode(instance.InstanceId, "MissionTarget", "") - else - targetName.hardtext = r2:getInstanceFromId(instance[attributeName]).Name - end - return - end - - - - r2:propertySheetDisplayer():onAttrModified(instance, attributeName) - return -end - - -function killNpcDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true -end - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - if tmpInstance.ParentInstance and tmpInstance.ParentInstance:isKindOf("NpcGrpFeature") then - r2.requestSetNode(self.InstanceId, targetAttr, r2.RefId("")) - end - end - -end - -function r2:killNpcDisplayer() - return killNpcDisplayerTable -- returned shared displayer to avoid wasting memory -end - - - -function component:textAdapter(text) - - assert(self) - assert(type(text) == "string") - local str = text - local mission_giver = "" - local mission_target = "" - - if tostring(self.MissionGiver) ~= "" then - local giver = r2:getInstanceFromId(self.MissionGiver) - if giver then mission_giver = giver.Name end - end - - if tostring(self.MissionTarget) ~= "" then - local target = r2:getInstanceFromId(self.MissionTarget) - if target then mission_target = target.Name end - end - - str=string.gsub(str, "", mission_giver) - str=string.gsub(str, "", mission_target) - return str -end - --- EVENTS----------------------------------------------------------------------- --- 4 : activation --- 5 : deactivation --- 3 : mission given --- 2 : wait validation --- 9 : mission completed ---------------------------------------------------------------------------------- -function component:translate(context) - - r2.Translator.translateAiGroup(self, context) - - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - - local validationNeeded = tonumber(self.ValidationNeeded) - - local giver = r2:getInstanceFromId(self.MissionGiver) - if not giver then return end - local rtGiverGrp = r2.Translator.getRtGroup(context, giver.InstanceId) - - local target = r2:getInstanceFromId(self.MissionTarget) - if not target then return end - local rtTargetGrp = r2.Translator.getRtGroup(context, target.InstanceId) - - if tostring(self.MissionTarget) == "" or self.MissionTarget == nil then return end - - -- Start of state - r2.Translator.Tasks.startOfStateLogic(self, context, rtGrp) - - -- Activation - r2.Translator.Tasks.activationLogic(self, context, rtGrp) - - --Deactivation - r2.Translator.Tasks.deactivationLogic(self, context, rtGrp) - - - -- when player targets mission giver - r2.Translator.Tasks.giverLogic(self, giver, context, rtGrp) - - --Set mission status to 1 when mission is taken - r2.Translator.Tasks.setStatusLogic(self, context, rtGrp) - - -- Qd player target le targetNpc : si validation sur giver = event 2 (waitValidation) - -- si validation sur target = event 3 (success) - do - local actionEvent = r2.Translator.createAction("user_event_trigger", rtGrp.Id, 9) - - local actionSet = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 2) - - local baseAct = r2.Scenario:getBaseAct() - local baseActRtGrp = r2.Translator.getRtGroup(context, baseAct.InstanceId) - local actionBroadcast = r2.Translator.createAction("broadcast_msg",baseActRtGrp.Id, self:textAdapter(self.BroadcastText) ) - - local actions = {actionSet, actionBroadcast} - if validationNeeded == 0 then - table.insert(actions, actionEvent) - end - - local multiactions = r2.Translator.createAction("multi_actions", actions) - - - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 1, multiactions)) - r2.Translator.translateAiGroupEvent("group_eliminated", target, context, rtAction) - end - - r2.Translator.Tasks.validationByMissionGiver(self, giver, context, rtGrp) - - r2.Translator.Tasks.successNoBroadcastLogic(self, context, rtGrp) - - - r2.Translator.translateFeatureActivation(self, context) -end - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1); - return action1, action1 - elseif condition.Condition.Type == "is inactive" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0); - return action1, action1 - elseif condition.Condition.Type == "is completed" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v3", 1); - return action1, action1 - - else - assert(nil) - end - return nil,nil -end - - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "mission asked" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 3) - elseif eventType == "wait validation" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 2) - elseif eventType == "succeeded" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 9) - - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.createComponent = function(x, y) - - local contextualText = i18n.get("uiR2EdKillNpc_ContextualText"):toUtf8() - local missionText = i18n.get("uiR2EdKillNpc_MissionText"):toUtf8() - local waitValidationText = i18n.get("uiR2EdKillNpc_WaitValidationText"):toUtf8() - local missionSucceededText = i18n.get("uiR2EdKillNpc_MissionSucceededText"):toUtf8() - local broadcastText = i18n.get("uiR2EdKillNpc_BroadcastText"):toUtf8() - - local comp = r2.newComponent("KillNpc") - assert(comp) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.bot_chat") - comp.Name = r2:genInstanceName(i18n.get("uiR2EdKillNpc")):toUtf8() - - comp.ContextualText = contextualText - comp.MissionText = missionText - comp.WaitValidationText = waitValidationText - comp.MissionSucceedText = missionSucceededText - comp.BroadcastText= broadcastText - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) --- comp.ItemQty = 1 - - comp._Seed = os.time() - - return comp -end - -component.create = function() - if r2:getLeftQuota() <= 0 then - r2:makeRoomMsg() - return - end - local function paramsOk(resultTable) - - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - - if showAgain == 1 then - r2.setDisplayInfo("KillNpc", 0) - else r2.setDisplayInfo("KillNpc", 1) end - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local component = feature.Components.KillNpc.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'KillNpc' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'KillNpc' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("KillNpc") == 1 then - r2.displayFeatureHelp("KillNpc") - end - r2.requestNewAction(i18n.get("uiR2EDNewKillNpcFeatureAction")) - local component = feature.Components.KillNpc.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'KillNpc' position") - end - local creature = r2.Translator.getDebugCreature("object_component_bot_chat.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureKillNpc") -end - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdKillNpc") - logicEntityMenu:addLine(ucstring(name), "lua", "", "KillNpc") -end - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()} - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["mission asked"] = { menu=i18n.get( "uiR2Event0MissionGiven" ):toUtf8(), - text=i18n.get( "uiR2Event1MissionGiven" ):toUtf8()}, - ["wait validation"] = { menu=i18n.get( "uiR2Event0TaskWaitValidation" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskWaitValidation" ):toUtf8()}, - ["succeeded"] = { menu=i18n.get( "uiR2Event0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskSuccess" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - ["is completed"] = { menu=i18n.get( "uiR2Test0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Test1TaskSuccess" ):toUtf8()}, - } - } - return logicTranslations -end - - -r2.Features["KillNpc"] = feature - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_loaded.lua b/code/ryzom/common/data_common/r2/r2_features_loaded.lua deleted file mode 100644 index b5e8b92ef..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_loaded.lua +++ /dev/null @@ -1,40 +0,0 @@ -function r2.getCategories() - local categories = { - {"uiR2EdMobSpawnersCategory", "r2ed_icon_creatures.tga", "root"}, - - {"uiR2EdChestsCategory", "r2ed_icon_components_chest.tga.tga", "root"}, - - -- {"uiR2EdTasksSubTasksCategory", "r2ed_icon_components_tasks.tga", "root"}, - -- {"uiR2EdTasksCategory", "r2ed_icon_macro_components.tga", "uiR2EdTasksSubTasksCategory"}, - -- {"uiR2EdTaskStepCategory", "", "uiR2EdTasksSubTasksCategory"}, - {"uiR2EdTasksCategory", "r2ed_icon_macro_components.tga", "root"}, - {"uiR2EdTaskStepCategory", "", "root"}, - - {"uiR2EdTriggersCategory", "r2ed_icon_components_trigger.tga", "root"}, - - {"uiR2EdDialogsCategory", "r2_mini_activity_chat.tga", "root"}, - - {"uiR2EdMacroComponentsCategory", "r2ed_icon_macro_components.tga", "root"}, - - {"uiR2EdDevCategory", "r2ed_icon_macro_components.tga", "root"}, - --{Category_Id, Category_Icon, Parent_Node} - } - return categories -end - -function r2.getLoadedFeaturesDynamic() - local loadedFeatures = - { - --Dev - --{"r2_features_teleport_near.lua", "TeleportNearFeature", "uiR2EdDevCategory"}, - {"r2_features_quest.lua", "Quest", "uiR2EdDevCategory"}, - {"r2_features_npc_interaction.lua", "NpcInteraction", "uiR2EdDevCategory"}, - - --{filename, feature_name, category} - } - return loadedFeatures -end - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_loot_spawner.lua b/code/ryzom/common/data_common/r2/r2_features_loot_spawner.lua deleted file mode 100644 index bcadf417b..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_loot_spawner.lua +++ /dev/null @@ -1,499 +0,0 @@ --- In Translation file --- Category : uiR2EdLootSpawner -- --- CreationFrom : uiR2EdLootSpawnerParameters - - -r2.Features.LootSpawnerFeature = {} - -local feature = r2.Features.LootSpawnerFeature - -feature.Name="LootSpawnerFeature" - -feature.Description="Spawns an easterEgg containing several user items after the death of a chosen number of npc" - -feature.Components = {} - -feature.Components.LootSpawner = - { - BaseClass="LogicEntity", - Name="LootSpawner", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "lootSpawnerDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - Parameters = {}, - - ApplicableActions = { "activate", "deactivate"}, - - Events = { "activation", "deactivation", "trigger"}, - - Conditions = { "is active", "is inactive"}, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - ----------------------------------------------------------------------------------------------- - --Category="uiR2EDRollout_Npc", - --Category="uiR2EDRollout_SpawningEgg", - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible= false}, - {Name="Components", Type="Table"}, - {Name= "Ghosts", Type = "Table", Visible = false }, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name= "Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="TriggerValue", Type="Number", Min="0", Default="0", Translation="uiR2EDProp_TriggerValue"}, - {Name="NpcNumber", Type="Number", Category="uiR2EDRollout_Npcs", WidgetStyle="EnumDropDown", - Enum={"1", "2", "3", "4", "5"}, DefaultValue="5"}, - {Name="Npc1Id", Type="RefId", Category="uiR2EDRollout_Npcs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", Translation="uiR2EDProp_Npc1Id", Visible= function(this) return this:displayRefId(1) end}, - {Name="Npc2Id", Type="RefId", Category="uiR2EDRollout_Npcs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", Translation="uiR2EDProp_Npc2Id", Visible= function(this) return this:displayRefId(2) end}, - {Name="Npc3Id", Type="RefId", Category="uiR2EDRollout_Npcs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", Translation="uiR2EDProp_Npc3Id", Visible= function(this) return this:displayRefId(3) end}, - {Name="Npc4Id", Type="RefId", Category="uiR2EDRollout_Npcs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", Translation="uiR2EDProp_Npc4Id", Visible= function(this) return this:displayRefId(4) end}, - {Name="Npc5Id", Type="RefId", Category="uiR2EDRollout_Npcs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", Translation="uiR2EDProp_Npc5Id", Visible= function(this) return this:displayRefId(5) end}, - {Name="EasterEggId", Type="RefId", PickFunction="r2:canPickEasterEgg", SetRefIdFunction="r2:setEasterEggRefIdTarget", Translation="uiR2EDProp_EasterEgg"} - }, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - - translate = function(this, context) - r2.Translator.translateAiGroup(this, context) - r2.Translator.translateFeatureActivation(this, context) - end - } - -------------------------------------------------------------------------------------------------------------------------- - - -local component = feature.Components.LootSpawner - -function component:displayRefId(index) - local nbNPCs = self.NpcNumber + 1 - if index <= nbNPCs then - return true - end - return false -end - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - --local rtEggGrp = r2.Translator.getRtGroup(context, component.EasterEggId) - local eggInstance = r2:getInstanceFromId(component.EasterEggId) - assert(eggInstance) - - if (action.Action.Type == "spawnEntity") then - if eggInstance then - local actionTrigger = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 6) - local actionSpawn = eggInstance:createActionActivateEasterEgg(context) - local retAction = r2.Translator.createAction("condition_if", r2:getNamespace()..rtNpcGrp.Id..".Active == 1", - r2.Translator.createAction("multi_actions", {actionTrigger, actionSpawn}) - ) - return retAction, retAction - end - return nil, nil - end - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationCondition(condition, rtNpcGrp) -end - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if tostring(event.Event.Type) == "trigger" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 6) - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) - -end - --------------------------------------------------------------------------------------------------------------------- -local lootSpawnerDisplayerTable = clone(r2:propertySheetDisplayer()) - --- --- If the message is received by a client that didn't request the modification, we must make sure this client --- doesn't modify the data because it has already been performed by the initial client. --- -local function checkPickedEntity(this, instanceId, attributeName) - - if instanceId == "" then - return false - end - local tmpInstance = r2:getInstanceFromId(instanceId) - assert(tmpInstance) - - local i = 1 - while i < 6 do - local attrName = "Npc" ..i.. "Id" - if attrName ~= attributeName and this[attrName] == tmpInstance.InstanceId then - --if not tmpInstance.User.SelfModified or tmpInstance.User.SelfModified == false then - -- messageBox("'"..tmpInstance.Name.."' has already been picked.") - --else - -- tmpInstance.User.SelfModified = false - --end - return false - end - i = i + 1 - end - - return true -end - - - -local oldOnAttrModified = lootSpawnerDisplayerTable.onAttrModified - -function lootSpawnerDisplayerTable:onAttrModified(instance, attributeName) - --if not instance.User.SelfModified then return end - -- call base version - oldOnAttrModified(self, instance, attributeName) - - if attributeName == "NpcNumber" then - local propertySheet = r2:getPropertySheet(instance) - local nbNPCs = instance.NpcNumber + 1 - local i = 1 - while i <= 5 do - if i > nbNPCs then - local name = "Npc"..tostring(i).."Id" - local refId = propertySheet:find(name) - local refIdName = refId:find("name") - refIdName.hardtext = "NONE" - r2.requestSetNode(instance.InstanceId, name, "") - end - i = i + 1 - end - propertySheet.Env.updatePropVisibility() - return - end - - if string.find(attributeName, "Id") == nil or attributeName == "InstanceId" then return end - - local propertySheet = r2:getPropertySheet(instance) - local refId = propertySheet:find(attributeName) - local refIdName = refId:find("name") - - local instanceId = instance[attributeName] - if instanceId == "" then - refIdName.hardtext = "NONE" - return - end - - if checkPickedEntity(instance, instanceId, attributeName) then - local tmpInstance = r2:getInstanceFromId(instanceId) - refIdName.hardtext = tmpInstance.Name - else - r2.requestSetNode(instance.InstanceId, attributeName, "") - end - -end - -function lootSpawnerDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true - -end - - -local function reattributeIdOnHrcMove(lootSpawner, group, targetAttr) - local propertySheet = r2:getPropertySheet(lootSpawner) - local refId = propertySheet:find(targetAttr) - local refIdName = refId:find("name") - - r2.requestSetNode(lootSpawner.InstanceId, targetAttr, group.InstanceId) - refIdName.hardtext = group.Name - -end - - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - local group = tmpInstance.ParentInstance - if group:isKindOf("NpcGrpFeature") then - reattributeIdOnHrcMove(self, group, targetAttr) - end - tmpInstance.User.SelfModified = false - end - -end - - - - -function r2:lootSpawnerDisplayer() - return lootSpawnerDisplayerTable -- returned shared displayer to avoid wasting memory -end --------------------------------------------------------------------------------------------------------------------- - - - -component.createGhostComponents= function(this, act) - - local comp = this - local easterEgg= r2:getInstanceFromId(comp.EasterEggId) - - if easterEgg == nil then - debugInfo("LootSpawner: Can't spawn a nil easteregg. You have to pick one.") - --assert(easterEgg) - return - end - - local counter = r2.newComponent("Counter") - assert(counter) - counter.Base = r2.Translator.getDebugBase("palette.entities.botobjects.user_event") - counter.Name = "Npc Counter" - counter.Position.x = comp.Position.x - counter.Position.y = comp.Position.y - counter.Position.z = 0 - - - - local nbNpc = 0 - - for id = 1, 5 do - local propertyName = "Npc"..tonumber(id).."Id" - if comp[propertyName] ~= nil and comp[propertyName] ~= "" then - local npcInstance = r2:getInstanceFromId(comp[propertyName]) - if npcInstance then - - if npcInstance:isKindOf("Npc") then - eventType = "death" - eventName = "On Death" - elseif npcInstance:isKindOf("NpcGrpFeature") then - eventType = "group death" - eventName = "On Group Death" - end - - local eventHandler = r2.newComponent("LogicEntityAction") - --eventHandler.Event.Type = "death" - eventHandler.Event.Type = eventType - eventHandler.Event.Value = "" - --eventHandler.Name = "On Death" - eventHandler.Event.Name = eventName - - local action = r2.newComponent("ActionStep") - table.insert(eventHandler.Actions, action) - action.Entity = r2.RefId(counter.InstanceId) - action.Action.Type = "Decrement" - action.Action.Value = "" - - if npcInstance:isKindOf("Npc") then - r2.requestInsertGhostNode(npcInstance.Behavior.InstanceId, "Actions", -1, "", eventHandler) - elseif npcInstance:isKindOf("NpcGrpFeature") then - r2.requestInsertGhostNode(npcInstance.Components[0].Behavior.InstanceId, "Actions", -1, "", eventHandler) - end - --r2.requestInsertGhostNode(guardInstance.Behavior.InstanceId, "Actions", -1, "", eventHandler) - - nbNpc = nbNpc + 1 - end - end - end - - if nbNpc == 0 then - debugInfo("LootSpawner: No npc has been picked.") - return - end - - counter.Value = tonumber(nbNpc) - --counter.TriggerValue = comp._TriggerValue - counter.TriggerValue = comp.TriggerValue - - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = "On Trigger" - eventHandler.Event.Value = "" - eventHandler.Name = "On Trigger" - - local action = r2.newComponent("ActionStep") - - action.Entity = r2.RefId(comp.InstanceId) --r2.RefId(boss.InstanceId) - action.Action.Type = "spawnEntity" - action.Action.Value = "" - - table.insert(eventHandler.Actions, action) - - table.insert(counter.Behavior.Actions, eventHandler) - - end - - r2.requestInsertGhostNode(comp.InstanceId, "Components", -1, "", counter) - --r2.requestInsertGhostNode(r2:getCurrentAct().InstanceId, "Features", -1, "", counter) - - r2.requestSetGhostNode(easterEgg.InstanceId, "Active", 0) - -end - -component.createComponent = function(x, y, tvalue) - - local comp = r2.newComponent("LootSpawner") - assert(comp) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.user_event") - comp.Name = r2:genInstanceName(i18n.get("uiR2EDRollout_LootSpawner")):toUtf8() - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - comp.TriggerValue = 0 - - comp._Seed = os.time() - - comp.Npc1Id = r2.RefId("") - comp.Npc2Id = r2.RefId("") - comp.Npc3Id = r2.RefId("") - comp.Npc4Id = r2.RefId("") - comp.Npc5Id = r2.RefId("") - - comp.NpcNumber = 0 - - - local easterEgg = r2.Features["EasterEggFeature"].Components.EasterEgg.createComponent(comp.Position.x + 1, comp.Position.y + 1) - easterEgg.Position.x, easterEgg.Position.y = r2:findEmptyPlace(comp.Position.x + 1, comp.Position.y + 1) - --easterEgg.Position.y = comp.Position.y + 1 - easterEgg.InheritPos = 0 - comp.EasterEggId = easterEgg.InstanceId - table.insert(comp.Components, easterEgg) - - - return comp -end - - -component.create = function() - if r2:getLeftQuota() <= 0 then - r2:makeRoomMsg() - return - end - local function paramsOk(resultTable) - - - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - if showAgain == 1 then - r2.setDisplayInfo("LootSpawnerForm", 0) - else r2.setDisplayInfo("LootSpawnerForm", 1) end - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local component = feature.Components.LootSpawner.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'LootSpawnerFeature' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'LootSpawnerFeature' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("LootSpawner") == 1 then - r2.displayFeatureHelp("LootSpawner") - end - r2.requestNewAction(i18n.get("uiR2EDNewLootSpawnerFeatureAction")) - local component = feature.Components.LootSpawner.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'LootSpawnerFeature' position") - end - local creature = r2.Translator.getDebugCreature("object_component_user_event.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureLootSpawner") -end - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EDRollout_RewardChest") - logicEntityMenu:addLine(ucstring(name), "lua", "", "RewardChest") -end - - -function component:getLogicTranslations() - local logicTranslations = {} - r2.Translator.addActivationToTranslations(logicTranslations) - return logicTranslations -end - - -r2.Features["LootSpawnerFeature"] = feature diff --git a/code/ryzom/common/data_common/r2/r2_features_man_hunt.lua b/code/ryzom/common/data_common/r2/r2_features_man_hunt.lua deleted file mode 100644 index f45fca421..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_man_hunt.lua +++ /dev/null @@ -1,442 +0,0 @@ - -r2.Features.ManHuntFeature = {} - -local feature = r2.Features.ManHuntFeature - -feature.Name="ManHuntFeature" - -feature.Description="Triggers when all selected NPCs die." - - - -feature.Components = {} - -feature.Components.ManHunt = - { - PropertySheetHeader = r2.getDisplayButtonHeader("r2.events:openEditor()", "uiR2EdEditEventsButton"), - BaseClass="LogicEntity", - Name="ManHunt", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "manHuntDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - Parameters = {}, - - ApplicableActions = { "activate", "deactivate"}, - - Events = { "activation", "deactivation", "trigger"}, - - Conditions = { "is active", "is inactive"}, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - ----------------------------------------------------------------------------------------------- - --Category="uiR2EDRollout_Guards" - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table", Visible= false}, - {Name= "Ghosts", Type = "Table", Visible = false }, - {Name= "Name", Type="String"}, - {Name= "Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="TriggerValue", Type="Number", Min="0", Default="0", Translation="uiR2EDProp_TriggerValue"}, - {Name="MobNumber", Type="Number", Category="uiR2EDRollout_Mobs", WidgetStyle="EnumDropDown", Enum={"1", "2", "3", "4", "5"}, - }, - {Name="Mob1Id", Type="RefId", Category="uiR2EDRollout_Mobs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", - Translation="uiR2EdProp_Mob1Id", Visible= function(this) return this:displayRefId(1) end}, - {Name="Mob2Id", Type="RefId", Category="uiR2EDRollout_Mobs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", - Translation="uiR2EdProp_Mob2Id", Visible= function(this) return this:displayRefId(2) end}, - {Name="Mob3Id", Type="RefId", Category="uiR2EDRollout_Mobs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", - Translation="uiR2EdProp_Mob3Id", Visible= function(this) return this:displayRefId(3) end}, - {Name="Mob4Id", Type="RefId", Category="uiR2EDRollout_Mobs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", - Translation="uiR2EdProp_Mob4Id", Visible= function(this) return this:displayRefId(4) end}, - {Name="Mob5Id", Type="RefId", Category="uiR2EDRollout_Mobs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", - Translation="uiR2EdProp_Mob5Id", Visible= function(this) return this:displayRefId(5) end}, - }, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - --r2.Translator.pretranslateDefaultFeature(this, context) - end, - - translate = function(this, context) - r2.Translator.translateAiGroup(this, context) - - r2.Translator.translateFeatureActivation(this, context) - end - } - -------------------------------------------------------------------------------------------------------------------------- - - -local component = feature.Components.ManHunt - -function component:displayRefId(index) - local nbMobs = self.MobNumber + 1 - if index <= nbMobs then - return true - end - return false -end - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if (action.Action.Type == "trigger") then - local retAction = r2.Translator.createAction("condition_if", r2:getNamespace()..rtNpcGrp.Id..".Active == 1", - r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 6) - ) - return retAction, retAction - end - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationCondition(condition, rtNpcGrp) -end - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if tostring(event.Event.Type) == "trigger" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 6) - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) - -end - ------------------------------------------------------------------------------------------------------------------- -local manHuntDisplayerTable = clone(r2:propertySheetDisplayer()) - --- --- If the message is received by a client that didn't request the modification, we must make sure this client --- doesn't modify the data because it has already been performed by the initial client. --- -local function checkPickedEntity(this, instanceId, attributeName) - if instanceId == "" then - return false - end - local tmpInstance = r2:getInstanceFromId(instanceId) - assert(tmpInstance) - local i = 1 - while i < 6 do - local attrName = "Mob" ..i.. "Id" - if attrName ~= attributeName and this[attrName] == tmpInstance.InstanceId then - return false - end - i = i + 1 - end - return true -end - - -local oldOnAttrModified = manHuntDisplayerTable.onAttrModified -function manHuntDisplayerTable:onAttrModified(instance, attributeName) - oldOnAttrModified(self, instance, attributeName) - - if attributeName == "MobNumber" then - local propertySheet = r2:getPropertySheet(instance) - local nbMobs = instance.MobNumber + 1 - local i = 1 - while i <= 5 do - if i > nbMobs then - local name = "Mob"..tostring(i).."Id" - local refId = propertySheet:find(name) - local refIdName = refId:find("name") - refIdName.hardtext = "NONE" - r2.requestSetNode(instance.InstanceId, name, "") - end - i = i + 1 - end - propertySheet.Env.updatePropVisibility() - return - end - - if string.find(attributeName, "Id") == nil or attributeName == "InstanceId" then return end - - local propertySheet = r2:getPropertySheet(instance) - local refId = propertySheet:find(attributeName) - if refId == nil then return end - local refIdName = refId:find("name") - - local instanceId = instance[attributeName] - if instanceId == "" then - refIdName.hardtext = "NONE" - return - end - - local inserted = checkPickedEntity(instance, instanceId, attributeName) - if inserted == true then - local tmpInstance = r2:getInstanceFromId(instanceId) - refIdName.hardtext = tmpInstance.Name - else - r2.requestSetNode(instance.InstanceId, attributeName, "") - end - instance.User.onHrcMove = false -end - -function manHuntDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true - -end - - -local function reattributeIdOnHrcMove(mHunt, group, targetAttr) - local propertySheet = r2:getPropertySheet(mHunt) - local refId = propertySheet:find(targetAttr) - local refIdName = refId:find("name") - - r2.requestSetNode(bSpawner.InstanceId, targetAttr, group.InstanceId) - refIdName.hardtext = group.Name - mHunt.User.onHrcMove = true - -end - - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - local group = tmpInstance.ParentInstance - if group:isKindOf("NpcGrpFeature") then - reattributeIdOnHrcMove(self, group, targetAttr) - end - tmpInstance.User.SelfModified = false - end - -end - - - - -function r2:manHuntDisplayer() - return manHuntDisplayerTable -- returned shared displayer to avoid wasting memory -end --------------------------------------------------------------------------------------------------------------------- - - -component.createGhostComponents= function(this, act) - - local comp = this - - local counter = r2.newComponent("Counter") - assert(counter) - - counter.Base = "palette.entities.botobjects.milestone" - counter.Name = "Mob Counter" - counter.Position.x = comp.Position.x - counter.Position.y = comp.Position.y - counter.Position.z = 0 - - - - local nbGuard = 0 - local eventType = "" --depends on the instance type (groupe or npc) - local eventName = "" - - -- Add to each guard a 'OnDeath EventHandler' which decrements the counter - for id = 1, 5 do - local propertyName = "Mob"..tonumber(id).."Id" - if comp[propertyName] ~= nil and comp[propertyName] ~= "" then - local guardInstance = r2:getInstanceFromId(comp[propertyName]) - if guardInstance then - - if guardInstance:isKindOf("Npc") then - eventType = "death" - eventName = "On Death" - elseif guardInstance:isKindOf("NpcGrpFeature") then - eventType = "group death" - eventName = "On Group Death" - end - - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = eventType - eventHandler.Event.Value = "" - eventHandler.Event.Name = eventName - - local action = r2.newComponent("ActionStep") - table.insert(eventHandler.Actions, action) - action.Entity = r2.RefId(counter.InstanceId) - action.Action.Type = "Decrement" - action.Action.Value = "" - - if guardInstance:isKindOf("Npc") then - r2.requestInsertGhostNode(guardInstance.Behavior.InstanceId, "Actions", -1, "", eventHandler) - elseif guardInstance:isKindOf("NpcGrpFeature") then - r2.requestInsertGhostNode(guardInstance.Components[0].Behavior.InstanceId, "Actions", -1, "", eventHandler) - end - --r2.requestInsertGhostNode(guardInstance.Behavior.InstanceId, "Actions", -1, "", eventHandler) - - nbGuard = nbGuard + 1 - end - end - end - - if nbGuard == 0 then - debugInfo("Man Hunt: No mob has been picked.") - return - end - - counter.Value = tonumber(nbGuard) - counter.TriggerValue = comp.TriggerValue - - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = "On Trigger" - eventHandler.Event.Value = "" - eventHandler.Name = "On Trigger" - - local action = r2.newComponent("ActionStep") - - action.Entity = r2.RefId(comp.InstanceId) - action.Action.Type = "trigger" - action.Action.Value = "" - - table.insert(eventHandler.Actions, action) - - table.insert(counter.Behavior.Actions, eventHandler) - - end - - r2.requestInsertGhostNode(comp.InstanceId, "Components", -1, "", counter) - - -end - -component.createComponent = function(x, y) - - local comp = r2.newComponent("ManHunt") - assert(comp) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.user_event") - comp.Name = r2:genInstanceName(i18n.get("uiR2EdManHunt")):toUtf8() - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - comp.TriggerValue = 0 - - comp._Seed = os.time() - - comp.Guard1Id = r2.RefId("") - comp.Guard2Id = r2.RefId("") - comp.Guard3Id = r2.RefId("") - comp.Guard4Id = r2.RefId("") - comp.Guard5Id = r2.RefId("") - - return comp -end - - -component.create = function() - if not r2:checkAiQuota() then return end - - local function paramsCancel() - debugInfo("Cancel form for 'ManHuntFeature' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'ManHuntFeature' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("ManHunt") == 1 then - r2.displayFeatureHelp("ManHunt") - end - r2.requestNewAction(i18n.get("uiR2EDNewManHuntAction")) - local component = feature.Components.ManHunt.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'ManHuntFeature' position") - end - local creature = r2.Translator.getDebugCreature("object_component_user_event.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureManHunt") - end - --- --- Registers the feature creation form used as a creation menu in the editor --- - - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdManHunt") - logicEntityMenu:addLine(ucstring(name), "lua", "", "ManHunt") -end - - -function component:getLogicTranslations() - local logicTranslations = {} - r2.Translator.addActivationToTranslations(logicTranslations) - return logicTranslations -end - - -r2.Features["ManHuntFeature"] = feature - diff --git a/code/ryzom/common/data_common/r2/r2_features_npc_groups.lua b/code/ryzom/common/data_common/r2/r2_features_npc_groups.lua deleted file mode 100644 index 20658dcfd..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_npc_groups.lua +++ /dev/null @@ -1,591 +0,0 @@ - -local registerFeature = function () - local feature={} - - feature.Name="NpcGrpFeature" - - feature.Description="The default feature" - - local NpcGrpFeatureVersion = 1 - feature.Components= - { - NpcGrpFeature = { - BaseClass="ActiveLogicEntity", - Name="NpcGrpFeature", - Version = NpcGrpFeatureVersion, - InEventUI = true, - --Menu="ui:interface:r2ed_base_menu", - --Menu="ui:interface:r2ed_entity_menu", - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "groupUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualGroup", - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "npcGroupPropertySheetDisplayer", - DisplayerVisualParams = - { - Look = r2.PrimRender.GroupLook, - ArrayName = "Components" - }, - ----------------------------------------------------------------------------------------------- - Parameters = { - }, - ApplicableActions = { - "Activate", - "Deactivate", "Kill", "begin activity sequence", - "Sit Down", "Stand Up", - "Fight with player", "Fight with Npcs", - "Dont fight with player", "Dont fight with Npcs", - "Run", "Dont run", - --"begin chat sequence" - }, - Events = { - "activation", - "desactivation", "member death", "group death", - "end of activity step", "end of activity sequence", - "begin of activity step", "begin of activity sequence", - "targeted by player", - - --"end of chat step", "end of chat sequence" - }, - Conditions = { - - --"is active", "is inactive", - "is in activity sequence", - "is in activity step", --"is in chat sequence", "is in chat step" - "is dead", "is alive", - }, - TextContexts = { - "a member is dead", "a member is dead", "a member is alive", - "group is dead", "group is alive" - }, - TextParameters = { - "members number" - }, - LiveParameters = { - "is active", "current activity sequence and activity step", - "current chat sequence and chat step" - }, - ----------------------------------------------------------------------------------------------- - Prop = - { - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="Components", Type="Table"}, - }, - - TreeIcon= function(this) - - if this.Components.Size>0 and (this.Components[0]:isKindOf("NpcCreature") or this.Components[0]:isKindOf("NpcPlant")) then - return "r2ed_icon_group_creatures.tga" - else - return "r2ed_icon_group.tga" - end - - return "" - end, - - PermanentTreeIcon= function(this) - if this.Components.Size>0 and (this.Components[0]:isKindOf("NpcCreature") or this.Components[0]:isKindOf("NpcPlant")) then - return "r2ed_icon_permanent_group_creatures.tga" - else - return "r2ed_icon_permanent_group.tga" - end - - return "" - end, - - --------------------------------------------------------------------------------------------------------- - -- get select bar type - SelectBarType = function(this) - return i18n.get("uiR2EDScene"):toUtf8() - end, - - updateVersion = function(this, scenarioValue, currentValue ) - local patchValue = scenarioValue - -- version 1 : Remove the "Cost" field -> hold locally now - if patchValue < 1 then - r2.requestEraseNode(this.InstanceId, "Cost", -1) - patchValue = 1 - end - - if patchValue == currentValue then return true end - return false - end, - ----------------------------------------------------------------------------------------------- - -- from base class - isCopyable = function(this) - return true - end, - -------------------------------------------------------------------------------------------- - -- from WorldObject - canChangeDisplayMode = function(this) - return true - end, - -- from WorldObject - isDisplayModeToggleSupported = function(this, displayMode) - return this.Components[0]:isDisplayModeToggleSupported(displayMode) - end, - getAvailableCommands = function(this, dest) - r2.Classes.ActiveLogicEntity.getAvailableCommands(this, dest) - this:getAvailableDisplayModeCommands(dest) - end, - ----------------------------------------------------------------------------------------------- - -- from base class - -- additionnal parameter 'srcOptions' gives the options inherited - paste = function(src, newPlace, srcInstanceId, srcOptions) - local options - if not srcOptions then - options = - { - CopyEvents = 0, - CopyActivities = 0, - -- CopyChatSequences = 0 - DuplicateGroup = -1 -- option available when duplicating leader only - } - end - local function paramsOk(options) - if not r2:checkAiQuota(table.getn(src.Components)) then return end - if options.CopyActivities == 0 then - src.ActivitiesId = {} - src.Components[1].Behavior.Activities = {} - end - if options.CopyEvents == 0 then - src.Components[1].Behavior.Actions = {} - end - --if options.CopyChatSequences == 0 then - -- src.Behavior.ChatSequences = {} - -- end - if newPlace then - -- compute min position and use as group ref pos - local mx = 0 - local my = 0 - local mz = 0 - -- compute center - for k, v in pairs(src.Components) do - v.Position.x = v.Position.x + src.Position.x - v.Position.y = v.Position.y + src.Position.y - v.Position.z = v.Position.z + src.Position.z - mx = mx + v.Position.x - my = my + v.Position.y - mz = mz + v.Position.z - end - mx = mx / table.getn(src.Components) - my = my / table.getn(src.Components) - mz = mz / table.getn(src.Components) - -- make relative to center - for k, v in pairs(src.Components) do - v.Position.x = v.Position.x - mx - v.Position.y = v.Position.y - my - v.Position.z = v.Position.z - mz - end - -- compute new center - if type(newPlace) == "table" then - src.Position.x, src.Position.y, src.Position.z = newPlace.x, newPlace.y, newPlace.z - else - src.Position.x, src.Position.y, src.Position.z = r2:getPastePosition() - end - end - r2:setCookie(src.InstanceId, "Select", true) - -- insert in current act - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1,"", src) - - end - if srcOptions then - -- if options were given, do not ask the user - paramsOk(srcOptions) - return - end - local function paramsCancel() - debugInfo('paste was cancelled') - end - if table.getn(src.Components[1].Behavior.Activities) == 0 then - options.CopyActivities = -1 - end - if table.getn(src.Components[1].Behavior.Actions) == 0 then - options.CopyEvents = -1 - end - --if table.getn(src.Behavior.ChatSequences) == 0 then - -- options.CopyChatSequences = -1 - -- end - if options.CopyActivities >= 0 or - options.CopyEvents >= 0 - --or options.CopyChatSequences >= 0 - then - r2:doForm("SpecialPaste", options, paramsOk, paramsCancel) - else - -- nothing specific to copy, do direct paste - paramsOk(options) - end - end, - ----------------------------------------------------------------------------------------------- - -- from base class - pasteGhost = function(src) - if not r2:checkAiQuota(table.getn(src.Components)) then return end - local target = r2:getCurrentAct():getDefaultFeature() - -- create the 'Ghosts' entry locally if it doesn't already exists - if target.Ghosts == nil then - r2.requestInsertGhostNode(target.InstanceId, "", -1, "Ghosts", {}) - end - -- - r2.requestInsertGhostNode(target.InstanceId, "Ghosts",-1,"", src) - -- insertion should have been done right now - return r2:getInstanceFromId(src.InstanceId) - end, - --------------------------------------------------------------------------------------------------------- - -- create a new copy with renaming - newCopy = function(this) - local result = r2.Classes.BaseClass.newCopy(this) - - local counterNames = {} - - for k, v in pairs(result.Components) do - local category = r2.getPropertyValue(v, "Category") - local subCategory = r2.getPropertyValue(v, "SubCategory") - if category == "Npc" then - - if subCategory=="Kami" or subCategory=="Karavan" then - - local baseName = r2.PaletteIdToTranslation[this.Components[k-1].Base] - if counterNames[baseName]==nil then - local uc_name = ucstring() - uc_name:fromUtf8(baseName) - local name = r2:genInstanceName(uc_name):toUtf8() - counterName = string.gsub(name, tostring(uc_name), "") - counterNames[baseName] = tonumber(counterName) - else - counterNames[baseName] = counterNames[baseName]+1 - end - - v.Name = baseName .. " " .. counterNames[baseName] - else - local sex - local sheetClient = r2.getPropertyValue(v, "SheetClient") - if isR2PlayerMale(sheetClient) then - sex = r2.male - else - sex = r2.female - end - local race = getR2PlayerRace(sheetClient) - v.Name = r2:randomNPCName2(race, sex) - end - end - end - return result - end, - --------------------------------------------------------------------------------------------------------- - -- From logic entity - getCategory = function(this) - return this.Components[0]:getCategory() - end, - --------------------------------------------------------------------------------------------------------- - -- From logic entity - getSubCategory = function(this) - return this.Components[0]:getSubCategory() - end, - ----------------------------------------------------------------------------------------------- - ----------------------------------------------------------------------------------------------- - -- cut / paste - accept = function(this, targetInstance) - return r2:testCanGroup(targetInstance, this) - end, - -- - insert = function(this, instanceToInsert) - assert(r2:testCanGroup(instanceToInsert, this)) - r2:group(instanceToInsert, this) - end, - --------------------------------------------------------------------------------------------------------- - getFirstSelectableSon = function(this) - for k = 0, this.Components.Size - 1 do - if this.Components[k].Selectable then - return this.Components[k] - end - end - return nil - end, - --------------------------------------------------------------------------------------------------------- - isNextSelectable = function(this) - return true - end, - ----------------------------------------------------------------------------------------------- - -- from base class - getParentTreeNode = function(this) --- if not this.ParentInstance:isKindOf("Act") then --- return r2.Classes.BaseClass.getParentTreeNode(this) --- end --- return this:getParentAct():getContentTreeNodes("people") - - if this.Components.Size>0 and (this.Components[0]:isKindOf("NpcCreature") or this.Components[0]:isKindOf("NpcPlant")) then - return this:getParentAct():getContentTreeNodes("creatures") - else - return this:getParentAct():getContentTreeNodes("people") - end - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.BaseClass.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - hasScenarioCost = function(this) - return true - end, - - pretranslate = function (this, context) - debugInfo("##pretranslate npcgrp##") - local feature = this - local components = this.Components - -- create one RtNpcGrp by group - - local rtNpcGrp = r2.newComponent("RtNpcGrp") - table.insert(context.RtAct.NpcGrps, rtNpcGrp) - -- register the groupe - context.RtGroups[feature.InstanceId] = rtNpcGrp - context.RtGroups[feature.InstanceId].Name = rtNpcGrp.Id - - -- register all group components - local key, comp = next(components, nil) - while (key ~= nil) do - context.RtGroups[comp.InstanceId] = rtNpcGrp - context.RtGroups[comp.InstanceId].Name = rtNpcGrp.Id - key, comp = next(components, key) - end - end, - pretranslate2 = function(this, context) - -- - context.Feature = this - -- - local scenario = context.Scenario - - local components = context.Feature.Components - local leader = components[0] - local hlComponent = context.Feature - - - assert(components.Size >= 1) - - local rtNpcGrp = r2.Translator.getRtGroup(context, context.Feature.InstanceId) - - -- translate actionHandlers - local aiActivity = r2.Translator.getAiActivity(leader) - r2.Translator.translateActivities(context, hlComponent, hlComponent:getBehavior(), rtNpcGrp, aiActivity) - - end, - translate = function (this, context) - -- - context.Feature = this - -- - local scenario = context.Scenario - - local components = context.Feature.Components - local leader = components[0] - local hlComponent = context.Feature - - - assert(components.Size >= 1) - - local rtNpcGrp = r2.Translator.getRtGroup(context, context.Feature.InstanceId) - --if there's no sequence for the group, - --create a state with no movement, and put the group in it. - local key, comp = next(components, nil) - while key do - if (comp.isKindOf and comp:isKindOf( "Npc") ) then - context.Component = comp - - -- insert Npc - local rtNpc = r2.Translator.translateNpc(comp, context) - table.insert(context.RtAct.Npcs, rtNpc) - table.insert(rtNpcGrp.Children, rtNpc.Id) - - end - key, comp = next(components, key) - end - - -- dump every action of the ai - -- r2.dumpAi(rpcGrp) - r2.Translator.setGroupParameters (leader, rtNpcGrp) - -- translate actionHandlers - -- local aiActivity = r2.Translator.getAiActivity(leader) - -- r2.Translator.translateActivities(context, hlComponent, hlComponent:getBehavior(), rtNpcGrp, aiActivity) - - -- set eventHandlers - r2.Translator.translateEventHandlers(context, hlComponent, hlComponent:getBehavior().Actions, rtNpcGrp) - --> events = leader or npc - end - } - } - - -- same for group and for npc - local component = feature.Components.NpcGrpFeature - component.getLogicCondition = r2.Translator.getNpcLogicCondition - component.getLogicAction = r2.Translator.getNpcLogicAction - component.getLogicEvent = r2.Translator.getNpcLogicEvent - - ---------------------------------------------------------------------------- - -- add a line to the event menu - function component:getLogicTranslations() - - local logicTranslations = { - ["ApplicableActions"] = { - ["Activate"] = { menu=i18n.get( "uiR2AA0Spawn" ):toUtf8(), - text=i18n.get( "uiR2AA1Spawn" ):toUtf8()}, - ["Deactivate"] = { menu=i18n.get( "uiR2AA0Despawn" ):toUtf8(), - text=i18n.get( "uiR2AA1Despawn" ):toUtf8()}, - ["Sit Down"] = { menu=i18n.get( "uiR2AA0NpcSit" ):toUtf8(), - text=i18n.get( "uiR2AA1NpcSit" ):toUtf8(), - groupIndependant=true}, - ["Stand Up"] = { menu=i18n.get( "uiR2AA0NpcStand" ):toUtf8(), - text=i18n.get( "uiR2AA1NpcStand" ):toUtf8(), - groupIndependant=true}, - ["Kill"] = { menu=i18n.get( "uiR2AA0Kill" ):toUtf8(), - text=i18n.get( "uiR2AA1Kill" ):toUtf8()}, - ["begin activity sequence"] = { menu=i18n.get( "uiR2AA0BeginSeq" ):toUtf8(), - text=i18n.get( "uiR2AA1BeginSeq" ):toUtf8()}, - ["Fight with player"] = { menu=i18n.get( "uiR2AA0FlagFightPlayersOn" ):toUtf8(), - text=i18n.get( "uiR2AA1FlagFightPlayersOn" ):toUtf8()}, - ["Dont fight with player"] = { menu=i18n.get( "uiR2AA0FlagFightPlayersOff" ):toUtf8(), - text=i18n.get( "uiR2AA1FlagFightPlayersOff" ):toUtf8()}, - ["Fight with Npcs"] = { menu=i18n.get( "uiR2AA0FlagFightNpcsOn" ):toUtf8(), - text=i18n.get( "uiR2AA1FlagFightNpcsOn" ):toUtf8()}, - ["Dont fight with Npcs"] = { menu=i18n.get( "uiR2AA0FlagFightNpcsOff" ):toUtf8(), - text=i18n.get( "uiR2AA1FlagFightNpcsOff" ):toUtf8()}, - ["Run"] = { menu=i18n.get( "uiR2AA0FlagRunOn" ):toUtf8(), - text=i18n.get( "uiR2AA1FlagRunOn" ):toUtf8()}, - ["Dont run"] = { menu=i18n.get( "uiR2AA0FlagRunOff" ):toUtf8(), - text=i18n.get( "uiR2AA1FlagRunOff" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Spawn" ):toUtf8(), - text=i18n.get( "uiR2Event1Spawn" ):toUtf8()}, - ["desactivation"] = { menu=i18n.get( "uiR2Event0Despawn" ):toUtf8(), - text=i18n.get( "uiR2Event1Despawn" ):toUtf8()}, - ["member death"] = { menu=i18n.get( "uiR2Event0MemberDeath" ):toUtf8(), - text=i18n.get( "uiR2Event1MemberDeath" ):toUtf8()}, - ["group death"] = { menu=i18n.get( "uiR2Event0GroupDeath" ):toUtf8(), - text=i18n.get( "uiR2Event1GroupDeath" ):toUtf8()}, - ["end of activity step"] = { menu=i18n.get( "uiR2Event0EndActivityStep" ):toUtf8(), - text=i18n.get( "uiR2Event1EndActivityStep" ):toUtf8()}, - ["end of activity sequence"] = { menu=i18n.get( "uiR2Event0EndActivitySeq" ):toUtf8(), - text=i18n.get( "uiR2Event1EndActivitySeq" ):toUtf8()}, - ["begin of activity step"] = { menu=i18n.get( "uiR2Event0BeginActivityStep" ):toUtf8(), - text=i18n.get( "uiR2Event1BeginActivityStep" ):toUtf8()}, - ["begin of activity sequence"] = { menu=i18n.get( "uiR2Event0BeginOfActivitySeq" ):toUtf8(), - text=i18n.get( "uiR2Event1BeginOfActivitySeq" ):toUtf8()}, - ["targeted by player"] = { menu=i18n.get( "uiR2Event0TargetedByPlayer" ):toUtf8(), - text=i18n.get( "uiR2Event1TargetedByPlayer" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Spawned" ):toUtf8(), - text=i18n.get( "uiR2Test1Spawned" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Despawned" ):toUtf8(), - text=i18n.get( "uiR2Test1Despawned" ):toUtf8()}, - ["is dead"] = { menu=i18n.get( "uiR2Test0Dead" ):toUtf8(), - text=i18n.get( "uiR2Test1Dead" ):toUtf8()}, - ["is alive"] = { menu=i18n.get( "uiR2Test0Alive" ):toUtf8(), - text=i18n.get( "uiR2Test1Alive" ):toUtf8()}, - ["is in activity sequence"] = { menu=i18n.get( "uiR2Test0Seq" ):toUtf8(), - text=i18n.get( "uiR2Test1Seq" ):toUtf8()}, - ["is in activity step"] = { menu=i18n.get( "uiR2Test0Step" ):toUtf8(), - text=i18n.get( "uiR2Test1Step" ):toUtf8()}, - } - } - return logicTranslations - end - - - - function component.getActivitiesIds(this) - local activitiesIds = {} - - local behavior = this:getBehavior() - local k, v = next(behavior.Activities, nil) - while k do - table.insert(activitiesIds, v.InstanceId) - k, v = next(behavior.Activities, k) - end - - return activitiesIds - end - - function component.getAiCost(this) - if this.User.GhostDuplicate then return 0 end - return r2.getAiCost(this) - 1 - end - - - -- obsolete - feature.getCost = function (featureInstance) - local cost = 0 - local components = featureInstance.Components - local key, comp = next(components, nil) - while(key ~= nil) - do - - if (comp.Class == "Npc" or comp.Class == "NpcCustom") - then - cost = cost +1 - end - key, comp = next(components, key) - end - return cost - - end - return feature -end - - -r2.Features["NpcGrpFeature"] = registerFeature() - - - --------------------------------------------------------------------------------------------------- --------------------------- NPC GROUP DisplayerProperties ----------------------------------------- --------------------------------------------------------------------------------------------------- - -local npcGroupPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function npcGroupPropertySheetDisplayerTable:onPostCreate(instance) -end ------------------------------------------------- -function npcGroupPropertySheetDisplayerTable:onErase(instance) -end ------------------------------------------------- -function npcGroupPropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function npcGroupPropertySheetDisplayerTable:onPostHrcMove(instance) - - for i=0, instance.Components.Size-1 do - local entity = instance.Components[i] - entity.DisplayerVisual:updateName() - entity:updatePermanentStatutIcon() - end - r2.events:updateElementsUI() -end ------------------------------------------------- -function npcGroupPropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function npcGroupPropertySheetDisplayerTable:onSelect(instance, isSelected) - r2:activeLogicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - ------------------------------------------------- -function npcGroupPropertySheetDisplayerTable:onAttrModified(instance, attributeName) - r2:activeLogicEntityPropertySheetDisplayer():onAttrModified(instance, attributeName) -end - ------------------------------------------------- -function r2:npcGroupPropertySheetDisplayer() - return npcGroupPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_npc_interaction.lua b/code/ryzom/common/data_common/r2/r2_features_npc_interaction.lua deleted file mode 100644 index e5f92cdb9..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_npc_interaction.lua +++ /dev/null @@ -1,411 +0,0 @@ - - -r2.Features.NpcInteraction = {} - -local feature = r2.Features.NpcInteraction - -feature.Name="NpcInteraction" - -feature.Description="" - -feature.Components = {} - -feature.Components.NpcInteraction = - { - BaseClass="LogicEntity", - Name="NpcInteraction", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "npcInteractionDisplayer", - - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - - ApplicableActions = { "activate", "deactivate"}, - - Events = {"activation", "deactivation", "trigger"}, - - Conditions = { "is active", "is inactive", "has triggered" }, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table"}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="InteractionTarget", Type="RefId", PickFunction="r2:canPickTalkingNpc", SetRefIdFunction="r2:setTalkingNpc"}, - - {Name="ContextualText", Type="String", Category="uiR2EDRollout_TextToSay", MaxNumChar="100" }, - {Name="PreInteractionText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="PostInteractionText", Type="String", Category="uiR2EDRollout_TextToSay"}, - - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="Repeatable", Type="Number", WidgetStyle="Boolean", DefaultValue="0"} - - }, - - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - } - - - -local component = feature.Components.NpcInteraction - -function component.pretranslate(this, context) - local prop = component.Prop - r2.Translator.CheckPickedEntity(this, prop) - r2.Translator.createAiGroup(this, context) -end - - - -local npcInteractionDisplayerTable = clone(r2:propertySheetDisplayer()) - -local oldOnAttrModified = npcInteractionDisplayerTable.onAttrModified - -function npcInteractionDisplayerTable:onAttrModified(instance, attributeName) - oldOnAttrModified(instance, attributeName) - - local propertySheet = r2:getPropertySheet(instance) - - local targetRefId = propertySheet:find("InteractionTarget") - local targetName = targetRefId:find("name") - - if attributeName == "InteractionTarget" then - local instanceId = instance[attributeName] - if instanceId == "" then - targetName.hardtext = "NONE" - return - end - - targetName.hardtext = r2:getInstanceFromId(instance[attributeName]).Name - end - - return -end - -function npcInteractionDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true -end - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - if tmpInstance.ParentInstance and tmpInstance.ParentInstance:isKindOf("NpcGrpFeature") then - r2.requestSetNode(self.InstanceId, targetAttr, r2.RefId("")) - end - end - -end - -function r2:npcInteractionDisplayer() - return npcInteractionDisplayerTable -- returned shared displayer to avoid wasting memory -end - - -function component:textAdapter(text) - - assert(self) - assert(type(text) == "string") - local str = text - local mission_giver = "" - local mission_target = "" - - if tostring(self.InteractionTarget) ~= "" then - local target = r2:getInstanceFromId(self.InteractionTarget) - if target then mission_target = target.Name end - end - - str=string.gsub(str, "", mission_target) - return str -end - - -function component:translate(context) - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - - r2.Translator.translateAiGroup(self, context) - - local target = r2:getInstanceFromId(self.InteractionTarget) - - local rtTargetGrp = nil - if target then - rtTargetGrp = r2.Translator.getRtGroup(context, target.InstanceId) - end - - ----------------- - --Contextual text - do - if target then - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, -- Active - r2.Translator.createAction("talk_to", rtGrp.Id, self:textAdapter(self.ContextualText))) - r2.Translator.translateAiGroupEvent("player_target_npc", target, context, rtAction) - end - end - - ------------------- - --Start of state - - do - - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", self.Active) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v3", 0) - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3,}) - r2.Translator.translateAiGroupEvent("start_of_state" , self, context, rtAction) - end - - - do - local action3 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 1, -- Repeatable - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1 )) - - local action4 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 0, -- Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0 ), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 5) - }) - ); - local action5 = r2.Translator.createAction("user_event_trigger", rtGrp.Id, 6) - local action1 = r2.Translator.createAction("npc_say", self:textAdapter(self.PostInteractionText), rtTargetGrp.Id ..":"..target.Name); - local action2 = r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1) - local rtAction = r2.Translator.createAction("multi_actions", {action1, action2, action3, action4, action5}) - - r2.Translator.translateAiGroupEvent("user_event_3", self, context, rtAction) - end - - - do - if rtTargetGrp then - local rtAction = r2.Translator.createAction("npc_say", self:textAdapter(self.PreInteractionText), rtTargetGrp.Id ..":"..target.Name); - r2.Translator.translateAiGroupEvent("user_event_1", self, context, rtAction) - end - end - r2.Translator.translateFeatureActivation(self, context) -end - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1); - return action1, action1 - elseif condition.Condition.Type == "is inactive" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0); - return action1, action1 - elseif condition.Condition.Type == "has triggered" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v3", 1); - return action1, action1 - - else - assert(nil) - end - return nil,nil -end - - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "trigger" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 6) - else - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) - end -end - -component.createComponent = function(x, y) - - local contextualText = i18n.get("uiR2EdNpcInteraction_ContextualText"):toUtf8() - local preInteractionText = i18n.get("uiR2EdNpcInteraction_PreInteractionText"):toUtf8() - local postInteractionText = i18n.get("uiR2EdNpcInteraction_PostInteractionText"):toUtf8() - - local comp = r2.newComponent("NpcInteraction") - assert(comp) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.bot_chat") - comp.Name = r2:genInstanceName(i18n.get("uiR2EdNpcInteraction")):toUtf8() - - comp.ContextualText = contextualText - comp.PreInteractionText = preInteractionText - comp.PostInteractionText = postInteractionText - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - comp._Seed = os.time() - - return comp -end - -component.create = function() - - r2:checkAiQuota() - - - local function paramsOk(resultTable) - - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - - if showAgain == 1 then - r2.setDisplayInfo("NpcInteractionForm", 0) - else r2.setDisplayInfo("NpcInteractionForm", 1) end - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local component = feature.Components.NpcInteraction.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'NpcInteraction' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'NpcInteraction' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("NpcInteraction") == 1 then - r2.displayFeatureHelp("NpcInteraction") - end - r2.requestNewAction(i18n.get("uiR2EDNewNpcInteractionFeatureAction")) - local component = feature.Components.NpcInteraction.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'NpcInteraction' position") - end - local creature = r2.Translator.getDebugCreature("object_component_bot_chat.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureNpcInteraction") -end - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdNpcInteraction") - logicEntityMenu:addLine(ucstring(name), "lua", "", "NpcInteraction") -end - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["trigger"] = { menu=i18n.get( "uiR2Event0Trigger" ):toUtf8(), - text=i18n.get( "uiR2Event1Trigger" ):toUtf8()}, - - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - ["has triggered"] = { menu=i18n.get( "uiR2Test0Trigger" ):toUtf8(), - text=i18n.get( "uiR2Test1Trigger" ):toUtf8()}, - } - } - return logicTranslations -end - - -r2.Features["NpcInteraction"] = feature - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_proximity_dialog.lua b/code/ryzom/common/data_common/r2/r2_features_proximity_dialog.lua deleted file mode 100644 index f6c115879..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_proximity_dialog.lua +++ /dev/null @@ -1,304 +0,0 @@ - -r2.Features.ProximityDialog = {} - -local feature = r2.Features.ProximityDialog - -feature.Name="ProximityDialog" - - -feature.Description="" - -feature.Components = {} - -local classProximityDialogVersion = 1 - -feature.Components.ProximityDialog = - { - PropertySheetHeader = r2.getDisplayButtonHeader("r2.dialogs:openEditor()", "uiR2EdEditDialogButton"), - BaseClass="ChatSequence", - Name="ProximityDialog", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - Version=classProximityDialogVersion , - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - Parameters = {}, - ApplicableActions = {"activate", "deactivate", "trigger", "starts dialog", "stops dialog", "starts chat"}, - Events = {"activation", "deactivation", "trigger", "end of chat", "end of dialog", "start of chat", "start of dialog"}, - Conditions = {"is active", "is inactive", "is in dialog", "is not in dialog", "is in chat"}, - TextContexts = {}, - TextParameters = {}, - LiveParameters = {}, - ----------------------------------------------------------------------------------------------- - Prop = - { - {Name="TriggerOn", Type="Number", WidgetStyle="EnumDropDown", Translation="uiR2EdProp_TriggerOn", - Enum={"Leaves the zone", "Enters the zone"}, - }, - }, - - updateVersion = function(this, scenarioValue, currentValue ) - - end, - } - -local component = feature.Components.ProximityDialog - -function component:translate(context) - r2.Classes["ChatSequence"].translate(self, context) - - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - - --start of state - do - --use zone trigger prop Cyclic as Repeatable for this component - local zTrigger = r2:getInstanceFromId(self._zoneTriggerId) - assert(zTrigger) - local cyclic = tonumber(zTrigger.Cyclic) - - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", self.Active) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "Repeatable", cyclic) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v3", 0) - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3,} ) - r2.Translator.translateAiGroupEvent("start_of_state" , self, context, rtAction) - end - - --trigger - do - local actionStartDialog = r2.Translator.createAction("dialog_starts", rtGrp.Id) - local actionDeactivate = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Repeatable", 0, - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 8)) - local actionSetV3 = r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1) - - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, - r2.Translator.createAction("multi_actions", {actionStartDialog, actionDeactivate, actionSetV3})) - - r2.Translator.translateAiGroupEvent("user_event_6", self, context, rtAction) - end - - --deactivation - do - local rtAction = r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0 ) - - r2.Translator.translateAiGroupEvent("user_event_8", self, context, rtAction) - end - -end - -function component.createGhostComponents(this, act) - local zoneTrigger = r2:getInstanceFromId(this._zoneTriggerId) - assert(zoneTrigger) - do - local type = "On Player Left" - if this.TriggerOn == 1 then - type = "On Player Arrived" - end - - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = type - eventHandler.Event.Value = "" - eventHandler.Name = type - - local action = r2.newComponent("ActionStep") - - action.Entity = r2.RefId(this.InstanceId) - action.Action.Type = "trigger" - action.Action.Value = "" - - table.insert(eventHandler.Actions, action) - - local behaviorId = zoneTrigger.Behavior.InstanceId - assert(behaviorId) - r2.requestInsertGhostNode(behaviorId, "Actions", -1, "", eventHandler) - end - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = "activation" - eventHandler.Event.Value = "" - eventHandler.Name = "activation" - - local action = r2.newComponent("ActionStep") - - action.Entity = r2.RefId(zoneTrigger.InstanceId) - action.Action.Type = "activate" - action.Action.Value = "" - - table.insert(eventHandler.Actions, action) - - local behaviorId = this.Behavior.InstanceId - assert(behaviorId) - r2.requestInsertGhostNode(behaviorId, "Actions", -1, "", eventHandler) - end - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = "deactivation" - eventHandler.Event.Value = "" - eventHandler.Name = "deactivation" - - local action = r2.newComponent("ActionStep") - - action.Entity = r2.RefId(zoneTrigger.InstanceId) - action.Action.Type = "deactivate" - action.Action.Value = "" - - table.insert(eventHandler.Actions, action) - - local behaviorId = this.Behavior.InstanceId - assert(behaviorId) - r2.requestInsertGhostNode(behaviorId, "Actions", -1, "", eventHandler) - end - -end - -function onComponentCreated(this) - local x = this.Position.x + 3 - local y = this.Position.y + 3 - local zoneTrigger = r2.Features["ZoneTrigger"].Components.ZoneTrigger.createComponent(x, y) - assert(zoneTrigger) - zoneTrigger.Name = this.Name.." "..i18n.get("uiR2EdZoneTrigger"):toUtf8() - zoneTrigger.InheritPos = 0 - zoneTrigger.Deletable = false - table.insert(this.SubComponents, zoneTrigger) - this._zoneTriggerId = zoneTrigger.InstanceId -end - -component.create = function() - if r2:getLeftQuota() <= 0 then - r2:makeRoomMsg() - return - end - - local function createComponent(x, y) - r2.requestNewAction(i18n.get("uiR2EDNewProximityDialogAction")) - local proxDialog = r2.newComponent("ProximityDialog") - assert(proxDialog) - proxDialog.Name = r2:genInstanceName(i18n.get("uiR2EDProximityDialog")):toUtf8() - proxDialog.Base = r2.Translator.getDebugBase("palette.entities.botobjects.dialog") - proxDialog.Position.x = x - proxDialog.Position.y = y - proxDialog.Position.z = r2:snapZToGround(x, y) - proxDialog.AutoStart = 0 - onComponentCreated(proxDialog) - r2:setCookie(proxDialog.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", proxDialog) - end - - local function posOk(x, y, z) - if r2.mustDisplayInfo("ProximityDialog") == 1 then - r2.displayFeatureHelp("ProximityDialog") - end - createComponent(x, y) - end - - local function posCancel() end - - local creature = r2.Translator.getDebugCreature("object_component_user_event.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureProximityDialog") -end - -component.getLogicAction = function(this, context, action) - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - local rtZoneTrigger = r2.Translator.getRtGroup(context, component._zoneTriggerId) - assert(rtZoneTrigger) - - if action.Action.Type == "trigger" then - local actionEvent = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1, - r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 6)) - return actionEvent, actionEvent - end - - return r2.Translator.getDialogLogicAction(this, context, action) -end - -component.getLogicEvent = function(this, context, event) - local rtNpcGrp = r2.Translator.getRtGroup(context, this.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - if eventType == "trigger" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 6) - end - - return r2.Translator.getDialogLogicEvent(this, context, event) -end - -component.getLogicCondition = function(this, context, condition) - local rtNpcGrp = r2.Translator.getRtGroup(context, condition.Entity) - assert(rtNpcGrp) - - if condition.Condition.Type == "is active" then - local firstCondition = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1) - return firstCondition, firstCondition - end - - if condition.Condition.Type == "is inactive" then - local firstCondition = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0) - return firstCondition, firstCondition - end - - return r2.Translator.getDialogLogicCondition(this, context, condition) -end - -function component.initLogicEntitiesInstancesMenu(this, subMenu, calledFunction) - local entitiesTable = r2.Scenario:getAllInstancesByType(this.Name) - for key, entity in pairs(entitiesTable) do - local uc_name = ucstring() - uc_name:fromUtf8(entity.Name) - subMenu:addLine(uc_name, "lua", calledFunction.."('".. entity.InstanceId .."')", entity.InstanceId) - end - - if table.getn(entitiesTable)==0 then - subMenu:addLine(i18n.get("uiR2EdNoSelelection"), "", "", "") - end -end - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["starts dialog"] = { menu=i18n.get( "uiR2AA0ChatSeqStart" ):toUtf8(), - text=i18n.get( "uiR2AA1ChatSeqStart" ):toUtf8()}, - ["stops dialog"] = { menu=i18n.get( "uiR2AA0ChatSeqStop" ):toUtf8(), - text=i18n.get( "uiR2AA1ChatSeqStop" ):toUtf8()}, - ["starts chat"] = { menu=i18n.get( "uiR2AA0ChatStepStart" ):toUtf8(), - text=i18n.get( "uiR2AA1ChatStepStart" ):toUtf8()}, - ["trigger"] = { menu=i18n.get( "uiR2AA0Trigger" ):toUtf8(), - text=i18n.get( "uiR2AA1Trigger" ):toUtf8()}, - }, - ["Events"] = { - ["start of dialog"] = { menu=i18n.get( "uiR2Event0ChatSeqStart" ):toUtf8(), - text=i18n.get( "uiR2Event1ChatSeqStart" ):toUtf8()}, - ["end of dialog"] = { menu=i18n.get( "uiR2Event0ChatSeqEnd" ):toUtf8(), - text=i18n.get( "uiR2Event1ChatSeqEnd" ):toUtf8()}, - ["start of chat"] = { menu=i18n.get( "uiR2Event0ChatStepStart" ):toUtf8(), - text=i18n.get( "uiR2Event1ChatStepStart" ):toUtf8()}, - ["end of chat"] = { menu=i18n.get( "uiR2Event0ChatStepEnd" ):toUtf8(), - text=i18n.get( "uiR2Event1ChatStepEnd" ):toUtf8()}, - ["trigger"] = { menu=i18n.get( "uiR2Event0Trigger" ):toUtf8(), - text=i18n.get( "uiR2Event1Trigger" ):toUtf8()}, - }, - ["Conditions"] = { - ["is in dialog"] = { menu=i18n.get( "uiR2Test0ChatSeq" ):toUtf8(), - text=i18n.get( "uiR2Test1ChatSeq" ):toUtf8()}, - ["is not in dialog"] = { menu=i18n.get( "uiR2Test0ChatNotSeq" ):toUtf8(), - text=i18n.get( "uiR2Test1ChatNotSeq" ):toUtf8()}, - ["is in chat"] = { menu=i18n.get( "uiR2Test0ChatStep" ):toUtf8(), - text=i18n.get( "uiR2Test1ChatStep" ):toUtf8()}, - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - } - } - return logicTranslations -end - -r2.Features["ProximityDialog"] = feature - - diff --git a/code/ryzom/common/data_common/r2/r2_features_quest.lua b/code/ryzom/common/data_common/r2/r2_features_quest.lua deleted file mode 100644 index fcc4ffbb3..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_quest.lua +++ /dev/null @@ -1,589 +0,0 @@ - -r2.Features.Quest = {} - -local feature = r2.Features.Quest - -feature.Name="Quest" - -feature.Description="" - -feature.Components = {} - -feature.Components.Quest = - { - BaseClass="LogicEntity", - Name="Quest", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "questDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - - ApplicableActions = { "activate", "deactivate", "validate current task", "complete"}, - - Events = {"activation", "deactivation", "success"}, - - Conditions = { "is active", "is inactive", "is finished" }, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table"}, - {Name="Name", Type="String", MaxNumChar="32"}, - - {Name="TaskNumber", Type="Number", Category="uiR2EDRollout_Targets", WidgetStyle="EnumDropDown", Enum={"1", "2", "3", "4", "5"},}, - {Name="TaskStep1Id", Type="RefId", Category="uiR2EDRollout_Targets", PickFunction="r2:canPickTaskComponent", SetRefIdFunction="r2:setTaskComponentTarget",Visible= function(this) return this:displayRefId(1) end}, - {Name="TaskStep2Id", Type="RefId", Category="uiR2EDRollout_Targets", PickFunction="r2:canPickTaskComponent", SetRefIdFunction="r2:setTaskComponentTarget",Visible= function(this) return this:displayRefId(2) end}, - {Name="TaskStep3Id", Type="RefId", Category="uiR2EDRollout_Targets", PickFunction="r2:canPickTaskComponent", SetRefIdFunction="r2:setTaskComponentTarget",Visible= function(this) return this:displayRefId(3) end}, - {Name="TaskStep4Id", Type="RefId", Category="uiR2EDRollout_Targets", PickFunction="r2:canPickTaskComponent", SetRefIdFunction="r2:setTaskComponentTarget",Visible= function(this) return this:displayRefId(4) end}, - {Name="TaskStep5Id", Type="RefId", Category="uiR2EDRollout_Targets", PickFunction="r2:canPickTaskComponent", SetRefIdFunction="r2:setTaskComponentTarget",Visible= function(this) return this:displayRefId(5) end}, - - {Name="QuestCompletedText", Type="String", Category="uiR2EDRollout_TextToSay"}, - - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="Repeatable", Type="Number", WidgetStyle="Boolean", DefaultValue="0"}, - - }, - - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - - - } - - -local component = feature.Components.Quest - - -function component:displayRefId(index) - local nbRefId = self.TaskNumber + 1 - if index <= nbRefId then - return true - end - return false -end - -function component:textAdapter(text) - assert(self) - assert(type(text) == "string") - local str = text - - str=string.gsub(str, "", self.Name) - return str -end - ------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------ -local questDisplayerTable = clone(r2:propertySheetDisplayer()) - --- --- If the message is received by a client that didn't request the modification, we must make sure this client --- doesn't modify the data because it has already been done by the initial client. --- -local function checkPickedEntity(this, instanceId, attributeName) - if instanceId == "" then - return false - end - local tmpInstance = r2:getInstanceFromId(instanceId) - assert(tmpInstance) - local i = 1 - while i < 5 do - local attrName = "Task" ..i.. "Id" - if attrName ~= attributeName and this[attrName] == tmpInstance.InstanceId then - return false - end - i = i + 1 - end - return true -end - - -local oldOnAttrModified = questDisplayerTable.onAttrModified -function questDisplayerTable:onAttrModified(instance, attributeName) - - oldOnAttrModified(self, instance, attributeName) - - if attributeName == "TaskNumber" then - local propertySheet = r2:getPropertySheet(instance) - local nbRefId = instance.TaskNumber + 1 - local i = 1 - while i <= 5 do - if i > nbRefId then - local name = "TaskStep"..tostring(i).."Id" - local refId = propertySheet:find(name) - local refIdName = refId:find("name") - refIdName.hardtext = "NONE" - r2.requestSetNode(instance.InstanceId, name, "") - end - i = i + 1 - end - propertySheet.Env.updatePropVisibility() - return - end - - if (string.find(attributeName, "Id") == nil or attributeName == "InstanceId") then return end - - local propertySheet = r2:getPropertySheet(instance) - local refId = propertySheet:find(attributeName) - if refId == nil then return end - local refIdName = refId:find("name") - local instanceId = instance[attributeName] - if not instanceId then - return - end - - if instanceId == "" then - refIdName.hardtext = "NONE" - return - end - - local inserted = checkPickedEntity(instance, instanceId, attributeName) - if inserted == true then - local tmpInstance = r2:getInstanceFromId(instanceId) - refIdName.hardtext = tmpInstance.Name - else - r2.requestSetNode(instance.InstanceId, attributeName, "") - end - instance.User.onHrcMove = false -end - -function questDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true - -end - - - -function r2:questDisplayer() - return questDisplayerTable -- returned shared displayer to avoid wasting memory -end - ---------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------- -function component:createGhostComponents(act) - local comp = self - - local nbTask = 0 - local firstId = true - - for id = 1, 5 do - local propertyName = "TaskStep"..tonumber(id).."Id" - if comp[propertyName] ~= nil and comp[propertyName] ~= "" then - local taskInstance = r2:getInstanceFromId(comp[propertyName]) - if taskInstance then - if firstId == true then - if comp.Active == 1 then - r2.requestSetGhostNode(taskInstance.InstanceId, "Active", 1) - else - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = "activation" - eventHandler.Event.Value = "" - eventHandler.Name = "activation" - - local action = r2.newComponent("ActionStep") - - action.Entity = r2.RefId(taskInstance.InstanceId) - action.Action.Type = "activate" - action.Action.Value = "" - - table.insert(eventHandler.Actions, action) - - local behaviorId = comp.Behavior.InstanceId - assert(behaviorId) - r2.requestInsertGhostNode(behaviorId, "Actions", -1, "", eventHandler) - end - firstId = false - else - r2.requestSetGhostNode(taskInstance.InstanceId, "Active", 0) - end - r2.requestSetGhostNode(taskInstance.InstanceId, "Repeatable", 0) - - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = "deactivation" - eventHandler.Event.Value = "" - eventHandler.Name = "deactivation" - - local action = r2.newComponent("ActionStep") - - action.Entity = r2.RefId(taskInstance.InstanceId) - action.Action.Type = "deactivate" - action.Action.Value = "" - - table.insert(eventHandler.Actions, action) - - local behaviorId = comp.Behavior.InstanceId - assert(behaviorId) - r2.requestInsertGhostNode(behaviorId, "Actions", -1, "", eventHandler) - - end - - - end - end - end --!FOR -end - -function component:getTaskRtIds(context) - local rtGroups = {} - for id = 1, 5 do - local taskId = self["TaskStep"..id.."Id"] - if taskId and taskId ~= "" then - local rtGroup = r2.Translator.getRtGroup(context, taskId) - local prefix = "" - if rtGroup.Id and rtGroup.Id ~= "" then - prefix = r2:getNamespace()..rtGroup.Id.."." - end - table.insert(rtGroups, prefix) - end - end - return rtGroups -end - -function component:getTaskInstances(context) - local instances = {} - for id = 1, 5 do - local taskId = self["TaskStep"..id.."Id"] - if taskId and taskId ~= "" then - local instance = r2:getInstanceFromId(taskId) - if instance then - table.insert(instances, instance) - end - end - end - return instances -end - -function component:translate(context) - --EVENTS : - -- 4: activate - -- 5 : deactivate - -- 4 (for steps) : init (activate reinit default values on mission steps) - -- 8 : quest completed - -- 9 : validate task step - r2.Translator.translateAiGroup(self, context) - - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - - local taskInstances = self:getTaskInstances(context) - if table.getn(taskInstances) == 0 then return end - local taskRtGrps = self:getTaskRtIds(context) - - local baseAct = r2.Scenario:getBaseAct() - local baseActRtGrp = r2.Translator.getRtGroup(context, baseAct.InstanceId) - - -- Start of state - do - -- v1 = repeatable - -- v2 = current step index - -- v3 = completed (at least once) - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", self.Active) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 1) - local rtAction4 = r2.Translator.createAction("set_value", rtGrp.Id, "v3", 0) - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3, } ) - r2.Translator.translateAiGroupEvent("start_of_state" , self, context, rtAction) - end - - - do - local k, v = next(taskInstances, nil) - while k do - local taskIndex = k - local taskInstance = v - - local rtActionIncrement = r2.Translator.createAction("increment_quest_step_index", rtGrp.Id, taskIndex) - local event = r2.Translator.getEventFromType(taskInstance, context, "succeeded") --get the right event for "succeeded" - r2.Translator.translateAiGroupEvent(event.Event, taskInstance, context, rtActionIncrement) - - k, v = next(taskInstances, k) - end - end - - do - local actionValidateTask = r2.Translator.createAction("validate_quest_step", rtGrp.Id, taskRtGrps) - - r2.Translator.translateAiGroupEvent("user_event_9", self, context, actionValidateTask) - end - - - --Deactivation (event 5) - do - local rtAction = r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0 ), - }) - r2.Translator.translateAiGroupEvent("user_event_5", self, context, rtAction) - end - - --Mission completed (event 8) - do - local actionBroadcast = r2.Translator.createAction("broadcast_msg", baseActRtGrp.Id, self:textAdapter(self.QuestCompletedText)) - - local actionRepeatable = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 1, --if Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 1 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1 ), - }) - ); - local actionNotRepeatable = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 0, -- if not Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 5), - r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1 ), - }) - ) - - local actionCompleted = r2.Translator.createAction("multi_actions", { - actionRepeatable, actionNotRepeatable, actionBroadcast, - }) - r2.Translator.translateAiGroupEvent("user_event_8", self, context, actionCompleted) - end - r2.Translator.translateFeatureActivation(self, context) -end - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtGrp) - - local prefix = "" - if rtGrp.Id and rtGrp.Id ~= "" then - prefix = r2:getNamespace() .. rtGrp.Id.."." - end - - local taskRtGrps = component:getTaskRtIds(context) - - if action.Action.Type == "validate current task" then - local actionSet = r2.Translator.createAction("set_value", rtGrp.Id, "v2", prefix.."v2 + 1") - local actionEvent = r2.Translator.createAction("user_event_trigger", rtGrp.Id, 9) - --local actionValidateStep = r2.Translator.createAction("validate_task_step", rtGrp.Id, taskRtGrps) - local rtAction = r2.Translator.createAction("multi_actions", {actionSet, actionEvent}) - local ifActive = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, rtAction) - return ifActive, ifActive - - elseif action.Action.Type == "complete" then - - local actionEventComplete = r2.Translator.createAction("user_event_trigger", rtGrp.Id, 8) - local ifActive = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, actionEventComplete) - - return ifActive, ifActive - end - - return r2.Translator.getFeatureActivationLogicAction(rtGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1); - return action1, action1 - elseif condition.Condition.Type == "is inactive" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0); - return action1, action1 - elseif condition.Condition.Type == "is finished" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v3", 1); - return action1, action1 - end - return nil,nil -end - - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local rtNpcGrp = r2.Translator.getRtGroup(context, this.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "success" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 8) - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.createComponent = function(x, y) - - local questCompletedText = i18n.get("uiR2EdQuest_QuestCompletedText"):toUtf8() - - local comp = r2.newComponent("Quest") - assert(comp) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.bot_chat") - comp.Name = r2:genInstanceName(i18n.get("uiR2EdQuest")):toUtf8() - - comp.QuestCompletedText = questCompletedText - comp.TaskNumber = 0 - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - comp._Seed = os.time() - - return comp -end - -component.create = function() - if r2:getLeftQuota() <= 0 then - r2:makeRoomMsg() - return - end - local function paramsOk(resultTable) - - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - - if showAgain == 1 then - r2.setDisplayInfo("Quest", 0) - else r2.setDisplayInfo("Quest", 1) end - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local component = feature.Components.Quest.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'Quest' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'Quest' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("Quest") == 1 then - r2.displayFeatureHelp("Quest") - end - r2.requestNewAction(i18n.get("uiR2EDNewQuestAction")) - local component = feature.Components.Quest.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'Quest' position") - end - local creature = r2.Translator.getDebugCreature("object_component_bot_chat.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureQuest") -end - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdQuest") - logicEntityMenu:addLine(ucstring(name), "lua", "", "Quest") -end - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - ["validate current task"] = { menu=i18n.get( "uiR2AA0ValidateCurrentTask" ):toUtf8(), - text=i18n.get( "uiR2AA1ValidateCurrentTask" ):toUtf8()}, - ["complete"] = { menu=i18n.get( "uiR2AA0CompleteQuest" ):toUtf8(), - text=i18n.get( "uiR2AA1CompleteQuest" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["success"] = { menu=i18n.get( "uiR2Event0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskSuccess" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - ["is finished"] = { menu=i18n.get( "uiR2Test0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Test1TaskSuccess" ):toUtf8()}, - } - } - return logicTranslations -end - - -r2.Features["Quest"] = feature - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_random_chest.lua b/code/ryzom/common/data_common/r2/r2_features_random_chest.lua deleted file mode 100644 index dd4226617..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_random_chest.lua +++ /dev/null @@ -1,472 +0,0 @@ - --- In Translation file --- Category : uiR2EdEasterEgg -- --- CreationFrom : uiR2EdEasterEggParameters - - -r2.Features.RandomChest = {} - -local feature = r2.Features.RandomChest - -feature.Name="RandomChest" - -feature.Description="A feature that allows a NPC to take some item(s) from easter eggs" - -feature.Components = {} - - - -feature.Components.RandomChest = - { - BaseClass="LogicEntity", - Name="RandomChest", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "randomChestDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - - ApplicableActions = { "activate", "deactivate"}, - - Events = { "activation", "deactivation", "opened"}, - - Conditions = { "is active", "is inactive" }, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table", Visible = false}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="ItemNumber", Type="Number", Category="uiR2EDRollout_Items", WidgetStyle="EnumDropDown", - Enum={"1", "2", "3"}, }, - {Name="Item1Qty", Type="Number", Category="uiR2EDRollout_Items", Min="1", Max="50",DefaultValue="1", Visible= function(this) return this:displayRefId(1) end}, - {Name="Item1Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_Items", Visible= function(this) return this:displayRefId(1) end}, - {Name="Item1Weight", Type="Number", Category="uiR2EDRollout_Items", Min="1", Max="100", DefaultValue="33", Visible= function(this) return this:displayRefId(1) end}, - {Name="Item2Qty", Type="Number", Category="uiR2EDRollout_Items", Min="0", Max="50",DefaultValue="0", Visible= function(this) return this:displayRefId(2) end}, - {Name="Item2Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_Items", Visible= function(this) return this:displayRefId(2) end}, - {Name="Item2Weight", Type="Number", Category="uiR2EDRollout_Items", Min="1", Max="100", DefaultValue="33", Visible= function(this) return this:displayRefId(2) end}, - {Name="Item3Qty", Type="Number", Category="uiR2EDRollout_Items", Min="0",Max="50", DefaultValue="0", Visible= function(this) return this:displayRefId(3) end}, - {Name="Item3Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_Items", Visible= function(this) return this:displayRefId(3) end}, - {Name="Item3Weight", Type="Number", Category="uiR2EDRollout_Items", Min="1", Max="100", DefaultValue="33", Visible= function(this) return this:displayRefId(3) end}, - {Name="Active", Type="Number", WidgetStyle="Boolean", Min="0", DefaultValue="1"}, - }, - - -- - -- from base class - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - -- - -- from base class - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - -- - -- from base class - getSelectBarSons = function(this) - return Components - end, - - -- - -- from base class - canHaveSelectBarSons = function(this) - return false; - end, - - -- - -- Called when running EditMode to create locally the feature without sending anything into the act (speed purpose). - -- - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - local eggId = this:getEggId(context) - end, - - translate = function(this, context) - local entity = this - - r2.Translator.translateAiGroup(this, context) - - local rtNpcGrp = r2.Translator.getRtGroup(context, this.InstanceId) - - if (this.Active == 1) - then - local eggId = this:getEggId(context) - local initialAction = this:createActionActivateRandomChest(context) - r2.Translator.translateAiGroupInitialState(this, context, initialAction) - end - r2.Translator.translateFeatureActivation(this, context) - end - - } - -------------------------------------------------------------------------------------------------------------------------- - -local component = feature.Components.RandomChest - -function component:displayRefId(index) - local nbItems = self.ItemNumber + 1 - if index <= nbItems then - return true - end - return false -end - - -local randomChestDisplayerTable = clone(r2:propertySheetDisplayer()) - -function randomChestDisplayerTable:onAttrModified(instance, attributeName) - if attributeName == "ItemNumber" then - local propertySheet = r2:getPropertySheet(instance) - local nbRefId = instance.ItemNumber + 1 - local i = 1 - while i <= 3 do - if i > nbRefId then - local name = "Item"..tostring(i).."Id" - local qty = "Item"..tostring(i).."Qty" - local weight = "Item"..tostring(i).."Weight" - r2.requestSetNode(instance.InstanceId, name, r2.RefId("")) - r2.requestSetNode(instance.InstanceId, qty, 0) - r2.requestSetNode(instance.InstanceId, weight, 0) - end - i = i + 1 - end - propertySheet.Env.updatePropVisibility() - return - end - r2:propertySheetDisplayer():onAttrModified(instance, attributeName) -end - -function randomChestDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function r2:randomChestDisplayer() - return randomChestDisplayerTable -- returned shared displayer to avoid wasting memory -end - --- --- Create the logic actions relative to the feature via the translator. --- - -function getPlotItemIdByInstance(missionItem) - if not missionItem then return "" end - local container = r2.Scenario.PlotItems - local k, v = next(container) - local id = 0 - while k do - if tostring(v.InstanceId) == tostring(missionItem.InstanceId) then return id end - id = id + 1 - k, v = next(container, k) - end - - return "" -end - - -function component:getItems() - - local str = "" - - local id = 1 - while id <= 3 do - local item = self["Item"..tostring(id).."Id"] - --r2.print("ITEM= '" ..item.."'") - if item and item ~= "" then - - local qt = tonumber(self["Item"..tostring(id).."Qty"]) - - local plotItem = r2:getInstanceFromId(item) - if plotItem then - local plotItemId = getPlotItemIdByInstance(plotItem) - if str ~= "" then str = str ..";" end - - str = str .. tostring(plotItemId)..":"..qt - end - end - id = id + 1 - end - return str -end - -function component:computeItemWeight(index) - local total = tonumber(self.Item1Weight) + tonumber(self.Item2Weight) + tonumber(self.Item3Weight) - if total == 0 then return -1 end - local coeff = 100.0 / total - - local weight = tonumber(self["Item"..tostring(index).."Weight"]) * coeff - return weight -end - -function component:createActionActivateRandomChest(context) - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - local eggId = self:getEggId(context) - local pos = r2.getWorldPos(self) - local x = pos.x - local y = pos.y - local z = r2:snapZToGround(x, y) - - local item1Weight = self:computeItemWeight(1) - local item1Id = tostring(getPlotItemIdByInstance(r2:getInstanceFromId(self.Item1Id))) - local item1Qty = tonumber(self.Item1Qty) - - local item2Weight = self:computeItemWeight(2) - local item2Id = tostring(getPlotItemIdByInstance(r2:getInstanceFromId(self.Item2Id))) - local item2Qty = tonumber(self.Item2Qty) - - local item3Weight = self:computeItemWeight(3) - local item3Id = tostring(getPlotItemIdByInstance(r2:getInstanceFromId(self.Item3Id))) - local item3Qty = tonumber(self.Item3Qty) - - if item1Weight == -1 or item2Weight == -1 or item3Weight == -1 then - debugInfo("Random chest: cannot divide by 0!") - return - end - - local randomChestActivation = r2.Translator.createAction("random_chest_activate", rtGrp.Id, eggId, r2:getActId(context.Act), x, y, z, - item1Weight, item1Id, item1Qty, - item2Weight, item2Id, item2Qty, - item3Weight, item3Id, item3Qty, - self.Name) - local setValue = r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1) - - local rtAction = r2.Translator.createAction("multi_actions", {randomChestActivation, setValue}) - return rtAction -end - -function component:createActionDeactivateEasterEgg(context) - local eggId = self:getEggId(context) - - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - - local actionDeactivate = r2.Translator.createAction("easter_egg_deactivate", rtGrp.Id, eggId, r2:getActId(context.Act)) - local actionSetValue = r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0) - - return r2.Translator.createAction("multi_actions", {actionDeactivate, actionSetValue}) -end - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - - if (action.Action.Type == "activate") then - - local retAction = component:createActionActivateRandomChest(context) - return retAction, retAction - elseif (action.Action.Type == "deactivate") then - local retAction = component:createActionDeactivateEasterEgg(context) - return retAction, retAction - end - - local firstAction, lastAction = nil, nil - return firstAction, lastAction -end - --- --- Checks the conditions defined for this feature --- -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationCondition(condition, rtNpcGrp) -end - - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "opened" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 2) - elseif eventType == "activation" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 4) - elseif eventType == "deactivation" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 5) - end - return eventHandler, firstCondition, lastCondition -end - - --- feature part - - --- --- Creates an instance of the feature with attributes retrieved from the creation form --- -function component.createComponent(x, y) - - local comp = r2.newComponent("RandomChest") - assert(comp) - - comp.Base = "palette.entities.botobjects.chest_wisdom_std_sel" - comp.Name = r2:genInstanceName(i18n.get("uiR2EdRandomChest")):toUtf8() - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - comp.ItemQty = 1 - - comp._Seed = os.time() - - return comp -end - - -function component:getEggId(context) - assert(context) - local n = 0 - - if context.EasterEggUniqId == nil then - context.EasterEggUniqId = {} - context.EasterEggMaxId = 0 - end - - local rtNpcGrp = r2.Translator.getRtGroup(context, self.InstanceId) - if context.EasterEggUniqId[rtNpcGrp.Id] == nil then - local n = context.EasterEggMaxId + 1 - context.EasterEggUniqId[rtNpcGrp.Id] = n - context.EasterEggMaxId = n - end - - return context.EasterEggUniqId[rtNpcGrp.Id] - -end - - - --- from ihm --- Displays the creation form of the feature and calls CreateComponent with the user input values --- -function component.create() - - if not r2:checkAiQuota() then return end - - - - local function paramsOk(resultTable) - - - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - if showAgain == 1 then - r2.setDisplayInfo("EasterEggForm", 0) - else r2.setDisplayInfo("EasterEggForm", 1) end - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local comp = component.createComponent( x, y) - r2:setCookie(comp.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", comp) - end - - local function paramsCancel() - debugInfo("Cancel form for 'RandomChest' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'RandomChest' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("RandomChest") == 1 then - r2.displayFeatureHelp("RandomChest") - end - r2.requestNewAction(i18n.get("uiR2EDNewRandomChestAction")) - local comp = component.createComponent( x, y) - r2:setCookie(comp.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", comp) - end - local function posCancel() - debugInfo("Cancel choice 'RandomChest' position") - end - r2:choosePos("object_chest_wisdom_std_sel.creature", posOk, posCancel, "createFeatureEasterEgg") -end - ------------------------------------------ ---- register the current Feature to menu - - ----------------------------------------------------------------------------- --- add a line to the event menu -function component:getLogicTranslations() - - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Spawn" ):toUtf8(), - text=i18n.get( "uiR2AA1Spawn" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Despawn" ):toUtf8(), - text=i18n.get( "uiR2AA1Despawn" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Spawn" ):toUtf8(), - text=i18n.get( "uiR2Event1Spawn" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Despawn" ):toUtf8(), - text=i18n.get( "uiR2Event1Despawn" ):toUtf8()}, - ["opened"] = { menu=i18n.get( "uiR2Event0ChestOpened" ):toUtf8(), - text=i18n.get( "uiR2Event1ChestOpened" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Spawned" ):toUtf8(), - text=i18n.get( "uiR2Test1Spawned" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Despawned" ):toUtf8(), - text=i18n.get( "uiR2Test1Despawned" ):toUtf8()} - } - } - return logicTranslations -end - -r2.Features["RandomChest"] = feature - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_request_item.lua b/code/ryzom/common/data_common/r2/r2_features_request_item.lua deleted file mode 100644 index 0bcb46b99..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_request_item.lua +++ /dev/null @@ -1,562 +0,0 @@ --- In Translation file --- Category : uiR2EdRequestItem -- --- CreationFrom : uiR2EdRequestItemParameters - - -r2.Features.RequestItemFeature = {} - -local feature = r2.Features.RequestItemFeature - -feature.Name="RequestItemFeature" - -feature.Description="A feature that makes a NPC request some item(s) from the player" - - -feature.Components = {} - -feature.Components.RequestItem = - { - BaseClass="LogicEntity", - Name="RequestItem", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "requestItemDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - - ApplicableActions = { "activate", "deactivate"}, - - Events = { "activation", "deactivation", "wait validation", "mission asked", "succeeded"}, - - Conditions = { "is active", "is inactive", "is succeeded" }, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table"}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="MissionGiver", Type="RefId", PickFunction="r2:canPickTalkingNpc", SetRefIdFunction="r2:setTalkingNpc"}, - {Name="ItemNumber", Type="Number", Category="uiR2EDRollout_ItemsToRequest", WidgetStyle="EnumDropDown", DefaultValue="3", - Enum={"1", "2", "3"}, }, - {Name="Item1Qty", Type="Number", Category="uiR2EDRollout_ItemsToRequest", Min="0", DefaultValue="1", Visible= function(this) return this:displayRefId(1) end}, - {Name="Item1Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_ItemsToRequest", Visible= function(this) return this:displayRefId(1) end}, - - - {Name="Item2Qty", Type="Number", Category="uiR2EDRollout_ItemsToRequest", Min="0", DefaultValue="0", Visible= function(this) return this:displayRefId(2) end}, - {Name="Item2Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_ItemsToRequest", Visible= function(this) return this:displayRefId(2) end}, - - {Name="Item3Qty", Type="Number", Category="uiR2EDRollout_ItemsToRequest", Min="0", DefaultValue="0", Visible= function(this) return this:displayRefId(3) end}, - {Name="Item3Id", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_ItemsToRequest", Visible= function(this) return this:displayRefId(3) end}, - - - {Name="ContextualText", Type="String", Category="uiR2EDRollout_TextToSay", MaxNumChar="100"}, - {Name="MissionText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="WaitValidationText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="MissionSucceedText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="BroadcastText", Type="String", Category="uiR2EDRollout_TextToSay", DefaultValue="", DefaultInBase = 1}, - - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="Repeatable", Type="Number", WidgetStyle="Boolean", DefaultValue="0"} - - }, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - - - } - - -local component = feature.Components.RequestItem - -function component:displayRefId(index) - local nbItems = self.ItemNumber + 1 - if index <= nbItems then - return true - end - return false -end - - -local requestItemDisplayerTable = clone(r2:propertySheetDisplayer()) - -function requestItemDisplayerTable:onAttrModified(instance, attributeName) - if attributeName == "ItemNumber" then - local propertySheet = r2:getPropertySheet(instance) - local nbRefId = instance.ItemNumber + 1 - local i = 1 - while i <= 3 do - if i > nbRefId then - local name = "Item"..tostring(i).."Id" - local qty = "Item"..tostring(i).."Qty" - r2.requestSetNode(instance.InstanceId, name, r2.RefId("")) - r2.requestSetNode(instance.InstanceId, qty, 0) - end - i = i + 1 - end - propertySheet.Env.updatePropVisibility() - return - end - r2:propertySheetDisplayer():onAttrModified(instance, attributeName) -end - -function requestItemDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true -end - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - if tmpInstance.ParentInstance and tmpInstance.ParentInstance:isKindOf("NpcGrpFeature") then - r2.requestSetNode(self.InstanceId, targetAttr, r2.RefId("")) - end - end - -end - -function r2:requestItemDisplayer() - return requestItemDisplayerTable -- returned shared displayer to avoid wasting memory -end - - -function component:getItems() - local str = "" - - local id = 1 - while id <= 3 do - local item = self["Item"..tostring(id).."Id"] - local item2 = self.Item1Id - if (item) then - - local qt = tonumber(self["Item"..tostring(id).."Qty"]) - - local plotItem = r2:getInstanceFromId(item) - if plotItem then - local plotItemSheetId = plotItem.SheetId - if str ~= "" then str = str ..";" end - local name = "" - if plotItemSheetId ~= nil then - name = r2.getSheetIdName(plotItemSheetId) - end - str = str .. tostring(name)..":"..qt - end - end - id = id + 1 - end - return str -end - -function component:textAdapter(text) - assert(text) - if type(text) ~= "string" then - debugInfo("Wrong type "..type(text)) - assert(nil) - end - local str = "" - local items = {} - local qts = {} - - local id = 1 - while id <= 3 do - local item = self["Item"..tostring(id).."Id"] - local item2 = self.Item1Id - if (item) then - - local qt = tonumber(self["Item"..tostring(id).."Qty"]) - qts[id] = qt - - local plotItem = r2:getInstanceFromId(item) - if plotItem then - items[id] = plotItem.Name - else - items[id] = "" - end - end - id = id + 1 - end - local str = text - str=string.gsub (str, "", tostring(qts[1])) - str=string.gsub (str, "", tostring(qts[2])) - str=string.gsub (str, "", tostring(qts[3])) - str=string.gsub (str, "", tostring(items[1])) - str=string.gsub (str, "", tostring(items[2])) - str=string.gsub (str, "", tostring(items[3])) - - local mission_giver = "" - if self.MissionGiver == nil then return end - local npc = r2:getInstanceFromId(self.MissionGiver) - if npc then - mission_giver = npc.Name - end - str=string.gsub(str, "", tostring(mission_giver)) - return str -end - - - -function component:translate(context) - r2.Translator.translateAiGroup(self, context) - - if self.MissionGiver == nil or self.MissionGiver == "" then return end - local npc = r2:getInstanceFromId(self.MissionGiver) - if not npc then return end - - local npcGrp = r2.Translator.getRtGroup(context, npc.InstanceId) - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - local items = self:getItems() - - - --START OF STATE - do - local action = r2.Translator.createAction("user_event_trigger", rtGrp.Id, 7) - r2.Translator.translateAiGroupEvent("start_of_state" , self, context, action) - end - - do - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", self.Active) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) -- Success - - local rtAction = r2.Translator.createAction("multi_actions", {rtAction1, rtAction2, rtAction3}) - - r2.Translator.translateAiGroupEvent("user_event_7", self, context, rtAction) - end - - do - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3, } ) - r2.Translator.translateAiGroupEvent("user_event_4", self, context, rtAction) - end - - --CONTEXTUAL TEXT - do - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, -- Active - r2.Translator.createAction("request_item", rtGrp.Id, items, self:textAdapter(self.ContextualText)) - ) - r2.Translator.translateAiGroupEvent("player_target_npc", npc, context, rtAction) - end - - - - --MISSION SUCCEEDED TEXT - do - - local actionSaySucceedText = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 1, - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 2), - r2.Translator.createAction("npc_say", self:textAdapter(self.MissionSucceedText), npcGrp.Id ..":"..npc.Name), - })); - - local actionRepeatable = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 1, -- Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1 ) , - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0 ) - }) - ); - local actionNotRepeatable = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 0, -- Not Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0 ) , - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 2 ), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 5) - }) - ); - - local baseAct = r2.Scenario:getBaseAct() - local baseActRtGrp = r2.Translator.getRtGroup(context, baseAct.InstanceId) - local actionBroadcast = r2.Translator.createAction("broadcast_msg",baseActRtGrp.Id, self:textAdapter(self.BroadcastText) ) - - - --reset all features var after success (depending on "repeatable") - local actionReset = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 2, - r2.Translator.createAction("multi_actions", {actionRepeatable, actionNotRepeatable})) - - local rtActionSucceed = r2.Translator.createAction("multi_actions", {actionSaySucceedText, actionReset, actionBroadcast}) - - r2.Translator.translateAiGroupEvent("user_event_3", self, context, rtActionSucceed) - end - - - --MISSION TEXT - do - local actionSayMissionText = r2.Translator.createAction("npc_say", self:textAdapter(self.MissionText), npcGrp.Id ..":"..npc.Name); - local actionSetStatus = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 1) - - --local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 0,actionSayMissionText) - local rtAction = r2.Translator.createAction("multi_actions", {actionSayMissionText, actionSetStatus}) - - r2.Translator.translateAiGroupEvent("user_event_2", self, context, rtAction) - end - - --WAIT VALIDATION TEXT - do - - - -- if the player carries the requested items when talking to the giver for the first time - local actionMission = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 0, - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("npc_say", self:textAdapter(self.MissionText), npcGrp.Id ..":"..npc.Name), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 1) - })) - - - -- if the player has already talked to the giver and brings the requested item - - - local actionValidation = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 1, - r2.Translator.createAction("npc_say", self:textAdapter(self.WaitValidationText), npcGrp.Id ..":"..npc.Name) - ) - local rtAction = r2.Translator.createAction("multi_actions", {actionValidation, actionMission}) - - - r2.Translator.translateAiGroupEvent("user_event_1", self, context, rtAction) - end - - r2.Translator.translateFeatureActivation(self, context) - -end - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1); - return action1, action1 - elseif condition.Condition.Type == "is inactive" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0); - return action1, action1 - elseif condition.Condition.Type == "is succeeded" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v2", 2); - return action1, action1 - - else - assert(nil) - end - return nil,nil -end - - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this--r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "mission asked" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 2) - elseif eventType == "wait validation" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 1) - elseif eventType == "succeeded" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 3) - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.createComponent = function(x, y) - - local comp = r2.newComponent("RequestItem") - assert(comp) - - local contextualText = i18n.get("uiR2EdRequestItem_ContextualText"):toUtf8() - local missionText = i18n.get("uiR2EdRequestItem_MissionText"):toUtf8() - local waitValidationText = i18n.get("uiR2EdRequestItem_WaitValidationText"):toUtf8() - local missionSucceededText = i18n.get("uiR2EdRequestItem_MissionSucceededText"):toUtf8() - local broadcastText = i18n.get("uiR2EdRequestItem_BroadcastText"):toUtf8() - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.bot_request_item") - comp.Name = r2:genInstanceName(i18n.get("uiR2EDRequestItem")):toUtf8() - - comp.ContextualText = contextualText - comp.MissionText = missionText - comp.WaitValidationText = waitValidationText - comp.MissionSucceedText = missionSucceededText - comp.BroadcastText = broadcastText - - comp.ItemNumber = 0 - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) --- comp.ItemQty = 1 - - comp._Seed = os.time() - - return comp -end - -component.create = function() - - if not r2:checkAiQuota() then return end - - - local function paramsOk(resultTable) - - - - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - if showAgain == 1 then - r2.setDisplayInfo("RequestItemForm", 0) - else r2.setDisplayInfo("RequestItemForm", 1) end - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local component = feature.Components.RequestItem.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'RequestItem' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'RequestItem' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("RequestItem") == 1 then - r2.displayFeatureHelp("RequestItem") - end - r2.requestNewAction(i18n.get("uiR2EDNewRequestItemFeatureAction")) - local component = feature.Components.RequestItem.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'RequestItem' position") - end - local creature = r2.Translator.getDebugCreature("object_component_bot_request_item.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureRequestItem") -end - - ---function component:registerMenu(logicEntityMenu) --- local name = i18n.get("uiR2EDRequestItem") --- logicEntityMenu:addLine(ucstring(name), "lua", "", "RequestItem") ---end - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["mission asked"] = { menu=i18n.get( "uiR2Event0MissionGiven" ):toUtf8(), - text=i18n.get( "uiR2Event1MissionGiven" ):toUtf8()}, - ["wait validation"] = { menu=i18n.get( "uiR2Event0TaskWaitValidation" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskWaitValidation" ):toUtf8()}, - ["succeeded"] = { menu=i18n.get( "uiR2Event0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskSuccess" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - ["is succeeded"] = { menu=i18n.get( "uiR2Test0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Test1TaskSuccess" ):toUtf8()}, - } - } - return logicTranslations -end - - -r2.Features["RequestItem"] = feature - - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_reward_provider.lua b/code/ryzom/common/data_common/r2/r2_features_reward_provider.lua deleted file mode 100644 index 3b0bc1845..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_reward_provider.lua +++ /dev/null @@ -1,426 +0,0 @@ --------------------------------- --- Events for reward provider: --- #4 : activation --- #5 : deactivation --- #6 : reward generated - - -r2.Features.RewardProviderFeature = {} - -local feature = r2.Features.RewardProviderFeature - -feature.Name="RewardProviderFeature" - -feature.Description="" - -feature.Components = {} - - -feature.Components.RewardProvider = - { - BaseClass="LogicEntity", - Name="RewardProvider", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "rewardProviderDisplayer", - - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - - ApplicableActions = { "activate", "deactivate"}, - - Events = {"activation", "deactivation", "reward given"}, - - Conditions = { "is active", "is inactive"}, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table"}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="RewardGiver", Type="RefId", PickFunction="r2:canPickTalkingNpc", SetRefIdFunction="r2:setTalkingNpc"}, - - {Name="ContextualText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="OnTargetText", Type="String", Category="uiR2EDRollout_TextToSay" }, - {Name="RewardText", Type="String", Category="uiR2EDRollout_TextToSay" }, - {Name="RareRewardText", Type="String", Category="uiR2EDRollout_TextToSay" }, - {Name="InventoryFullText", Type="String", Category="uiR2EDRollout_TextToSay" }, - {Name="NotEnoughPointsText", Type="String", Category="uiR2EDRollout_TextToSay" }, - - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - - }, - - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - if component.appendInstancesByType then - component:appendInstancesByType(destTable, kind) - end - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - } - - - -local component = feature.Components.RewardProvider - -function component.pretranslate(this, context) - local prop = component.Prop - r2.Translator.CheckPickedEntity(this, prop) - r2.Translator.createAiGroup(this, context) -end - - - -local rewardProviderTable = clone(r2:propertySheetDisplayer()) - -local oldOnAttrModified = rewardProviderTable.onAttrModified - -function rewardProviderTable:onAttrModified(instance, attributeName) - oldOnAttrModified(instance, attributeName) - - local propertySheet = r2:getPropertySheet(instance) - - local giverRefId = propertySheet:find("RewardGiver") - local giverName = propertySheet:find("RewardGiver"):find("name") - - if attributeName == "RewardGiver" then - local instanceId = instance[attributeName] - if instanceId == "" then - giverName.hardtext = "NONE" - return - end - local tmpInstance = r2:getInstanceFromId(instanceId) - giverName.hardtext = tmpInstance.Name - end - - - return -end - -function rewardProviderTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true -end - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - if tmpInstance.ParentInstance and tmpInstance.ParentInstance:isKindOf("NpcGrpFeature") then - r2.requestSetNode(self.InstanceId, targetAttr, r2.RefId("")) - end - end - -end - -function r2:rewardProviderDisplayer() - return rewardProviderTable -- returned shared displayer to avoid wasting memory -end - - -function component:textAdapter(text) - - assert(self) - assert(type(text) == "string") - local str = text - local reward_giver = "" - - if tostring(self.RewardGiver) ~= "" then - local giver = r2:getInstanceFromId(self.RewardGiver) - if giver then reward_giver = giver.Name end - end - - str=string.gsub(str, "", reward_giver) - return str -end - - -function component:getTextTable() - local texts = {} - texts["rewardText"] = self:textAdapter(self.RewardText) - texts["rareRewardText"] = self:textAdapter(self.RareRewardText) - texts["inventoryFullText"] = self:textAdapter(self.InventoryFullText) - texts["notEnoughPointsText"] = self:textAdapter(self.NotEnoughPointsText) - - return texts -end - - -function component:translate(context) - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - - r2.Translator.translateAiGroup(self, context) - - local giver = r2:getInstanceFromId(self.RewardGiver) - if not giver then return end - local rtGiverGrp = r2.Translator.getRtGroup(context, giver.InstanceId) - - ----------------- - --Contextual & onTarget text - do - if giver then - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, - r2.Translator.createAction("talk_to", rtGrp.Id, self:textAdapter(self.ContextualText))) - r2.Translator.translateAiGroupEvent("player_target_npc", giver, context, rtAction) - end - end - - do - if giver then - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, - r2.Translator.createAction("npc_say", self:textAdapter(self.OnTargetText), rtGiverGrp.Id ..":"..giver.Name)) - r2.Translator.translateAiGroupEvent("player_target_npc", giver, context, rtAction) - end - end - ------------------- - --give reward action - do - if giver then - local texts = self:getTextTable() - - - - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("give_reward", rtGiverGrp.Id, giver.Name, texts), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 6) })) - - r2.Translator.translateAiGroupEvent("user_event_3", self, context, rtAction) - end - end - ------------------- - --Start of state - do - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", self.Active) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2} ) - r2.Translator.translateAiGroupEvent("start_of_state" , self, context, rtAction) - end - - r2.Translator.translateFeatureActivation(self, context) - -end - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1); - return action1, action1 - elseif condition.Condition.Type == "is inactive" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0); - return action1, action1 - else - assert(nil) - end - return nil,nil -end - - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "reward given" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 6) - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.createComponent = function(x, y) - - local contextualText = i18n.get("uiR2EdRewardProvider_ContextualText"):toUtf8() - local onTargetText = i18n.get("uiR2EdRewardProvider_OnTargetText"):toUtf8() - local rewardText = i18n.get("uiR2EdRewardProvider_RewardText"):toUtf8() - local rareRewardText = i18n.get("uiR2EdRewardProvider_RareRewardText"):toUtf8() - local inventoryFullText = i18n.get("uiR2EdRewardProvider_InventoryFullText"):toUtf8() - local notEnoughPointsText = i18n.get("uiR2EdRewardProvider_NotEnoughPointsText"):toUtf8() - - local comp = r2.newComponent("RewardProvider") - assert(comp) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.bot_chat") - comp.Name = r2:genInstanceName(i18n.get("uiR2EDRewardProvider")):toUtf8() - - comp.ContextualText = contextualText - comp.OnTargetText = onTargetText - comp.RewardText = rewardText - comp.RareRewardText = rareRewardText - comp.InventoryFullText = inventoryFullText - comp.NotEnoughPointsText = notEnoughPointsText - - comp.Repeatable = true - - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - comp._Seed = os.time() - - return comp -end - -component.create = function() - - r2:checkAiQuota() - - - local function paramsOk(resultTable) - - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - - if showAgain == 1 then - r2.setDisplayInfo("RewardProvider", 0) - else r2.setDisplayInfo("RewardProvider", 1) end - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local component = feature.Components.RewardProvider.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'RewardProvider' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'RewardProvider' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("RewardProvider") == 1 then - r2.displayFeatureHelp("RewardProvider") - end - r2.requestNewAction(i18n.get("uiR2EDNewRewardProviderFeatureAction")) - local component = feature.Components.RewardProvider.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'RewardProvider' position") - end - local creature = r2.Translator.getDebugCreature("object_component_bot_chat.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureRewardProvider") -end - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EDRollout_RewardProvider") - logicEntityMenu:addLine(ucstring(name), "lua", "", "RewardProvider") -end - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["reward given"] = { menu=i18n.get( "uiR2Event0RewardGiven" ):toUtf8(), - text=i18n.get( "uiR2Event1RewardGiven" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - } - } - return logicTranslations -end - - -r2.Features["RewardProvider"] = feature - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_scenery_object_interaction.lua b/code/ryzom/common/data_common/r2/r2_features_scenery_object_interaction.lua deleted file mode 100644 index 4fc3f79fa..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_scenery_object_interaction.lua +++ /dev/null @@ -1,438 +0,0 @@ - -r2.Features.SceneryObjectInteractionFeature = {} - -local feature = r2.Features.SceneryObjectInteractionFeature - -feature.Name="SceneryObjectInteractionFeature" - -feature.Description="" - -feature.Components = {} - -feature.Components.SceneryObjectInteraction = - { - BaseClass="LogicEntity", - Name="SceneryObjectInteraction", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "sceneryObjectInteractionDisplayer", - - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - - ApplicableActions = { "activate", "deactivate"}, - - Events = {"activation", "deactivation", "trigger"}, - - Conditions = { "is active", "is inactive", "has triggered", "has not triggered" }, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table"}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="SceneryObject", Type="RefId", PickFunction="r2:canPickSceneryObject", SetRefIdFunction="r2:setSceneryObjectTarget"}, - - --{Name="ContextualText", Type="String", ValidationFun="r2.refuseEmptyString", Category="uiR2EDRollout_TextToSay" }, - {Name="ContextualText", Type="String", Category="uiR2EDRollout_TextToSay", MaxNumChar="100" }, - - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="Repeatable", Type="Number", WidgetStyle="Boolean", DefaultValue="0"} - - }, - - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - } - - - -local component = feature.Components.SceneryObjectInteraction - -function component.pretranslate(this, context) - local prop = component.Prop - r2.Translator.CheckPickedEntity(this, prop) - r2.Translator.createAiGroup(this, context) -end - - - -local sceneryObjectInteractionDisplayerTable = clone(r2:propertySheetDisplayer()) - -local oldOnAttrModified = sceneryObjectInteractionDisplayerTable.onAttrModified - -function sceneryObjectInteractionDisplayerTable:onAttrModified(instance, attributeName) - oldOnAttrModified(instance, attributeName) - - local propertySheet = r2:getPropertySheet(instance) - - local scObjRefId = propertySheet:find("SceneryObject") - local scObjName = scObjRefId:find("name") - - - - if attributeName == "SceneryObject" then - - local instanceId = instance[attributeName] - if instanceId == "" then - scObjName.hardtext = "NONE" - return - end - scObjName.hardtext = r2:getInstanceFromId(instance[attributeName]).Name - return - end - - return -end - -function sceneryObjectInteractionDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true -end - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - debugInfo("postHrcMove!") - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - if tmpInstance.ParentInstance and tmpInstance.ParentInstance:isKindOf("NpcGrpFeature") then - r2.requestSetNode(self.InstanceId, targetAttr, r2.RefId("")) - end - end - -end - -function r2:sceneryObjectInteractionDisplayer() - return sceneryObjectInteractionDisplayerTable -- returned shared displayer to avoid wasting memory -end - - -function component:textAdapter(text) - - assert(self) - assert(type(text) == "string") - local str = text - local object = "" - - - if tostring(self.SceneryObject) ~= "" then - local scObject = r2:getInstanceFromId(self.SceneryObject) - if scObject then object = scObject.Name end - end - - - str=string.gsub(str, "", object) - return str -end - -function component:pretranslate(context) - if context.InteractingSceneryObjects then - if self.SceneryObject and self.SceneryObject ~= "" then - local scObj = r2:getInstanceFromId(self.SceneryObject) - --assert(scObj) - table.insert(context.InteractingSceneryObjects, scObj.InstanceId) - end - end - --inspect(context.InteractingSceneryObjects) - r2.Translator.createAiGroup(self, context) -end - -function component:translate(context) - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - - r2.Translator.translateAiGroup(self, context) - - local sceneryObject = r2:getInstanceFromId(self.SceneryObject) - - ----------------- - --Contextual text - do - if sceneryObject then - local actionContextual = r2.Translator.createAction("talk_to", rtGrp.Id, self:textAdapter(tostring(self.ContextualText))) - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, -- Active - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 0, actionContextual)) - r2.Translator.translateAiGroupEvent("player_target_npc", sceneryObject, context, rtAction) - end - end - - r2.Translator.Tasks.setStatusLogic(self, context, rtGrp) - ------------------- - --Trigger - if sceneryObject then - local rtSceneryObjectGrp = r2.Translator.getRtGroup(context, sceneryObject.InstanceId) - - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, --if active - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 1, --and if the scenery object has been selected once by the player - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 2 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1 ), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 6) }) - )) - - --r2.Translator.translateAiGroupEvent("player_target_npc", sceneryObject, context, rtAction) - r2.Translator.translateAiGroupEvent("user_event_3", self, context, rtAction) - end - - ------------------- - --Start of state - - do - - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", self.Active) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) -- the scenery object hasn't been selected yet - local rtAction4 = r2.Translator.createAction("set_value", rtGrp.Id, "v3", 0) - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3, rtAction4} ) - r2.Translator.translateAiGroupEvent("start_of_state" , self, context, rtAction) - end - - - do - local action2 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 1, -- Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0 ), - }) - ); - local action3 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 0, -- Not Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0 ) , - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 1 ), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 5) - }) - ); - - local rtAction = r2.Translator.createAction("multi_actions", {action2, action3}) - --Autodeactivate after having triggered - r2.Translator.translateAiGroupEvent("user_event_6", self, context, rtAction) - end - - r2.Translator.translateFeatureActivation(self, context) - -end - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - local prefix = "" - - if rtNpcGrp.Id and rtNpcGrp.Id ~= "" then - prefix = r2:getNamespace() .. rtNpcGrp.Id.."." - end - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1); - return action1, action1 - elseif condition.Condition.Type == "is inactive" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0); - return action1, action1 - elseif condition.Condition.Type == "has triggered" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v3", 1 ); - return action1, action1 - elseif condition.Condition.Type == "has not triggered" then - local action1 = r2.Translator.createAction("dynamic_if", prefix.."v3 == 0"); - return action1, action1 - else - assert(nil) - end - return nil,nil -end - - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if event.Event.Type == "trigger" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 6) - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.createComponent = function(x, y) - - local contextualText = i18n.get("uiR2EdSceneryObjectInteraction_ContextualText"):toUtf8() - - local comp = r2.newComponent("SceneryObjectInteraction") - assert(comp) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.bot_chat") - comp.Name = r2:genInstanceName(i18n.get("uiR2EdSceneryObjectInteraction")):toUtf8() - - comp.ContextualText = contextualText - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) --- comp.ItemQty = 1 - - comp._Seed = os.time() - - return comp -end - -component.create = function() - - r2:checkAiQuota() - - - local function paramsOk(resultTable) - - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - - if showAgain == 1 then - r2.setDisplayInfo("SceneryObjectInteraction", 0) - else r2.setDisplayInfo("SceneryObjectInteraction", 1) end - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local component = feature.Components.SceneryObjectInteraction.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'SceneryObjectInteraction' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'SceneryObjectInteraction' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("SceneryObjectInteraction") == 1 then - r2.displayFeatureHelp("SceneryObjectInteraction") - end - r2.requestNewAction(i18n.get("uiR2EDNewSceneryObjectInteractionFeatureAction")) - local component = feature.Components.SceneryObjectInteraction.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'SceneryObjectInteraction' position") - end - local creature = r2.Translator.getDebugCreature("object_component_bot_chat.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureSceneryObjectInteraction") -end - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdSceneryObjectInteraction") - logicEntityMenu:addLine(ucstring(name), "lua", "", "SceneryObjectInteraction") -end - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["trigger"] = { menu=i18n.get( "uiR2Event0Trigger" ):toUtf8(), - text=i18n.get( "uiR2Event1Trigger" ):toUtf8()}, - - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - ["has triggered"] = { menu=i18n.get( "uiR2Test0Trigger" ):toUtf8(), - text=i18n.get( "uiR2Test1Trigger" ):toUtf8()}, - ["has not triggered"] = { menu=i18n.get( "uiR2Test0NotTrigger" ):toUtf8(), - text=i18n.get( "uiR2Test1NotTrigger" ):toUtf8()}, - } - } - return logicTranslations -end - - -r2.Features["SceneryObjectInteractionFeature"] = feature - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_scenery_object_interaction_task.lua b/code/ryzom/common/data_common/r2/r2_features_scenery_object_interaction_task.lua deleted file mode 100644 index e6f32c4cd..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_scenery_object_interaction_task.lua +++ /dev/null @@ -1,549 +0,0 @@ - -r2.Features.SceneryObjectInteractionTaskStepTaskStep = {} - -local feature = r2.Features.SceneryObjectInteractionTaskStepTaskStep - -feature.Name="SceneryObjectInteractionTaskStepTaskStep" - -feature.Description="" - -feature.Components = {} - -feature.Components.SceneryObjectInteractionTaskStep = - { - BaseClass="LogicEntity", - Name="SceneryObjectInteractionTaskStep", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "sceneryObjectInteractionTaskStepDisplayer", - - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - - ApplicableActions = { "activate", "deactivate"}, - - Events = {"activation", "deactivation", "succeeded"}, - - Conditions = { "is active", "is inactive", "in progress", "is succeeded" }, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table"}, - - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="Repeatable", Type="Number", WidgetStyle="Boolean", DefaultValue="0"}, - {Name="ValidationNeeded", Category="uiR2EDRollout_TextToSay", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="SceneryObject", Type="RefId", PickFunction="r2:canPickSceneryObject", SetRefIdFunction="r2:setSceneryObjectTarget"}, - {Name="MissionGiver", Type="RefId", PickFunction="r2:canPickTalkingNpc", SetRefIdFunction="r2:setTalkingNpc"}, - - {Name="ContextualText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="MissionText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="NotValidatedText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="MissionSucceedText", Type="String", Category="uiR2EDRollout_TextToSay", Visible= function(this) - return this:IsValidationNeeded() end, DefaultInBase = 1}, - {Name="BroadcastText", Type="String", Category="uiR2EDRollout_TextToSay", DefaultValue="", DefaultInBase = 1}, - }, - - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - } - - - -local component = feature.Components.SceneryObjectInteractionTaskStep - -function component:IsValidationNeeded() - local validationNeeded = self.ValidationNeeded - if validationNeeded == 1 then - return true - end - return false -end - -function component.pretranslate(this, context) - local prop = component.Prop - r2.Translator.CheckPickedEntity(this, prop) - r2.Translator.createAiGroup(this, context) -end - - - -local sceneryObjectInteractionTaskStepDisplayerTable = clone(r2:propertySheetDisplayer()) - -local oldOnAttrModified = sceneryObjectInteractionTaskStepDisplayerTable.onAttrModified - -function sceneryObjectInteractionTaskStepDisplayerTable:onAttrModified(instance, attributeName) - oldOnAttrModified(instance, attributeName) - - local propertySheet = r2:getPropertySheet(instance) - - local scObjRefId = propertySheet:find("SceneryObject") - local scObjName = scObjRefId:find("name") - - if attributeName == "ValidationNeeded" then - local propertySheet = r2:getPropertySheet(instance) - propertySheet.Env.updatePropVisibility() - return - end - - if attributeName == "SceneryObject" then - - local instanceId = instance[attributeName] - if instanceId == "" then - scObjName.hardtext = "NONE" - return - end - scObjName.hardtext = r2:getInstanceFromId(instance[attributeName]).Name - return - end - - local giverRefId = propertySheet:find("MissionGiver") - local giverName = propertySheet:find("MissionGiver"):find("name") - - if attributeName == "MissionGiver" then - - local instanceId = instance[attributeName] - if instanceId == "" then - giverName.hardtext = "NONE" - return - end - - if instance["MissionTarget"] == instance[attributeName] then - giverName.hardtext = "NONE" - r2.requestSetNode(instance.InstanceId, "MissionGiver", "") - else - giverName.hardtext = r2:getInstanceFromId(instance[attributeName]).Name - end - return - end - - return -end - -function sceneryObjectInteractionTaskStepDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true -end - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - if tmpInstance.ParentInstance and tmpInstance.ParentInstance:isKindOf("NpcGrpFeature") then - r2.requestSetNode(self.InstanceId, targetAttr, r2.RefId("")) - end - end - -end - -function r2:sceneryObjectInteractionTaskStepDisplayer() - return sceneryObjectInteractionTaskStepDisplayerTable -- returned shared displayer to avoid wasting memory -end - - -function component:textAdapter(text) - - assert(self) - assert(type(text) == "string") - local str = text - local object = "" - local mission_giver = "" - - if tostring(self.SceneryObject) ~= "" then - local scObject = r2:getInstanceFromId(self.SceneryObject) - if scObject then object = scObject.Name end - end - - if tostring(self.MissionGiver) ~= "" then - local giver = r2:getInstanceFromId(self.MissionGiver) - if giver then mission_giver = giver.Name end - end - - str=string.gsub(str, "", object) - str=string.gsub(str, "", mission_giver) - - return str -end - -function component:pretranslate(context) - if context.InteractingSceneryObjects then - if self.SceneryObject and self.SceneryObject ~= "" then - local scObj = r2:getInstanceFromId(self.SceneryObject) - if scObj then - table.insert(context.InteractingSceneryObjects, scObj.InstanceId) - end - end - end - --inspect(context.InteractingSceneryObjects) - r2.Translator.createAiGroup(self, context) -end - -function component:translate(context) - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - - r2.Translator.translateAiGroup(self, context) - - if not self.SceneryObject or self.SceneryObject == "" then return end - if not self.MissionGiver or self.MissionGiver == "" then return end - - local validationNeeded = self.ValidationNeeded - - local sceneryObject = r2:getInstanceFromId(self.SceneryObject) - if not sceneryObject then return end - - local rtSceneryObjectGrp = r2.Translator.getRtGroup(context, sceneryObject.InstanceId) - - local giver = r2:getInstanceFromId(self.MissionGiver) - if not giver then return end - local rtGiverGrp = r2.Translator.getRtGroup(context, giver.InstanceId) - - local baseAct = r2.Scenario:getBaseAct() - local baseActRtGrp = r2.Translator.getRtGroup(context, baseAct.InstanceId) - - ------------------- - --Start of state - do - local action = r2.Translator.createAction("user_event_trigger", rtGrp.Id, 7) - r2.Translator.translateAiGroupEvent("start_of_state" , self, context, action) - end - - do - - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", self.Active) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) -- the scenery object hasn't been selected yet - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3, } ) - r2.Translator.translateAiGroupEvent("user_event_7", self, context, rtAction) - end - - - --Activation - do - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) -- the scenery object hasn't been selected yet - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3, } ) - r2.Translator.translateAiGroupEvent("user_event_4", self, context, rtAction) - end - - - ------------------- - --Mission text - if giver then - local actionValidation = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 1, --giver already said mission text - r2.Translator.createAction("npc_say", self:textAdapter(self.NotValidatedText), rtGiverGrp.Id ..":"..giver.Name)) - - local actionMission = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 0, --giver didn't say mission text yet - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("npc_say", self:textAdapter(self.MissionText), rtGiverGrp.Id ..":"..giver.Name), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 1 ), })) - - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, - r2.Translator.createAction("multi_actions", {actionValidation, actionMission})) - - - r2.Translator.translateAiGroupEvent("player_target_npc", giver, context, rtAction) - end - - - - - --Contextual text - do - if sceneryObject then - local actionContextual = r2.Translator.createAction("talk_to", rtGrp.Id, self:textAdapter(tostring(self.ContextualText))) - - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, -- Active - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 1, actionContextual)) - r2.Translator.translateAiGroupEvent("player_target_npc", sceneryObject, context, rtAction) - end - end - - --when the player did interact with the scenery obj : trigger - if sceneryObject then - local eventId = 9 - if validationNeeded == 1 then - eventId = 8 - end - local actionEvent = r2.Translator.createAction("user_event_trigger", rtGrp.Id, eventId) - - local actionSet = r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1) - - local actionSetStatus = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 2) - - local actions = r2.Translator.createAction("multi_actions", {actionSetStatus, actionEvent, actionSet}) - - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, --if active - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 1, actions))--and if the scenery object has been selected once by the player - - r2.Translator.translateAiGroupEvent("user_event_3", self, context, rtAction) - end - - - --depending on validationNeeded prop - if validationNeeded == 1 then - do - local actionEvent = r2.Translator.createAction("user_event_trigger", rtGrp.Id, 9) - local actionSaySuccessText = r2.Translator.createAction("npc_say", self:textAdapter(self.MissionSucceedText), rtGiverGrp.Id ..":"..giver.Name); - - local action = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 2, - r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, - r2.Translator.createAction("multi_actions", {actionEvent, actionSaySuccessText}))) - - r2.Translator.translateAiGroupEvent("player_target_npc", giver, context, action) - end - - do - local actionBroadcast = r2.Translator.createAction("broadcast_msg", baseActRtGrp.Id, self:textAdapter(self.BroadcastText)) - r2.Translator.translateAiGroupEvent("user_event_8", self, context, actionBroadcast) - end - end - - --user event 9 : success - do - local action2 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 1, -- Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0 ), - }) - ); - local action3 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 0, -- Not Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1 ), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 5) - }) - ); - - local actions = {} - if validationNeeded == 1 then - actions = {action2, action3} - else - local actionBroadcast = r2.Translator.createAction("broadcast_msg", baseActRtGrp.Id, self:textAdapter(self.BroadcastText)) - - actions = {action2, action3, actionBroadcast} - end - - local rtAction = r2.Translator.createAction("multi_actions", actions) - - - --Autodeactivate after having triggered? - r2.Translator.translateAiGroupEvent("user_event_9", self, context, rtAction) - end - - r2.Translator.translateFeatureActivation(self, context) - -end - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - local prefix = "" - - if rtNpcGrp.Id and rtNpcGrp.Id ~= "" then - prefix = r2:getNamespace() .. rtNpcGrp.Id.."." - end - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1); - return action1, action1 - elseif condition.Condition.Type == "is inactive" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0); - return action1, action1 - elseif condition.Condition.Type == "in progress" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v2", 1 ); - return action1, action1 - elseif condition.Condition.Type == "is succeeded" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v3", 1 ); - return action1, action1 - else - assert(nil) - end - return nil,nil -end - - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if event.Event.Type == "succeeded" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 9) - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.createComponent = function(x, y) - - local contextualText = i18n.get("uiR2EdSceneryObjectInteractionTaskStep_ContextualText"):toUtf8() - local missionText = i18n.get("uiR2EdSceneryObjectInteractionTaskStep_MissionText"):toUtf8() - local notValidatedText = i18n.get("uiR2EdSceneryObjectInteractionTaskStep_NotValidatedText"):toUtf8() - local broadcastText = i18n.get("uiR2EdSceneryObjectInteractionTaskStep_BroadcastText"):toUtf8() - local missionSucceedText = i18n.get("uiR2EdSceneryObjectInteractionTaskStep_MissionSucceedTextText"):toUtf8() - - - local comp = r2.newComponent("SceneryObjectInteractionTaskStep") - assert(comp) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.bot_chat") - comp.Name = r2:genInstanceName(i18n.get("uiR2EdSceneryObjectInteractionTaskStep")):toUtf8() - - comp.ContextualText = contextualText - comp.MissionText = missionText - comp.NotValidatedText = notValidatedText - comp.BroadcastText = broadcastText - comp.MissionSucceedText = missionSucceedText - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) --- comp.ItemQty = 1 - - comp._Seed = os.time() - - return comp -end - -component.create = function() - - r2:checkAiQuota() - - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'SceneryObjectInteractionTaskStep' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("SceneryObjectInteractionTaskStep") == 1 then - r2.displayFeatureHelp("SceneryObjectInteractionTaskStep") - end - r2.requestNewAction(i18n.get("uiR2EDNewSceneryObjectInteractionTaskStepAction")) - local component = feature.Components.SceneryObjectInteractionTaskStep.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'SceneryObjectInteractionTaskStep' position") - end - local creature = r2.Translator.getDebugCreature("object_component_bot_chat.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureSceneryObjectInteractionTaskStep") -end - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdSceneryObjectInteractionTaskStep") - logicEntityMenu:addLine(ucstring(name), "lua", "", "SceneryObjectInteractionTaskStep") -end - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["succeeded"] = { menu=i18n.get( "uiR2Event0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskSuccess" ):toUtf8()}, - - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - ["is succeeded"] = { menu=i18n.get( "uiR2Test0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Test1TaskSuccess" ):toUtf8()}, - ["in progress"] = { menu=i18n.get( "uiR2Test0InProgress" ):toUtf8(), - text=i18n.get( "uiR2Test1InProgress" ):toUtf8()}, - } - } - return logicTranslations -end - - -r2.Features["SceneryObjectInteractionTaskStep"] = feature - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_scenery_object_remover.lua b/code/ryzom/common/data_common/r2/r2_features_scenery_object_remover.lua deleted file mode 100644 index 608c574d4..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_scenery_object_remover.lua +++ /dev/null @@ -1,448 +0,0 @@ --- In Translation file --- Category : uiR2EdSceneryObjectRemover -- --- CreationFrom : uiR2EdSceneryObjectRemoverParameters - - -r2.Features.SceneryObjectRemoverFeature = {} - -local feature = r2.Features.SceneryObjectRemoverFeature - -feature.Name="SceneryObjectRemoverFeature" - -feature.Description="Removes scenery objects at runtime" - -feature.Components = {} - -feature.Components.SceneryObjectRemover = - { - BaseClass="LogicEntity", - Name="SceneryObjectRemover", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "sceneryObjectRemoverDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - Parameters = {}, - - ApplicableActions = { "activate", "deactivate", "remove objects"}, - - Events = {"removed objects"}, - - Conditions = { "is active", "is inactive", "has removed objects", "has not removed objects"}, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - ----------------------------------------------------------------------------------------------- - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible= false}, - {Name="Components", Type="Table"}, - {Name= "Ghosts", Type = "Table", Visible = false }, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name= "Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="SceneryObjectNumber", Type="Number", Category="uiR2EDRollout_Scenery_Objects", WidgetStyle="EnumDropDown", - Enum={"1", "2", "3", "4", "5"}, DefaultValue="0"}, - {Name="SceneryObject1Id", Type="RefId", Category="uiR2EDRollout_Scenery_Objects",PickFunction="r2:canPickSceneryObject", SetRefIdFunction="r2:setSceneryObjectTarget", Translation="uiR2EDProp_SceneryObject1Id", Visible= function(this) return this:displayRefId(1) end}, - {Name="SceneryObject2Id", Type="RefId", Category="uiR2EDRollout_Scenery_Objects",PickFunction="r2:canPickSceneryObject", SetRefIdFunction="r2:setSceneryObjectTarget", Translation="uiR2EDProp_SceneryObject2Id", Visible= function(this) return this:displayRefId(2) end}, - {Name="SceneryObject3Id", Type="RefId", Category="uiR2EDRollout_Scenery_Objects",PickFunction="r2:canPickSceneryObject", SetRefIdFunction="r2:setSceneryObjectTarget", Translation="uiR2EDProp_SceneryObject3Id", Visible= function(this) return this:displayRefId(3) end}, - {Name="SceneryObject4Id", Type="RefId", Category="uiR2EDRollout_Scenery_Objects",PickFunction="r2:canPickSceneryObject", SetRefIdFunction="r2:setSceneryObjectTarget", Translation="uiR2EDProp_SceneryObject4Id", Visible= function(this) return this:displayRefId(4) end}, - {Name="SceneryObject5Id", Type="RefId", Category="uiR2EDRollout_Scenery_Objects",PickFunction="r2:canPickSceneryObject", SetRefIdFunction="r2:setSceneryObjectTarget", Translation="uiR2EDProp_SceneryObject5Id", Visible= function(this) return this:displayRefId(5) end}, - }, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - - translate = function(this, context) - r2.Translator.translateAiGroup(this, context) - --r2.Translator.translateFeatureActivation(this, context) - local rtNpcGrp = r2.Translator.getRtGroup(context, this.InstanceId) - assert(rtNpcGrp) - if this.Active and this.Active == 1 then - local action1 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Active", 1) - local action2 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "v1", 0) - local action3 = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 4) - local retAction = r2.Translator.createAction("multi_actions", {action1, action2, action3}) - r2.Translator.translateAiGroupEvent("start_of_state" , this, context, retAction) - else - local action1 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Active", 0) - local action2 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "v1", 0) - local retAction = r2.Translator.createAction("multi_actions", {action1, action2}) - r2.Translator.translateAiGroupEvent("start_of_state" , this, context, retAction) - end - end - } - -------------------------------------------------------------------------------------------------------------------------- - - -local component = feature.Components.SceneryObjectRemover - -function component:displayRefId(index) - local nbScObj = self.SceneryObjectNumber + 1 - if index <= nbScObj then - return true - end - return false -end - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - - if (action.Action.Type == "remove objects") then - local actionTrigger = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 6) - local actionSetValue = r2.Translator.createAction("set_value", rtNpcGrp.Id, "v1", 1) - local despawnActions = {} - local i = 1 - while i <= component.SceneryObjectNumber + 1 do - local rtScenObj = r2.Translator.getRtGroup(context, component["SceneryObject"..i.."Id"]) - if rtScenObj then - local actionDespawn = r2.Translator.createAction("despawn", rtScenObj.Id) - table.insert(despawnActions, actionDespawn) - end - i = i + 1 - end - - local removedEvent = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 6) - - table.insert(despawnActions, actionTrigger) - table.insert(despawnActions, actionSetValue) - table.insert(despawnActions, removedEvent) - - local retAction = r2.Translator.createAction("condition_if", r2:getNamespace()..rtNpcGrp.Id..".Active == 1", - r2.Translator.createAction("condition_if", r2:getNamespace()..rtNpcGrp.Id..".v1 == 0", - r2.Translator.createAction("multi_actions", despawnActions)) - ) - return retAction, retAction - end - - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if condition.Condition.Type == "has removed objects" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v1", 1); - return action1, action1 - elseif condition.Condition.Type == "has not removed objects" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v1", 0); - return action1, action1 - end - return r2.Translator.getFeatureActivationCondition(condition, rtNpcGrp) -end - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - if eventType == "removed objects" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 6) - end - - return nil, nil - -end - --------------------------------------------------------------------------------------------------------------------- -local sceneryObjectRemoverDisplayerTable = clone(r2:propertySheetDisplayer()) - --- --- If the message is received by a client that didn't request the modification, we must make sure this client --- doesn't modify the data because it has already been performed by the initial client. --- -local function checkPickedEntity(this, instanceId, attributeName) - - if instanceId == "" then - return false - end - local tmpInstance = r2:getInstanceFromId(instanceId) - assert(tmpInstance) - - local i = 1 - while i < 6 do - local attrName = "Npc" ..i.. "Id" - if attrName ~= attributeName and this[attrName] == tmpInstance.InstanceId then - --if not tmpInstance.User.SelfModified or tmpInstance.User.SelfModified == false then - -- messageBox("'"..tmpInstance.Name.."' has already been picked.") - --else - -- tmpInstance.User.SelfModified = false - --end - return false - end - i = i + 1 - end - - return true -end - - - -local oldOnAttrModified = sceneryObjectRemoverDisplayerTable.onAttrModified - -function sceneryObjectRemoverDisplayerTable:onAttrModified(instance, attributeName) - --if not instance.User.SelfModified then return end - -- call base version - oldOnAttrModified(self, instance, attributeName) - - if attributeName == "NpcNumber" then - local propertySheet = r2:getPropertySheet(instance) - local nbScObjs = instance.SceneryObjectNumber + 1 - local i = 1 - while i <= 5 do - if i > nbScObjs then - local name = "SceneryObject"..tostring(i).."Id" - local refId = propertySheet:find(name) - local refIdName = refId:find("name") - refIdName.hardtext = "NONE" - r2.requestSetNode(instance.InstanceId, name, "") - end - i = i + 1 - end - propertySheet.Env.updatePropVisibility() - return - end - - if string.find(attributeName, "Id") == nil or attributeName == "InstanceId" then return end - - local propertySheet = r2:getPropertySheet(instance) - local refId = propertySheet:find(attributeName) - local refIdName = refId:find("name") - - local instanceId = instance[attributeName] - if instanceId == "" then - refIdName.hardtext = "NONE" - return - end - - if checkPickedEntity(instance, instanceId, attributeName) then - local tmpInstance = r2:getInstanceFromId(instanceId) - refIdName.hardtext = tmpInstance.Name - else - r2.requestSetNode(instance.InstanceId, attributeName, "") - end - -end - -function sceneryObjectRemoverDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true - -end - - -local function reattributeIdOnHrcMove(scObjRemover, group, targetAttr) - local propertySheet = r2:getPropertySheet(scObjRemover) - local refId = propertySheet:find(targetAttr) - local refIdName = refId:find("name") - - r2.requestSetNode(scObjRemover.InstanceId, targetAttr, group.InstanceId) - refIdName.hardtext = group.Name - -end - - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - local group = tmpInstance.ParentInstance - if group:isKindOf("NpcGrpFeature") then - reattributeIdOnHrcMove(self, group, targetAttr) - end - tmpInstance.User.SelfModified = false - end - -end - - - - -function r2:sceneryObjectRemoverDisplayer() - return sceneryObjectRemoverDisplayerTable -- returned shared displayer to avoid wasting memory -end --------------------------------------------------------------------------------------------------------------------- - - -component.createGhostComponents= function(this, act) - -end - -component.createComponent = function(x, y, tvalue) - - local comp = r2.newComponent("SceneryObjectRemover") - assert(comp) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.user_event") - comp.Name = r2:genInstanceName(i18n.get("uiR2EDRollout_SceneryObjectRemover")):toUtf8() - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - comp._Seed = os.time() - - comp.SceneryObjectId = r2.RefId("") - comp.SceneryObject2Id = r2.RefId("") - comp.SceneryObject3Id = r2.RefId("") - comp.SceneryObject4Id = r2.RefId("") - comp.SceneryObject5Id = r2.RefId("") - comp.SceneryObjectNumber = 0 - return comp -end - - -component.create = function() - if r2:getLeftQuota() <= 0 then - r2:makeRoomMsg() - return - end - local function paramsOk(resultTable) - - - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - if showAgain == 1 then - r2.setDisplayInfo("SceneryObjectRemover", 0) - else r2.setDisplayInfo("SceneryObjectRemover", 1) end - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local component = feature.Components.SceneryObjectRemover.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'SceneryObjectRemoverFeature' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'SceneryObjectRemoverFeature' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("SceneryObjectRemover") == 1 then - r2.displayFeatureHelp("SceneryObjectRemover") - end - r2.requestNewAction(i18n.get("uiR2EDNewSceneryObjectRemoverFeatureAction")) - local component = feature.Components.SceneryObjectRemover.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'SceneryObjectRemoverFeature' position") - end - local creature = r2.Translator.getDebugCreature("object_component_user_event.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureSceneryObjectRemover") -end - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EDRollout_SceneryObjectRemover") - logicEntityMenu:addLine(ucstring(name), "lua", "", "SceneryObject") -end - - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - ["remove objects"] = { menu=i18n.get( "uiR2AA0RemoveObject" ):toUtf8(), - text=i18n.get( "uiR2AA1RemoveObject" ):toUtf8()}, - }, - ["Events"] = { - ["removed objects"] = { menu=i18n.get( "uiR2Event0RemovedObjects" ):toUtf8(), - text=i18n.get( "uiR2Event1RemovedObjects" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - ["has removed objects"] = { menu=i18n.get( "uiR2Test0HasRemoved" ):toUtf8(), - text=i18n.get( "uiR2Test1HasRemoved" ):toUtf8()}, - ["has not removed objects"] = { menu=i18n.get( "uiR2Test0HasNotRemoved" ):toUtf8(), - text=i18n.get( "uiR2Test1HasNotRemoved" ):toUtf8()} - } - } - return logicTranslations -end - - -r2.Features["SceneryObjectRemoverFeature"] = feature diff --git a/code/ryzom/common/data_common/r2/r2_features_talk_to.lua b/code/ryzom/common/data_common/r2/r2_features_talk_to.lua deleted file mode 100644 index ec42e68c5..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_talk_to.lua +++ /dev/null @@ -1,529 +0,0 @@ - --- In Translation file --- Category : uiR2EdTalkTo -- --- CreationFrom : uiR2EdTalkToParameters - - -r2.Features.TalkToFeature = {} - -local feature = r2.Features.TalkToFeature - -feature.Name="TalkToFeature" - -feature.Description="A feature that makes a NPC request the player to talk to an other player" - -feature.Components = {} - -feature.Components.TalkTo = - { - BaseClass="LogicEntity", - Name="TalkTo", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "talkToDisplayer", - - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - - ApplicableActions = { "activate", "deactivate"}, - - Events = {"activation", "deactivation", "wait validation", "mission asked", "succeeded"}, - - Conditions = { "is active", "is inactive", "is succeeded" }, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table"}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="MissionGiver", Type="RefId", PickFunction="r2:canPickTalkingNpc", SetRefIdFunction="r2:setTalkingNpc"}, - {Name="MissionTarget", Type="RefId", PickFunction="r2:canPickTalkingNpc", SetRefIdFunction="r2:setTalkingNpc"}, - - --{Name="ContextualText", Type="String", ValidationFun="r2.refuseEmptyString", Category="uiR2EDRollout_TextToSay" }, - {Name="ContextualText", Type="String", Category="uiR2EDRollout_TextToSay", MaxNumChar="100" }, - {Name="MissionText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="WaitValidationText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="MissionSucceedText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="BroadcastText", Type="String", Category="uiR2EDRollout_TextToSay", DefaultValue="", DefaultInBase = 1}, - - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="Repeatable", Type="Number", WidgetStyle="Boolean", DefaultValue="0"} - - }, - - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - } - - - -local component = feature.Components.TalkTo - -function component.pretranslate(this, context) - local prop = component.Prop - r2.Translator.CheckPickedEntity(this, prop) - r2.Translator.createAiGroup(this, context) -end - - - -local talkToDisplayerTable = clone(r2:propertySheetDisplayer()) - -local oldOnAttrModified = talkToDisplayerTable.onAttrModified - -function talkToDisplayerTable:onAttrModified(instance, attributeName) - oldOnAttrModified(instance, attributeName) - - local propertySheet = r2:getPropertySheet(instance) - - local targetRefId = propertySheet:find("MissionTarget") - local targetName = targetRefId:find("name") - - local giverRefId = propertySheet:find("MissionGiver") - local giverName = propertySheet:find("MissionGiver"):find("name") - - - - if attributeName == "MissionGiver" then - - local instanceId = instance[attributeName] - if instanceId == "" then - giverName.hardtext = "NONE" - return - end - - if instance["MissionTarget"] == instance[attributeName] then - giverName.hardtext = "NONE" - r2.requestSetNode(instance.InstanceId, "MissionGiver", "") - else - giverName.hardtext = r2:getInstanceFromId(instance[attributeName]).Name - end - return - end - - if attributeName == "MissionTarget" then - local instanceId = instance[attributeName] - if instanceId == "" then - targetName.hardtext = "NONE" - return - end - - if instance["MissionGiver"] == instance[attributeName] then - targetName.hardtext = "NONE" - r2.requestSetNode(instance.InstanceId, "MissionTarget", "") - else - targetName.hardtext = r2:getInstanceFromId(instance[attributeName]).Name - end - return - end - - return -end - -function talkToDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true -end - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - if tmpInstance.ParentInstance and tmpInstance.ParentInstance:isKindOf("NpcGrpFeature") then - r2.requestSetNode(self.InstanceId, targetAttr, r2.RefId("")) - end - end - -end - -function r2:talkToDisplayer() - return talkToDisplayerTable -- returned shared displayer to avoid wasting memory -end - - -function component:textAdapter(text) - assert(self) - assert(type(text) == "string") - local str = text - local mission_giver = "" - local mission_target = "" - - if tostring(self.MissionGiver) ~= "" then - local giver = r2:getInstanceFromId(self.MissionGiver) - if giver then mission_giver = giver.Name end - end - - if tostring(self.MissionTarget) ~= "" then - local target = r2:getInstanceFromId(self.MissionTarget) - if target then mission_target = target.Name end - end - - str=string.gsub(str, "", mission_giver) - str=string.gsub(str, "", mission_target) - return str -end - - -function component:translate(context) - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - - r2.Translator.translateAiGroup(self, context) - - local giver = r2:getInstanceFromId(self.MissionGiver) - - - - local target = r2:getInstanceFromId(self.MissionTarget) - - local rtTargetGrp = nil - if target then - rtTargetGrp = r2.Translator.getRtGroup(context, target.InstanceId) - end - - ----------------- - --Contextual text - do - if target then - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, -- Active - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v3", 1, -- giver has been spoken to - r2.Translator.createAction("talk_to", rtGrp.Id, self:textAdapter(self.ContextualText)) ) - ) - r2.Translator.translateAiGroupEvent("player_target_npc", target, context, rtAction) - end - end - - ------------------- - --Mission text - if giver then - local rtGiverGrp = r2.Translator.getRtGroup(context, giver.InstanceId) - --local rtAction2 = r2.Translator.createAction("condition_if", r2:getNamespace()..rtGrp.Id..".Active == 1") - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, -- Active - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("npc_say", self:textAdapter(self.MissionText), rtGiverGrp.Id ..":"..giver.Name), - r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1 ), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 2) }) - ) - - r2.Translator.translateAiGroupEvent("player_target_npc", giver, context, rtAction) - end - - --if there's no giver, target should speak anyway - local v3 - if giver == nil then v3 = 1 else v3 = 0 end - ------------------- - --Start of state - - - do - local action = r2.Translator.createAction("user_event_trigger", rtGrp.Id, 7) - r2.Translator.translateAiGroupEvent("start_of_state" , self, context, action) - end - - do - - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", self.Active) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) -- Success - local rtAction4 = r2.Translator.createAction("set_value", rtGrp.Id, "v3", v3 ) -- Has - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3, rtAction4, } ) - --r2.Translator.translateAiGroupEvent("start_of_state" , self, context, rtAction) - r2.Translator.translateAiGroupEvent("user_event_7", self, context, rtAction) - end - - do - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", self.Repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) -- Success - local rtAction4 = r2.Translator.createAction("set_value", rtGrp.Id, "v3", v3 ) -- Has - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3, rtAction4, } ) - r2.Translator.translateAiGroupEvent("user_event_4", self, context, rtAction) - end - - do - local action2 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 1, -- Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v3", v3 ) - }) - ); - local action3 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 0, -- Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0 ) , - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 1 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v3", v3 ), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 5) - }) - ); - - local rtAction - local baseAct = r2.Scenario:getBaseAct() - local baseActRtGrp = r2.Translator.getRtGroup(context, baseAct.InstanceId) - local actionBroadcast = r2.Translator.createAction("broadcast_msg",baseActRtGrp.Id, self:textAdapter(self.BroadcastText) ) - - if rtTargetGrp then - local action1 = r2.Translator.createAction("npc_say", self:textAdapter(self.MissionSucceedText), rtTargetGrp.Id ..":"..target.Name); - rtAction = r2.Translator.createAction("multi_actions", {action1, action2, action3, actionBroadcast}) - else - rtAction = r2.Translator.createAction("multi_actions", {action2, action3, actionBroadcast}) - end - - r2.Translator.translateAiGroupEvent("user_event_3", self, context, rtAction) - end - - - - - - do - if rtTargetGrp then - local rtAction = r2.Translator.createAction("npc_say", self:textAdapter(self.WaitValidationText), rtTargetGrp.Id ..":"..target.Name); - r2.Translator.translateAiGroupEvent("user_event_1", self, context, rtAction) - end - end - r2.Translator.translateFeatureActivation(self, context) - - --- ()receiveMissionItems("system_mp.sitem:2;system_mp_choice.sitem:1;system_mp_supreme.sitem:3", "Give some stuff hי!", @groupToNotify); - - - - -end - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1); - return action1, action1 - elseif condition.Condition.Type == "is inactive" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0); - return action1, action1 - elseif condition.Condition.Type == "is succeeded" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v2", 1); - return action1, action1 - - else - assert(nil) - end - return nil,nil -end - - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "mission asked" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 2) - elseif eventType == "wait validation" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 1) - elseif eventType == "succeeded" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 3) - - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.createComponent = function(x, y) - - local contextualText = i18n.get("uiR2EdTalkTo_ContextualText"):toUtf8() - local missionText = i18n.get("uiR2EdTalkTo_MissionText"):toUtf8() - local waitValidationText = i18n.get("uiR2EdTalkTo_WaitValidationText"):toUtf8() - local missionSucceededText = i18n.get("uiR2EdTalkTo_MissionSucceededText"):toUtf8() - local broadcastText = i18n.get("uiR2EdTalkTo_BroadcastText"):toUtf8() - - local comp = r2.newComponent("TalkTo") - assert(comp) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.bot_chat") - comp.Name = r2:genInstanceName(i18n.get("uiR2EdTalkTo")):toUtf8() - - comp.ContextualText = contextualText - comp.MissionText = missionText - comp.WaitValidationText = waitValidationText - comp.MissionSucceedText = missionSucceededText - comp.BroadcastText = broadcastText - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) --- comp.ItemQty = 1 - - comp._Seed = os.time() - - return comp -end - -component.create = function() - - r2:checkAiQuota() - - - local function paramsOk(resultTable) - - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - - if showAgain == 1 then - r2.setDisplayInfo("TalkToForm", 0) - else r2.setDisplayInfo("TalkToForm", 1) end - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local component = feature.Components.TalkTo.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'TalkTo' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'TalkTo' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("TalkTo") == 1 then - r2.displayFeatureHelp("TalkTo") - end - r2.requestNewAction(i18n.get("uiR2EDNewTalkToFeatureAction")) - local component = feature.Components.TalkTo.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'TalkTo' position") - end - local creature = r2.Translator.getDebugCreature("object_component_bot_chat.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureTalkTo") -end - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdTalkTo") - logicEntityMenu:addLine(ucstring(name), "lua", "", "TalkTo") -end - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["mission asked"] = { menu=i18n.get( "uiR2Event0MissionGiven" ):toUtf8(), - text=i18n.get( "uiR2Event1MissionGiven" ):toUtf8()}, - ["wait validation"] = { menu=i18n.get( "uiR2Event0TaskWaitValidation" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskWaitValidation" ):toUtf8()}, - ["succeeded"] = { menu=i18n.get( "uiR2Event0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskSuccess" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - ["is succeeded"] = { menu=i18n.get( "uiR2Test0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Test1TaskSuccess" ):toUtf8()}, - } - } - return logicTranslations -end - - -r2.Features["TalkTo"] = feature - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_target_mob.lua b/code/ryzom/common/data_common/r2/r2_features_target_mob.lua deleted file mode 100644 index 7bd2bbb43..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_target_mob.lua +++ /dev/null @@ -1,436 +0,0 @@ - -r2.Features.TargetMob = {} - -local feature = r2.Features.TargetMob - -feature.Name="TargetMobFeature" - -feature.Description="" - -feature.Components = {} - -feature.Components.TargetMob = - { - BaseClass="LogicEntity", - Name="TargetMob", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "targetMobDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - - ApplicableActions = { "activate", "deactivate"}, - - Events = {"activation", "deactivation", "wait validation", "mission asked", "succeeded"}, - - Conditions = { "is active", "is inactive", "is succeeded" }, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table"}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="MissionGiver", Type="RefId", PickFunction="r2:canPickTalkingNpc", SetRefIdFunction="r2:setTalkingNpc"}, - {Name="MissionTarget", Type="RefId", PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget"}, - {Name="ValidationNeeded", Category="uiR2EDRollout_TextToSay", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="ContextualText", Type="String", Category="uiR2EDRollout_TextToSay", MaxNumChar="100" }, - {Name="MissionText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="WaitValidationText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="MissionSucceedText", Type="String", Category="uiR2EDRollout_TextToSay", Visible= function(this) - return this:IsValidationNeeded() end }, - {Name="BroadcastText", Type="String", Category="uiR2EDRollout_TextToSay", DefaultValue="", DefaultInBase = 1}, - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="Repeatable", Type="Number", WidgetStyle="Boolean", DefaultValue="0"}, - - - }, - - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - - - } - - -local component = feature.Components.TargetMob - -function component:IsValidationNeeded() - local validationNeeded = self.ValidationNeeded - if validationNeeded == 1 then - return true - end - return false -end - -local targetMobDisplayerTable = clone(r2:propertySheetDisplayer()) - -local oldOnAttrModified = targetMobDisplayerTable.onAttrModified -function targetMobDisplayerTable:onAttrModified(instance, attributeName) - - oldOnAttrModified(self, instance, attributeName) - r2:propertySheetDisplayer():onAttrModified(instance, attributeName) - - local propertySheet = r2:getPropertySheet(instance) - - if attributeName == "ValidationNeeded" then - local propertySheet = r2:getPropertySheet(instance) - propertySheet.Env.updatePropVisibility() - return - end - - return -end - -function targetMobDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true -end - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - if tmpInstance.ParentInstance and tmpInstance.ParentInstance:isKindOf("NpcGrpFeature") then - r2.requestSetNode(self.InstanceId, targetAttr, r2.RefId("")) - end - end - -end - -function r2:targetMobDisplayer() - return targetMobDisplayerTable -- returned shared displayer to avoid wasting memory -end - -function component:textAdapter(text) - - assert(self) - assert(type(text) == "string") - local str = text - local mission_giver = "" - local mission_target = "" - - if tostring(self.MissionGiver) ~= "" then - local giver = r2:getInstanceFromId(self.MissionGiver) - if giver then mission_giver = giver.Name end - end - - if tostring(self.MissionTarget) ~= "" then - local target = r2:getInstanceFromId(self.MissionTarget) - if target then mission_target = target.Name end - end - - str=string.gsub(str, "", mission_giver) - str=string.gsub(str, "", mission_target) - return str -end - - -function component:translate(context) - r2.Translator.translateAiGroup(self, context) - - local validationNeeded = self.ValidationNeeded - - if self.MissionGiver == nil then return end - local giver = r2:getInstanceFromId(self.MissionGiver) - if not giver then return end - local rtGiverGrp = r2.Translator.getRtGroup(context, giver.InstanceId) - assert(rtGiverGrp) - - if self.MissionTarget == nil then return end - local target = r2:getInstanceFromId(self.MissionTarget) - if not target then return end - local rtTargetGrp = r2.Translator.getRtGroup(context, target.InstanceId) - assert(rtTargetGrp) - - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - - -- Start of state - r2.Translator.Tasks.startOfStateLogic(self, context, rtGrp) - - --Activation - r2.Translator.Tasks.activationLogic(self, context, rtGrp) - - --Deactivation - r2.Translator.Tasks.deactivationLogic(self, context, rtGrp) - - --Mission given on user_event_3 - r2.Translator.Tasks.setStatusLogic(self, context, rtGrp) - - --Mission successful on user_event_9 - r2.Translator.Tasks.successNoBroadcastLogic(self, context, rtGrp) - - --If giver validates the task - if validationNeeded == 1 then - r2.Translator.Tasks.validationByMissionGiver(self, giver, context, rtGrp) - end - - - -- Texte contextuel de mission - do - local actionSet = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 2 ) - - local baseAct = r2.Scenario:getBaseAct() - local baseActRtGrp = r2.Translator.getRtGroup(context, baseAct.InstanceId) - local actionBroadcast = r2.Translator.createAction("broadcast_msg",baseActRtGrp.Id, self:textAdapter(self.BroadcastText) ) - - local actions = {} - if validationNeeded == 0 then - local actionEvent = r2.Translator.createAction("user_event_trigger", rtGrp.Id, 9) - actions = {actionSet, actionEvent, actionBroadcast} - else - actions = {actionSet, actionBroadcast} - end - - local rtAction = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, -- Active - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 1, -- giver has been spoken to - r2.Translator.createAction("multi_actions", actions) - )) - r2.Translator.translateAiGroupEvent("player_target_npc", target, context, rtAction) - end - - -- Mission giver must either give the mission (1st time) or say WaitValidationText - r2.Translator.Tasks.giverLogic(self, giver, context, rtGrp) - - r2.Translator.translateFeatureActivation(self, context) -end - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1); - return action1, action1 - elseif condition.Condition.Type == "is inactive" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0); - return action1, action1 - elseif condition.Condition.Type == "is succeeded" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v3", 1); - return action1, action1 - - else - assert(nil) - end - return nil,nil -end - - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "mission asked" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 3) - elseif eventType == "wait validation" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 2) - elseif eventType == "succeeded" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 9) - - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.createComponent = function(x, y) - - local contextualText = i18n.get("uiR2EdTargetMob_ContextualText"):toUtf8() - local missionText = i18n.get("uiR2EdTargetMob_MissionText"):toUtf8() - local waitValidationText = i18n.get("uiR2EdTargetMob_WaitValidationText"):toUtf8() - local missionSucceededText = i18n.get("uiR2EdTargetMob_MissionSucceededText"):toUtf8() - local broadcastText = i18n.get("uiR2EdTargetMob_BroadcastText"):toUtf8() - - local comp = r2.newComponent("TargetMob") - assert(comp) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.bot_chat") - comp.Name = r2:genInstanceName(i18n.get("uiR2EdTargetMob")):toUtf8() - - comp.ContextualText = contextualText - comp.MissionText = missionText - comp.WaitValidationText = waitValidationText - comp.MissionSucceedText = missionSucceededText - comp.BroadcastText= broadcastText - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) --- comp.ItemQty = 1 - - comp._Seed = os.time() - - return comp -end - -component.create = function() - if r2:getLeftQuota() <= 0 then - r2:makeRoomMsg() - return - end - local function paramsOk(resultTable) - - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - - if showAgain == 1 then - r2.setDisplayInfo("TargetMobForm", 0) - else r2.setDisplayInfo("TargetMobForm", 1) end - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local component = feature.Components.TargetMob.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'TargetMob' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'TargetMob' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("TargetMob") == 1 then - r2.displayFeatureHelp("TargetMob") - end - r2.requestNewAction(i18n.get("uiR2EDNewTargetMobFeatureAction")) - local component = feature.Components.TargetMob.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'TargetMob' position") - end - local creature = r2.Translator.getDebugCreature("object_component_bot_chat.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureTargetMob") -end - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdTargetMob") - logicEntityMenu:addLine(ucstring(name), "lua", "", "TargetMob") -end - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["mission asked"] = { menu=i18n.get( "uiR2Event0MissionGiven" ):toUtf8(), - text=i18n.get( "uiR2Event1MissionGiven" ):toUtf8()}, - ["wait validation"] = { menu=i18n.get( "uiR2Event0TaskWaitValidation" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskWaitValidation" ):toUtf8()}, - ["succeeded"] = { menu=i18n.get( "uiR2Event0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskSuccess" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - ["is succeeded"] = { menu=i18n.get( "uiR2Test0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Test1TaskSuccess" ):toUtf8()}, - } - } - return logicTranslations -end - - -r2.Features["TargetMob"] = feature - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_time_trigger.lua b/code/ryzom/common/data_common/r2/r2_features_time_trigger.lua deleted file mode 100644 index ed6449bf4..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_time_trigger.lua +++ /dev/null @@ -1,435 +0,0 @@ - - --- In Transalation file --- Category : uiR2EdTimeTrigger -- --- CreationFrom : uiR2EdTimeTriggerParameters --- uiR2EdtooltipCreateFeatureTimeTrigger -> tooltip - -r2.Features.TimeTriggerFeature = {} - -local feature = r2.Features.TimeTriggerFeature - -feature.Name="TimeTriggerFeature" - -feature.Description="A Time Trigger" - -feature.Components = {} - -feature.Components.TimeTriggerFeature = - { - BaseClass="LogicEntity", - Name="TimeTriggerFeature", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - Parameters = {}, - ApplicableActions = { - "Activate", "Deactivate", "Trigger", - }, - Events = { - "On Trigger", - "On Activation", - "On Desactivation" - }, - Conditions = { - "is active", "is finished" - }, - TextContexts = {}, - TextParameters = {}, - LiveParameters = {}, - ----------------------------------------------------------------------------------------------- - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText"}, - {Name="Name", Category="uiR2EDRollout_TimeTrigger", Type="String", MaxNumChar="32"}, - {Name="Components", Type="Table"}, - {Name="AtWhichHour", Type="Number", Category="uiR2EDRollout_TimeTrigger", Min="0", Max="23", Default="0"}, - {Name="uiR2EDProp_AtWhichMinute", Type="Number", Category="uiR2EDRollout_TimeTrigger", Min="0", Max="59", Default="0"}, - {Name="Cyclic", Type="Number", Category="uiR2EDRollout_TimeTrigger", WidgetStyle="Boolean", Min="0", Max="1", Default="0"}, - --- {Name="Secondes",Type="Number", Category="uiR2EDRollout_TimeTrigger", Min="0", Max="59", Default="0"} - - - }, - ----------------------------------------------------------------------------------------------- - -- from base class - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - getSelectBarSons = function(this) - return Components - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) end, - - translate = function(this, context)end, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - } - --- Specific to the component TimeTrigger -local component = feature.Components.TimeTriggerFeature - -function feature.getLogicActionActivate(entity, context, action, rtNpcGrp) - local action1 = r2.Translator.createAction("timer_enable", rtNpcGrp.Id, 0) - local action2 = r2.Translator.createAction("generic_event_trigger", rtNpcGrp.Id, 0) - local retAction = r2.Translator.createAction("multi_actions", {action1, action2}) - return retAction, retAction -end - -function feature.getLogicActionDeactivate(entity, context, action, rtNpcGrp) - local action1 = r2.Translator.createAction("timer_disable", rtNpcGrp.Id, 0) - local action2 = r2.Translator.createAction("generic_event_trigger", rtNpcGrp.Id, 1) - local retAction = r2.Translator.createAction("multi_actions", {action1, action2}) - return retAction, retAction -end - - -function feature.getLogicActionTrigger(entity, context, action, rtNpcGrp) - local retAction = r2.Translator.createAction("timer_trigger", rtNpcGrp.Id, 0) - assert(retAction) - return retAction, retAction -end - -function feature.getLogicActionAdd10Seconds(entity, context, action, rtNpcGrp) - local retAction = r2.Translator.createAction("timer_add", rtNpcGrp.Id, 0, 10) - return retAction, retAction -end - -function feature.getLogicActionAdd1Minute(entity, context, action, rtNpcGrp) - local retAction = r2.Translator.createAction("timer_add", rtNpcGrp.Id, 0, 60) - return retAction, retAction -end - -function feature.getLogicActionSub10Seconds(entity, context, action, rtNpcGrp) - local retAction = r2.Translator.createAction("timer_sub", rtNpcGrp.Id, 0, 10) - return retAction, retAction - -end - -function feature.getLogicActionSub1Minute(entity, context, action, rtNpcGrp) - local retAction = r2.Translator.createAction("timer_sub", rtNpcGrp.Id, 0, 60) - return retAction, retAction -end - - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - - local funs = { - ["Activate"] = feature.getLogicActionActivate, - ["Deactivate"] = feature.getLogicActionDeactivate, - ["Pause"] = feature.getLogicActionPause, - ["Resume"] = feature.getLogicActionResume, - ["Trigger"] = feature.getLogicActionTrigger, - ["Add 10 Seconds"] = feature.getLogicActionAdd10Seconds, - ["Add 1 minute"] = feature.getLogicActionAdd1Minute, - ["Sub 10 seconds"] = feature.getLogicActionSub0Seconds, - ["Sub 1 minute"] = feature.getLogicActionSub1Minute, - } - - - local fun = funs[ action.Action.Type ] - if fun then - firstAction, lastAction = fun(entity, context, action, rtNpcGrp) - end - - return firstAction, lastAction -end - - - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("timer_is_enable", rtNpcGrp.Id, 0); - local action2 = r2.Translator.createAction("condition_if", "is_enable == 1" ); - local multiactions= r2.Translator.createAction("multi_actions", {action1, action2}); - return multiactions, action2 - elseif condition.Condition.Type == "is paused" then - local action1 = r2.Translator.createAction("timer_is_enable", rtNpcGrp.Id, 0); - local action2 = r2.Translator.createAction("timer_is_suspended", rtNpcGrp.Id, 0); - local action31 = r2.Translator.createAction("condition_if", "is_suspended == 1"); - local action3 = r2.Translator.createAction("condition_if", "is_enable == 1", action31); - local multiactions = r2.Translator.createAction("multi_actions", {action1, action2, action3}); - table.insert(action3.Children, action31) - return multiactions, action31 - elseif condition.Condition.Type == "is running" then - local action1 = r2.Translator.createAction("timer_is_enable", rtNpcGrp.Id, 0); - local action2 = r2.Translator.createAction("timer_is_suspended", rtNpcGrp.Id, 0); - local action31 = r2.Translator.createAction("condition_if", "is_suspended == 0"); - local action3 = r2.Translator.createAction("condition_if", "is_enable == 1", action31); - local multiactions = r2.Translator.createAction("multi_actions", {action1, action2, action3}); - table.insert(action3.Children, action31) - return multiactions, action3 - elseif condition.Condition.Type == "is finished" then - local action1 = r2.Translator.createAction("timer_is_enable", rtNpcGrp.Id, 0); - local action2 = r2.Translator.createAction("condition_if", "is_enable == 0" ); - local multiactions= r2.Translator.createAction("multi_actions", {action1, action2}); - return multiactions, action2 - else - assert(nil) - end - return nil,nil -end - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "On Trigger" then - eventHandler, firstCondition, lastCondition = r2.Translator.createEvent("timer_t0_triggered", "", rtNpcGrp.Id) - elseif eventType == "On Activation" then - return r2.Translator.getComponentGenericEvent(rtNpcGrp, 0) - elseif eventType == "On Desactivation" then - return r2.Translator.getComponentGenericEvent(rtNpcGrp, 1) - elseif eventType == "On Pause" then - return r2.Translator.getComponentGenericEvent(rtNpcGrp, 2) - end - - - return eventHandler, firstCondition, lastCondition -end - - - - --- feature part - - - -feature.createComponent = function(x, y, hours, minutes, cyclic) - - local comp = r2.newComponent("TimeTriggerFeature") - assert(comp) - - comp.Base = "palette.entities.botobjects.time_trigger" - comp.Name = r2:genInstanceName(i18n.get("uiR2EdNameTimeTriggerFeature")):toUtf8() - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - comp.Hours = hours - comp.Minutes = minutes - comp.Cyclic = cyclic - - return comp -end - - - - - - --- TODO to up --- Register an RtNpcGrp to a specific instnaceId -r2.Translator.registerManager = function(context, comp) - local rtNpcGrp = r2.newComponent("RtNpcGrp") - table.insert(context.RtAct.NpcGrps, rtNpcGrp) - context.RtGroups[tostring(comp.InstanceId)] = rtNpcGrp - rtNpcGrp.Name = rtNpcGrp.Id -end - -feature.preTranslatFeature = function(context) - --debugInfo("Pre") - --feature.doLogic(context) - local instance = r2:getInstanceFromId(context.Feature.InstanceId); - r2.Translator.registerManager(context, context.Feature) - -end - -feature.Translator = function(context) - local rtNpcGrp = r2.Translator.getRtGroup(context, context.Feature.InstanceId) - - local aiState = r2.newComponent("RtAiState") - aiState.AiActivity = "normal" - table.insert(context.RtAct.AiStates, aiState) - table.insert(aiState.Children, rtNpcGrp.Id) - - context.Feature:translate(context) - -end --- from ihm -feature.create = function() - - if not r2:checkAiQuota() then return end - - local function paramsOk(resultTable) - - r2.requestNewAction(i18n.get("uiR2EDNewTimeTriggerFeatureAction")) - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local minutes = tonumber( resultTable["Minutes"] ) - local hours = tonumber( resultTable["Hours"] ) - local cyclic = tonumber( resultTable["Cyclic"] ) - - if not x or not y or not minutes or not hours or hours <0 or hours >=24 or minutes <0 or minutes > 59 - then - debugInfo("Can't create Component") - return - end - - local component = feature.createComponent( x, y, hours, cyclic) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - component.Minutes = minutes - component.Hours = hours - - end - - - - local function paramsCancel() - debugInfo("Cancel form for 'TimeTrigger' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'TimeTrigger' at pos (%d, %d, %d)", x, y, z)) - r2:doForm("TimeTriggerForm", {X=x, Y=y}, paramsOk, paramsCancel) - end - local function posCancel() - debugInfo("Cancel choice 'TimeTrigger' position") - end - r2:choosePos("object_component_time_trigger.creature", posOk, posCancel, "createFeatureTimeTrigger") -end - - -function feature.registerForms() - r2.Forms.TimeTriggerForm = - { - Caption = "uiR2EdTimeTriggerParameters", - Prop = - { - -- following field are tmp for property sheet building testing - {Name="Hours", Type="Number", Category="uiR2EDRollout_TimeTrigger", Min="0", Max="23", Default="0"}, - {Name="Minutes", Type="Number", Category="uiR2EDRollout_TimeTrigger", Min="0", Max="59", Default="0"}, --- {Name="Secondes", Type="Number", Category="uiR2EDRollout_TimeTrigger", Min="0", Max="59", Default="0"}, - {Name="Cyclic", Type="Number", Category="uiR2EDRollout_TimeTrigger", WidgetStyle="Boolean", Min="0", Max="1", Default="0"}, - - } - } - -end - - -feature.preTranslatFeature = function(context) - local instance = r2:getInstanceFromId(context.Feature.InstanceId); - r2.Translator.registerManager(context, context.Feature) - -end - -feature.Translator = function(context) - local rtNpcGrp = r2.Translator.getRtGroup(context, context.Feature.InstanceId) - - local aiState = r2.newComponent("RtAiState") - aiState.AiActivity = "normal" - table.insert(context.RtAct.AiStates, aiState) - table.insert(aiState.Children, rtNpcGrp.Id) - - local instance = context.Feature - r2.Translator.translateEventHandlers( context, instance, instance.Behavior.Actions, rtNpcGrp) - - do - local eventHandler = r2.Translator.createEvent("start_of_state", aiState.Id, rtNpcGrp.Id) - - local action1 = r2.Translator.createAction("generic_event_trigger", rtNpcGrp.Id, 0, time) - local action2 = r2.Translator.createAction("timer_set_daytime", rtNpcGrp.Id, 0, instance.Hours, instance.Minutes) - local action = r2.Translator.createAction("multi_actions", {action1, action2}) - - table.insert(context.RtAct.Events, eventHandler) - -- insert a npc_event_handler_action - table.insert(eventHandler.ActionsId, action.Id) - table.insert(context.RtAct.Actions, action) - end - - if instance.Cyclic == 1 then - local eventHandler =r2.Translator.createEvent("timer_t0_triggered", aiState.Id, rtNpcGrp.Id) - local action1 = r2.Translator.createAction("generic_event_trigger", rtNpcGrp.Id, 0, time) - local action2 = r2.Translator.createAction("timer_set_daytime", rtNpcGrp.Id, 0, instance.Hours, instance.Minutes) - local action = r2.Translator.createAction("multi_actions", {action1, action2}) - - table.insert(context.RtAct.Events, eventHandler) - -- insert a npc_event_handler_action - table.insert(eventHandler.ActionsId, action.Id) - table.insert(context.RtAct.Actions, action) - end - - -end - -function component:getLogicTranslations() - -- register trad - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - ["trigger"] = { menu=i18n.get( "uiR2AA0Trigger" ):toUtf8(), - text=i18n.get( "uiR2AA1Trigger" ):toUtf8()}, - }, - ["Events"] = { - ["On Activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["On Desactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["On Trigger"] = { menu=i18n.get( "uiR2Event0Trigger" ):toUtf8(), - text=i18n.get( "uiR2Event1Trigger" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is finished"] = { menu=i18n.get( "uiR2Test0TimerFinished" ):toUtf8(), - text=i18n.get( "uiR2Test1TimerFinished" ):toUtf8()}, - } - } - return logicTranslations -end - -r2.Features["TimeTriggerFeature"] = feature - diff --git a/code/ryzom/common/data_common/r2/r2_features_timed_spawn.lua b/code/ryzom/common/data_common/r2/r2_features_timed_spawn.lua deleted file mode 100644 index 0e9372b17..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_timed_spawn.lua +++ /dev/null @@ -1,453 +0,0 @@ - -r2.Features.TimedSpawner = {} - -local feature = r2.Features.TimedSpawner - -feature.Name="Timed Spawner" - - -feature.Description="" - -feature.Components = {} - -local classTimedSpawnerVersion = 1 - -feature.Components.TimedSpawner = - { - --PropertySheetHeader = r2.getDisplayButtonHeader("r2.events:openEditor()", "uiR2EdEditEventsButton"), - BaseClass="LogicEntity", - Name="TimedSpawner", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - Version=classTimedSpawnerVersion , - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "timedSpawnerDisplayer", - - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - Parameters = {}, - ApplicableActions = {"activate", "deactivate", "trigger"}, - Events = {"activation", "deactivation", "trigger"}, - Conditions = {"is active", "is inactive"}, - TextContexts = {}, - TextParameters = {}, - LiveParameters = {}, - ----------------------------------------------------------------------------------------------- - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="MobNumber", Type="Number", Category="uiR2EDRollout_Mobs", WidgetStyle="EnumDropDown", Enum={"1", "2", "3", "4", "5"}, - }, - {Name="Mob1Id", Type="RefId", Category="uiR2EDRollout_Mobs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", - Translation="uiR2EdProp_Mob1Id", Visible= function(this) return this:displayRefId(1) end}, - {Name="Mob2Id", Type="RefId", Category="uiR2EDRollout_Mobs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", - Translation="uiR2EdProp_Mob2Id", Visible= function(this) return this:displayRefId(2) end}, - {Name="Mob3Id", Type="RefId", Category="uiR2EDRollout_Mobs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", - Translation="uiR2EdProp_Mob3Id", Visible= function(this) return this:displayRefId(3) end}, - {Name="Mob4Id", Type="RefId", Category="uiR2EDRollout_Mobs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", - Translation="uiR2EdProp_Mob4Id", Visible= function(this) return this:displayRefId(4) end}, - {Name="Mob5Id", Type="RefId", Category="uiR2EDRollout_Mobs",PickFunction="r2:canPickNpcOrGroup", SetRefIdFunction="r2:setNpcOrGroupRefIdTarget", - Translation="uiR2EdProp_Mob5Id", Visible= function(this) return this:displayRefId(5) end}, - {Name="Minutes", Type="Number", Min="0", Max="60", DefaultValue="0"}, - {Name="Secondes",Type="Number", Min="0", Max="60", DefaultValue="30"}, - {Name="Components", Type="Table"}, - - }, - ----------------------------------------------------------------------------------------------- - -- from base class - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - getSelectBarSons = function(this) - return Components - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - - translate = function(this, context) - r2.Translator.translateAiGroup(this, context) - r2.Translator.translateFeatureActivation(this, context) - end, - - updateVersion = function(this, scenarioValue, currentValue ) - - end, - - - } - -local component = feature.Components.TimedSpawner - -function component:displayRefId(index) - local nbMobs = self.MobNumber + 1 - if index <= nbMobs then - return true - end - return false -end ------------------------------------------------------------------------------------------------------------------- -local timedSpawnerDisplayerTable = clone(r2:propertySheetDisplayer()) - --- --- If the message is received by a client that didn't request the modification, we must make sure this client --- doesn't modify the data because it has already been performed by the initial client. --- -local function checkPickedEntity(this, instanceId, attributeName) - if instanceId == "" then - return false - end - local tmpInstance = r2:getInstanceFromId(instanceId) - assert(tmpInstance) - local i = 1 - while i < 6 do - local attrName = "Mob" ..i.. "Id" - if attrName ~= attributeName and this[attrName] == tmpInstance.InstanceId then - return false - end - i = i + 1 - end - return true -end - - - -function timedSpawnerDisplayerTable:onAttrModified(instance, attributeName) - if attributeName == "MobNumber" then - local propertySheet = r2:getPropertySheet(instance) - local nbMobs = instance.MobNumber + 1 - local i = 1 - while i <= 5 do - if i > nbMobs then - local name = "Mob"..tostring(i).."Id" - local refId = propertySheet:find(name) - local refIdName = refId:find("name") - refIdName.hardtext = "NONE" - r2.requestSetNode(instance.InstanceId, name, "") - end - i = i + 1 - end - propertySheet.Env.updatePropVisibility() - return - end - - if string.find(attributeName, "Id") == nil or attributeName == "InstanceId" then return end - - local propertySheet = r2:getPropertySheet(instance) - local refId = propertySheet:find(attributeName) - if refId == nil then return end - local refIdName = refId:find("name") - - local instanceId = instance[attributeName] - if instanceId == "" then - refIdName.hardtext = "NONE" - return - end - - local inserted = checkPickedEntity(instance, instanceId, attributeName) - if inserted == true then - local tmpInstance = r2:getInstanceFromId(instanceId) - refIdName.hardtext = tmpInstance.Name - else - r2.requestSetNode(instance.InstanceId, attributeName, "") - end - instance.User.onHrcMove = false -end - -function timedSpawnerDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true - -end - - -local function reattributeIdOnHrcMove(timedSpawner, group, targetAttr) - local propertySheet = r2:getPropertySheet(timedSpawner) - local refId = propertySheet:find(targetAttr) - local refIdName = refId:find("name") - - r2.requestSetNode(timedSpawner.InstanceId, targetAttr, group.InstanceId) - refIdName.hardtext = group.Name - timedSpawner.User.onHrcMove = true - -end - - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - local group = tmpInstance.ParentInstance - if group:isKindOf("NpcGrpFeature") then - reattributeIdOnHrcMove(self, group, targetAttr) - end - tmpInstance.User.SelfModified = false - end - -end - - -function r2:timedSpawnerDisplayer() - return timedSpawnerDisplayerTable -- returned shared displayer to avoid wasting memory -end --------------------------------------------------------------------------------------------------------------------- - - - -component.getLogicAction = function(entity, context, action) - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if (action.Action.Type == "trigger") then - local i = 1 - local spawnActions = {} - while i <= 5 do - local attrName = "Mob"..i.."Id" - if component[attrName] ~= "" then - local rtMobGrp = r2.Translator.getRtGroup(context, component[attrName]) - local actionSpawn = r2.Translator.createAction("spawn", rtMobGrp.Id) - table.insert(spawnActions, actionSpawn) - end - i = i + 1 - end - - if table.getn(spawnActions) ~= 0 then - local actionTrigger = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 6) - table.insert(spawnActions, actionTrigger) - local retAction = r2.Translator.createAction("condition_if", r2:getNamespace()..rtNpcGrp.Id..".Active == 1", - r2.Translator.createAction("multi_actions", spawnActions) - ) - return retAction, retAction - end - return nil, nil - end - return r2.Translator.getFeatureActivationLogicAction(rtNpcGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - return r2.Translator.getFeatureActivationCondition(condition, rtNpcGrp) -end - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if tostring(event.Event.Type) == "trigger" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 6) - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.createGhostComponents= function(this, act) - - local comp = this - - local timer = r2.newComponent("Timer") - assert(timer) - timer.Name = r2:genInstanceName(i18n.get("uiR2EdTimer")):toUtf8() - timer.InheritPos = 0 - timer.Position.x = comp.Position.x - timer.Position.y = comp.Position.y - timer.Position.z = comp.Position.z - timer.Minutes = comp.Minutes - timer.Secondes = comp.Secondes - --timer.Cyclic = comp.Cyclic - timer.Active = comp.Active - r2.requestInsertGhostNode(comp.InstanceId, "Components", -1, "", timer) - local nbMob = 0 - - for id = 1, 5 do - local propertyName = "Mob"..id.."Id" - if comp[propertyName] ~= nil and comp[propertyName] ~= "" then - local mob = r2:getInstanceFromId(comp[propertyName]) - if mob then - nbMob = nbMob + 1 - if mob:isKindOf("NpcGrpFeature") then - local instanceId = mob.Components[0].InstanceId - r2.requestSetGhostNode(instanceId, "AutoSpawn", 0) - else - r2.requestSetGhostNode(mob.InstanceId, "AutoSpawn", 0) - end - end - end - end - - if nbMob == 0 then - return - end - - do - local type = "On Trigger" - - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = type - eventHandler.Event.Value = "" - eventHandler.Name = type - - local action = r2.newComponent("ActionStep") - - action.Entity = r2.RefId(comp.InstanceId) - action.Action.Type = "trigger" - action.Action.Value = "" - - table.insert(eventHandler.Actions, action) - - local behaviorId = timer.Behavior.InstanceId - assert(behaviorId) - r2.requestInsertGhostNode(behaviorId, "Actions", -1, "", eventHandler) - - end - - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = "activation" - eventHandler.Value = "" - eventHandler.Name = "activation" - - local action = r2.newComponent("ActionStep") - action.Entity = r2.RefId(timer.InstanceId) - action.Action.Type = "Activate" - action.Action.Value = "" - table.insert(eventHandler.Actions, action) - local behaviorId = comp.Behavior.InstanceId - assert(behaviorId) - r2.requestInsertGhostNode(behaviorId, "Actions", -1, "", eventHandler) - - - end -end - - -component.createComponent = function(x, y) - - local comp = r2.newComponent("TimedSpawner") - assert(comp) - assert(comp.Position) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.user_event") - comp.Name = r2:genInstanceName(i18n.get("uiR2EdTimedSpawner")):toUtf8() - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - return comp -end - -component.create = function() - - if not r2:checkAiQuota() then return end - - - - local function posOk(x, y, z) - debugInfo("Validate creation of a Timed Spawner.") - if r2.mustDisplayInfo("TimedSpawner") == 1 then - r2.displayFeatureHelp("TimedSpawner") - end - r2.requestNewAction(i18n.get("uiR2EDNewTimedSpawnerFeatureAction")) - local component = feature.Components.TimedSpawner.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function posCancel() end - - local creature = r2.Translator.getDebugCreature("object_component_user_event.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureTimedSpawner") -end - ------------------------------------------ ---- register the curent Feature to menu - -function component:getLogicTranslations() - -- register trad - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - ["trigger"] = { menu=i18n.get( "uiR2AA0Trigger" ):toUtf8(), - text=i18n.get( "uiR2AA1Trigger" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["trigger"] = { menu=i18n.get( "uiR2Event0Trigger" ):toUtf8(), - text=i18n.get( "uiR2Event1Trigger" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()} - } - } - - return logicTranslations -end - -r2.Features["TimedSpawner"] = feature - - diff --git a/code/ryzom/common/data_common/r2/r2_features_timer.lua b/code/ryzom/common/data_common/r2/r2_features_timer.lua deleted file mode 100644 index 91a2c4af2..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_timer.lua +++ /dev/null @@ -1,593 +0,0 @@ --- In Transalation file --- Category : uiR2EdTimer -- --- CreationFrom : uiR2EdTimerParameters --- uiR2EDtooltipCreateFeatureTimer -> tooltip - -r2.Features.TimerFeature = {} - -local feature = r2.Features.TimerFeature - -feature.Name="TimerFeature" - -feature.BanditCount = 0 - -feature.Description="A Timer" - -feature.Components = {} - - -feature.Components.Timer = - { - PropertySheetHeader = r2.getDisplayButtonHeader("r2.events:openEditor()", "uiR2EdEditEventsButton"), - BaseClass="LogicEntity", - Name="Timer", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - Parameters = {}, - ApplicableActions = { - "Activate", "Deactivate", "Pause", "Resume", "Trigger", - "add seconds", "sub seconds", --- "Add 10 Seconds", "Add 1 minute", "Sub 10 seconds", "Sub 1 minute" - }, - Events = { - "On Trigger", - "On Activation", "On Desactivation", - "On Pause", "On Resume" - }, - Conditions = { - "is active", "is inactive", "is paused", - "is running", "is finished" - }, - TextContexts = {}, - TextParameters = {}, - LiveParameters = {}, - ----------------------------------------------------------------------------------------------- - -- Category="uiR2EDRollout_Timer", - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="Components", Type="Table"}, - {Name="Minutes", Type="Number", Min="0", Max="120", DefaultValue="0"}, - {Name="Secondes",Type="Number", Min="0", Max="999", DefaultValue="30"}, - {Name="Cyclic", Type="Number", WidgetStyle="Boolean", Min="0", Max="1", DefaultValue="0"}, - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - }, - ----------------------------------------------------------------------------------------------- - -- from base class - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - --------------------------------------------------------------------------------------------------------- - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - getSelectBarSons = function(this) - return Components - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - - translate = function(this, context) - r2.Translator.translateAiGroup(this, context) - - - local time = this.Secondes + this.Minutes * 60 - --local time = secs + min * 60 - local rtNpcGrp = r2.Translator.getRtGroup(context, this.InstanceId) - - if this.Active == 1 then - local action1 = r2.Translator.createAction("timer_set", rtNpcGrp.Id, 0, time) - local action2 = r2.Translator.createAction("generic_event_trigger", rtNpcGrp.Id, 0) - local action3 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "v2", 0) - local action4 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Active", 1) - local action = r2.Translator.createAction("multi_actions", {action1, action2, action3, action4}) - - r2.Translator.translateAiGroupInitialState(this, context, action) - else - local action1 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "v2", 0) - local action2 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Active", 0) - local action = r2.Translator.createAction("multi_actions", {action1, action2}) - - r2.Translator.translateAiGroupInitialState(this, context, action) - end - - do - local actionTrigger = r2.Translator.createAction("set_value", rtNpcGrp.Id, "v2", 1) - r2.Translator.translateAiGroupEvent("timer_t0_triggered", this, context, actionTrigger) - end - - --TODO: gestion v2 pour trigger - if this.Cyclic == 1 then - local states = r2.Translator.getRtStatesNames(context, this.InstanceId) - local eventHandler = r2.Translator.createEvent("timer_t0_triggered", states, rtNpcGrp.Id) - local action1 = r2.Translator.createAction("timer_set", rtNpcGrp.Id, 0, time) - local action2 = r2.Translator.createAction("generic_event_trigger", rtNpcGrp.Id, 0) - local action = r2.Translator.createAction("multi_actions", {action1, action2}) - table.insert(context.RtAct.Events, eventHandler) - -- insert a npc_event_handler_action - table.insert(eventHandler.ActionsId, action.Id) - table.insert(context.RtAct.Actions, action) - else - local states = r2.Translator.getRtStatesNames(context, this.InstanceId) - local eventHandler = r2.Translator.createEvent("timer_t0_triggered", states, rtNpcGrp.Id) - local actionEmit = r2.Translator.createAction("generic_event_trigger", rtNpcGrp.Id, 1) - table.insert(context.RtAct.Events, eventHandler) - -- insert a npc_event_handler_action - table.insert(eventHandler.ActionsId, actionEmit.Id) - table.insert(context.RtAct.Actions, actionEmit) - end - end, - } - --- Specific to the component Timer -local component = feature.Components.Timer - - -function component.getLogicActionActivate(entity, context, action, rtNpcGrp) - - local time = entity.Secondes + entity.Minutes * 60 - local action1 = r2.Translator.createAction("timer_set", rtNpcGrp.Id, 0, time) --- local action1 = r2.Translator.createAction("timer_enable", rtNpcGrp.Id, 0) - local action2 = r2.Translator.createAction("generic_event_trigger", rtNpcGrp.Id, 0) - local actionIfInactive = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0, - r2.Translator.createAction("multi_actions", {action1, action2})) - - return actionIfInactive, actionIfInactive -end - -function component.getLogicActionDeactivate(entity, context, action, rtNpcGrp) - local action2 = r2.Translator.createAction("timer_disable", rtNpcGrp.Id, 0) - local action1 = r2.Translator.createAction("generic_event_trigger", rtNpcGrp.Id, 1) - local retAction = r2.Translator.createAction("multi_actions", {action1, action2}) - local actionIfActive = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1, retAction) - return actionIfActive, actionIfActive -end - -function component.getLogicActionPause(entity, context, action, rtNpcGrp) - local action1 = r2.Translator.createAction("timer_suspend", rtNpcGrp.Id, 0) - local action2 = r2.Translator.createAction("generic_event_trigger", rtNpcGrp.Id, 2) - - local multiAction = r2.Translator.createAction("multi_actions", {action1, action2}) - - local actionIsEnable = r2.Translator.createAction("timer_is_enable", rtNpcGrp.Id, 0); - local actionIf = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "is_enable", 1, multiAction) - local retAction = r2.Translator.createAction("multi_actions", {actionIsEnable, actionIf}) - assert(retAction) - return retAction, retAction -end - -function component.getLogicActionResume(entity, context, action, rtNpcGrp) - - local action1 = r2.Translator.createAction("timer_resume", rtNpcGrp.Id, 0) - local action2 = r2.Translator.createAction("generic_event_trigger", rtNpcGrp.Id, 3) - - local multiAction = r2.Translator.createAction("multi_actions", {action1, action2}) - - local actionIsEnable = r2.Translator.createAction("timer_is_enable", rtNpcGrp.Id, 0); - local actionIf = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "is_enable", 1, multiAction) - local retAction = r2.Translator.createAction("multi_actions", {actionIsEnable, actionIf}) - assert(retAction) - return retAction, retAction -end - -function component.getLogicActionTrigger(entity, context, action, rtNpcGrp) - local multiAction = r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtNpcGrp.Id, "v2", 1), - r2.Translator.createAction("timer_trigger", rtNpcGrp.Id, 0)}) - local actionIsEnable = r2.Translator.createAction("timer_is_enable", rtNpcGrp.Id, 0); - local actionIf = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "is_enable", 1, multiAction) - local retAction = r2.Translator.createAction("multi_actions", {actionIsEnable, actionIf}) - assert(retAction) - return retAction, retAction -end - -function component.getLogicActionAddSeconds(entity, context, action, rtNpcGrp) - local value = 0 - if action.Action.ValueString then value = tonumber(action.Action.ValueString) end - local timerAdd = r2.Translator.createAction("timer_add", rtNpcGrp.Id, 0, value) - - local actionIsEnable = r2.Translator.createAction("timer_is_enable", rtNpcGrp.Id, 0); - local actionIf = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "is_enable", 1, timerAdd) - local retAction = r2.Translator.createAction("multi_actions", {actionIsEnable, actionIf}) - assert(retAction) - return retAction, retAction -end - -function component.getLogicActionSubSeconds(entity, context, action, rtNpcGrp) - local value = 0 - if action.Action.ValueString then value = tonumber(action.Action.ValueString) end - local actionSub = r2.Translator.createAction("timer_sub", rtNpcGrp.Id, 0, value) - - local actionIsEnable = r2.Translator.createAction("timer_is_enable", rtNpcGrp.Id, 0); - local actionIf = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "is_enable", 1, actionSub) - local retAction = r2.Translator.createAction("multi_actions", {actionIsEnable, actionIf}) - assert(retAction) - return retAction, retAction - -end - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - - local funs = { - ["Activate"] = component.getLogicActionActivate, - ["Deactivate"] = component.getLogicActionDeactivate, - ["Pause"] = component.getLogicActionPause, - ["Resume"] = component.getLogicActionResume, - ["Trigger"] = component.getLogicActionTrigger, - ["Add 10 Seconds"] = component.getLogicActionAdd10Seconds, - ["Add 1 minute"] = component.getLogicActionAdd1Minute, - ["Sub 10 seconds"] = component.getLogicActionSub0Seconds, - ["Sub 1 minute"] = component.getLogicActionSub1Minute, - ["sub seconds"] = component.getLogicActionSubSeconds, - ["add seconds"] = component.getLogicActionAddSeconds, - - } - - - local fun = funs[ action.Action.Type ] - if fun then - firstAction, lastAction = fun(entity, context, action, rtNpcGrp) - - end - - assert(firstAction) - return firstAction, lastAction -end - - - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - local prefix = "" - - if rtNpcGrp.Id and rtNpcGrp.Id ~= "" then - prefix = r2:getNamespace() .. rtNpcGrp.Id.."." - end - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("timer_is_enable", rtNpcGrp.Id, 0); - local action2 = r2.Translator.createAction("condition_if", prefix.."is_enable == 1" ); - local multiactions= r2.Translator.createAction("multi_actions", {action1, action2}); - return multiactions, action2 - elseif condition.Condition.Type == "is inactive" then - local action1 = r2.Translator.createAction("timer_is_enable", rtNpcGrp.Id, 0) - local action2 = r2.Translator.createAction("condition_if", prefix.."is_enable == 0") - local multiActions = r2.Translator.createAction("multi_actions", {action1, action2}) - return multiActions, action2 - elseif condition.Condition.Type == "is paused" then - local action1 = r2.Translator.createAction("timer_is_enable", rtNpcGrp.Id, 0); - local action2 = r2.Translator.createAction("timer_is_suspended", rtNpcGrp.Id, 0); - local actionSuspended = r2.Translator.createAction("condition_if", prefix.."is_suspended == 1"); - local action3 = r2.Translator.createAction("condition_if", prefix.."is_enable == 1", actionSuspended); - local multiactions = r2.Translator.createAction("multi_actions", {action1, action2, action3}); - return multiactions, actionSuspended - elseif condition.Condition.Type == "is running" then - local action1 = r2.Translator.createAction("timer_is_enable", rtNpcGrp.Id, 0); - local action2 = r2.Translator.createAction("timer_is_suspended", rtNpcGrp.Id, 0); - local actionSuspended = r2.Translator.createAction("condition_if", prefix.."is_suspended == 0"); - local action3 = r2.Translator.createAction("condition_if", prefix.."is_enable == 1", actionSuspended); - local multiactions = r2.Translator.createAction("multi_actions", {action1, action2, action3}); - return multiactions, actionSuspended - elseif condition.Condition.Type == "is finished" then - local action1 = r2.Translator.createAction("timer_is_enable", rtNpcGrp.Id, 0); - local action2 = r2.Translator.createAction("condition_if", prefix.."is_enable == 0"); - local action3 = r2.Translator.createAction("condition_if", prefix.."v2 == 1", action2); - - local multiactions= r2.Translator.createAction("multi_actions", {action1, action3}); - - return multiactions, action2 - else - assert(nil) - end - return nil,nil -end - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "On Trigger" then - eventHandler, firstCondition, lastCondition = r2.Translator.createEvent("timer_t0_triggered", "", rtNpcGrp.Id) - --return r2.Translator.getComponentUserEvent(rtNpcGrp, 6) - elseif eventType == "On Activation" then - return r2.Translator.getComponentGenericEvent(rtNpcGrp, 0) - elseif eventType == "On Desactivation" then - return r2.Translator.getComponentGenericEvent(rtNpcGrp, 1) - elseif eventType == "On Pause" then - return r2.Translator.getComponentGenericEvent(rtNpcGrp, 2) - elseif eventType == "On Resume" then - return r2.Translator.getComponentGenericEvent(rtNpcGrp, 3) - end - - - return eventHandler, firstCondition, lastCondition -end - -component.createComponent = function(x, y, secondes, minutes, cyclic) - - local comp = r2.newComponent("Timer") - assert(comp) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.timer") - comp.Name = r2:genInstanceName(i18n.get("uiR2EdNameTimerFeature")):toUtf8() - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - if minutes then comp.Minutes = minutes end - if secondes then comp.Secondes = secondes end - if cyclic then comp.Cyclic = cyclic end - - return comp -end - - -component.create = function() - - if not r2:checkAiQuota() then return end - - - local function paramsOk(resultTable) - - - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local minutes = tonumber( resultTable["Minutes"] ) - local secondes = tonumber( resultTable["Secondes"] ) - local cyclic = tonumber( resultTable["Cyclic"] ) - local showAgain = tonumber(resultTable["Display"]) - - if not x or not y - then - debugInfo("Can't create Component") - return - end - - local component = feature.Components.Timer.createComponent( x, y, secondes, minutes, cyclic) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'Timer' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'Timer' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("Timer") == 1 then - r2.displayFeatureHelp("Timer") - end - r2.requestNewAction(i18n.get("uiR2EDNewTimerFeatureAction")) - local component = feature.Components.Timer.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - - end - local function posCancel() - debugInfo("Cancel choice 'Timer' position") - end - local creature = r2.Translator.getDebugCreature("object_component_timer.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureTimer") -end - - - -function feature.registerForms() - r2.Forms.TimerForm = - { - Caption = "uiR2EdTimerParameters", - PropertySheetHeader = - [[ - - ]], - - Prop = - { - {Name="Display", Type="Number", WidgetStyle="Boolean", DefaultValue="0", Translation="uiR2showMessageAgain", InvertWidget=true, CaptionWidth=5 }, - -- following field are tmp for property sheet building testing - -- {Name="Minutes", Type="Number", Category="uiR2EDRollout_Timer", Min="0", Max="59", Default="0"}, - -- {Name="Secondes", Type="Number", Category="uiR2EDRollout_Timer", Min="0", Max="59", Default="10"}, - -- {Name="Cyclic", Type="Number", Category="uiR2EDRollout_Timer", WidgetStyle="Boolean", Min="0", Max="1", Default="0"}, - -- {Name="Active", Type="Number", WidgetStyle="Boolean", Category="uiR2EDRollout_Default", DefaultValue="1"}, - } - - } - -end - -function component:getLogicTranslations() - -- register trad - local logicTranslations = { - ["ApplicableActions"] = { - ["Activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["Deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - ["Trigger"] = { menu=i18n.get( "uiR2AA0Trigger" ):toUtf8(), - text=i18n.get( "uiR2AA1Trigger" ):toUtf8()}, - ["Pause"] = { menu=i18n.get( "uiR2AA0TimerPause" ):toUtf8(), - text=i18n.get( "uiR2AA1TimerPause" ):toUtf8()}, - ["Resume"] = { menu=i18n.get( "uiR2AA0TimerResume" ):toUtf8(), - text=i18n.get( "uiR2AA1TimerResume" ):toUtf8()}, - ["Add 10 Seconds"] = { menu=i18n.get( "uiR2AA0TimerAdd10s" ):toUtf8(), - text=i18n.get( "uiR2AA1TimerAdds10s" ):toUtf8()}, - ["Add 1 minute"] = { menu=i18n.get( "uiR2AA0TimerAdd1m" ):toUtf8(), - text=i18n.get( "uiR2AA1TimerAdds1m" ):toUtf8()}, - ["Sub 10 seconds"] = { menu=i18n.get( "uiR2AA0TimerSub10s" ):toUtf8(), - text=i18n.get( "uiR2AA1TimerSubs10s" ):toUtf8()}, - ["Sub 1 minute"] = { menu=i18n.get( "uiR2AA0TimerSub1m" ):toUtf8(), - text=i18n.get( "uiR2AA1TimerSubs1m" ):toUtf8()}, - ["add seconds"] = { menu=i18n.get( "uiR2AA0TimerAddNSeconds" ):toUtf8(), - text=i18n.get( "uiR2AA1TimerAddNSeconds" ):toUtf8()}, - ["sub seconds"] = { menu=i18n.get( "uiR2AA0TimerSubNSeconds" ):toUtf8(), - text=i18n.get( "uiR2AA1TimerSubNSeconds" ):toUtf8()}, - }, - ["Events"] = { - ["On Activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["On Desactivation"]= { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["On Trigger"] = { menu=i18n.get( "uiR2Event0Trigger" ):toUtf8(), - text=i18n.get( "uiR2Event1Trigger" ):toUtf8()}, - ["On Pause"] = { menu=i18n.get( "uiR2Event0TimerPause" ):toUtf8(), - text=i18n.get( "uiR2Event1TimerPause" ):toUtf8()}, - ["On Resume"] = { menu=i18n.get( "uiR2Event0TimerResume" ):toUtf8(), - text=i18n.get( "uiR2Event1TimerResume" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - ["is paused"] = { menu=i18n.get( "uiR2Test0TimerPaused" ):toUtf8(), - text=i18n.get( "uiR2Test1TimerPaused" ):toUtf8()}, - ["is running"] = { menu=i18n.get( "uiR2Test0TimerRunning" ):toUtf8(), - text=i18n.get( "uiR2Test1TimerRunning" ):toUtf8()}, - ["is finished"] = { menu=i18n.get( "uiR2Test0TimerFinished" ):toUtf8(), - text=i18n.get( "uiR2Test1TimerFinished" ):toUtf8()}, - } - } - return logicTranslations -end - -function component.initEventValuesMenu(this, menu, categoryEvent) - --local startTime = nltime.getPreciseLocalTime() - for ev=0,menu:getNumLine()-1 do - - local eventType = tostring(menu:getLineId(ev)) - - --local endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for 10 is %f", endTime - startTime)) - --startTime = nltime.getPreciseLocalTime() - - if r2.events.eventTypeWithValue[eventType] == "Number" then - menu:addSubMenu(ev) - local subMenu = menu:getSubMenu(ev) - local func = "" - -- for i=0, 9 do - -- local uc_name = ucstring() - -- uc_name:fromUtf8( tostring(i) ) - -- func = "r2.events:setEventValue('','" .. categoryEvent .."','".. tostring(i).."')" - -- subMenu:addLine(uc_name, "lua", func, tostring(i)) - -- end - - --endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for 11 is %f", endTime - startTime)) - --startTime = nltime.getPreciseLocalTime() - - local lineNb = 0 - for i=0, 50, 10 do - local lineStr = tostring(i).."/"..tostring(i+9) - subMenu:addLine(ucstring(lineStr), "", "", tostring(i)) - - --endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for 12 is %f", endTime - startTime)) - --startTime = nltime.getPreciseLocalTime() - - subMenu:addSubMenu(lineNb) - local subMenu2= subMenu:getSubMenu(lineNb) - for s=0,9 do - lineStr = tostring(i+s) - local func = "r2.events:setEventValue('','" .. categoryEvent .."','".. lineStr.."')" - subMenu2:addLine(ucstring(lineStr), "lua", func, lineStr) - end - lineNb = lineNb+1 - - --endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for 13 is %f", endTime - startTime)) - --startTime = nltime.getPreciseLocalTime() - end - - for i=0, 50, 10 do - local lineStr = tostring(i).." m /"..tostring(i+9).." m" - subMenu:addLine(ucstring(lineStr), "", "", tostring(i)) - - subMenu:addSubMenu(lineNb) - local subMenu2= subMenu:getSubMenu(lineNb) - local index = 0 - - --endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for 14 is %f", endTime - startTime)) - --startTime = nltime.getPreciseLocalTime() - - for m=0,9 do - lineStr = tostring( (i+m)*60) --- local func = "r2.events:setEventValue('','" .. categoryEvent .."','".. lineStr.."')" - subMenu2:addLine(ucstring(tostring(i+m) .. "m"), "", "", lineStr) - subMenu2:addSubMenu(index) - local subMenu3= subMenu2:getSubMenu(index) - index = index + 1 - for s=0, 55, 5 do - lineStr = tostring( (i+m)*60 + s) - local func = "r2.events:setEventValue('','" .. categoryEvent .."','".. lineStr.."')" - subMenu3:addLine(ucstring(tostring(i+m) .. "m ".. s .. "s"), "lua", func, lineStr) - end - end - lineNb = lineNb+1 - - --endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for 15 is %f", endTime - startTime)) - --startTime = nltime.getPreciseLocalTime() - end - end - end -end - -r2.Features["TimerFeature"] = feature - diff --git a/code/ryzom/common/data_common/r2/r2_features_user_item.lua b/code/ryzom/common/data_common/r2/r2_features_user_item.lua deleted file mode 100644 index b162a9219..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_user_item.lua +++ /dev/null @@ -1,208 +0,0 @@ --- In Translation file --- Category : uiR2EdUserItemFeature -- --- CreationFrom : uiR2EdUserItemParameters - - -r2.Features.UserItemFeature = {} - -local feature = r2.Features.UserItemFeature - -feature.Name="UserItemFeature" - -feature.Description="A UserItem feature" - - - --- ######################### --- # FEATURE FUNCTIONS # --- ######################### - -function feature.registerForms() - r2.Forms.UserItemFeatureForm = - { - Caption = "uiR2EdUserItemParameters", - Prop = - { - -- The creation form's fields are defined here - {Name="Property1", Type="String", Category="uiR2EDRollout_UISubsection"} - } - } - -end - - - - -feature.Components = {} - -feature.Components.UserItemFeature = - { - BaseClass="LogicEntity", - Name="UserItemFeature", - Menu="ui:interface:r2ed_feature_menu", - - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - Parameters = {}, - - ApplicableActions = {}, - - Events = {}, - - Conditions = {}, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", Category="uiR2EDRollout_UISubsection", WidgetStyle="StaticText"} - }, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - this:createGhostComponents() - end, - - translate = function(this, context) - r2.Translator.translateAiGroup(this, context) - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end - } - - - - --- ########################### --- # COMPONENT FUNCTIONS # --- ########################### --- --- The following functions are specific to the Feature --- -local component = feature.Components.UserItemFeature - -component.getLogicAction = function(entity, context, action) - local firstAction, lastAction = nil,nil - return firstAction, lastAction -end - -component.getLogicCondition = function(this, context, condition) - return nil,nil -end - -component.getLogicEvent = function(this, context, event) - local eventHandler, firsCondition, lastCondition = nil, nil, nil - return eventHandler, firsCondition, lastCondition - -end - -component.createGhostComponents = function(act, comp) - -end - -component.createComponent = function(x, y) - - local comp = r2.newComponent("UserItemFeature") - assert(comp) - - comp.Base = "palette.entities.botobjects.milestone" - comp.Name = r2:genInstanceName(i18n.get("uiR2EdUserItemFeature")):toUtf8() - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - --comp._Seed = os.time() - - return comp -end - -component.create = function() - - if not r2:checkAiQuota() then return end - - - local function paramsOk(resultTable) - - r2.requestNewAction(i18n.get("uiR2EDNewUserItemFeatureAction")) - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local component = feature.createComponent( x, y) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'UserItemFeature' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'UserItemFeature' at pos (%d, %d, %d)", x, y, z)) - r2:doForm("UserItemFeatureForm", {X=x, Y=y}, paramsOk, paramsCancel) - end - local function posCancel() - debugInfo("Cancel choice 'UserItemFeature' position") - end - r2:choosePos("object_milestone.creature", posOk, posCancel, "createFeatureBanditCamp") -end - ------------------------------------------ ---- register the current Feature to menu - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdUserItemFeature") - logicEntityMenu:addLine(ucstring(name), "lua", "", "UserItemFeature") -end - -function component:getLogicEntityAttributes() - -- register trad - local localLogicEntityAttributes = { - ["ApplicableActions"] = {}, - ["Events"] = {}, - ["Conditions"] = {} - } - return localLogicEntityAttributes -end - -r2.Features["UserItemFeature"] = feature - diff --git a/code/ryzom/common/data_common/r2/r2_features_user_trigger.lua b/code/ryzom/common/data_common/r2/r2_features_user_trigger.lua deleted file mode 100644 index 86d619a3d..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_user_trigger.lua +++ /dev/null @@ -1,330 +0,0 @@ - --- In Translation file --- Category : uiR2EdUserTrigger -- --- CreationFrom : uiR2EdUserTriggerParameters - - -r2.Features.UserTriggerFeature = {} - -local feature = r2.Features.UserTriggerFeature - -feature.Name="UserTriggerFeature" - -feature.Description="A feature that allows a DM to trigger an event" - -feature.Components = {} - - -function feature.registerForms() - r2.Forms.UserTriggerForm = - { - Caption = "uiR2EdUserTriggerParameters", - PropertySheetHeader = - [[ - - ]], - Prop = - { - {Name="Display", Type="Number", WidgetStyle="Boolean", DefaultValue="0", Translation="uiR2showMessageAgain", InvertWidget=true, CaptionWidth=5 }, - } - } - -end - - - -feature.Components.UserTrigger = - { - PropertySheetHeader = r2.getDisplayButtonHeader("r2.events:openEditor()", "uiR2EdEditEventsButton"), - BaseClass="LogicEntity", - Name="UserTrigger", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - -- - -- Supposed to be the specific attributes of the feature (ex: for a banditcamp, number of bandits, - -- race, etc.) but apparently not used.. - -- - Parameters = {}, - -- - -- The different actions that can be performed by the feature (activate, wander, spawn etc.) - -- - ApplicableActions = { "trigger"}, - -- - -- Events are what happen to the feature and may trigger actions on the feature. (ex: "on activation", - -- "on arrive at camp" etc.) - -- - Events = { "triggered"}, - - -- Conditions are what can be tested on the feature, giving information about its state (ex: "is wandering", "is active" etc.) - -- - Conditions = { }, - -- - -- TextContexts is what the feature might say upon events (2 different kinds: spontaneous & interrogation texts) - -- - TextContexts = {}, - -- - -- Not quite clear.. - -- - TextParameters = {}, - -- - -- Feature's parameters which can be modified by the GM at runtime. - -- - LiveParameters = {}, - ----------------------------------------------------------------------------------------------- - -- - -- Properties define the feature's parameters like this: - -- {Name="Parameter_Name", Type="Param_Type", Category="??", WidgetStyle="UI_WidgetStyle", Min="min_value", Max="max_value", Default="defalut_value" - -- Categories can be found in data_common/r2/r2.uxt?? - -- - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table", Visible = false}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="Description", Type="String", } - -- {Name="SheetId", Type="RefId", WidgetStyle="PlotItem", Category="uiR2EDRollout_Description"}, - }, - - -- - -- from base class - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - - -- - -- from base class - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - -- - -- from base class - getSelectBarSons = function(this) - return Components - end, - - -- - -- from base class - canHaveSelectBarSons = function(this) - return false; - end, - - -- - -- Called when running EditMode to create locally the feature without sending anything into the act (speed purpose). - -- - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - - translate = function(this, context) - r2.Translator.translateAiGroup(this, context) - - local rtNpcGrp = r2.Translator.getRtGroup(context, this.InstanceId) - - local rt = r2.newComponent("RtUserTrigger") - assert(rt) - rt.Name = this.Name - rt.TriggerId = 1 - rt.Grp = rtNpcGrp.Id - - table.insert(context.RtAct.UserTriggers, rt) - end - - - } - - -local component = feature.Components.UserTrigger - --- --- Create the logic actions relative to the feature via the translator. --- - -component.getLogicAction = function(entity, context, action) - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if (action.Action.Type == "Trigger") then - local retAction =r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 1) - return retAction, retAction - end - - local firstAction, lastAction = nil, nil - return firstAction, lastAction -end - --- --- Checks the conditions defined for this feature --- -function component.getLogicCondition(this, context, condition) - return nil,nil -end - - -function component.getLogicEvent(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "triggered" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 1) - end - - return eventHandler, firstCondition, lastCondition -end - - - - --- feature part - - --- --- Creates an instance of the feature with attributes retrieved from ttriggeredd- -function component.createComponent(x, y) - - local comp = r2.newComponent("UserTrigger") - assert(comp) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.user_event") - comp.Name = r2:genInstanceName(i18n.get("uiR2ED" .. component.Name)):toUtf8() - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - return comp -end - - - - --- --- from ihm --- Displays the creation form of the feature and calls CreateComponent with the user input values --- -component.create = function(this) - - if not r2:checkAiQuota() then return end - - - - local function paramsOk(resultTable) - - r2.requestNewAction(i18n.get("uiR2EDNewUserTriggerFeatureAction")) - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - if not x or not y - then - debugInfo("Can't create Component") - return - end - - if showAgain == 1 then - r2.setDisplayInfo("UserTriggerForm", 0) - else r2.setDisplayInfo("UserTriggerForm", 1) end - - local component = component.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'UserTrigger' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("UserTrigger") == 1 then - r2.displayFeatureHelp("UserTrigger") - end - r2.requestNewAction(i18n.get("uiR2EDNewUserTriggerFeatureAction")) - local component = component.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function posCancel() - debugInfo("Cancel choice 'UserTriggerFeature' position") - end - local creature = r2.Translator.getDebugCreature("object_component_user_event.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureUserTrigger") -end - - - -function component.getLogicAction(entity, context, action) - assert( action.Class == "ActionStep") - - local firstAction, lastAction = nil, nil - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - - if action.Action.Type == 'trigger' then - local retAction =r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 1) - return retAction, retAction - end - - printWarning('Action not implemented yet :'.. action.Action.Type) - assert(nil) - return nil, nil -end - ----------------------------------------------------------------------------- --- add a line to the event menu -function component:getLogicTranslations() - - local logicTranslations = { - ["ApplicableActions"] = { - ["trigger"] = { menu=i18n.get( "uiR2AA0Trigger" ):toUtf8(), - text=i18n.get( "uiR2AA1Trigger" ):toUtf8()}, - }, - ["Events"] = { - ["triggered"] = { menu=i18n.get( "uiR2Event0Trigger" ):toUtf8(), - text=i18n.get( "uiR2Event1Trigger" ):toUtf8()}, - } - } - return logicTranslations -end - -r2.Features["UserTriggerFeature"] = feature - diff --git a/code/ryzom/common/data_common/r2/r2_features_visit_zone.lua b/code/ryzom/common/data_common/r2/r2_features_visit_zone.lua deleted file mode 100644 index fb40d9a0f..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_visit_zone.lua +++ /dev/null @@ -1,502 +0,0 @@ - --- In Translation file --- Category : uiR2EdVisitZone -- --- CreationFrom : uiR2EdVisitZoneParameters - - -r2.Features.VisitZoneFeature = {} - -local feature = r2.Features.VisitZoneFeature - -feature.Name="VisitZoneFeature" - -feature.Description="" - -feature.Components = {} - -feature.Components.VisitZone = - { - BaseClass="LogicEntity", - Name="VisitZone", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "visitZoneDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - - ApplicableActions = { "activate", "deactivate", "succeed"}, - - Events = {"activation", "deactivation", "wait validation", "mission asked", "succeeded"}, - - Conditions = { "is active", "is inactive", "is succeeded" }, - - TextContexts = {}, - - TextParameters = {}, - - LiveParameters = {}, - - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Components", Type="Table"}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="MissionGiver", Type="RefId", PickFunction="r2:canPickTalkingNpc", SetRefIdFunction="r2:setTalkingNpc"}, - {Name="ValidationNeeded", Category="uiR2EDRollout_TextToSay", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="ContextualText", Type="String", Category="uiR2EDRollout_TextToSay", MaxNumChar="100" }, - {Name="MissionText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="WaitValidationText", Type="String", Category="uiR2EDRollout_TextToSay"}, - {Name="MissionSucceedText", Type="String", Category="uiR2EDRollout_TextToSay", Visible= function(this) - return this:IsValidationNeeded() end }, - {Name="BroadcastText", Type="String", Category="uiR2EDRollout_TextToSay", DefaultValue="", DefaultInBase = 1}, - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="Repeatable", Type="Number", WidgetStyle="Boolean", DefaultValue="0"}, - - - }, - - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - - getSelectBarSons = function(this) - return Components - end, - - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - - - } - - -local component = feature.Components.VisitZone - -function component:IsValidationNeeded() - local validationNeeded = self.ValidationNeeded - if validationNeeded == 1 then - return true - end - return false -end - ----------------------------------------- ----------------------------------------- - -local visitZoneDisplayerTable = clone(r2:propertySheetDisplayer()) - -local oldOnAttrModified = visitZoneDisplayerTable.onAttrModified -function visitZoneDisplayerTable:onAttrModified(instance, attributeName) - - oldOnAttrModified(self, instance, attributeName) - r2:propertySheetDisplayer():onAttrModified(instance, attributeName) - if attributeName == "ValidationNeeded" then - local propertySheet = r2:getPropertySheet(instance) - propertySheet.Env.updatePropVisibility() - return - end -end - -function visitZoneDisplayerTable:onSelect(instance, isSelected) - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - -function component:onTargetInstancePreHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - local tmpInstance = r2:getInstanceFromId(targetId) - tmpInstance.User.SelfModified = true -end - -function component:onTargetInstancePostHrcMove(targetAttr, targetIndexInArray) - local targetId = self[targetAttr] - - local tmpInstance = r2:getInstanceFromId(targetId) - - assert(tmpInstance) - if tmpInstance.User.SelfModified and tmpInstance.User.SelfModified == true then - if tmpInstance.ParentInstance and tmpInstance.ParentInstance:isKindOf("NpcGrpFeature") then - r2.requestSetNode(self.InstanceId, targetAttr, r2.RefId("")) - end - end - -end - -function r2:visitZoneDisplayer() - return visitZoneDisplayerTable -- returned shared displayer to avoid wasting memory -end ----------------------------------------- ----------------------------------------- -component.createGhostComponents = function(this, act) - - local comp = this - - local giver = r2:getInstanceFromId(comp.MissionGiver) - if not giver then return end - - local zoneTrigger = r2:getInstanceFromId(comp._ZoneId) - assert(zoneTrigger) - - local validationNeeded = comp.ValidationNeeded - - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = "On Player Arrived" - eventHandler.Event.Value = "" - eventHandler.Name = "On Player Arrived" - - local actionSuccess = r2.newComponent("ActionStep") - actionSuccess.Entity = r2.RefId(comp.InstanceId) - if validationNeeded == 1 then - actionSuccess.Action.Type = "validateTask" - else - actionSuccess.Action.Type = "succeed" - end - actionSuccess.Action.Value = "" - - table.insert(eventHandler.Actions, actionSuccess) - - local behaviorId = zoneTrigger.Behavior.InstanceId - assert(behaviorId) - r2.requestInsertGhostNode(behaviorId, "Actions", -1, "", eventHandler) - end - - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = "activation" - eventHandler.Event.Value = "" - eventHandler.Name = "activation" - - local action = r2.newComponent("ActionStep") - - action.Entity = r2.RefId(zoneTrigger.InstanceId) - action.Action.Type = "activate" - action.Action.Value = "" - - table.insert(eventHandler.Actions, action) - - local behaviorId = this.Behavior.InstanceId - assert(behaviorId) - r2.requestInsertGhostNode(behaviorId, "Actions", -1, "", eventHandler) - end - do - local eventHandler = r2.newComponent("LogicEntityAction") - eventHandler.Event.Type = "deactivation" - eventHandler.Event.Value = "" - eventHandler.Name = "deactivation" - - local action = r2.newComponent("ActionStep") - - action.Entity = r2.RefId(zoneTrigger.InstanceId) - action.Action.Type = "deactivate" - action.Action.Value = "" - - table.insert(eventHandler.Actions, action) - - local behaviorId = this.Behavior.InstanceId - assert(behaviorId) - r2.requestInsertGhostNode(behaviorId, "Actions", -1, "", eventHandler) - end -end - - -function component:textAdapter(text) - - assert(self) - assert(type(text) == "string") - local str = text - local mission_giver = "" - local mission_target = "" - - if tostring(self.MissionGiver) ~= "" then - local giver = r2:getInstanceFromId(self.MissionGiver) - if giver then mission_giver = giver.Name end - end - - str=string.gsub(str, "", mission_giver) - return str -end - ---EVENT --- 1: mission given (plugged on talkto) --- 2: wait validation (plugged on talkto) --- 4: activation (generic) --- 5: deactivation (generic) --- 8: step validated --- 9: mission successful (generic) - - --- --- v1: repeatable --- v2: mission state 0= the player didn't talk to the mission giver, --- 1= player talked to the mission giver, but didn't visit the zone yet --- 2= player did visit the zone but didn't come back to talk to the mission giver yet --- v3: mission completed (0=never completed, 1=completed at least once) --- -function component:translate(context) - r2.Translator.translateAiGroup(self, context) - - local rtGrp = r2.Translator.getRtGroup(context, self.InstanceId) - - local validationNeeded = self.ValidationNeeded - - local giver = r2:getInstanceFromId(self.MissionGiver) - if not giver then return end - local rtGiverGrp = r2.Translator.getRtGroup(context, giver.InstanceId) - - -- Start of state - r2.Translator.Tasks.startOfStateLogic(self, context, rtGrp) - - -- Activation - r2.Translator.Tasks.activationLogic(self, context, rtGrp) - - --Deactivation - r2.Translator.Tasks.deactivationLogic(self, context, rtGrp) - - --Set mission status to 1 when mission is taken - r2.Translator.Tasks.setStatusLogic(self, context, rtGrp) - - -- Mission giver must either give the mission (1st time) or say WaitValidationText - r2.Translator.Tasks.giverLogic(self, giver, context, rtGrp) - - --depending on validationNeeded prop, either set - if validationNeeded == 1 then - r2.Translator.Tasks.validationByMissionGiver(self, giver, context, rtGrp) - - r2.Translator.Tasks.broadcastOnEvent8(self, context) - end - - --success with broadcast - r2.Translator.Tasks.successBroadcastLogic(self, context, rtGrp) - - r2.Translator.translateFeatureActivation(self, context) - -end - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtGrp) - - if action.Action.Type == "validateTask" then - local action = r2.Translator.createAction("validate_task", rtGrp.Id) - return action, action - elseif action.Action.Type == "succeed" then - local actionComplete = r2.Translator.createAction("complete_mission", rtGrp.Id) - return actionComplete, actionComplete - end - - return r2.Translator.getFeatureActivationLogicAction(rtGrp, action) -end - -component.getLogicCondition = function(this, context, condition) - - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1); - return action1, action1 - elseif condition.Condition.Type == "is inactive" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0); - return action1, action1 - elseif condition.Condition.Type == "is succeeded" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "v3", 1); - return action1, action1 - - else - assert(nil) - end - return nil,nil -end - - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "mission asked" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 3) - elseif eventType == "wait validation" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 2) - elseif eventType == "succeeded" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 9) - - end - - return r2.Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) -end - -component.createComponent = function(x, y) - - local contextualText = i18n.get("uiR2EdVisitZone_ContextualText"):toUtf8() - local missionText = i18n.get("uiR2EdVisitZone_MissionText"):toUtf8() - local waitValidationText = i18n.get("uiR2EdVisitZone_WaitValidationText"):toUtf8() - local missionSucceededText = i18n.get("uiR2EdVisitZone_MissionSucceededText"):toUtf8() - local broadcastText = i18n.get("uiR2EdVisitZone_BroadcastText"):toUtf8() - - local comp = r2.newComponent("VisitZone") - assert(comp) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.bot_chat") - comp.Name = r2:genInstanceName(i18n.get("uiR2EdVisitZone")):toUtf8() - - comp.ContextualText = contextualText - comp.MissionText = missionText - comp.WaitValidationText = waitValidationText - comp.MissionSucceedText = missionSucceededText - comp.BroadcastText = broadcastText - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - local zoneTrigger = r2.Features["ZoneTrigger"].Components.ZoneTrigger.createComponent(x + 3, y + 3) - zoneTrigger.Name = comp.Name.." "..i18n.get("uiR2EdZoneTrigger"):toUtf8() --r2:genInstanceName(i18n.get("uiR2EdZoneTrigger")):toUtf8() - zoneTrigger.InheritPos = 0 - zoneTrigger.Deletable = false - table.insert(comp.Components, zoneTrigger) - comp._ZoneId = zoneTrigger.InstanceId - - comp._Seed = os.time() - - return comp -end - -component.create = function() - if r2:getLeftQuota() <= 0 then - r2:makeRoomMsg() - return - end - local function paramsOk(resultTable) - - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - - if showAgain == 1 then - r2.setDisplayInfo("VisitZoneForm", 0) - else r2.setDisplayInfo("VisitZoneForm", 1) end - - if not x or not y - then - debugInfo("Can't create Component") - return - end - local component = feature.Components.VisitZone.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function paramsCancel() - debugInfo("Cancel form for 'VisitZone' creation") - end - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of 'VisitZone' at pos (%d, %d, %d)", x, y, z)) - if r2.mustDisplayInfo("VisitZone") == 1 then - r2.displayFeatureHelp("VisitZone") - end - r2.requestNewAction(i18n.get("ui2REDNewVisitZoneFeatureAction")) - local component = feature.Components.VisitZone.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - local function posCancel() - debugInfo("Cancel choice 'VisitZone' position") - end - local creature = r2.Translator.getDebugCreature("object_component_bot_chat.creature") - r2:choosePos(creature, posOk, posCancel, "createFeatureVisitZone") -end - - -function component:registerMenu(logicEntityMenu) - local name = i18n.get("uiR2EdVisitZone") - logicEntityMenu:addLine(ucstring(name), "lua", "", "VisitZone") -end - -function component:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - ["succeed"] = { menu=i18n.get( "uiR2AA0SucceedTask" ):toUtf8(), - text=i18n.get( "uiR2AA1SucceedTask" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["mission asked"] = { menu=i18n.get( "uiR2Event0MissionGiven" ):toUtf8(), - text=i18n.get( "uiR2Event1MissionGiven" ):toUtf8()}, - ["wait validation"] = { menu=i18n.get( "uiR2Event0TaskWaitValidation" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskWaitValidation" ):toUtf8()}, - ["succeeded"] = { menu=i18n.get( "uiR2Event0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Event1TaskSuccess" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - ["is succeeded"] = { menu=i18n.get( "uiR2Test0TaskSuccess" ):toUtf8(), - text=i18n.get( "uiR2Test1TaskSuccess" ):toUtf8()}, - } - } - return logicTranslations -end - - -r2.Features["VisitZone"] = feature - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_features_zone_triggers.lua b/code/ryzom/common/data_common/r2/r2_features_zone_triggers.lua deleted file mode 100644 index cdf83235d..000000000 --- a/code/ryzom/common/data_common/r2/r2_features_zone_triggers.lua +++ /dev/null @@ -1,403 +0,0 @@ - -r2.Features.ZoneTrigger = {} - -local feature = r2.Features.ZoneTrigger - -feature.Name="ZoneTrigger" - - -feature.Description="Triggers an event when a player enters or leaves a zone" - -feature.Components = {} - -local classZoneTriggerVersion = 1 - -feature.Components.ZoneTrigger = - { - PropertySheetHeader = r2.getDisplayButtonHeader("r2.events:openEditor()", "uiR2EdEditEventsButton"), - BaseClass="LogicEntity", - Name="ZoneTrigger", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - Version=classZoneTriggerVersion , - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - ----------------------------------------------------------------------------------------------- - Parameters = {}, - ApplicableActions = { - "activate", "deactivate", "simulate on enter", "simulate on leave" - }, - Events = { - "On Player Arrived", - "On Player Left", - "activation", "deactivation" - -- "On First Player Arrived", - -- "On First Player Left", - }, - Conditions = {"is active", "is inactive", "is empty", "is full"}, - TextContexts = {}, - TextParameters = {}, - LiveParameters = {}, - ----------------------------------------------------------------------------------------------- - Prop = - { - {Name="InstanceId", Type="String", WidgetStyle="StaticText", Visible = false}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="Cyclic", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue="1"}, - {Name="Components", Type="Table"} - - }, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) -- fill by ancestor - this:getAvailableDisplayModeCommands(dest) - end, - ----------------------------------------------------------------------------------------------- - -- from base class - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - getSelectBarSons = function(this) - return Components - end, - --------------------------------------------------------------------------------------------------------- - -- from base class - canHaveSelectBarSons = function(this) - return false; - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - - - pretranslate = function(this, context) - local rtNpcGrp, aiState = r2.Translator.createAiGroup(this, context) - local zone = r2:getInstanceFromId(this._Zone) - Logic.assignZone(aiState, zone) - aiState.IsTriggerZone = 1 - end, - - translate = function(this, context) - - local instance = this - local instanceId = this.InstanceId - local rtNpcGrp = r2.Translator.getRtGroup(context, instanceId) - local states = r2.Translator.getRtStatesNames(context, instanceId) - - - - - - do - local eventHandler = r2.Translator.createEvent("on_player_arrived", states, rtNpcGrp.Id) - eventHandler.IsTriggerZone = 1 - local action = r2.Translator.createAction("on_player_arrived_impl", rtNpcGrp.Id) - - table.insert(context.RtAct.Events, eventHandler) - -- insert a npc_event_handler_action - table.insert(eventHandler.ActionsId, action.Id) - table.insert(context.RtAct.Actions, action) - end - - do - local eventHandler = r2.Translator.createEvent("on_player_left", states, rtNpcGrp.Id) - eventHandler.IsTriggerZone = 1 - local action = r2.Translator.createAction("on_player_left_impl", rtNpcGrp.Id) - - table.insert(context.RtAct.Events, eventHandler) - -- insert a npc_event_handler_action - table.insert(eventHandler.ActionsId, action.Id) - table.insert(context.RtAct.Actions, action) - end - - do - local eventHandler =r2.Translator.createEvent("start_of_state", states, rtNpcGrp.Id) - eventHandler.IsTriggerZone = 1 - local action = r2.Translator.createAction("trigger_zone_init", rtNpcGrp.Id, instance.Active, instance.Cyclic ) - - table.insert(context.RtAct.Events, eventHandler) - -- insert a npc_event_handler_action - table.insert(eventHandler.ActionsId, action.Id) - table.insert(context.RtAct.Actions, action) - end - - -- AdD - r2.Translator.translateAiGroup(this, context) - --r2.Translator.translateEventHandlers( context, instance, instance.Behavior.Actions, rtNpcGrp) - - end, - - updateVersion = function(this, scenarioValue, currentValue ) - local patchValue = scenarioValue - if patchValue < 1 then - if not this.Active then r2.requestSetNode(this.InstanceId, "Active", 1) end - if not this.Cyclic then r2.requestSetNode(this.InstanceId, "Cyclic", 1) end - patchValue = 1 - end - - if patchValue == currentValue then return true end - return false - end, - - - } - --- Specific to the component Zone -local component = feature.Components.ZoneTrigger - - -component.getLogicAction = function(entity, context, action) - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - - local theType = action.Action.Type - local retAction = nil - if theType == "activate" then - retAction = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0, - r2.Translator.createAction("trigger_zone_activates", rtNpcGrp.Id)) - elseif theType == "deactivate" then - retAction = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1, - r2.Translator.createAction("trigger_zone_deactivates", rtNpcGrp.Id)) - elseif theType == "simulate on enter" then - retAction = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1, - r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 1)) - elseif theType == "simulate on leave" then - retAction = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1, - r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 2)) - - end - - return retAction, retAction -end - -component.getLogicCondition = function(this, context, condition) - assert( condition.Class == "ConditionStep") - local component = r2:getInstanceFromId(condition.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - local states = r2.Translator.getRtStatesNames(context, component.InstanceId) - assert(states) - - local theType = condition.Condition.Type - if theType == "is empty" then - local retAction = r2.Translator.createAction("trigger_zone_min_player", rtNpcGrp.Id, states, 0) - return retAction, retAction - elseif theType == "is full" then - local retAction = r2.Translator.createAction("trigger_zone_min_player", rtNpcGrp.Id, states, 1) - return retAction, retAction - end - - - return r2.Translator.getFeatureActivationCondition(condition, rtNpcGrp) -end - -component.getLogicEvent = function(this, context, event) - assert( event.Class == "LogicEntityAction") - - local component = this -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = r2.Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local eventType = tostring(event.Event.Type) - - local eventHandler, lastCondition = nil, nil - - if eventType == "On Player Arrived" then - local e, c1, c2 =r2.Translator.getComponentUserEvent(rtNpcGrp, 1); - e.IsTriggerZone = 1 - return e, c1, c2 - elseif eventType == "On Player Left" then - local e, c1, c2 = r2.Translator.getComponentUserEvent(rtNpcGrp, 2); - e.IsTriggerZone = 1 - return e, c1, c2 - elseif eventType == "activation" then - e, c1, c2 = r2.Translator.getComponentUserEvent(rtNpcGrp, 4) - e.IsTriggerZone = 1 - return e, c1, c2 - elseif eventType == "deactivation" then - e, c1, c2 = r2.Translator.getComponentUserEvent(rtNpcGrp, 5) - e.IsTriggerZone = 1 - return e, c1, c2 - end - return eventHandler, firstCondition, lastCondition -end - - -local ZoneTriggerRadius = 5 -local ZoneTriggerNumCorners = 4 - -component.createComponent = function(x, y) - - local comp = r2.newComponent("ZoneTrigger") - assert(comp) - assert(comp.Position) - - comp.Base = r2.Translator.getDebugBase("palette.entities.botobjects.trigger_zone") - comp.Name = r2:genInstanceName(i18n.get("uiR2EDRollout_ZoneTrigger")):toUtf8() - - comp.Position.x = x - comp.Position.y = y - comp.Position.z = r2:snapZToGround(x, y) - - local zone = r2.newComponent("Region") - r2.Utils.createTriggerRegion(zone, 0, 0, ZoneTriggerRadius) -- the region doesn't inherit the feature position, so must give its pos - zone.Deletable = 0 - zone.Position.x = 0 -- comp.Position.x - zone.Position.y = 0 -- comp.Position.y - zone.Position.z = 0 -- comp.Position.z - zone.InheritPos = 1 -- don't inherit position of parents - zone.Name = r2:genInstanceName(i18n.get("uiR2EDPlaces")):toUtf8() - comp._Zone = zone.InstanceId - table.insert(comp.Components, zone) - - - return comp -end - -component.create = function() - - if not r2:checkAiQuota() then return end - - local function paramsOk(resultTable) - - r2.requestNewAction(i18n.get("uiR2EDNewZoneTriggersFeatureAction")) - - local x = tonumber( resultTable["X"] ) - local y = tonumber( resultTable["Y"] ) - local showAgain = tonumber(resultTable["Display"]) - - if not x or not y then - debugInfo("Can't create Component") - return - end - - if showAgain == 1 then - r2.setDisplayInfo("ZoneForm", 0) - else r2.setDisplayInfo("ZoneForm", 1) end - - - local component = feature.Components.ZoneTrigger.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function posOk(x, y, z) - debugInfo("Validate creation of a Zone Trigger.") - if r2.mustDisplayInfo("ZoneTrigger") == 1 then - r2.displayFeatureHelp("ZoneTrigger") - end - r2.requestNewAction(i18n.get("uiR2EDNewZoneTriggersFeatureAction")) - local component = feature.Components.ZoneTrigger.createComponent( x, y) - r2:setCookie(component.InstanceId, "DisplayProp", 1) - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function posCancel() end - - local creature = r2.Translator.getDebugCreature("object_component_trigger_zone.creature") - --r2:choosePos(creature, posOk, posCancel, "createFeatureZoneTrigger") - - local poly = {} - local step = 2 * math.pi / ZoneTriggerNumCorners - for k = 0, ZoneTriggerNumCorners - 1 do - table.insert(poly, CVector2f(ZoneTriggerRadius * math.cos(k * step), ZoneTriggerRadius * math.sin(k * step))) - end - r2:choosePos(creature, posOk, posCancel, "createFeatureZoneTrigger", - "curs_create.tga", - "curs_stop.tga", - { poly }, r2.PrimRender.ComponentRegionLook, r2.PrimRender.ComponentRegionInvalidLook) - - -end - - -function feature.registerForms() - r2.Forms.ZoneForm = - { - Caption = "uiR2EdTriggerZoneParameters", - PropertySheetHeader = - [[ - - ]], - Prop = - { - {Name="Display", Type="Number", WidgetStyle="Boolean", DefaultValue="0", Translation="uiR2showMessageAgain", InvertWidget=true, CaptionWidth=5 }, - } - } - -end - ------------------------------------------ ---- register the curent Feature to menu - -function component:getLogicTranslations() - -- register trad - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - ["simulate on enter"] = { menu=i18n.get( "uiR2AA0ZoneTriggerSimEnter" ):toUtf8(), - text=i18n.get( "uiR2AA1ZoneTriggerSimEnter" ):toUtf8()}, - ["simulate on leave"] = { menu=i18n.get( "uiR2AA0ZoneTriggerSimExit" ):toUtf8(), - text=i18n.get( "uiR2AA1ZoneTriggerSimExit" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["On Player Arrived"] = { menu=i18n.get( "uiR2Event0ZoneTriggerEntry" ):toUtf8(), - text=i18n.get( "uiR2Event1ZoneTriggerEntry" ):toUtf8()}, - ["On Player Left"] = { menu=i18n.get( "uiR2Event0ZoneTriggerExit" ):toUtf8(), - text=i18n.get( "uiR2Event1ZoneTriggerExit" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - ["is empty"] = { menu=i18n.get( "uiR2Test0ZoneTriggerEmpty" ):toUtf8(), - text=i18n.get( "uiR2Test1ZoneTriggerEmpty" ):toUtf8()}, - ["is full"] = { menu=i18n.get( "uiR2Test0ZoneTriggerFull" ):toUtf8(), - text=i18n.get( "uiR2Test1ZoneTriggerFull" ):toUtf8()}, - - - } - } - - return logicTranslations -end - -r2.Features["ZoneTrigger"] = feature - - - diff --git a/code/ryzom/common/data_common/r2/r2_init.lua b/code/ryzom/common/data_common/r2/r2_init.lua deleted file mode 100644 index fc04587ed..000000000 --- a/code/ryzom/common/data_common/r2/r2_init.lua +++ /dev/null @@ -1,35 +0,0 @@ --- main init function - -r2.init = function () - local function protected() - - debugInfo("r2.init begin") - profileFunction(r2.registerHighLevel, "r2.registerHighLevel") - profileFunction(r2.registerBasicBricks, "r2.registerBasicBricks") - profileFunction(r2.loadFeatures, "r2.loadFeatures") - profileFunction(r2.loadPalette, "r2.loadPalette") - - profileFunction(r2.setupClasses, "r2.setupClasses") - - -- tmp - if r2.InClient == true then - --r2:testPropertySheet() - profileMethod(r2, "buildAllPropertySheetsAndForms", "r2:buildAllPropertySheetsAndForms") - end - -- IMPORTANT : should be called after all parameters of classes (displayers ...) have been initialized - r2.TextMgr = r2.newComponent("TextManager") - - - debugInfo("r2.init end") - end - - - local ok, errMsg = pcall(protected) - - if not ok then - debugInfo("Error while initialization:'".. errMsg.."'") - end - - -end - diff --git a/code/ryzom/common/data_common/r2/r2_islands.xml b/code/ryzom/common/data_common/r2/r2_islands.xml deleted file mode 100644 index a8209512d..000000000 --- a/code/ryzom/common/data_common/r2/r2_islands.xml +++ /dev/null @@ -1,2847 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_logic.lua b/code/ryzom/common/data_common/r2/r2_logic.lua deleted file mode 100644 index d50a15faf..000000000 --- a/code/ryzom/common/data_common/r2/r2_logic.lua +++ /dev/null @@ -1,2637 +0,0 @@ - --- --- - -Logic = {} - -Logic.Activities = {"Follow Route", "Patrol", "Repeat Road", "Deploy", "Wander", "Rest In Zone", "Feed In Zone", "Hunt In Zone", "Guard Zone", "Stand Still", "Stand On Start Point", "Go To Start Point"} -Logic.TimeLimits = {"No Limit", "Until", "Few Sec", "Few Min", "Chat", "Season", "Day", "Month"} -Logic.Seasons = {"Spring", "Summer", "Autumn", "Winter"} -Logic.Days = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"} -Logic.Months = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"} -Logic.ScriptActions ={"Sit Down", "Stand Up", "Go To Step", "Set Activity", "Stop Actions", "Start Mission"} - -Logic.EventModes ={"Once Only", "Repeating"} -Logic.EventTypes ={"Time", "Place", "Entity or Group", "State Machine", "Counter"} -Logic.ConditionTypes ={ - {}, - {"Any player in zone", "All players in zone", "No players in zone", "Some players in zone"}, - {"At Destination", "Enters State", "Leaves State", "Activity Is", "Die", "Is Attacked"}, - {}, - {"v0_changed", "v3_changed", "Equals", "Lesser", "Greater", ""}, - } - -Logic.ChatTypes = {"None", "Repeating", "Non Repeating", "Continue"} -Logic.InteractionTypes = {"Give", "Say"} - -Logic.Name = "Activity" -Logic.Description = "A feature for describing activities sequences" - - - - -Logic.Components = {} - - - - - -- ACTION ------------------- -Logic.Components.LogicEntityAction = - { - BaseClass ="BaseClass", - Name = "LogicEntityAction", - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "logicEntityActionPropertySheetDisplayer", - Prop = - { - {Name ="Name", Type ="String"}, - {Name ="Event", Type ="EventType"}, - {Name ="Actions", Type ="Table"}, -- "ActionStep" list - {Name ="Conditions", Type ="Table"}, -- "ConditionStep" list - }, - - getName = function(this) - - local logicEntity = this.Parent.Parent.Parent - assert(logicEntity) - - if logicEntity:isGrouped() then - logicEntity = logicEntity.ParentInstance - end - - local coloredName = (logicEntity.InstanceId == r2.events.filteredLogicEntityId) - - local eventType = r2.events.keyWordsColor .. i18n.get("uiR2EdEventTxtPreEvent"):toUtf8() .. " " - - if coloredName then - eventType = eventType .. r2.events.filterWordColor - else - eventType = eventType .. r2.events.entityWordColor - end - local name = "No name" - if logicEntity.getName then - name = logicEntity:getName() - elseif logicEntity.Name then - name = logicEntity.Name - end - eventType = eventType .. name .. " " - eventType = eventType .. r2.events.communWordsColor - - eventType = eventType ..r2.getLogicAttribute(logicEntity.Class, "Events", this.Event.Type).text - - if this.Event.Value~="" then - local instance = r2:getInstanceFromId(this.Event.Value) - assert(instance) - - eventType = eventType .. " " .. instance:getShortName() - end - - - if this.Event.ValueString and this.Event.ValueString ~= "" then - if string.gfind(eventType, "%%1")() then - eventType = string.gsub(eventType, "%%1", "'"..tostring(this.Event.ValueString).."'") - else - eventType = eventType .. " '" .. tostring(this.Event.ValueString).. "'" - end - end - - eventType = eventType .. ", " - - - -- conditions - local conditionsList = "" - for i=0, this.Conditions.Size-1 do - local conditionInst = this.Conditions[i] - - if conditionInst.Entity~="" and conditionInst.Condition.Type~="" then - - conditionsList = conditionsList .. "\n" .. r2.events.keyWordsColor - ..string.upper(i18n.get("uiR2EdEventTxtPreCondition"):toUtf8()).." " - .. r2.events.communWordsColor - - local conditionLogicEntity = r2:getInstanceFromId(tostring(conditionInst.Entity)) - assert(conditionLogicEntity) - - coloredName = (conditionLogicEntity.InstanceId == r2.events.filteredLogicEntityId) - if coloredName then - conditionsList = conditionsList .. r2.events.filterWordColor - else - conditionsList = conditionsList .. r2.events.entityWordColor - end - conditionsList = conditionsList .. conditionLogicEntity.Name .. " " - conditionsList = conditionsList .. r2.events.communWordsColor - - conditionsList = conditionsList ..r2.getLogicAttribute(conditionLogicEntity.Class, "Conditions", conditionInst.Condition.Type).text - - if conditionInst.Condition.Value~="" then - local instance = r2:getInstanceFromId(conditionInst.Condition.Value) - assert(instance) - conditionsList = conditionsList .. " '" .. instance:getShortName() .."'" - end - - conditionsList = conditionsList .. ", " - end - end - - -- actions - local actionsList = "" - for i=0, this.Actions.Size-1 do - local actionInst = this.Actions[i] - - if actionInst.Entity~="" and actionInst.Action.Type~="" then - - actionsList = actionsList .. "\n" .. r2.events.keyWordsColor - ..string.upper(i18n.get("uiR2EdEventTxtPreActions"):toUtf8()).." " - .. r2.events.communWordsColor - - local actionLogicEntity = r2:getInstanceFromId(tostring(actionInst.Entity)) - assert(actionLogicEntity) - - coloredName = (actionLogicEntity.InstanceId == r2.events.filteredLogicEntityId) - if coloredName then - actionsList = actionsList .. r2.events.filterWordColor - else - actionsList = actionsList .. r2.events.entityWordColor - end - local name = "No name" - if actionLogicEntity.getName then - name = actionLogicEntity:getName() - elseif actionLogicEntity.Name then - name = actionLogicEntity.Name - end - actionsList = actionsList .. name .. " " - actionsList = actionsList .. r2.events.communWordsColor - - actionsList = actionsList ..r2.getLogicAttribute(actionLogicEntity.Class, "ApplicableActions", actionInst.Action.Type).text - if actionInst.Action.Value~="" then - local instance = r2:getInstanceFromId(actionInst.Action.Value) - assert(instance) - actionsList = actionsList .. " '" .. instance:getShortName() .. "'" - end - - if actionInst.Action.ValueString and actionInst.Action.ValueString ~= "" then - - if string.gfind(actionsList, "%%1")() then - actionsList = string.gsub(actionsList, "%%1", "'"..tostring(actionInst.Action.ValueString).."'") - else - actionsList = actionsList .. " '" .. tostring(actionInst.Action.ValueString).. "'" - end - end - - if i~=this.Actions.Size-1 then - actionsList = actionsList .. "," - else - actionsList = actionsList .. "." - end - end - end - - if actionsList=="" then - actionsList = "\n..." - end - - return eventType .. conditionsList .. actionsList --.. "\n" - end, - - getLogicEntityParent = function(this) - - local logicEntity = this.Parent.Parent.Parent - if logicEntity:isGrouped() then logicEntity = logicEntity.Parent.Parent end - - return logicEntity - end, - - -- The act of the event - getLogicAct = function(this) - - local currentAct = r2:getCurrentAct() - local baseAct = r2.Scenario:getBaseAct() - local isBaseAct = false - local presentActs = {} - local isCurrentAct = false - local counter = 0 - - - local entity = this:getLogicEntityParent() - if entity and entity.getParentAct then - local act = entity:getParentAct() - if act then - if act==currentAct then - isCurrentAct=true - elseif act==baseAct then - isBaseAct = true - else - presentActs[act.InstanceId] = act.InstanceId - counter = counter+1 - end - end - end - - - local function verifyAct ( container) - - local key, value = next(container, nil) - while key do - if value.Action and value.Action.Type == "Start Act" then - else - local entityId = value.Entity - local entity= r2:getInstanceFromId(entityId) - if entity and entity.getParentAct then - local act = entity:getParentAct() - if act then - if act==currentAct then - isCurrentAct=true - elseif act==baseAct then - isBaseAct = true - else - presentActs[act.InstanceId] = act.InstanceId - counter = counter+1 - end - end - end - end - key, value = next(container, key) - end - end - - verifyAct(this.Actions) - verifyAct(this.Conditions) - - if counter>=2 or (counter==1 and isCurrentAct) then - return nil - elseif counter==1 and not isCurrentAct and isBaseAct then - local act = nil - for k, actId in pairs(presentActs) do - act = r2:getInstanceFromId(actId) - break - end - --inspect(act) - return act - else - --inspect(currentAct) - return currentAct - end - end, - - - - - ---------- - -- called upon translation - getLogicActForTranslate = function(this) - local currentAct = this:getLogicEntityParent():getParentAct() - local baseAct = r2.Scenario:getBaseAct() - - local entity = this.Event.Entity - if entity and entity.getParentAct then - local act = entity:getParentAct() - if currentAct == nil then - currentAct = act - elseif act ~= currentAct then - if currentAct == baseAct then - currentAct = act - elseif act == baseAct then - -- do nothing - else - return nil - end - end - end - - - - local function verifyAct ( container) - local key, value = next(container, nil) - while key do - if value.Action and value.Action.Type == "Start Act" then - else - local entityId = value.Entity - local entity= r2:getInstanceFromId(entityId) - if entity and entity.getParentAct then - local act = entity:getParentAct() - if act then - if currentAct == nil then - currentAct = act - elseif act ~= currentAct then - if currentAct == baseAct then - currentAct = act - elseif act == baseAct then - -- do nothing - else return false - end - end - end - end - end - key, value = next(container, key) - end - return true - end - - - if not verifyAct(this.Actions) then return false end - if not verifyAct(this.Conditions) then return false end - return currentAct - end, - -- - getLogicActInstanceId = function(this) - --local ok, act = pcall(Logic.Components.LogicEntityAction.getLogicAct, this) - local ok, act = pcall(Logic.Components.LogicEntityAction.getLogicActForTranslate, this) - if not ok or not act then - return r2.RefId("") - end - - return act.InstanceId - end, - } - -Logic.Components.EventType = - { - BaseClass ="BaseClass", - Name = "EventType", - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "eventTypePropertySheetDisplayer", - Prop = - { - {Name ="Type", Type ="String"}, - {Name ="Value", Type ="RefId"}, -- if type is end of activity/chat step/sequence, instance id - {Name ="ValueString", Type ="String", DefaultValue="", DefaultInBase=1}, -- if type is emit user event, sub timer... - - } - } - -local classActionStepVersion = 2 -Logic.Components.ActionStep = { - BaseClass ="BaseClass", - Name = "ActionStep", - Version = classActionStepVersion, - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "actionStepPropertySheetDisplayer", - Prop = - { - {Name ="Entity", Type ="RefId"}, -- entity target id - {Name ="Action", Type ="ActionType"} -- sequence id - }, - - updateVersion = function(this, scenarioValue, currentValue ) - - local patchValue = scenarioValue - if patchValue < 1 then - local invalidActions = {} - invalidActions["desactivate"] = "deactivate" - invalidActions["Desactivate"] = "deactivate" - r2.updateLogicActions(this, invalidActions, "BanditCamp") - patchValue = 1 - end - - if patchValue < 2 then - - local action = this.Action - if action.Type == "Add 10 Seconds" then - r2.requestSetNode(action.InstanceId, "Type", "add seconds") - r2.requestInsertNode(action.InstanceId, "", -1, "ValueString", "10") - end - - if action.Type == "Sub 10 seconds" then - r2.requestSetNode(action.InstanceId, "Type", "sub seconds") - r2.requestInsertNode(action.InstanceId, "", -1, "ValueString", "10") - end - if action.Type == "Add 1 minute" then - r2.requestSetNode(action.InstanceId, "Type", "add seconds") - r2.requestInsertNode(action.InstanceId, "", -1, "ValueString", "60") - end - - if action.Type == "Sub 1 minute" then - r2.requestSetNode(action.InstanceId, "Type", "sub seconds") - r2.requestInsertNode(action.InstanceId, "", -1, "ValueString", "60") - end - - patchValue = 2 - end - - if patchValue == currentValue then return true end - return false - end, - } - - -Logic.Components.ActionType = - { - BaseClass ="BaseClass", - Name = "ActionType", - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "actionTypePropertySheetDisplayer", - Prop = - { - {Name ="Type", Type ="String"}, - {Name ="Value", Type ="RefId"}, -- if type is begin of activity/chat sequence, instance id - {Name ="ValueString", Type ="String", DefaultValue="", DefaultInBase=1}, -- if type is emit user event, sub timer... - - - } - } - -Logic.Components.ConditionStep = - { - BaseClass ="BaseClass", - Name = "ConditionStep", - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "conditionStepPropertySheetDisplayer", - Prop = - { - {Name ="Entity", Type ="RefId"}, -- entity id - {Name ="Condition", Type ="ConditionType"} - - } - } - -Logic.Components.ConditionType = - { - BaseClass ="BaseClass", - Name = "ConditionType", - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "conditionTypePropertySheetDisplayer", - Prop = - { - {Name ="Type", Type ="String"}, - {Name ="Value", Type ="RefId"}, -- if type is being in activity/chat step/sequence, instance id - - - } - } - - -- REACTION ----------------- - -Logic.Components.LogicEntityReaction = - { - BaseClass ="BaseClass", - Name = "LogicEntityReaction", - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "logicEntityReactionPropertySheetDisplayer", - Prop = - { - {Name ="Name", Type ="String"}, - {Name ="LogicEntityAction", Type ="String"}, -- id of associated LogicEntityAction - {Name ="ActionStep", Type ="String"}, -- id of associated ActionStep - } - } - -Logic.Components.ChatAction= - { - BaseClass ="BaseClass", - Name ="ChatAction", - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "chatActionPropertySheetDisplayer", - Prop = - { - {Name ="Who", Type ="RefId"}, - {Name ="WhoNoEntity", Type ="String"}, - {Name ="Says", Type ="String"}, - {Name ="Emote", Type ="String"}, - {Name ="Facing", Type ="RefId"}, --- {Name ="FacingNoEntity", Type ="String"}, - } - } - -Logic.Components.ChatStep = { - BaseClass ="BaseClass", - Name = "ChatStep", - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "chatStepPropertySheetDisplayer", - Prop = - { - {Name ="Actions", Type ="Table"}, - {Name ="Time", Type ="Number" }, - {Name ="Name", Type ="String" } - }, - - getName = function(this) - - -- after time - local minNb, secNb = r2.dialogs:calculMinSec(this.Time) - local time = "" - if minNb ~= 0 then - time = tostring(minNb)..i18n.get("uiR2EdShortMinutes"):toUtf8() - end - time = time.." " ..tostring(secNb)..i18n.get("uiR2EdShortSeconds"):toUtf8() - local afterTime = "(" ..i18n.get("uiR2EdAfter"):toUtf8().." ".. time..") " - - -- says - local whoToWho = "" - local action = this.Actions[0] - local who = action.Who - if who=="" then who=action.WhoNoEntity end - if who and who ~= "" then - - if r2:getInstanceFromId(who) then - who=r2:getInstanceFromId(who).Name - else - who = r2.dialogs.whoToWhoTranslation[who] - end - - whoToWho = who .. " " - - local facing = action.Facing - if facing~="" then - whoToWho = whoToWho ..i18n.get("uiR2EdSaysTo"):toUtf8().. " " .. r2:getInstanceFromId(facing).Name .. " " - end - - local emote = action.Emote - if emote~="" and r2.dialogs.fromEmoteIdToName[emote] ~= nil then - whoToWho = whoToWho .."(" .. r2.dialogs.fromEmoteIdToName[emote] .. ") :" - end - end - - return afterTime..whoToWho - - end, - - getShortName = function(this) - - -- says - local saysWhat = "" - local action = this.Actions[0] - local who = action.Who - if who ~= "" or WhoNoEntity~="" then - who = r2:getInstanceFromId(who) - if who then - saysWhat = who.Name - elseif action.WhoNoEntity=="_System" then - saysWhat = i18n.get("uiR2EdSystem"):toUtf8() - elseif action.WhoNoEntity=="_DM" then - saysWhat = i18n.get("uiR2EdDonjonMaster"):toUtf8() - end - - saysWhat = saysWhat .. " " ..i18n.get("uiR2EdSays"):toUtf8().. " " - - local says = action.Says - if says ~= "" then - local inst=r2:getInstanceFromId(says) - if inst then - says = inst.Text - local uc_says = ucstring() - uc_says:fromUtf8(says) - uc_says = uc_says:substr(0, 4) - says = uc_says:toUtf8() - end - - end - - saysWhat = saysWhat .. says .. "..." - end - - return saysWhat - - end, - - -------------------------------------------------------------------------------------------- - -- from 'BaseClass' - getParentTreeNode = function(this) - end, - } - - -local classChatSequenceVersion = 1 -Logic.Components.ChatSequence = { - PropertySheetHeader = r2.getDisplayButtonHeader("r2.dialogs:openEditor()", "uiR2EdEditDialogButton"), - BaseClass = "LogicEntity", - Name = "ChatSequence", - InEventUI = true, - Menu="ui:interface:r2ed_feature_menu", - Version = classChatSequenceVersion, - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "chatSequencePropertySheetDisplayer", - - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - - Parameters = {}, - ApplicableActions = { - "activate", "deactivate", "starts dialog", "stops dialog", "starts chat" , "continues dialog" - }, - Events = { - "start of dialog", "end of dialog" , - "start of chat", "end of chat", - "activation", "deactivation" - }, - Conditions = { - "is not in dialog", "is in dialog", "is in chat" - }, - TextContexts = {}, - TextParameters = {}, - LiveParameters = {}, - - - Prop = - { - {Name = "Type", Type="String",DefaultValue = "None", Visible=false}, - {Name ="Repeating", Type="Number" ,DefaultValue = "0", Visible=false}, - {Name="Components",Type="Table"}, - {Name="SubComponents", Type="Table"}, - {Name="Name", Type="String", MaxNumChar="32"}, - {Name="AutoStart", Type="Number", WidgetStyle="Boolean", DefaultValue="1", Visible=function(this) return this:mustDisplayAutostart() end}, - {Name="Active", Type="Number", WidgetStyle="Boolean", DefaultValue = "1"}, - }, - - - mustDisplayAutostart = function(this) - if this.Class == "ProximityDialog" then - return false - end - return true - end, - - -- it's a feature - getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end, - - onPostCreate = function(this) - --this:createGhostComponents() - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - - end, - - create = function() - - --if r2:getLeftQuota() <= 0 then -- ?? - -- r2:makeRoomMsg() - -- return - --end - - local function posOk(x, y, z) - if r2.mustDisplayInfo("ChatSequence") == 1 then - r2.displayFeatureHelp("ChatSequence") - end - debugInfo(string.format("Validate creation of 'Dialog' at pos (%d, %d, %d)", x, y, z)) - r2.dialogs:newSequenceInst(x, y, z) - end - local function posCancel() - debugInfo("Cancel choice 'Dialog' position") - end - - local creature = r2.Translator.getDebugCreature("object_component_dialog.creature") - r2:choosePos(creature, posOk, posCancel, "createDialog") - end, - - ---- get Name ------ - getName = function(this) - - local name = this.Name - if name == "" then - - local index = r2.logicComponents:searchElementIndex(this) - if index >= 0 then - name = i18n.get("uiR2EDDialog"):toUtf8() .. index - end - end - - return name - end, - - ---- get Name ------ - getShortName = function(this) - - return this:getName() - end, - - --------------------------------------------------------------------------------------------------------- - - editDialogs = function(this) - r2.dialogs:openEditor() - end, - - getAvailableCommands = function(this, dest) - r2.Classes.LogicEntity.getAvailableCommands(this, dest) - table.insert(dest, this:buildCommand(this.editDialogs, "edit_dialogs", "uiR2EDEditDialogs", "r2ed_edit_dialog.tga", true)) - this:getAvailableDisplayModeCommands(dest) - end, - - initEventValuesMenu = function(this, menu, categoryEvent) - for ev=0,menu:getNumLine()-1 do - - local eventType = tostring(menu:getLineId(ev)) - - if r2.events.eventTypeWithValue[eventType] == "Number" then - menu:addSubMenu(ev) - local subMenu = menu:getSubMenu(ev) - local func = "" - for i=0, 9 do - local uc_name = ucstring() - uc_name:fromUtf8( tostring(i) ) - func = "r2.events:setEventValue('','" .. categoryEvent .."','".. tostring(i).."')" - subMenu:addLine(uc_name, "lua", func, tostring(i)) - end - - elseif r2.events.eventTypeWithValue[eventType]=="ChatStep" then - - menu:addSubMenu(ev) - local subMenu = menu:getSubMenu(ev) - - for c=0, this.Components.Size-1 do - local chat = this.Components[c] - local uc_name = ucstring() - uc_name:fromUtf8(chat:getShortName()) - subMenu:addLine(uc_name, "lua", - "r2.events:setEventValue('".. chat.InstanceId .."','" .. categoryEvent .. "')", chat.InstanceId) - end - - if this.Components.Size==0 then - subMenu:addLine(i18n.get("uiR2EdNoSelelection"), "", "", "") - end - end - end - end, - - getLogicAction = function(this, context, action) - return r2.Translator.getDialogLogicAction(this, context, action) - end, - getLogicEvent = function(this, context, event) - return r2.Translator.getDialogLogicEvent(this, context, event) - end, - getLogicCondition = function(this, context, condition) - return r2.Translator.getDialogLogicCondition(this, context, condition) - end, - - pretranslate = function(this, context) - r2.Translator.createAiGroup(this, context) - end, - - translate = function(this, context) - r2.Translator.translateFeatureActivation(this, context) - r2.Translator.translateDialog( this, context) - end, - - updateVersion = function(this, scenarioValue, currentValue ) - local patchValue = scenarioValue - if patchValue < 1 then - local subComponents = {} - r2.requestInsertNode(this.InstanceId, "", -1, "SubComponents", subComponents) - r2.requestInsertNode(this.InstanceId, "", -1, "AutoStart", this.Active) - r2.requestSetNode(this.InstanceId, "Active", 1) - r2.requestSetNode(this.InstanceId, "Base", r2.Translator.getDebugBase("palette.entities.botobjects.dialog")) - patchValue = 1 - end - - if patchValue == currentValue then return true end - return false - end, - - initLogicEntitiesInstancesMenu = function(this, subMenu, calledFunction) - - local entitiesTable = r2.Scenario:getAllInstancesByType(this.Name) - for key, entity in pairs(entitiesTable) do - local uc_name = ucstring() - uc_name:fromUtf8(entity.Name) - subMenu:addLine(uc_name, "lua", calledFunction.."('".. entity.InstanceId .."')", entity.InstanceId) - end - - if table.getn(entitiesTable)==0 then - subMenu:addLine(i18n.get("uiR2EdNoSelelection"), "", "", "") - end - end - - } - - -local ActivityStepVersion = 1 -Logic.Components.ActivityStep = { - BaseClass ="BaseClass", - Name ="ActivityStep", - Version = ActivityStepVersion, - BuildPropertySheet = true, - Menu ="ui:interface:r2ed_feature_menu", - - BuildPropertySheet = false, - DisplayerVisualParams = - { - Look = r2.PrimRender.GroupLook, - ArrayName = "Components" - }, - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "activityStepPropertySheetDisplayer", - - Prop = - { - {Name="Activity", Type="String"}, - {Name="ActivityZoneId",Type="RefId",Category="ActivityStep"}, - {Name="TimeLimit",Type="String",Category="ActivityStep"}, - {Name="TimeLimitValue", Type="String",Category="ActivityStep",Category="ActivityStep"}, - {Name="RoadCountLimit", Type="String",Category="ActivityStep",Category="ActivityStep", DefaultInBase = 1, DefaultValue = "0"}, - {Name="Chat",Type="RefId"}, - {Name = "Type", Type="String",DefaultValue = "None"}, --TEMP TEMP TEMP - {Name="EventsIds",Type="Table"}, - {Name="Name", Type="String", MaxNumChar="32"} - }, - -- get sequencable parent for this activity step - getSequencableParent = function(this) - local currParent = this.Parent - while currParent do - if currParent.InstanceId and currParent:isSequencable() then - return currParent - end - currParent = currParent.Parent - end - return nil - end, - getVerbLookupString = function(this) - local seqParent = this:getSequencableParent() - if seqParent then - return seqParent:getActivityVerbLookupName(this.Activity) - else - return this.Activity - end - end, - -- do lookup from the verb lookup string used to know the display name, and button texture - doLookupFromVerb = function(this, lookupTable) - local lookupString = this:getVerbLookupString() - -- activity type - local value = lookupTable[lookupString] - if not value then - debugInfo(colorTag(255,0,0).."The activity '".. lookupString .."' is not properly registred") - return nil - end - return value - end, - -- get texture for the button displayed in the mini activity view - getMiniButtonTexture = function(this) - local result = this:doLookupFromVerb(r2.miniActivities.activityTextures) - if result then return result end - return "brick_default.tga" - end, - -- get the verb for this activity (rest, feed, patrol etc...) - getVerb = function(this) - local result = this:doLookupFromVerb(r2.activities.activityTypeTranslation) - if result then result = result.trans end - if result then return result end - return ucstring("Activity not registered : " .. lookupString) - end, - -- element name - getName = function(this) - local activityType = this:getVerb() .. " " - if this.ActivityZoneId~= "" then - local place = r2:getInstanceFromId(tostring(this.ActivityZoneId)) - if place~=nil then - activityType = activityType.. place.Name .." " - end - end - - -- activity time - local activityTime = "" - if this.TimeLimit == "Few Sec" then - - local hourNb, minNb, secNb = r2.logicComponents:calculHourMinSec(tonumber(this.TimeLimitValue)) - - local timeLimitText = i18n.get("uiR2EdFor"):toUtf8() .. " " - if hourNb ~= 0 then timeLimitText = timeLimitText .. hourNb .. i18n.get("uiR2EdShortHours"):toUtf8() .. " " end - if minNb ~= 0 then timeLimitText = timeLimitText .. minNb .. i18n.get("uiR2EdShortMinutes"):toUtf8() .. " " end - timeLimitText = timeLimitText .. secNb .. i18n.get("uiR2EdShortSeconds"):toUtf8() - - activityTime = timeLimitText - - elseif r2.activities.timeLimitsTranslation[this.TimeLimit] ~= nil then - activityTime = string.lower(r2.activities.timeLimitsTranslation[this.TimeLimit]) - end - - return activityType..activityTime - end, - - -- element name - getShortName = function(this) - - -- activity type - local activityType = this:getVerb() - if this.ActivityZoneId~= "" then - local place = r2:getInstanceFromId(tostring(this.ActivityZoneId)) - if place~=nil then - activityType = activityType.. " " .. place.Name - end - end - - return activityType - end, - - updateVersion = function(this, scenarioValue, currentValue ) - local patchValue = scenarioValue - - if patchValue < 1 then - local activity = this.Activity - if (activity and activity == "Inactive") then - r2.requestSetNode(this.InstanceId, "Activity", "Stand Still") - end - local name = this.Name - - patchValue = 1 - end - if patchValue == currentValue then return true end - return false - end - } - - - -Logic.Components.ActivitySequence = { - BaseClass="BaseClass", - Name="ActivitySequence", - BuildPropertySheet = true, - Menu ="ui:interface:r2ed_feature_menu", - - --DisplayerUI = "R2::CDisplayerLua", - --DisplayerUIParams = "defaultUIDisplayer", - BuildPropertySheet = false, - DisplayerVisual = "R2::CDisplayerVisualActivitySequence", - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "activitySequencePropertySheetDisplayer", - - Prop = - { - --{Name ="InstanceId", Type ="String"}, - {Name ="Repeating", Type ="Number" , DefaultValue = "1"}, - {Name ="Components", Type ="Table"}, - {Name ="Name", Type ="String"} - }, - - ---- get Name ------ - getName = function(this) - - local name = this.Name - if name == "" then - - local index = r2.logicComponents:searchElementIndex(this) - - if index >= 0 then - name = i18n.get("uiR2EdSeq"):toUtf8() .. index - end - end - - return name - end, - - ---- get Name ------ - getShortName = function(this) - - return this:getName() - end, - - -- get ActiveLogicEntity parent - getActiveLogicEntityParent = function(this) - - -- ActiveLogicEntity.Behavior.Activities - local activeLogicEntity = this.Parent.Parent.Parent - - -- NpcGrpFeature.Components - --if activeLogicEntity:isGrouped() then activeLogicEntity = activeLogicEntity.Parent.Parent end - - return activeLogicEntity - end, - } - - - ---this function must be called when we delete a ChatAction, ---to unregister the text -onDeleteChatAction = function(chatAction) - if chatAction.User.DeleteInProgress == true then return end - chatAction.User.DeleteInProgress = true - if chatAction.Says ~= nil and chatAction.Says ~= "" - then - - debugInfo("onDeleteChatAction") - r2.unregisterTextFromId(chatAction.Says) - end -end - ---counts the states created, to ensure states names uniqueness - ---timer used to time the sequences steps -Logic.activityStepTimer = "t0" -Logic.activityStepTimerId = 0 ---timer used to time the chat steps -Logic.chatTimer = "t1" -Logic.chatTimerId = 1 ---timer used inside activities -Logic.activityInternalTimer = "t2" -Logic.activityInternalTimerId = 2 - ---variable used to know which action of the current chat sequence ---must be played -Logic.chatStepVar = "v1" ---variable used to know which chat sequence is currently played -Logic.chatSequenceVar = "v0" ---variable used to know which activity sequence is currently played -Logic.activityStepVar = "v2" ---variable used to know which interrupt action must be executed -Logic.triggerEventVar = "v3" - -Logic.EndOfActivitySequenceEvent = 9 -Logic.EndOfChatSequenceEvent = 8 - ---switch_action which hold all chat sequences -Logic.DialogAction = nil ---switch action holding chat sequences transitions -Logic.DialogAction2 = nil - ---switch_action which hold all sequence steps -Logic.SequenceAction = nil -Logic.ActionStepCounter =0 -Logic.ChatSequenceCounter = 0 ---used to know the names of all the states generated ---to translate this activity -Logic.StatesByName = "" - ---timer_triggered event, triggered ---each time we must enter a new chat step -Logic.DialogEvent = nil - -Logic.DialogEvent2 = nil - ---timer_triggered event, triggered ---each time we must enter a new sequence step -Logic.SequenceEvent = nil - ---hold the states used in the current activity. ---all the states are created at the start of the translation, ---before translating the events and actions. -Logic.States = {} - ---hold the states used in all the activities ---of the group -Logic.ActivitiesStates ={} - ---the activity which is currently being translated. -Logic.CurrentActivity = nil - ----------------------------------------------------- ---to be called once for each sequence of each group ---complete the AiActivity field of the first state of this sequence ---and create the actions to go to the first step -Logic.initGroupActivitiesTranslation = function(context, hlComponent, sequence, first, activityIndex, aiActivity, rtGrp) - assert(context and hlComponent and sequence and activityIndex and aiActivity and rtGrp) - --get the states of this activity - - local activityStates = Logic.ActivitiesStates[ tostring(sequence.InstanceId) ] - assert(sequence.Class == "ActivitySequence") - if not activityStates then - - if hlComponent then - printWarning("Error while translating '" .. hlComponent.Name .. "' activities in sequence " .. sequence.Name) - -- pretranslate sequence.InstanceId errors instanceId not added in currentAct.ActivitiesId ? - return nil - end - end - --get the initial state of this activity - local aiState = activityStates[sequence.InstanceId][1] - Logic.StatesByName = "" - for k, v in pairs(activityStates) - do - if v.Class ~= "RtAiState" - then - local k1, v1 = next( v, nil) - while k1 do - Logic.StatesByName = r2.Utils.concat(Logic.StatesByName, v1.Name) - k1, v1 = next(v, k1) - end - else - Logic.StatesByName = r2.Utils.concat(Logic.StatesByName, v.Name) - end - end - aiState.AiActivity = aiActivity - assert(aiState.AiActivity) - local event = r2.Translator.createEvent("start_of_state", aiState.Name, rtGrp.Name) - -- local event = r2.Translator.createEvent("group_spawned", aiState.Name, rtGrp.Name) - table.insert(context.RtAct.Events, event) - if first == true - then - table.insert(aiState.Children, rtGrp.Id) - end - - local speed = "" - - if hlComponent.Speed and hlComponent.Speed == "run" then speed = "()addProfileParameter(\"running\");\n" end - - local code = "currentActivitySequenceVar = " .. tostring(activityIndex -1 ) ..";\n" - .. "oldActivitySequenceVar = currentActivitySequenceVar;\n" - .. "RoadCountLimit=0;\n" - .. "oldActivityStepVar = -1;\n" - .. "oldActivityStepVar2 = 0;\n" - .. Logic.activityStepVar .." = 0;\n" - .. speed - .."alive = 0;\n" - .."(alive)isAlived();\n" - .. "if (alive == 1)\n{\n" - .. "\t()setTimer(30, " .. Logic.activityStepTimerId .. ");\n" - .. "\tinit = 1;\n" - .. "}\n" - - - -- Fauna activities - - - local action = r2.Translator.createAction("code", code) - action.Name = "startActivitySequence" - - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) - - - - do - local event = r2.Translator.createEvent("group_spawned", aiState.Name, rtGrp.Name) - local action = r2.Translator.createAction("code", "if (init != 1)\n{\n\t()setTimer(30, " .. Logic.activityStepTimerId .. ");\n}\n") - table.insert(context.RtAct.Events, event) - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) - end - - - local leader = hlComponent - - if hlComponent:isKindOf("NpcGrpFeature") then - if hlComponent.Components.Size ~= 0 then - leader = hlComponent.Components[0] - else - leader = nil - end - end -end - ---insert an activity step at the specified position -Logic.insertActivityStep = function(sequence, step, pos) - local n = table.getn(sequence.Components) - if n < pos - then - table.insert(sequence.Components, step) - else - table.insert(sequence.Components, pos, step) - end -end - ---insert a chat step at the specified position -Logic.insertChatStep = function(chatSequence, chatStep, pos) - local n = table.getn(chatSequence.Components) - if n < pos - then - table.insert(chatSequence.Components, chatStep) - else - table.insert(chatSequence.Components, pos) - end -end - - -Logic.createInteraction = function(action, parameter) - local index = Logic.find(Logic.InteractionTypes, action) - local interaction - - if index == nil or parameter == nil - then --- debugInfo(colorTag(255,0,0).."unknown interaction : " .. action .." !") - return nil - end - - interaction = r2.newComponent("Interaction") - interaction.Type = action - interaction.Parameter = parameter - return interaction -end - -Logic.createActivityStep = function(activity, timeLimit, zoneId, time) - local activityStep = nil - - if activity == nil or timeLimit == nil - then - return nil - end - ---checking activity type and time limit type - if Logic.find(Logic.Activities, activity)~= nil and Logic.find(Logic.TimeLimits, timeLimit)~= nil - then - --checking activity parameter - if ( (activity ~= "Stand Still") and (activity ~= "Inactive") and (zoneId == nil) ) - then - --this activity need a zone, and no zone id is given --- debugInfo(colorTag(255,0,0).."activity <" .. activity .."> need a zone id!") - return nil - end - - --checking time parameter - --if time parameter needed, check its presence - if timeLimit~="No Limit" and timeLimit~="Chat" and time == nil - then - --this activity needs a time limit and no limit is given --- debugInfo(colorTag(255,0,0).."Time limit <" .. timeLimit .."> need a time limit parameter!") - return nil - end - - --check season validity - if (timeLimit == "Season") and (Logic.find(Logic.Seasons, time) == nil) - then --- debugInfo(colorTag(255,0,0).."Unknown season: " .. time) - return nil - end - - --check day validity - if (timeLimit == "Day") and (Logic.find(Logic.Days, time) == nil) - then - debugInfo(colorTag(255,0,0).."Uknown week day: " .. time) - return nil - end - - if (timeLimit == "Month") and (Logic.find(Logic.Months, time)== nil) - then --- debugInfo(colorTag(255,0,0,0).."Uknown month: " .. time) - return nil - end - - activityStep = r2.newComponent("ActivityStep") - activityStep.Activity = activity - activityStep.TimeLimit = timeLimit - activityStep.ActivityZoneId = zoneId - activityStep.TimeLimitValue = time - else --- debugInfo(colorTag(255,0,0).."Unknown activity !") - end - return activityStep -end - -Logic.createState = function() - local aiState = r2.newComponent("RtAiState") - aiState.Name = aiState.Id - Logic.StatesByName = Logic.StatesByName .."\n" .. aiState.Name - return aiState -end - ---create the AiStates necessay to translate this step -Logic.createStepStates = function(step, context) - local states = {} - local state = Logic.createState() - table.insert(states, state) - table.insert(context.RtAct.AiStates, state) - if step.Activity == "Patrol" - then - local state = Logic.createState() - table.insert(states, state) - table.insert(context.RtAct.AiStates, state) - end - return states -end - ---assign a zone or a road to an AiState ---if invert is true, invert the road -Logic.assignZone = function(rtAiState, zone, invert) - assert( zone and type(zone) == "userdata") - local points = zone.Points - assert( points ~= nil) - - local size = points.Size + 1 - rtAiState.Pts = {} - local i =0 - local j - - local k, v = next(points, nil) - while k ~= nil - do - assert(v ~= nil) - i = i +1 - if invert == true - then - j = size - i - else - j = i - end - rtAiState.Pts[j]={} - rtAiState.Pts[j].x = r2.getWorldPos(v).x - rtAiState.Pts[j].y = r2.getWorldPos(v).y - rtAiState.Pts[j].z = r2.getWorldPos(v).z - k, v = next(points, k) - end -end - ---create all the states used in this activity Sequence -Logic.createActivityStates = function(context, sequence) - assert( sequence ~= nil) - - local activityStates ={} - --activity's initial stat, aiStopStatee - - -- init state - local aiStartState = r2.newComponent("RtAiState") - aiStartState.Name = aiStartState.Id - Logic.StatesByName = aiStartState.Name - aiStartState.AiMovement = "idle" -- "stand_on_start_point" - table.insert(context.RtAct.AiStates, aiStartState) - - - -- end state - local aiStopState = r2.newComponent("RtAiState") - aiStopState.Name = aiStopState.Id - --Logic.StatesByName = aiStopState.Name - aiStopState.AiMovement = "idle" -- "stand_on_start_point" - table.insert(context.RtAct.AiStates, aiStopState) - - activityStates[sequence.InstanceId]= { aiStartState, aiStopState} - - - if (sequence.Components == nil) then assert(nil) end - --creation of the states of the step - local k, v = next(sequence.Components, nil) - while k do - local states = Logic.createStepStates(v, context) - activityStates[v.InstanceId]= states - k, v = next(sequence.Components, k) - end - Logic.ActivitiesStates[sequence.InstanceId] = activityStates -end - -Logic.translateActivitySequence = function(context, hlComponent, activitySequence, sequenceId, rtNpcGrp) - assert(rtNpcGrp ~= nil) - if context.Real == false - then - return - end - Logic.ActionStepCounter = 0 - Logic.ChatSequenceCounter = 0 - --Logic.States = {} - Logic.CurrentActivity = activitySequence - local ok = false - - local nbSteps = activitySequence.Components.Size - local aiState - local action - local event - local sequence = activitySequence - - - if sequence.Components.Size ==0 - then - return - end - - - Logic.initSequence(context, rtNpcGrp) - if Logic.ActivitiesStates[sequence.InstanceId] then - Logic.States = Logic.ActivitiesStates[sequence.InstanceId] - else - Logic.States = "" - end - - - - local i =1 - local k, activityStep = next(sequence.Components, nil) - while k do - --translate step - Logic.translateActivityStep(context, hlComponent, activitySequence, activityStep, i, rtNpcGrp) - i = i + 1 - k, activityStep = next(sequence.Components, k) - - end - - --create actions to repeat the sequence - if sequence.Repeating == 1 - then - - local code = - "//sequence will repeat".. - "oldChatSequenceVar = " .. Logic.chatSequenceVar .. ";\n" .. - "RoadCountLimit=0;\n" .. - "oldActivityStepVar = " .. Logic.activityStepVar .. ";\n" .. - "oldActivityStepVar2 = " .. Logic.activityStepVar .. " + 1" .. ";\n" .. - "v2=0;\n" .. - "()setTimer(1, " ..Logic.activityStepTimerId .. ");\n" --- .. "()setEvent(" .. Logic.EndOfActivitySequenceEvent ..");\n" - - local action = r2.Translator.createAction("code", code) - action.Name = "repeat_sequence" - table.insert(Logic.SequenceAction.Children, action) - - else - - local backupState = - "//sequence will not repeat".. - "oldChatSequenceVar = " .. Logic.chatSequenceVar .. ";\n" .. - "RoadCountLimit=0;\n".. - "oldActivityStepVar = " .. Logic.activityStepVar .. ";\n" .. - "oldActivityStepVar2 = " .. Logic.activityStepVar .. " + 1" .. ";\n" - - local stateName = Logic.ActivitiesStates[sequence.InstanceId][sequence.InstanceId][2].Id - - local setNextActivityState = "()postNextState(\"" .. r2.getNamespace() .. stateName .."\");\n" - - local action = r2.Translator.createAction("code", backupState - -- .."()setEvent(" .. Logic.EndOfActivitySequenceEvent ..");\n" - ..setNextActivityState) - - - action.Name = "end_of_activity_sequence" - table.insert(Logic.SequenceAction.Children, action) - end - - Logic.SequenceEvent.StatesByName = Logic.StatesByName - Logic.DialogEvent = nil - Logic.SequenceEvent = nil -end - - - -Logic._obsolete_TranslateScriptAction = function(context, step, nextTime) - local actionType = Logic.getAction(step) - assert(actionType~= nil) --- debugInfo(colorTag(0,255,0).. actionType) - - if actionType == "stop_actions" - then - local action = r2.Translator.createAction("set_timer_" ..Logic.chatTimer, "0") - return action - end - - if actionType == "start_mission" - then - local counterMission = context.Components[step.Parameter] - local action = r2.Translator.createAction("trigger_event_1", context.RtCounters[counterMission.InstanceId].RtGroup.Name) --- debugInfo("action created!!") - return action - end - - if 0==1 and actionType == "go_to_step" - then - --TODO - local param = tonumber(step.Parameter) - debugInfo("param = " .. param) - if (param < 1) or (Logic.CurrentActivity.Components[param]== nil) - then --- debugInfo(colorTag(255,0,0).."Impossible to go to step " .. param .." !") - return nil - end - debugInfo(context.Feature.Class) - return Logic.selectActivityStep(param) - end - - if actionType == "set_activity" - then - local group = nil - local param - local rtGroup - if step.Who ~= "" and step.Who ~= nil - then - group = step.Who - rtGroup = r2.Translator.getRtGroup(context, group) - end - - param = tonumber(step.Parameter) - --- debugInfo("param = " .. param) - - local action - if group ~= nil - then - action = r2.Translator.createAction("begin_state", Logic.getActivityInitialStateName(group, param, context)) - assert(action ~= nil) - local index = Logic.addTriggeredAction(context, context.RtGroups[group].Name, action) - action = r2.Translator.createAction("modify_variable", rtGroup.Name ..":" ..Logic.triggerEventVar .." = " .. index) - action.Name ="set_activity" - else - action = r2.Translator.createAction("begin_state", Logic.getActivityInitialStateName(context.Group.Name, param, context)) - assert(action ~= nil) - end - return action - end - - local action = r2.Translator.createAction(actionType) - assert(action ~= nil) - return action -end - - - - -Logic.translateChatAction = function(context, chatSequenceNumber, chatStepNumber, chatSequence, chatStep, chatAction, rtMAction) - local getRtId = r2.Features["TextManager"].getRtId - if chatAction.Class == "ChatAction" - then - local who = r2.Utils.getNpcParam( tostring( chatAction.Who), context) - -- create say action - if not who then - - local whoInstance = r2:getInstanceFromId( tostring(chatAction.Who) ) - local chatSequenceInstance = r2:getInstanceFromId(chatSequence.InstanceId) - - local whoName = "" - if whoInstance then whoName = "(" .. whoInstance.Name ..")" end - - if false then - printWarning( "Error in ChatStep '" .. chatStep:getName() - .. "' of the ChatSequence '" .. chatSequence:getName() .. "'" - .. " the field Who '" .. chatAction.Who .."' is invalid " ) - end - - return nil - - end - - if chatAction.Says ~= "" and chatAction.Says ~= nil - then - local param = getRtId(context, tostring(chatAction.Says)) - if param then - action = r2.Translator.createAction("npc_say", param, who); - - -- action = r2.newComponent("RtNpcEventHandlerAction") - -- action.Action = "npc_say" - - -- action.Parameters = who .."\n" .. param - table.insert(rtMAction.Children, action) - else - debugInfo(colorTag(255,255,0).."WRN: Text " .. chatAction.Says .. " error") - end - - end - - -- create emot action - if tostring(chatAction.Emote) ~= "" and chatAction.Emote ~= nil - then - action = r2.newComponent("RtNpcEventHandlerAction") - action.Action = "emot" - action.Parameters = tostring(chatAction.Emote).."\n" .. who - table.insert(rtMAction.Children, action) - end - - -- create facing action - if tostring(chatAction.Facing) ~= "" and chatAction.Facing ~= nil - then - local facing = r2.Utils.getNpcParam(tostring(chatAction.Facing), context) - if facing then - action = r2.newComponent("RtNpcEventHandlerAction") - action.Action = "facing" - action.Parameters = facing .."\n" .. who - table.insert(rtMAction.Children, action) - else - printWarning("Can not find npc") - end - end - else - printWarning( chatAction.Class .. " not implemented yet") - end -end - -Logic.translateChatStep = function(context, chatSequenceNumber, chatSequence, chatStepNumber, chatStep, rtActionSwitchChatStep) - - assert(chatStep) - assert(chatStep.Class == "ChatStep") - - if chatStep.Actions.Size > 0 then - - local rtMAction = r2.Translator.createAction("multi_actions") - table.insert(rtActionSwitchChatStep.Children, rtMAction) - - local k, chatAction = next(chatStep.Actions, nil) - while k do - Logic.translateChatAction(context, chatSequenceNumber, chatStepNumber, chatSequence, chatStep, chatAction, rtMAction) - - local oldChatAction = chatAction - -- next wait - do - - if (chatStepNumber < chatSequence.Components.Size and chatSequence.Components[chatStepNumber ]) then - - local action = r2.Translator.createAction("code", - "oldChatStepVar = " .. tostring(chatStepNumber)..";\n" .. - Logic.chatStepVar .." = " .. tostring(chatStepNumber+1)..";\n" .. - "()setTimer(" .. tostring(1+chatSequence.Components[chatStepNumber].Time*10) .. ", " .. Logic.chatTimerId .. ");\n"); - action.Name = "next" - table.insert(rtMAction.Children, action) - - else - local action = r2.Translator.createAction("code", - "oldChatStepVar = " .. tostring(chatStepNumber)..";\n" .. - Logic.chatStepVar .." = " .. tostring(chatStepNumber+1)..";\n" .. - "()setEvent(" ..Logic.EndOfChatSequenceEvent ..");\n" .. - "if (repeatSequence == 1)\n{\n " .. Logic.chatSequenceVar .."=" ..Logic.chatSequenceVar ..";\n" .. - "}\n") - - action.Name = "end_of_chat_sequence" - table.insert(rtMAction.Children, action) - - end - - - - end - - - k, chatAction = next(chatStep.Actions, k) - - end - - - else - local action = r2.Translator.createAction("null_action") - action.Name = "empty_chat_step_" .. chatStepNumber - table.insert(rtActionSwitchChatStep.Children, action) - end - -end - -Logic.translateChatSequence = function (context, chatSequenceNumber, chatSequence, rtSwitchChatSequence) - assert(chatSequence) - assert(chatSequence.Class == "ChatSequence") - if chatSequence.Components.Size > 0 then - - local rtActionSwitchChatStep = r2.Translator.createAction("switch_actions", Logic.chatStepVar) - rtActionSwitchChatStep.Name = "switch_chat_step" - table.insert(rtSwitchChatSequence.Children, rtActionSwitchChatStep) - - local chatStepNumber = 0 - - -- initial wait - do - local action = r2.Translator.createAction("code", "oldChatStepVar = 0;\n" - .. Logic.chatStepVar .." = 1;\n()setTimer(" .. tostring( tonumber(chatSequence.Components[0].Time)*10 + 1) .. ", " .. Logic.chatTimerId ..");\n"); - action.Name = "initial_wait" - table.insert(rtActionSwitchChatStep.Children, action) - end - - - local k, chatStep = next(chatSequence.Components, nil) - while k do - chatStepNumber = chatStepNumber + 1 - Logic.translateChatStep(context, chatSequenceNumber, chatSequence, chatStepNumber, chatStep, rtActionSwitchChatStep) - k, chatStep = next(chatSequence.Components, k) - end - else - local action = r2.Translator.createAction("null_action") - action.Name = "empty_chat_sequence_" .. chatSequenceNumber - table.insert(rtSwitchChatSequence.Children, action) - end -end - -Logic.translateChatSequences = function (context, hlComponent, behavior, rtNpcGrp) - assert(behavior.ChatSequences) - if behavior.ChatSequences.Size > 0 then - assert(rtNpcGrp) - - do - local event = r2.Translator.createEvent("variable_" ..Logic.chatSequenceVar .."_changed", "", rtNpcGrp.Name) - event.Name = "activity_sequence_changed" - table.insert(context.RtAct.Events, event) - - local rtInitChatStep = r2.Translator.createAction("code", "oldChatStepVar = -1;\n" .. Logic.chatStepVar .." = 0;\n()setTimer(1, " ..Logic.chatTimerId .. ");\n") - rtInitChatStep.Name = "init_chat_step" - table.insert(context.RtAct.Actions, rtInitChatStep) - table.insert(event.ActionsId, rtInitChatStep.Id) - end - - - local event = r2.Translator.createEvent("timer_" ..Logic.chatTimer .."_triggered", "", rtNpcGrp.Name) - event.Name = "dialog_event" - table.insert(context.RtAct.Events, event) - - local rtSwitchChatSequence = r2.Translator.createAction("switch_actions", Logic.chatSequenceVar) - rtSwitchChatSequence.Name = "switch_chat_sequence" - table.insert(context.RtAct.Actions, rtSwitchChatSequence) - table.insert(event.ActionsId, rtSwitchChatSequence.Id) - - local chatSequenceNumber = 0 - local k, chatSequence = next(behavior.ChatSequences, nil) - while k do - context.Feature = nil - chatSequenceNumber = chatSequenceNumber + 1 - Logic.translateChatSequence(context, chatSequenceNumber, chatSequence, rtSwitchChatSequence) - k, chatSequence = next(behavior.ChatSequences, k) - end - end -end - - - -function Logic.isWanderActivity(activity) - return activity == "Wander" or activity == "Go To Zone" or activity == "Rest In Zone" or activity == "Feed In Zone" - or activity == "Hunt In Zone" or activity == "Guard Zone" -end - - -------------------------------------------------- ---create a transition to go to step number stepNb ---set a timer to go to next step ---select the step ---goto the step's state -Logic.createTransition = function(context, hlComponent, activitySequence, activityStep, activityStepIndex, stepAction) - local findChatSequenceIdByInstanceId = function (chat) - - local parent = chat.ParentInstance.ChatSequences - assert(parent) - - - local nbSequence = 0 - local k, sequence = next(parent, nil) - while k do - if tostring(sequence.InstanceId) == tostring(chat.InstanceId) then return nbSequence end - nbSequence = nbSequence + 1 - k, sequence = next(parent, k) - end - return -1 - end - - assert(activityStep) - - local chat = nil - - - if activityStep.Chat ~= "" then - chat = r2:getInstanceFromId( tostring(activityStep.Chat) ) - end - - local code = "" - - - local backupState = "" - local setChatSequence = "" - local setNextActivity = "" - local setNextActivityTimer = "" - local setNextActivityState = "" - - - backupState = - "oldChatSequenceVar = " .. Logic.chatSequenceVar .. ";\n" .. - "RoadCountLimit=0;\n".. - "oldActivityStepVar = " .. Logic.activityStepVar .. ";\n" .. - "oldActivityStepVar2 = " .. Logic.activityStepVar.. " + 1;\n" - - - if chat~= nil then - local id = findChatSequenceIdByInstanceId( chat ) - assert(id ~= -1 ) - setChatSequence = Logic.chatSequenceVar .. " = " .. tostring( id ) .. ";\n" - if (activityStep.Type == "Repeating") then - setChatSequence = setChatSequence .. "repeatSequence = 1;\n" - else - setChatSequence = setChatSequence .. "repeatSequence = 0;\n" - end - end - - -- next activity - setNextActivity = Logic.activityStepVar .. " = " .. activityStepIndex ..";\n" - - -- next activity timer - local param = Logic.getTimeLimit(activityStep) - if param ~= nil then - if Logic.isWanderActivity(activityStep.Activity) then - -- The time limite is use by the activity - else - setNextActivityTimer = "()setTimer(" .. param ..", " ..Logic.activityStepTimerId .. ");\n" - end - end - - local states = Logic.States[activityStep.InstanceId] - local stateName = states[1].Name - - -- next activity state - - setNextActivityState = "()postNextState(\"" .. r2.getNamespace() .. stateName .."\");\n" - local action = r2.Translator.createAction("code", backupState .. setChatSequence .. setNextActivity .. setNextActivityTimer .. setNextActivityState) - - - action.Name = "process_activity_step" .. activityStepIndex - - if stepAction then - local tmpAction = r2.Translator.createAction("multi_actions") - table.insert(tmpAction.Children, action) - table.insert(tmpAction.Children, stepAction) - action = tmpAction - end - - action.Name = "process_activity_step" .. activityStepIndex - return action - -end - - ------------------------------------------- ---crיe une action qui permet de ---sיlectionner une sיquence de chat -Logic.selectDialog = function(dialogNb, rtNpcGrp) - local action - local prefix = "" - if (rtNpcGrp ~= nil) then - prefix = r2.getNamespace() .. rtNpcGrp .. "." - end - - action = r2.Translator.createAction("code", - prefix .."oldChatSequenceVar =" .. prefix..Logic.chatSequenceVar ..";\n" .. - prefix .. Logic.chatSequenceVar .." = " ..(dialogNb-1)..";\n") - action.Name = "select_dialog" - return action -end - ---create the actions and events necessary to choose ---the dialog while running sequence -Logic.initDialog = function(context) - local event = r2.Translator.createEvent("variable_" ..Logic.chatSequenceVar .."_changed", "all_sequence_states", context.Group.Name) - event.Name = "change_dialog_event" - Logic.DialogEvent2 = event - local action - local mAction = r2.Translator.createAction("multi_actions") - action = r2.Translator.createAction("code", "oldChatStepVar = " .. Logic.chatStepVar ..";\n" .. Logic.chatStepVar .." = 0;\n") - action.Name = "reset_dialog" - table.insert(mAction.Children, action) - action = r2.Translator.createAction("switch_actions", Logic.chatSequenceVar) - action.Name = "init_dialog_timer" - table.insert(mAction.Children, action) - Logic.DialogAction2 = action - table.insert(context.RtAct.Events, event) - table.insert(context.RtAct.Actions, mAction) - table.insert(event.ActionsId, mAction.Id) - - - event = r2.Translator.createEvent("timer_" ..Logic.chatTimer .."_triggered", "all_sequence_states", context.Group.Name) - event.Name = "dialog_event" - Logic.DialogEvent = event - table.insert(context.RtAct.Events, event) - - Logic.DialogAction = r2.Translator.createAction("switch_actions", Logic.chatSequenceVar) - table.insert(context.RtAct.Actions, Logic.DialogAction) - table.insert(event.ActionsId, Logic.DialogAction.Id) -end - -Logic.initSequence = function(context, rtNpcGrp) - assert(context) - assert(rtNpcGrp) - - event = r2.Translator.createEvent("timer_" ..Logic.activityStepTimer .."_triggered", "all_sequence_states", rtNpcGrp.Name) - event.Name = "sequence_event" - Logic.SequenceEvent = event - table.insert(context.RtAct.Events, event) - - Logic.SequenceAction = r2.Translator.createAction("switch_actions", Logic.activityStepVar) - table.insert(context.RtAct.Actions, Logic.SequenceAction) - table.insert(event.ActionsId, Logic.SequenceAction.Id) -end - --- ust to implement translateEvents used to implement event created for implementing -Logic.translateEvent = function( context, hlComponent, activitySequence, activityStep, activityStepIndex, event, rtNpcGrp, statesByName) - local chat = nil --- context, groups, states, actionToAdd) - local eventType, eventParam = Logic.getEvent(event) - local eventHandler = nil - - if context.Events[event.InstanceId] == nil - then - eventHandler = r2.Translator.createEvent(eventType, states, groups) - assert(eventHandler ~= nil) - - local stepAction = Logic.translateChatStep(context, event.Action, nil) - - if actionToAdd ~= nil - then - table.insert(stepAction.Children, actionToAdd) - end - - assert(stepAction ~= nil) - - table.insert(context.RtAct.Actions, stepAction) - table.insert(eventHandler.ActionsId, stepAction.Id) - context.Events[event.InstanceId] = eventHandler - else - eventHandler = context.Events[event.InstanceId] - - if string.find(eventHandler.StatesByName, states) == nil - then - eventHandler.StatesByName = eventHandler.StatesByName .. "\n" .. states - end - - if string.find(eventHandler.GroupsByName, groups) == nil - then - eventHandler.GroupsByName = eventHandler.GroupsByName .. "\n" .. groups - end - - end - - return eventHandler -end - --- translateEvents -Logic.translateEvents = function(context, hlComponent, activitySequence, activityStep, activityStepIndex, rtNpcGrp, statesByName) - - local activityStep - - local last = nil - - if activityStepIndex == activitySequence.Components.Size then - last = true - end - - - local k, eventId = next(step.EventsIds, nil) - do - local eventHandler = r2:getInstanceFromId(eventId) - assert(eventHandler ~= nil) - local action = nil - - if eventHandler.Condition.Type == "At Destination" then - if step.Activity == "Follow Route" and last ~= true then - action = Logic.selectActivityStep(activityStepIndex + 1) - end - end - - --the event returned here is a RtNpcEventHandler - event = translateEvent(context, groups, states, action) - assert(event ~= nil) - - table.insert(context.RtAct.Events, event) - k, eventId = next(step.EventsIds, k) - end -end - ---translate an activity step -Logic.translateActivityStep = function(context, hlComponent, activitySequence, activityStep, activityStepIndex, rtNpcGrp) - - --translate this activity activityStep's events - assert(rtNpcGrp) - local aiState - local aiState2 - local statesByName - local groupsByName = rtNpcGrp.Name - local zone = nil - local chat = nil - local aiScriptDebug = false - - local activityStep = activityStep - - if activityStep.Chat ~= "" then - chat = r2:getInstanceFromId(activityStep.Chat) - if not chat then - printErr("translation error: in the activitySequence " .. activitySequence.Name .. " in component " .. hlComponent.Name .. ": " .. " the chat sequence associated to this activity sequence can not be found") - return nil - end - end - - local states = Logic.States[activityStep.InstanceId] - --states creation - aiState = states[1] -- 1 is first ( a lua object not a instance ) - - --setting state AiMovement - aiState.AiMovement = Logic.getAiMovement(activityStep.Activity) - assert(aiState.AiMovement ~= "") - --setting state zone or road - - - local positionalActivity= {["Patrol"] = "road", - ["Wander"] = "zone", - ["Repeat Road"] = "road", - ["Follow Route"] = "road", - ["Rest In Zone"] = "zone", - ["Feed In Zone"] = "zone", - ["Hunt In Zone"] = "zone", - ["Guard Zone"] = "zone", - ["Go To Zone"] = "zone", - } - if positionalActivity[activityStep.Activity] then - local zone = r2:getInstanceFromId(activityStep.ActivityZoneId) - if zone == nil then - aiState = states[1] - aiState.AiMovement = "idle" - return aiState - else - if positionalActivity[activityStep.Activity] == "zone" then - if table.getn(zone.Points) < 3 then - aiState = states[1] - aiState.AiMovement = "idle" - return aiState - end - else - if table.getn(zone.Points) < 2 then - aiState = states[1] - aiState.AiMovement = "idle" - return aiState - end - end - end - end - - - - - if activityStep.Activity == "Patrol" then - local zone = r2:getInstanceFromId(activityStep.ActivityZoneId) - if (zone == nil) - then - printErr("translation error: in the activitySequence " .. activitySequence.Name .. " in component " .. hlComponent.Name .. ": " .. " the zone associated to the action can not be found") - return nil - end - - --un etat aller, un etat retour - aiState2 = states[2] - aiState2.AiMovement = "follow_route" - Logic.assignZone(aiState, zone, false) - Logic.assignZone(aiState2, zone, true) - - statesByName = aiState.Name .."\n" .. aiState2.Name - elseif activityStep.Activity == "Repeat Road" or activityStep.Activity == "Follow Route" or activityStep.Activity == "Wander" - or activityStep.Activity == "Rest In Zone" or activityStep.Activity == "Feed In Zone" or activityStep.Activity == "Hunt In Zone" - or activityStep.Activity == "Guard Zone" or activityStep.Activity == "Go To Zone" then - local zone = r2:getInstanceFromId(activityStep.ActivityZoneId) - if (zone == nil) then - printErr("translation error: in the activitySequence " .. activitySequence.Name .. " in component " .. hlComponent.Name .. ": " .. " the zone associated to the action can not be found") - return nil - end - Logic.assignZone(aiState, zone, false) - statesByName = aiState.Name - else - statesByName = aiState.Name - end - - - if activityStep.Activity == "Repeat Road" then - local action - local event - --when at end of the road, ... - event = r2.Translator.createEvent("destination_reached_all", statesByName, groupsByName) - table.insert(context.RtAct.Events, event) - --return to the start of the road - local repeatCount = activityStep.RoadCountLimit - if not repeatCount then repeatCount = 2 end - - action = r2.Translator.createAction("next_road", groupsByName, aiState.Name, activityStepIndex , repeatCount) - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) - - elseif activityStep.Activity == "Patrol" then - local action - local event - local repeatCount = activityStep.RoadCountLimit - if not repeatCount then repeatCount = 2 end - event = r2.Translator.createEvent("destination_reached_all", aiState.Name, groupsByName) - table.insert(context.RtAct.Events, event) - action = r2.Translator.createAction("next_road", groupsByName, aiState2.Name, activityStepIndex, repeatCount) - action.Name = "return" - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) - - event = r2.Translator.createEvent("destination_reached_all", aiState2.Name, groupsByName) - table.insert(context.RtAct.Events, event) - action = r2.Translator.createAction("next_road", groupsByName, aiState.Name, activityStepIndex , repeatCount) - action.Name = "go" - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) - - elseif activityStep.Activity == "Follow Route" or activityStep.Activity == "Go To Start Point" or activityStep.Activity == "Go To Zone" then - local action - local event - event = r2.Translator.createEvent("destination_reached_all", aiState.Name, groupsByName) - table.insert(context.RtAct.Events, event) - action = Logic.selectActivityStep(activityStepIndex + 1) - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) - elseif activityStep.Activity == "Rest In Zone" then - local wanderTime = 100 - local restTime = 300 - r2.Translator.createActivityInZone(context, aiState.Name, groupsByName, "Rest", Logic.activityInternalTimerId, wanderTime, restTime, aiScriptDebug) - elseif activityStep.Activity == "Feed In Zone" then - local wanderTime = 50 - local feedTime = 150 - r2.Translator.createActivityInZone(context, aiState.Name, groupsByName, "Eat", Logic.activityInternalTimerId, wanderTime, feedTime, aiScriptDebug) - elseif activityStep.Activity == "Hunt In Zone" then - local wanderTime = 100 - local alertTime = 25 - local eatTime = 80 - r2.Translator.createHuntActivityInZone(context, aiState.Name, groupsByName, Logic.activityInternalTimerId, wanderTime, alertTime, eatTime, aiScriptDebug) - elseif activityStep.Activity == "Guard Zone" then - r2.Translator.createSimpleActivityInZone(context, aiState.Name, groupsByName, "Alert", false, aiScriptDebug) - end - - - if Logic.isWanderActivity(activityStep.Activity) and activityStep.TimeLimit == "Few Sec" then - local event = r2.Translator.createEvent("destination_reached_all", aiState.Name, groupsByName) - table.insert(context.RtAct.Events, event) - local number = tonumber(activityStep.TimeLimitValue) - if number == nil then - number = 0 - end - local action = r2.Translator.createAction("wander_destination_reached", groupsByName, aiState.Name, activityStepIndex, number) - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) - end - - local stepAction = nil - if activityStep.Activity == "Stand Up" then - stepAction = r2.Translator.createAction("stand_up", rtNpcGrp.Id ) - elseif activityStep.Activity == "Sit Down" then - stepAction = r2.Translator.createAction("sit_down", rtNpcGrp.Id ) - end - - - -- translate event create by activitySequence (eg patrol) - if activityStep.EventsIds.Size ~= 0 - then - Logic.translateEvents(context, hlComponent, activitySequence, activityStep, activityStepIndex, rtNpcGrp, statesByName) - end - - - - --go to next activityStep - local action = Logic.createTransition(context, hlComponent, activitySequence, activityStep, activityStepIndex, stepAction) - table.insert(Logic.SequenceAction.Children, action) - - - -- if ActivityStep.TimeLimit == "Chat" creates a eventhandler to go to next state - - if activityStep.TimeLimit == "Chat" then - local action - local condition - local event - - local number = Logic.findChatSequenceIdByInstanceId(hlComponent, chat.InstanceId) - if (number == nil or number == -1) then - printWarning("Error in translation: in component '" .. hlComponent.Name .. " the chat sequence selected as time limit of Activity Step " .. activityStepIndex .. " does not exist.") - - end - - - - event = r2.Translator.createEvent("user_event_8", aiState.Name, rtNpcGrp.Id) - table.insert(context.RtAct.Events, event) - - - - condition = r2.Translator.createAction("condition_if", "v0 == "..tostring(number-1)) - table.insert(context.RtAct.Actions, condition) - - - action = Logic.selectActivityStep(activityStepIndex + 1) - table.insert(condition.Children, action) - table.insert(event.ActionsId, condition.Id) - - - end - - assert(State ~= "") - return aiState -end - ---------------------------------------------------------------------------------------- ---helpers functions-- ---------------------------------------------------------------------------------------- - - -Logic.getAiMovement = function(activity) - assert(activity and type(activity) == "string") - if (activity == "Follow Route") or (activity == "Patrol") or (activity == "Repeat Road") then - return "follow_route" - elseif activity == "Deploy" then - return "stand_on_vertices" - elseif activity == "Wander" or activity == "Go To Zone" or activity == "Rest In Zone" or activity == "Feed In Zone" - or activity == "Hunt In Zone" or activity == "Guard Zone" then - return "wander" - elseif activity == "Stand Still" or activity == "Inactive" or activity == "Stand Up" or activity == "Sit Down" then - return "idle" - elseif activity == "Stand On Start Point" or activity == "Go To Start Point" then - return "stand_on_start_point" - end - - printWarning("Undef activity '"..activity.."'") - assert(nil) - return "" -end - -Logic.getAction = function(action) -local action_type = action.Action - - if action_type == "Sit Down" - then - return "sit_down" - end - if action_type == "Stand Up" - then - return "stand_up" - end - if action_type == "Go To Step" - then - if action.Parameter == nil or action.Parameter == "" - then - return nil - end - return "go_to_step" - end - if action_type == "Set Activity" - then - if action.Parameter == nil or action.Parameter == "" - then - return nil - end - return "set_activity" - end - - if action_type == "Stop Actions" - then - return "stop_actions" - end - - if action_type == "Start Mission" - then - return "start_mission" - end - - return nil -end - -Logic.getEvent = function(Event) - local i = Logic.find(Logic.EventTypes, Event.Condition.SourceType) - --Time event type - if i == 0 - then - end - - --place event type - if i == 1 - then - end - - --entity event type - if i == 2 - then - if Event.Condition.Type == "At Destination" - then - return "destination_reached_all" - end - - if Event.Condition.Type == "Is Attacked" - then - return "group_under_attack" - end - - if Event.Condition.Type == "Enters State" - then - return "start_of_state" - end - - if Event.Condition.Type == "Leaves State" - then - return "end_of_state" - end - if Event.Condition.Type == "Activity Is" - then - end - end - - --State Machine event type - if i == 3 - then - end - - --Counter event type - if i == 4 - then - local counterName = Event.Parameter - local param - - if counterName == nil - then - - end - - if string.find(Event.Condition.Type, "v%d_changed") ~= nil - then - return "variable_" ..Event.Condition.Type - end - - if Event.Condition.Type == "Equals" - then - param = " = " - else - if Event.Condition.Type == "Lesser" - then - param = " < " - else - if Event.Condition.Type == "Greater" - then - param = " > " - else - param = nil - end - end - end - if param == nil - then - return nil - end - param = param ..Event.Condition.ConditionParameter - - return "variable_changed", param - end -end - -Logic.checkEvent = function(eventMode, sourceType, sourceId, conditionType, parameter) - local eventTypeInd = Logic.find(Logic.EventTypes, sourceType) - local conditionTypeInd - if eventTypeInd == nil - then - return false - end - - --{"Time", "Place", "Entity or Group", "State Machine", "Counter"} - - conditionTypeInd = Logic.find(Logic.ConditionTypes[eventTypeInd], conditionType) - if eventTypeInd == nil - then - return false - end - - --Time event type - if eventTypeInd == 0 - then - end - - --Place event type - if eventTypeInd == 1 - then - end - - --Entity or Group event type - if eventTypeInd == 2 - then - if parameter == nil or parameter == "" - then - if conditionType == "At Destination" or conditionType == "Is Attacked" - then - return true - else - return false - end - else - if conditionType == "Enters State" or conditionType == "Leaves State" - then - return true - else - return false - end - end - end - - --State Machine event type - if eventTypeInd == 3 - then - end - - --Counter event type - if eventTypeInd == 4 - then - if string.find(conditionType, "v%d_changed") ~= nil - then - return true - end - if conditionType == "Lesser" or conditionType == "Greater" or conditionType == "Equals" - then - return true - end - end - - return false - -end - -Logic.fillCondition = function(condition, sourceType, sourceId, conditionType, conditionParameter) - condition.SourceType = sourceType - condition.SourceId = sourceId - condition.Type = conditionType - condition.ConditionParameter = conditionParameter -end - -Logic.fillEvent = function(event, eventMode, sourceType, sourceId, conditionType, conditionParameter) - if Logic.checkEvent(eventMode, sourceType, sourceId, conditionType, conditionParameter) == false - then - assert(0) - return false - end - - Logic.fillCondition(event.Condition, sourceType, sourceId, conditionType, conditionParameter) - event.EventMode = eventMode - return true -end ------------------------------------------ ---genere le parametre de l'action set_timer -Logic.getTimeLimit = function(step) - local param = "" - - if step.TimeLimit == "Few Sec" then - local limit = tonumber(step.TimeLimitValue) - if limit == nil then - limit = 0 - end - limit = 1 + limit * 10 - param = tostring( limit ) - return param - end - return nil -end - -Logic.getActivityInitialStateName = function(groupId, activityNb, context) - local group = context.Components[groupId] - local activity = group.Components[1].Behavior.Activities[activityNb] - - if activity == nil - then - return nil - end - - local activityStates = Logic.ActivitiesStates[activity.InstanceId] - return activityStates[activity.InstanceId][0].Name -end - ---return the states used to represent this step activity -Logic.getActivityStepStates = function(activity, stepNb) - local activityStates = Logic.ActivitiesStates[activity.InstanceId] - local states = activityStates[activity.Components[stepNb].InstanceId] - return states -end - -Logic.find = function(array, elem) - local i = 0 - for k, v in pairs(array) - do - if k ~="Keys" - then - if elem == v - then - return i - end - i = i + 1 - end - end - return nil -end - - - -Logic.findChatSequenceIdByInstanceIdImpl = function(instance, instanceId) - local behvior = instance:getBehavior() - local k, sequence = next(behvior.ChatSequences, nil) - local nbSequence = 0 - while k do - nbSequence = nbSequence + 1 - if tostring(sequence.InstanceId) == instanceId then return nbSequence end - k, sequence = next(behvior.ChatSequences, k) - end - return -1 -end - -Logic.findChatSequenceIdByInstanceId = function(target, instanceId) - local instance =target - return Logic.findChatSequenceIdByInstanceIdImpl(instance, instanceId) - -end - --- target -> hlNpc or hlNpcGrp -Logic.findChatStepIdByInstanceId = function(target, instanceId) - assert( type(target) == "userdata") - local nbSequence = 0 - local nbStep = 0 - - local instance = target - assert(instance ~= nil) - local behavior = instance:getBehavior() - assert(behavior ~= nil) - local k2, sequence = next(behavior.ChatSequences, nil) - while k2 do - - nbSequence = nbSequence + 1 - nbStep = 0 - local k, step = next(sequence.Components, nil) - while k do - nbStep = nbStep +1 - if tostring(step.InstanceId) == instanceId then return {nbStep, nbSequence} end - k, step = next(sequence.Components, k) - end - k2, sequence = next(behavior.ChatSequences, k2) - end - assert(0) - return {-1, -1} -end - --- target is a NpcGrp or a Npc or a CustomNpc -Logic.findActivitySequenceIdByInstanceId = function(target, instanceId) - assert( type(target) == "userdata") - - local nbSequence = 0 - local behavior = nil - - behavior = target:getBehavior() - - if behavior == nil then - debugInfo("Error: try to find activity Sequence on an unknown entity of type " .. target.Class ) - assert(nil) - end - - local npc = behavior.ParentInstance - local grp = behavior.ParentInstance.ParentInstance - if not npc:isGrouped() then grp = nil end - - - local k, sequence = next(behavior.Activities, nil) - while (k ~= nil) do - - nbSequence = nbSequence + 1 - if sequence.InstanceId == instanceId then - if grp then return {nbSequence, grp} end - if npc then return {nbSequence, npc} end - assert(nil) - end - k, sequence = next(behavior.Activities, k) - end - return {-1, nil} -end - -Logic.findActivityStepIdByInstanceId = function(target, instanceId) - assert( type(target) == "userdata") - local nbSequence = 0 - local nbStep = 0 - local comp = target - local behavior = comp:getBehavior() - - local k, sequence = next(behavior.Activities, nil) - while k do - - if tostring(sequence.InstanceId) == instanceId then - assert(nil) -- use findActivityStep instead of findactivitySequence - end - - nbSequence = nbSequence + 1 - nbStep = 0 - local k2, step = next(sequence.Components, nil) - while (k2) do - nbStep = nbStep +1 - if tostring(step.InstanceId) == instanceId then return {nbStep, nbSequence} end - k2, step = next(sequence.Components, k2) - end - k, sequence = next(behavior.Activities, k) - end - return {-1, -1} -end - - - - - -Logic.selectActivityStep = function(stepNb) - local action - stepNb = stepNb - 1 - - action = r2.Translator.createAction("code", - Logic.activityStepVar .. " = " .. stepNb ..";\n" - .. "()setTimer(1, " ..Logic.activityStepTimerId .. ");\n") - action.Name = "select_activity_step " .. stepNb - - return action -end - - - ----------------------------------------------------------------------------- --- add a line to the event menu - -local component = Logic.Components.ChatSequence - - ----------------------------------------------------------------------------- --- add a line to the event menu -function component:getLogicTranslations() - - local logicTranslations = { - ["ApplicableActions"] = { - ["starts dialog"] = { menu=i18n.get( "uiR2AA0ChatSeqStart" ):toUtf8(), - text=i18n.get( "uiR2AA1ChatSeqStart" ):toUtf8()}, - ["stops dialog"] = { menu=i18n.get( "uiR2AA0ChatSeqStop" ):toUtf8(), - text=i18n.get( "uiR2AA1ChatSeqStop" ):toUtf8()}, - ["starts chat"] = { menu=i18n.get( "uiR2AA0ChatStepStart" ):toUtf8(), - text=i18n.get( "uiR2AA1ChatStepStart" ):toUtf8()}, - ["continues dialog"] = { menu=i18n.get( "uiR2AA0ChatStepContinue" ):toUtf8(), - text=i18n.get( "uiR2AA1ChatStepContinue" ):toUtf8()}, - }, - ["Events"] = { - ["start of dialog"] = { menu=i18n.get( "uiR2Event0ChatSeqStart" ):toUtf8(), - text=i18n.get( "uiR2Event1ChatSeqStart" ):toUtf8()}, - ["end of dialog"] = { menu=i18n.get( "uiR2Event0ChatSeqEnd" ):toUtf8(), - text=i18n.get( "uiR2Event1ChatSeqEnd" ):toUtf8()}, - ["start of chat"] = { menu=i18n.get( "uiR2Event0ChatStepStart" ):toUtf8(), - text=i18n.get( "uiR2Event1ChatStepStart" ):toUtf8()}, - ["end of chat"] = { menu=i18n.get( "uiR2Event0ChatStepEnd" ):toUtf8(), - text=i18n.get( "uiR2Event1ChatStepEnd" ):toUtf8()}, - }, - ["Conditions"] = { - ["is in dialog"] = { menu=i18n.get( "uiR2Test0ChatSeq" ):toUtf8(), - text=i18n.get( "uiR2Test1ChatSeq" ):toUtf8()}, - ["is not in dialog"] = { menu=i18n.get( "uiR2Test0ChatNotSeq" ):toUtf8(), - text=i18n.get( "uiR2Test1ChatNotSeq" ):toUtf8()}, - ["is in chat"] = { menu=i18n.get( "uiR2Test0ChatStep" ):toUtf8(), - text=i18n.get( "uiR2Test1ChatStep" ):toUtf8()}, - } - } - return logicTranslations -end - - -r2.Features["ActivitySequence"] = Logic - diff --git a/code/ryzom/common/data_common/r2/r2_logic_comp.lua b/code/ryzom/common/data_common/r2/r2_logic_comp.lua deleted file mode 100644 index 85a37a47e..000000000 --- a/code/ryzom/common/data_common/r2/r2_logic_comp.lua +++ /dev/null @@ -1,316 +0,0 @@ -r2.logicComponents = {} - -r2.logicComponents.logicEditors = { - r2.activities, - r2.dialogs, - r2.events, - } - -r2.logicComponents.undoRedoInstances = {} - - ------ INIT ALL EDITORS ---------------------------------------------------- -function r2.logicComponents:initLogicEditors() - - for k, uiClass in pairs(self.logicEditors) do - uiClass:initEditor() - end -end - ------- SELECT ELEMENT -------------------------------------------- -function r2.logicComponents:selectElement(classUI, selectedButtonElt) - - if selectedButtonElt == nil then - selectedButtonElt = getUICaller() - end - assert(selectedButtonElt) - - local sequenceUI = classUI:currentSequUI() - assert(sequenceUI) - - local upDown = sequenceUI:find("order_group") - assert(upDown) - - -- new selected element - if selectedButtonElt.pushed == true then - - if classUI:currentEltUIId() then - - local lastSelectedElement = classUI:currentEltUI() - assert(lastSelectedElement) - - local lastEltsList = lastSelectedElement.parent - local editElt = lastEltsList:find("edit_element") - assert(editElt) - - if classUI:currentEltUIId() == selectedButtonElt.parent.parent.parent.id then - return - end - - lastSelectedElement.active = true - lastSelectedElement:find("select").pushed = false - - editElt.active = false - end - - classUI:setCurrentEltUIId(selectedButtonElt.parent.parent.parent.id) - - local selectedElement = selectedButtonElt.parent.parent.parent - assert(selectedElement) - - -- update element editor position in list - local eltsList = sequenceUI:find("elements_list") - assert(eltsList) - local editElt = eltsList:find("edit_element") - assert(editElt) - - local indexSelectedElt = eltsList:getElementIndex(selectedElement) - local indexEltEditor = eltsList:getElementIndex(editElt) - - if indexEltEditor2) - - -- cancel current selection - else - - local lastSelectedElement = classUI:currentEltUI() - assert(lastSelectedElement) - - upDown.active = false - - local lastEltsList = lastSelectedElement.parent - local editElt = lastEltsList:find("edit_element") - assert(editElt) - - editElt.active = false - lastSelectedElement.active = true - - classUI:setCurrentEltUIId(nil) - end -end - ------- SELECT SEQUENCE -------------------------------------- -function r2.logicComponents:selectSequence(classUI, sequenceUI) - - local sequenceUI = classUI:currentSequUI() - assert(sequenceUI) - - -- select first chat of dialog - local eltsList = sequenceUI:find("elements_list") - assert(eltsList) --- if eltsList.childrenNb > 1 then - --- local firstElt = eltsList:getChild(0) - -- element editor --- if r2.logicUI:getEltUIInstId(firstElt) == nil then --- firstElt = eltsList:getChild(1) --- end - --- local selectedButton = firstElt:find("select") --- assert(selectedButton) - --- selectedButton.pushed = true --- classUI:selectElement(selectedButton) --- end - - -- deselect old selected element - if classUI:currentEltUIId() then - - local lastSelectedElement = classUI:currentEltUI() - assert(lastSelectedElement) - - local lastEltsList = lastSelectedElement.parent - local editElt = lastEltsList:find("edit_element") - assert(editElt) - - lastSelectedElement.active = true - lastSelectedElement:find("select").pushed = false - - editElt.active = false - - classUI:setCurrentEltUIId(nil) - end - - eltsList.Env.Minimize = true -end - ------- CREATE EDITOR ----------------------------------------------- -function r2.logicComponents:createElementEditor(classUI) - - -- not necessary current sequenceUI - local sequenceUI = classUI:updatedSequUI() - assert(sequenceUI) - - -- create element editor - local elementsList = sequenceUI:find("elements_list") - assert(elementsList) - - local newEditorElt = createGroupInstance(classUI.elementEditorTemplate, elementsList.id, {id="edit_element", active="false"}) - assert(newEditorElt) - elementsList:addChild(newEditorElt) - elementsList.parent:updateCoords() - - newEditorElt.active = false - - return newEditorElt -end - ------ CLOSE ELEMENT EDITOR --------------------------------------------- -function r2.logicComponents:closeElementEditor(classUI) - - local selectedEltUI = classUI:currentEltUI() - if selectedEltUI then - local selectedEltButton = selectedEltUI:find("select") - assert(selectedEltButton) - - selectedEltButton.pushed = false - classUI:selectElement(selectedEltButton) - end -end - ------- NEW ELEMENT INST ------------------------------------------ -function r2.logicComponents:newElementInst(classUI) -end - ------- UPDATE ELEMENT TITLE ------------------------------------------- -function r2.logicComponents:updateElementTitle(classUI, eltUI, showPartIndex) - - local eltInst = r2:getInstanceFromId(r2.logicUI:getEltUIInstId(eltUI)) - assert(eltInst) - - -- part index - local partIndex = "" - - if showPartIndex then - local index = self:searchElementIndex(eltInst) - partIndex = classUI.elementInitialName.." "..index.." : " - end - - local eltName = eltInst:getName() - - -- title - local title = eltUI:find("title") - assert(title) - local uc_title = ucstring() - uc_title:fromUtf8(partIndex..eltName) - title.uc_hardtext_format = uc_title -end - ------- REMOVE ELEMENT INST ---------------------------------------- -function r2.logicComponents:removeElementInst(classUI) - - --r2.requestNewAction(i18n.get("uiR2EDRemoveLogicElementAction")) - - local toErasedInstId = classUI:currentEltInstId() - assert(toErasedInstId) - - -- request erase node - if toErasedInstId and r2:getInstanceFromId(toErasedInstId) then - r2.requestEraseNode(toErasedInstId, "", -1) - end -end - ------- UP ELEMENT INST ------------------------------------------- -function r2.logicComponents:upElementInst(classUI) - - r2.requestNewAction(i18n.get("uiR2EDMoveLogicElementUpAction")) - - local sequenceUI = classUI:currentSequUI() - assert(sequenceUI) - - local listElements = sequenceUI:find("elements_list") - assert(listElements) - - local selectedElement = classUI:currentEltUI() - assert(selectedElement) - - local index = listElements:getElementIndex(selectedElement) - - if index>0 then - local sequenceId = classUI:currentSequInstId() - assert(sequenceId) - - r2.requestMoveNode(sequenceId, "Components", index, - sequenceId, "Components", index-1) - end -end - ------- DOWN ELEMENT INST ----------------------------------------- -function r2.logicComponents:downElementInst(classUI) - - r2.requestNewAction(i18n.get("uiR2EDMoveLogicElementDownAction")) - - local sequenceUI = classUI:currentSequUI() - assert(sequenceUI) - - local listElements = sequenceUI:find("elements_list") - assert(listElements) - - local selectedElement = classUI:currentEltUI() - assert(selectedElement) - - local index = listElements:getElementIndex(selectedElement) - - local sequenceId = classUI:currentSequInstId() - assert(sequenceId) - if index < r2:getInstanceFromId(sequenceId).Components.Size-1 then - r2.requestMoveNode(sequenceId, "Components", index, - sequenceId, "Components", index+1) - end -end - ----- TRANSLATE SECONDS IN HOURS, MINUTES AND ECONDS -function r2.logicComponents:calculHourMinSec(totalSecNb) - - local minSecNb, hourNb = totalSecNb, 0 - while minSecNb > 3599 do - hourNb = hourNb+1 - minSecNb = minSecNb - 3600 - end - - local minNb, secNb = 0, minSecNb - while secNb > 59 do - minNb = minNb+1 - secNb = secNb - 60 - end - - return hourNb, minNb, secNb -end - - ---- SEARCH INDEX OF INSTANCE IN COMPONENT TABLE -function r2.logicComponents:searchElementIndex(instance, fun) - - local components = instance.Parent - local decalSequ = 0 - - for i=0, components.Size-1 do - local comp = components[i] - if fun and not fun(comp) then - decalSequ = decalSequ+1 - elseif comp.User.Deleted == true then - decalSequ = decalSequ+1 - end - if comp.InstanceId == instance.InstanceId then - return i+1-decalSequ - end - end - - return -1 -end - - - diff --git a/code/ryzom/common/data_common/r2/r2_logic_entities.lua b/code/ryzom/common/data_common/r2/r2_logic_entities.lua deleted file mode 100644 index 26b39193a..000000000 --- a/code/ryzom/common/data_common/r2/r2_logic_entities.lua +++ /dev/null @@ -1,598 +0,0 @@ -local logicEntity = -{ - BaseClass = "WorldObject", - Name="LogicEntity", - InEventUI = false, - - Parameters = {}, - ApplicableActions = {}, - Events = {}, - Conditions = {}, - TextContexts = {}, - TextParameters = {}, - LiveParameters = {}, - - DisplayerProperties = "R2::CDisplayerLua", - DisplayerPropertiesParams = "logicEntityPropertySheetDisplayer", - PermanentTreeIcon = "r2ed_icon_permanent_macro_components.tga", - TreeIcon = "r2ed_icon_macro_components.tga", - SelectBarType = i18n.get("uiR2EDMacroComponents"):toUtf8(), - - Prop = - { - {Name="Behavior", Type="LogicEntityBehavior"}, - }, - - --------------------------------------------------------------------------------------------------------- - -- from base class - getContextualTreeIcon = function(this) - if this:getParentAct():isBaseAct() then - return this:getPermanentTreeIcon() - end - return "" - end, - - getSelectBarIcon = function(this) - return r2.Classes.BaseClass.getContextualTreeIcon(this) - end, - - --------------------------------------------------------------------------------------------------------- - -- from base class - getPermanentStatutIcon = function(this) - - if not this:isBotObject() and this:getParentAct():isBaseAct() then - return "r2ed_permanent_pins.tga" - else - return "" - end - end , - - -------------------------------------------------------------------------------------------- - -- Get the currently selected sequence, or nil if there's no available sequence - getSelectedSequenceIndex = function(this) - local activities = this:getBehavior().Activities - if activities.Size == 0 then return nil end - local index = defaulting(this.User.SelectedSequence, 0) - if index >= activities.Size then - index = activities.Size - 1 - end - return index - end, - -------------------------------------------------------------------------------------------- - -- from WorldObject - canChangeDisplayMode = function(this) - return true - end, - --------------------------------------------------------------------------------------------------------- - -- get the "Category" for this logic entity (Category entry found in the palette) - getCategory = function(this) - return this.Category - end, - --------------------------------------------------------------------------------------------------------- - -- get the "Sub-Category" for this logic entity (Category entry found in the palette) - getSubCategory = function(this) - return this.SubCategory - end, - -------------------------------------------------------------------------------------------- - isNextSelectable = function(this) - return true - end, - -------------------------------------------------------------------------------------------- - -- return the behavior object, depending on wether this npc is grouped or not - getBehavior = function(this) - if this:isKindOf("NpcGrpFeature") then - return this.Components[0].Behavior - elseif this:isGrouped() and this.ParentInstance:isKindOf("NpcGrpFeature") then - return this.ParentInstance.Components[0].Behavior - else - return this.Behavior - end - end, - -------------------------------------------------------------------------------------------- - -- check if that npc is part of a group - isGrouped = function(this) - if this.User.Grouped == true then return true end - if this.ParentInstance then - return this.ParentInstance:isKindOf("NpcGrpFeature") - end - return false - end, - - - -- get list of command for display in the toolbar - getAvailableCommands = function(this, dest) - r2.Classes.WorldObject.getAvailableCommands(this, dest) - if not this:isBotObject() and not this:isKindOf("Act") then - table.insert(dest, this:buildCommand(this.editActions, "edit_actions", "uiR2EDEditEventsTriggers", "r2ed_edit_events.tga", false)) - - if not this:getParentAct():isBaseAct() then - table.insert(dest, this:buildCommand(this.togglePermanentCurrentAct, "permanent_content", "uimR2EDMenuPermanentContent", "r2ed_permanent_content.tga", true)) - else - table.insert(dest, this:buildCommand(this.togglePermanentCurrentAct, "current_content", "uimR2EDMenuCurrentActContent", "r2ed_current_act_content.tga", true)) - end - end - end, - - -- - togglePermanentCurrentAct = function(this, noNewAction) - - local newAct - local actionName="" - if this:getParentAct():isBaseAct() then - newAct = r2:getCurrentAct() - actionName = "uiR2EDCurrentActEntityAction" - else - newAct = r2.Scenario:getBaseAct() - actionName = "uiR2EDPermanentEntityAction" - end - - local parent = newAct.Features[0] - local attr = "Components" - local instance = this - if not this:isInDefaultFeature() then - parent = newAct - attr = "Features" - end - - if this:isGrouped() or this:isKindOf("Creature") then - instance = this.ParentInstance - end - - if noNewAction~=false then - r2.requestNewAction(i18n.get(actionName)) - end - r2.requestMoveNode(instance.InstanceId, "", -1, parent.InstanceId, attr, -1) - end, - - -- - onPostCreate = function(this) - if this.User.DisplayProp and this.User.DisplayProp == 1 then - r2:setSelectedInstanceId(this.InstanceId) - r2:showProperties(this) - this.User.DisplayProp = nil - end - end, - -- - editActions = function(this) - - r2.events:openEditor() - end, - -------------------------------------------------------------------------------------------- - -- Test if this entity is a bot object - isBotObject = function(this) - return false - end, - -------------------------------------------------------------------------------------------- - -- Test if thisentity is a plant - isPlant = function(this) - return false - end, - -------------------------------------------------------------------------------------------- - -- from base class - onPostHrcMove = function (this) - -- if no more in a group, then mark as 'ungrouped' - local grouped = false - if this.ParentInstance then - grouped = this.ParentInstance:isKindOf("NpcGrpFeature") - end - this.User.Grouped = grouped - -- force update of the available options - --if this == r2:getSelectedInstance() then - r2.ContextualCommands:update() - --end - end, - - getAiCost = function(this) - if this.User.GhostDuplicate then return 0 end - return r2.getAiCost(this) - end, - - getStaticObjectCost = function(this) - return r2.getStaticObjectCost(this) - end, - - hasScenarioCost = function(this) - return true; - end, - - createProtected = function(this) - - if not r2:checkAiQuota() then return end - - if this.create then - this.create() - end - end, - - -- - getApplicableActions = function(this) - return r2.Classes[this.Class].ApplicableActions - end, - - ---------------------------------------------------------------------------- - -- add a line to the event sub menu - initEventTypeMenu = function(this, subMenu, eventCategory) - - local class = r2.Classes[this.Class] - local eventsTable = {} - if eventCategory=="ApplicableActions" then - eventsTable = this:getApplicableActions() - else - eventsTable = class[eventCategory] - end - - for k, eventType in pairs(eventsTable) do - local endRequest = (r2.events.eventTypeWithValue[eventType]==nil) - - if not r2.getLogicAttribute(this.Class, eventCategory, eventType) then - debugInfo("Error: '"..eventCategory.. "' '" ..eventType .. "' is not defined for class'"..this.Class.."'") - assert(r2.getLogicAttribute(this.Class, eventCategory, eventType)) - end - - local uc_eventType = ucstring() - local menuTitle = r2.getLogicAttribute(this.Class, eventCategory, eventType) - - local addLine = true - if r2.events.memberManagement and this:isKindOf("Npc") and this:isGrouped() and menuTitle.groupIndependant~=true then - addLine = false - end - - if addLine then - uc_eventType:fromUtf8(menuTitle.menu) - subMenu:addLine(uc_eventType, "lua", - "r2.events:setEventType('".. eventType .."','" .. tostring(endRequest) .. "','" .. eventCategory .. "')", eventType) - end - end - - if table.getn(class[eventCategory])==0 then - subMenu:addLine(i18n.get("uiR2EdNoSelelection"), "", "", "") - end - end, -} - - -function logicEntity:getLogicTranslations() - local logicTranslations = { - ["ApplicableActions"] = { - ["activate"] = { menu=i18n.get( "uiR2AA0Activate" ):toUtf8(), - text=i18n.get( "uiR2AA1Activate" ):toUtf8()}, - ["deactivate"] = { menu=i18n.get( "uiR2AA0Deactivate" ):toUtf8(), - text=i18n.get( "uiR2AA1Deactivate" ):toUtf8()}, - ["trigger"] = { menu=i18n.get( "uiR2AA0Trigger" ):toUtf8(), - text=i18n.get( "uiR2AA1Trigger" ):toUtf8()}, - }, - ["Events"] = { - ["activation"] = { menu=i18n.get( "uiR2Event0Activation" ):toUtf8(), - text=i18n.get( "uiR2Event1Activation" ):toUtf8()}, - ["deactivation"] = { menu=i18n.get( "uiR2Event0Deactivation" ):toUtf8(), - text=i18n.get( "uiR2Event1Deactivation" ):toUtf8()}, - ["trigger"] = { menu=i18n.get( "uiR2Event0Trigger" ):toUtf8(), - text=i18n.get( "uiR2Event1Trigger" ):toUtf8()}, - }, - ["Conditions"] = { - ["is active"] = { menu=i18n.get( "uiR2Test0Active" ):toUtf8(), - text=i18n.get( "uiR2Test1Active" ):toUtf8()}, - ["is inactive"] = { menu=i18n.get( "uiR2Test0Inactive" ):toUtf8(), - text=i18n.get( "uiR2Test1Inactive" ):toUtf8()}, - } - } - return logicTranslations -end - ------------------------------------------ ---- register the curent Feature to menu - ---function logicEntity.initLogicEntitiesMenu(this, logicEntityMenu) --- --- if this.InEventUI == true then --- local name = i18n.get("uiR2ED" .. this.Name) --- local tableInstances = r2.Scenario:getAllInstancesByType(this.Name) --- if table.getn(tableInstances) > 0 then --- logicEntityMenu:addLine(name, "lua", "", this.Name) --- end --- end ---end - ----------------------------------------------------------------------------- --- add a line to the event sub menu ---function logicEntity.initLogicEntitiesInstancesMenu(this, subMenu, calledFunction) --- --- local entitiesTable = r2.Scenario:getAllInstancesByType(this.Name) --- for key, entity in pairs(entitiesTable) do --- local uc_name = ucstring() --- uc_name:fromUtf8(entity.Name) --- subMenu:addLine(uc_name, "lua", calledFunction.."('".. entity.InstanceId .."')", entity.InstanceId) --- end --- --- if table.getn(entitiesTable)==0 then --- subMenu:addLine(i18n.get("uiR2EdNoSelelection"), "", "", "") --- end ---end - ------------------------------------------ ---- register the curent Feature to menu - -function logicEntity.initLogicEntitiesMenu(this, logicEntityMenu) - --debugInfo("####5") - if this.InEventUI == true then - local name = i18n.get("uiR2ED" .. this.Name) - --local startTime = nltime.getPreciseLocalTime() - local enumerator = r2:enumInstances(this.Name) - --local endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for enumInstances is %f", endTime - startTime)) - startTime = endTime - if enumerator:next() then - logicEntityMenu:addLine(name, "lua", "", this.Name) - end - --endTime = nltime.getPreciseLocalTime() - --debugInfo(string.format("time for next is %f", endTime - startTime)) - end -end - ------------------------------------------------------------------------------- ----- add a line to the event sub menu -function logicEntity.initLogicEntitiesInstancesMenu(this, subMenu, calledFunction) - local enumerator = r2:enumInstances(this.Name) - local found = false - while 1 do - local entity = enumerator:next() - if not entity then break end - found= true - local uc_name = ucstring() - uc_name:fromUtf8(entity.Name) - subMenu:addLine(uc_name, "lua", calledFunction.."('".. entity.InstanceId .."')", entity.InstanceId) - end - if not found then - subMenu:addLine(i18n.get("uiR2EdNoSelelection"), "", "", "") - end -end - - - - - -r2.registerComponent(logicEntity) - ---------------------------------------------------- ---useful to represent a mission ---an empty group, an active state, a inactive state ---and a finished state. Use the createPseudoGroup ---function to directly add these in the context ---local pseudoGroup= ---{ --- BaseClass="BaseClass", --- Name="PseudoGroup", --- Prop= --- { --- {Name="RtGroup",Type="RtNpcGrp"}, --- {Name="InactiveState",Type="RtAiState"}, --- {Name="ActiveState",Type="RtAiState"}, --- {Name="FinishedState",Type="RtAiState"}, --- } ---} ---r2.registerComponent(pseudoGroup) - ---insert a new text in the textManager, after it has been translated -local insertTextRt = function(text,context) - local rtEntry = r2.newComponent("RtEntryText") - rtEntry.Text = text - debugInfo(colorTag(128,128,0).."insertion : "..text.." "..rtEntry.Id) - table.insert(context.RtScenario.Texts.Texts,rtEntry) - debugInfo(colorTag(128,128,0).."new size : "..table.getn(context.RtScenario.Texts.Texts)) - return rtEntry.Id -end - ----------------------------------------------- -----create a psudo group to translate missions -----insert the elements in the context ---r2.createPseudoGroup = function(context) --- local PseudoGroup = r2.newComponent("PseudoGroup") --- local group = PseudoGroup.RtGroup --- group.Name = group.Id --- --- table.insert(context.RtAct.NpcGrps, group) --- --- do --- local state --- --- state= PseudoGroup.InactiveState --- state.Name = state.Id --- table.insert(context.RtAct.AiStates,state) --- table.insert(state.Children,group.Id) --- --- state= PseudoGroup.ActiveState --- state.Name = state.Id --- table.insert(context.RtAct.AiStates,state) --- --- --- state= PseudoGroup.FinishedState --- state.Name = state.Id --- table.insert(context.RtAct.AiStates,state) --- --- end --- return PseudoGroup ---end --- --- --- -local feature = {} - --- ---local logicTexts ={ --- BaseClass="BaseClass", --- Name="LogicTexts", --- Prop= --- { --- {Name="Spontaneous",Type="Table"}, --- {Name="Interrogated",Type="Table"}, --- }, ---} --- ---local LogicTextsTranslator = function(this,context,logicEntity) --- local addTriggeredAction = r2.Features["ActivitySequence"].addTriggeredAction --- local action --- local index --- local counter =context.Counter --- --- if logicEntity == nil --- then --- debugInfo("logic entity nil!!") --- end --- --- if context.RtGroups == nil --- then --- debugInfo("context.RtGroups nil!!") --- end --- --- if context.RtGroups[logicEntity.NpcGrpId] == nil --- then --- debugInfo("context.RtGroups[logicEntity.NpcGrpId] nil!!") --- end --- --- for k,v in pairs(this.Spontaneous) --- do --- if k ~= "Keys" --- then --- --get the "npc_say" action --- action = Translator.LogicEntityTranslator(v,context,logicEntity) --- --add this action to the triggerable actions of the npc group which give the mission --- index = addTriggeredAction(context,context.RtGroups[logicEntity.NpcGrpId].Name,action) --- --- local name = context.RtGroups[logicEntity.NpcGrpId].Name --- --- --create an action to trigg the action to the npc group --- action = Actions.createAction("modify_variable",name..":v3 = "..index) --- --- --then, add the action to the correct state/event --- --- if k=="Activated" --- then --- r2.Utils.addReaction(counter.ActiveState,"start_of_state",action) --- end --- --- if k=="Deactivated" --- then --- r2.Utils.addReaction(counter.InactiveState,"start_of_state",action) --- end --- --- if k=="Progresses" --- then --- r2.Utils.addReaction(counter.ActiveState,"user_event_0",action) --- end --- end --- end --- --- for k,v in pairs(this.Interrogated) --- do --- if k ~= "Keys" --- then --- --get the "npc_say" action --- action = r2.Translator.LogicEntityTranslator(v,context) --- --add this action to the triggerable actions of the npc group which give the mission --- index = addTriggeredAction(context,context.RtGroups[logicEntity.NpcGrpId].Name,action) --- local name = context.RtGroups[logicEntity.NpcGrpId].Name --- --create an action to trigg the action to the npc group --- action = Actions.createAction("modify_variable",name..":v3 = "..index) --- --- --TODO insert the action in the correct state/event ... --- end --- end --- ---end --- ---r2.registerComponent(logicTexts) --- --- ---r2.registerComponent(varText) ---------------------------------------------------------- ---This component is linked to a BaseCounter.It's used in ---the ParametrableText component to represent the value ---of the variable ---local var = ---{ --- BaseClass="BaseClass", --- Name="TextParam", --- Prop= --- { --- {Name="BaseCounterId",Type="String"} --- } ---} ---r2.registerComponent(var) --- - ----------------------------------------------------- ---this component represents a text with parameters. ---It's a table of strings and/or TextParam elements. ---It allows to build sentences with variables. ---The Translator build a sentence with the strings --- and parameters, and returns a "npc_say" action. ---see the UnitTest.testCounter() function. ---local paramText = ---{ --- BaseClass="BaseClass", --- Name="ParametrableText", --- Prop= --- { --- --components are : "TextParam" objects or strings --- {Name="Components",Type="Table"}, --- {Name="Npc",Type="String"} --- } --- ---} ---r2.registerComponent(paramText) --- --- ---local ParamTextTranslator = function(this,context) --- local text="" --- local param="" --- for k,v in pairs(this.Components) --- do --- if k~="Keys" --- then --- if type(v) == "string" --- then --- text = text..v --- else --- if v.Class == "TextParam" --- then --- local id = v.BaseCounterId --- local baseCounter = context.Components[id] --- local counterName = context.CounterNames[id] --- param = r2.Utils.concat(param,counterName) --- text = text.."$d "..baseCounter.Object.." " --- end --- end --- --- end --- end --- local action = r2.newComponent("RtNpcEventHandlerAction") --- action.Action = "npc_say" --- local who = r2.Utils.getNpcParam(this.Npc,context) --- action.Parameters = who.."\n"..insertTextRt(text,context).."\n"..param --- return action ---end --- --- Obsolette? ---Translator.LogicEntityTranslator = function(logicEntity,context,ParentLogicEntity) --- local class = logicEntity.Class --- if class == "VarText" --- then --- return VarTextTranslator(logicEntity,context,ParentLogicEntity) --- end --- if class == "Counter" --- then --- return CounterTranslator(logicEntity,context,ParentLogicEntity) --- end --- if class == "LogicTexts" --- then --- return LogicTextsTranslator(logicEntity,context,ParentLogicEntity) --- end --- if class == "BaseCounter" --- then --- return BaseCounterTranslator(logicEntity,context,ParentLogicEntity) --- end --- if class == "ParametrableText" --- then --- return ParamTextTranslator(logicEntity,context) --- end ---end diff --git a/code/ryzom/common/data_common/r2/r2_logic_ui.lua b/code/ryzom/common/data_common/r2/r2_logic_ui.lua deleted file mode 100644 index a1430e303..000000000 --- a/code/ryzom/common/data_common/r2/r2_logic_ui.lua +++ /dev/null @@ -1,388 +0,0 @@ -r2.logicUI = -{ - MenuName = "ui:interface:r2ed_triggers_menu", - Menu = nil, -} - -function r2.logicUI:openLogicMenu(caller) - - launchContextMenuInGame(self.MenuName) - if self.Menu == nil or self.Menu.isNil then - self.Menu = getUI(self.MenuName) - end - - local menu = self.Menu - - menu:setParentPos(caller) - menu:setPosRef("BL TL") - - local root = menu:getRootMenu() - if (caller.y_real - root.h_real < 0) then - menu.y = root.h_real + caller.h_real - else - menu.y = 0 - end - menu:setMinW(85) - menu:updateCoords() -end - -function r2.logicUI:getEltUIInstId(eltUI) - return eltUI.Env.InstanceId -end - -function r2.logicUI:setEltUIInstId(eltUI, id) - eltUI.Env.InstanceId = id -end - -function r2.logicUI:setSequUIInstId(sequUI, id) - sequUI.Env.InstanceId = id -end - -function r2.logicUI:getSequUIInstId(sequUI) - return sequUI.Env.InstanceId -end - -------- NEW ELEMENT UI --------------------------------------------- -function r2.logicUI:newElementUI(classUI, newInst, withOrder) - - local templateParams = classUI.eltTemplateParams - - --not necessary current sequenceUI - local sequenceUI = classUI:updatedSequUI() - assert(sequenceUI) - - local listElements = sequenceUI:find("elements_list") - assert(listElements) - - for i=0, listElements.childrenNb-1 do - local elt = listElements:getChild(i) - local instId = self:getEltUIInstId(elt) - if instId==newInst.InstanceId then return end - end - - classUI.elementsIdCounter = classUI.elementsIdCounter+1 - - local elementId = "elt"..classUI.elementsIdCounter - - -- create new element - local newElement = createGroupInstance("element_template", listElements.id, - {id=elementId, posref="TL TL", x="0", y="0", sizeref="w", hardtext="", - select_elt=templateParams.selectElt, open_elt_editor=templateParams.openEltEditor, - max_min_elt=templateParams.maxMinElt, remove_elt=templateParams.removeElt, open_chat=templateParams.openChat, - col_over=templateParams.colOver, col_pushed=templateParams.colPushed, multi_max_line=templateParams.multiMaxLine}) - assert(newElement) - - -- add element to list - local eltIndex = -1 - if withOrder then - local comps = newInst.Parent - for i=0, comps.Size-1 do - local comp = comps[i] - if comp.InstanceId == newInst.InstanceId then - eltIndex = i - break - end - end - local eltEditor = listElements:find("edit_element") - assert(eltEditor) - local indexEltEditor = listElements:getElementIndex(eltEditor) - if indexEltEditor<= eltIndex then eltIndex=eltIndex+1 end - else - eltIndex = listElements.childrenNb - end - - listElements:addChildAtIndex(newElement, eltIndex) - listElements.parent:updateCoords() - - -- active global minimize / maximize button - if classUI.maxAndMin then - - classUI:maximizeMinimizeElement(newElement) - - if listElements.childrenNb == 2 then - local maxElts = sequenceUI:find("maximize_elements") - assert(maxElts) - maxElts.active = true - end - end - - -- scroll goes down to new element - local scrollBar = sequenceUI:find("scroll_objects") - assert(scrollBar) - scrollBar.trackPos = 0 - - -- target sroll text - local scroll = newElement:find("scroll_bar_text") - assert(scroll) - - local scrollText = newElement:find("scroll_text_gr") - assert(scrollText) - scroll:setTarget(scrollText.id) - - self:setEltUIInstId(newElement, newInst.InstanceId) - - -- update next elements title - if eltIndex=0 and indexEditor>=0 and indexInstance>=0 then - - local finalIndex = indexInstance - - if indexEditor-1 <= indexInstance then finalIndex=finalIndex+1 end - - local selectedEltUI = classUI:currentEltUI() - local isSelected = (selectedEltUI==elementUI) - - local loop = math.abs(finalIndex-index) - if loop>0 then - - -- replace element UI - for i=1, loop do - if finalIndex < index then - listElements:upChild(elementUI) - else - listElements:downChild(elementUI) - end - end - - -- replace element editor - if isSelected then - for i=1, loop do - if finalIndex < index then - listElements:upChild(eltEditor) - else - listElements:downChild(eltEditor) - end - end - end - - local firstIndex = math.min(index, finalIndex) - local lastIndex = math.min(listElements.childrenNb-1, math.max(index, finalIndex)+1) - for i=firstIndex, lastIndex do - local eltUI = listElements:getChild(i) - if eltUI~=eltEditor then - classUI:updateElementTitle(eltUI) - end - end - - if selectedEltUI~=nil then - selectedEltUI.active=false - classUI:updateElementEditor() - end - end - end -end - ------- MAX/MIN ELEMENT UI ------------------------------------------- -function r2.logicUI:maximizeMinimizeElement(element, allMinimize) - - if element == nil then - element = getUICaller().parent.parent.parent.parent.parent.parent - end - assert(element) - - local eltText = element:find("element_text") - assert(eltText) - - local allMin, allMax = true, true - if allMinimize ~= nil then - allMin = allMinimize - allMax = not allMin - end - - local maxButton = element:find("maximize_element") - assert(maxButton) - local minButton = element:find("minimize_element") - assert(minButton) - - -- maximize - if allMax and eltText.active==false then - eltText.active = true - maxButton.active = false - minButton.active = true - - -- minimize - elseif allMin and eltText.active==true then - eltText.active = false - maxButton.active = true - minButton.active = false - end -end - ------- MAX/MIN ELEMENTS UI ------------------------------------------- -function r2.logicUI:maximizeMinimizeElements(classUI) - - local sequenceUI = classUI:currentSequUI() - assert(sequenceUI) - - local elements = sequenceUI:find("elements_list") - assert(elements) - - elements.Env.Minimize = not elements.Env.Minimize - - for i = 0, elements.childrenNb-1 do - local element = elements:getChild(i) - assert(element) - - -- if element is not the element editor - if self:getEltUIInstId(element) and element~=classUI:currentEltUI() then - classUI:maximizeMinimizeElement(element, elements.Env.Minimize) - end - end - - local minElts = sequenceUI:find("minimize_elements") - assert(minElts) - local maxElts = sequenceUI:find("maximize_elements") - assert(maxElts) - - if elements.Env.Minimize == true then - minElts.active = false - maxElts.active = true - else - minElts.active = true - maxElts.active = false - end -end - - ------- CLOSE EDITOR ------------------------------------------ -function r2.logicUI:closeEditor(classUI) - - -- reset current dialog and current chat - classUI:setCurrentEltUIId(nil) -end - - -------- UTILS ------------------------------------------------ - -function r2.logicUI:findElementUIFromInstance(classUI, instance) - - local sequenceUI = classUI:currentSequUI() - assert(sequenceUI) - - local eltsList = sequenceUI:find("elements_list") - assert(eltsList) - - for i=0,eltsList.childrenNb-1 do - local element = eltsList:getChild(i) - if r2.logicUI:getEltUIInstId(element) == instance.InstanceId then - return element - end - end - - return nil -end - - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_mini_activities.lua b/code/ryzom/common/data_common/r2/r2_mini_activities.lua deleted file mode 100644 index 716b8e74b..000000000 --- a/code/ryzom/common/data_common/r2/r2_mini_activities.lua +++ /dev/null @@ -1,213 +0,0 @@ -r2.miniActivities = { - - -activityTextures = { ["Follow Route"] = "r2_mini_activity_follow_road.tga", - ["Patrol"] = "r2_mini_activity_patrol_road.tga", - ["Repeat Road"] = "r2_mini_activity_repeat_road.tga", - ["Wander"] = "r2_mini_activity_wander_zone.tga", - ["Stand Still"] = "r2_mini_activity_stand_still.tga", - ["Rest In Zone"] = "r2_mini_activity_rest_zone.tga", - ["Feed In Zone"] = "r2_mini_activity_feed_zone.tga", - ["Work In Zone"] = "r2_mini_activity_work_zone.tga", - ["Hunt In Zone"] = "r2_mini_activity_hunt_zone.tga", - ["Guard Zone"] = "r2_mini_activity_guard_zone.tga", - }, - -maxActivities = 14, - -uiId = "ui:interface:r2ed_mini_activity_view", - -} - ---------------------------------------------------------------------------------------------------------- --- Show the mini activity view for this instance -function r2.miniActivities:openEditor() - - local selectedInstance = r2:getSelectedInstance() - if not (selectedInstance:isPlant() or selectedInstance:isBotObject()) then - r2.miniActivities:updateMiniActivityView() - r2.miniActivities:updateSequenceButtonBar() - - local miniActivityView = getUI(self.uiId) - assert(miniActivityView) - - miniActivityView.active = true - end -end - ------- CLOSE EDITOR ------------------------------------------------------ -function r2.miniActivities:closeEditor() - - local ui = getUI(self.uiId) - assert(ui) - if ui.active then - ui.active = false - end -end - ---- UPDATE SEQUENCE BUTTON BAR ------------------------------------------------- -function r2.miniActivities:updateSequenceButtonBar() - - local selectBar = getUI("ui:interface:r2ed_select_bar") - assert(selectBar) - - local sequencesButton = selectBar:find("sequences") - assert(sequencesButton) - - local sequenceInst - if r2.activities.isInitialized then - sequenceInst = r2.activities:currentSequInst() - else - local logicEntity = r2:getSelectedInstance() - if logicEntity== nil then return end - - if logicEntity:getBehavior().Activities.Size > 0 then - sequenceInst = logicEntity:getBehavior().Activities[logicEntity:getSelectedSequenceIndex()] - end - end - - local uc_sequ = ucstring() - if sequenceInst and sequenceInst.User.Deleted~=true then - uc_sequ:fromUtf8(sequenceInst:getName()) - else - uc_sequ = i18n.get("uiR2EDSequences") - end - sequencesButton.uc_hardtext = uc_sequ -end - - ---- UPDATE MINI ACTIVITIES VIEW ---------------------------------------------------- -function r2.miniActivities:updateMiniActivityView() - - local miniActivityView = getUI(self.uiId) - assert(miniActivityView) - - local miniActivities = miniActivityView:find("mini_activities") - assert(miniActivities) - - local noActivityLabel = miniActivityView:find("no_activity") - assert(noActivityLabel) - - local startCount = 0 - - local sequenceInst - if r2.activities.isInitialized then - sequenceInst = r2.activities:currentSequInst() - else - local logicEntity = r2:getSelectedInstance() - if logicEntity == nil then return end - - if logicEntity:getBehavior().Activities.Size > 0 then - sequenceInst = logicEntity:getBehavior().Activities[logicEntity:getSelectedSequenceIndex()] - end - end - - if sequenceInst~=nil and sequenceInst.User.Deleted~=true then - - local decalErased = 0 - - for i=0, sequenceInst.Components.Size-1 do - - local activityInst = sequenceInst.Components[i] - assert(activityInst) - - if activityInst then - - local activityZoneId = activityInst.ActivityZoneId - if activityInst.User.Deleted~=true - -- this zone just has been deleted - and not (activityZoneId~="" and r2:getInstanceFromId(activityZoneId)==nil) then - - local miniIndex = i - decalErased - - local miniActivity = miniActivities[tostring(miniIndex)] - assert(miniActivity) - - miniActivity.active = true - miniActivity.Env.InstanceId = activityInst.InstanceId - - -- activity type button - local activityButton = miniActivity:find("activity"):find("button") - assert(activityButton) - local activityTexture = activityInst:getMiniButtonTexture() - if activityTexture then - activityButton.texture = activityTexture - activityButton.texture_pushed = activityTexture - activityButton.texture_over = activityTexture - end - - -- activity type text - local activityText = miniActivity:find("activity_name") - assert(activityText) - local activityType = activityInst:getVerb() - if activityZoneId~="" then - local place = r2:getInstanceFromId(activityZoneId) - assert(place) - activityType = activityType .. " '" .. place.Name .."'" - end - local uc_type = ucstring() - uc_type:fromUtf8(activityType) - activityText.uc_hardtext = uc_type - else - decalErased = decalErased+1 - end - end - end - startCount = sequenceInst.Components.Size - decalErased - - --label "No activity" - if (sequenceInst.Components.Size==0) or (sequenceInst.Components.Size==1 and erasedInstId~=nil) - or (startCount == 0) then - noActivityLabel.active = true - noActivityLabel.uc_hardtext = i18n.get("uiR2EdNoActivity") - else - noActivityLabel.active = false - end - - else - - noActivityLabel.active = true - noActivityLabel.uc_hardtext = i18n.get("uiR2EdNoSequence") - end - - -- hide remaining mini activity templates - for i=startCount, r2.activities.maxElements-1 do - local miniActivity = miniActivities[tostring(i)] - assert(miniActivity) - miniActivity.active = false - end -end - --- OPEN ACTIVITIES EDITOR ON SELECTED MINI ACTIVITY ------------------------------- -function r2.miniActivities:openActivity() - - r2.activities:openEditor() - - local miniActivity = getUICaller().parent.parent.parent - assert(miniActivity) - - local sequenceUI = r2.activities:currentSequUI() - assert(sequenceUI) - - local activityList = sequenceUI:find("elements_list") - assert(activityList) - - local activityUI - for i=0, activityList.childrenNb-1 do - local activity = activityList:getChild(i) - assert(activity) - - if r2.logicUI:getEltUIInstId(activity) == miniActivity.Env.InstanceId then - activityUI = activity - break - end - end - - if activityUI then - local selectedButtonElt = activityUI:find("select") - assert(selectedButtonElt) - - selectedButtonElt.pushed = true - r2.activities:selectElement(selectedButtonElt) - end -end diff --git a/code/ryzom/common/data_common/r2/r2_misc.lua b/code/ryzom/common/data_common/r2/r2_misc.lua deleted file mode 100644 index d85744bd0..000000000 --- a/code/ryzom/common/data_common/r2/r2_misc.lua +++ /dev/null @@ -1,348 +0,0 @@ --- This file contains a set of miscellanous functions that don't fit in any other place --- TODO nico : could be useful outside r2 -> export this - - ---------------- --- FUNCTIONS -- ---------------- - - ------------------------------------------------------------------------------------------------------------- --- equivalent of the ? : C operator, execpt that the 2 sides are evaluated before assignement -function select(cond, valueForTrue, valueForFalse) - if cond then - return valueForTrue - else - return valueForFalse - end -end - - ------------------------------------------------------------------------------------------------------------- --- execute a function for each key pair in a table -function forEach(table, fn) - local i, v = next(table,nil) -- get first index of "o" and its value - while i do - fn(i, v) - i, v = next(table,i) -- get next index and its value - end -end - - ------------------------------------------------------------------------------------------------------------- --- whatever -table.setn = function(table, n) - assert(table) - local mt = getmetatable(table) - if mt ~= nil then - if mt.__next ~= nil then - table.Size = n - end - end -end - ------------------------------------------------------------------------------------------------------------- --- extension to table library : remove all content of a table without deleting the table object -function table.clear(tbl) - while next(tbl) do - tbl[next(tbl)] = nil - end - table.setn(tbl, 0) -end - ------------------------------------------------------------------------------------------------------------- --- extension to table library : merge the content of two table remove the element, remove fields with duplicated keys (except for number) -function table.merge(tbl1, tbl2) - local k, v = next(tbl2) - while k do - if (type(k) == "number") then - table.insert(tbl1, v) - else - tbl1[k] = v - end - k, v = next(tbl2, k) - end -end - ------------------------------------------------------------------------------------------------------------- --- Addtion to the string library : test wether a string match with the given pattern (returns true is so) -function string.match(str, pattern) - assert( type(str) == "string") - if (str == nil) then - debugInfo(debug.traceback()) - assert(0) - end - local startPos, endPos = string.find(str, pattern) - if startPos == nil then return false end - return startPos == 1 and endPos == string.len(str) -end - ------------------------------------------------------------------------------------------------------------- --- clone content of a table -function clone(t) - local new = {} - local i, v = next(t, nil) - while i do - if (type(v)=="table") then v= clone(v) end - new[i] = v - i, v = next(t, i) - end - return new -end - ------------------------------------------------------------------------------------------------------------- --- Test if 2 values are equal --- If values are table, then a member wise comparison is done -function isEqual(lhs, rhs) - if type(lhs) ~= type(rhs) then return false end - if type(lhs) == "table" then - local lk, lv = next(lhs) -- keys - local rk, rv = next(rhs) -- values - while lk and rk do - if not isEqual(lk, rk) then - return false - end - if not isEqual(lv, rv) then - return false - end - lk, lv = next(lhs, lk) - rk, rv = next(rhs, rk) - end - if lk ~= nil or rk ~= nil then - return false - -- not same table length - end - return true - else - return lhs == rhs - end -end - ------------------------------------------------------------------------------------------------------------- --- Test if 2 values are equal --- If values are table, then a member wise comparison is done --- special : function pointer are ignored and considered equals -function isEqualIgnoreFunctions(lhs, rhs) - if type(lhs) ~= type(rhs) then return false end - if type(lhs) == "table" then - local lk, lv = next(lhs) -- keys - local rk, rv = next(rhs) -- values - while lk and rk do - if not isEqualIgnoreFunctions(lk, rk) then - return false - end - if not isEqualIgnoreFunctions(lv, rv) then - return false - end - lk, lv = next(lhs, lk) - rk, rv = next(rhs, rk) - end - if lk ~= nil or rk ~= nil then - return false - -- not same table length - end - return true - elseif type(lhs) == "function" then - return true - else - return lhs == rhs - end -end - - ------------------------------------------------------------------------------------------------------------- --- clone of a table, but with a depth of 1 ... -function shallowClone(t) - local new = {} - local i, v = next(t, nil) - while i do - new[i] = v - i, v = next(t, i) - end - return new -end - -------------------------------------------------------------------------------------------------- --- If args 'value' is nil then the arg 'default' is returned, else the actual 'value' is return -function defaulting(value, default) - if value == nil then - return default - else - return value - end -end - - -------------------------------------------------------------------------------------------------- --- return clamped value. Min and/or max are ignotred if null -function clamp(value, min, max) - local result = value - if min then result = math.max(min, result) end - if max then result = math.min(max, result) end - return result -end - -------------------------------------------------------------------------------------------------- --- enclose a string by double quotes -function strify(str) - return [["]] .. tostring(str) .. [["]] -end - -------------------------------------------------------------------------------------------------- --- enclose a string by double quotes -function strifyXml(str) - local strxml = string.gsub(tostring(str), ">", ">") - strxml = string.gsub(strxml, "<", "<") - strxml = string.gsub(strxml, "&", "&") - strxml = string.gsub(strxml, "'", "'") - strxml = string.gsub(strxml, '"', """) - return [["]] .. strxml .. [["]] -end - ------------------------------------------------------------------------------------------------------------- --- snap a position to ground, returning the z snapped coordinate -function r2:snapZToGround(x, y) - local x1, y1, z1 = r2:snapPosToGround(x, y) - return z1 -end - -------------------------------------------------------------------------------------------------- --- ---built an ordered table from a table whose index are strings ---example : --- ---table = ---{ ---"bar" = test(), ---"foo" = { "hello" }, ---"abc" = 10, ---} --- ---result = sortAlphabeticaly(table) --- --- ---result is an integer indexed table : ---{ --- -- index = { sorted key, value } --- 1 = { "abc", 10 }, --- 2 = { "bar", test() }, --- 3 = { "foo", { "hello" } } ---} --- - -function sortAlphabetically(src) - local sortedTable = {} - local index = 1 - for k, v in pairs(src) do - sortedTable[index] = { key = k, value = v } - index = index + 1 - end - local function comp(val1, val2) - return val1.key < val2.key - end - table.sort(sortedTable, comp) - return sortedTable -end - ----------- --- INIT -- ----------- - --- redefine the 'next' function of lua to use a "__next" function in the metatable --- useful to traverse C++ objects that are exposed to lua through the use of the metatable -assert(next ~= nil) -- default lib should have been opened - -if oldNextFunction == nil then - oldNextFunction = next -end -next = function(table, key) - assert(table) - local mt = getmetatable(table) - if mt ~= nil then - if mt.__next ~= nil then - return mt.__next(table, key) - end - end - -- tmp - --if type(table) ~= "table" then - -- debugInfo(debug.traceback()) - -- debugInfo("'next' expect a table (or user data with __next metamethod) as its first parameter") - -- return - --end - -- else use default 'next' function - return oldNextFunction(table, key) -end - - - --- assert(table.getn ~= nil) -- default lib should have been opened - ---if oldTableGetnFunction == nil then --- oldTableGetnFunction = table.getn ---end --- ---table.getn = function(table) --- assert(table) --- local mt = getmetatable(table) --- if mt ~= nil then --- if mt.__next ~= nil then --- return table.Size --- end --- end --- return oldTableGetnFunction(table) ---end - - -table.getn = function(table) - assert(table) - local mt = getmetatable(table) - if mt ~= nil then - if mt.__next ~= nil then - return table.Size - end - end - return #table -end - - - --- redefine the hardcoded 'pairs' function to use the redefined 'next' --- hardcoded version uses the C version of next, not the lua one if it has been redefined - -if oldPairsFunction ~= nil then - pairs = oldPairsFunction -end - -if oldPairsFunction == nil then - oldPairsFunction = pairs -end - -if true then - -- TODO nico : bad init of editor if I name this 'pairs' directly (don't know why), so named it 'specPairs' and used - -- 'specPairs' when I must iterate over C++ objects ... - specPairs = function(table) - local function iterFunc(table, key) - return next(table, key) - end - return iterFunc, table - end -end - -function r2.assert (param) - if not param then assert(nil) end - return param -end - -function r2.isTable(node) - if not node then return false end - - if type(node) == "table" then - return true - elseif type(node) == "userdata" then - local mt = getmetatable(node) - if mt~= nil and mt.__next ~= nil then - return true - end - end - return false -end diff --git a/code/ryzom/common/data_common/r2/r2_palette.lua b/code/ryzom/common/data_common/r2/r2_palette.lua deleted file mode 100644 index 073758d45..000000000 --- a/code/ryzom/common/data_common/r2/r2_palette.lua +++ /dev/null @@ -1,14263 +0,0 @@ - --- tmp for nico's tests -local function formatLevel(level) - local result = tostring(level) - while string.len(result) ~= 3 do - result = "0" .. result - end - return result -end - -local function formatSelectionTextName(level, ecosystem) - return "palette.selection_test.level_" .. formatLevel(level) .. "_" .. tostring(ecosystem) -end - -local levelStep = 10 -local ecosystemTable = { "", "Desert", "Forest", "Jungle", "Lacustre", "PrimeRoots", "Goo" } - -r2.loadPalette = function() - local entries = {} - --- test entries for levels & ecosystems - if r2.Config.TestPaletteSelection then - for ecosystem = 1, 4 do - for level = 1,250, levelStep do - local npc = - { - Name="Npc", - Equipment="", - IsStuck=0, - SheetClient="fyros_race_stats", - Level=level, - Ecosystem = ecosystemTable[ecosystem], - AiMovement="stand_on_start_point", - Profile="no_change", - Angle=0, - Position={x=0, y=0, z=0} - } - r2.addPaletteElement(formatSelectionTextName(level, ecosystem), npc) - end - end - end - --- base class - entries.npc = - { - Name="", - Equipment="", - SheetClient="undef", - Level=1, - AiMovement="stand_on_start_point", --- AiActivity="guard", user Profile instead - IsStuck=0, - IsBotObject = 0, - IsNamed=0, - IsNpc = 1, -- Bandit, Cuthroat, Guard, Civil - Category="Npc", - - GabaritHeight = 0, - GabaritTorsoWidth = 0, - GabaritArmsWidth = 0, - GabaritLegsWidth = 0, - GabaritBreastSize = 0, - - HairType = 0, - HairColor = 0, - Tattoo = 0, - EyesColor = 0, - - MorphTarget1 = 0, - MorphTarget2 = 0, - MorphTarget3 = 0, - MorphTarget4 = 0, - MorphTarget5 = 0, - MorphTarget6 = 0, - MorphTarget7 = 0, - MorphTarget8 = 0, - - Sex = 0, - JacketModel = 0, - TrouserModel = 0, - FeetModel = 0, - HandsModel = 0, - ArmModel = 0, - WeaponRightHand = 0, - WeaponLeftHand = 0, - - JacketColor = 0, - ArmColor = 0, - HandsColor = 0, - TrouserColor = 0, - FeetColor =0, - - Function = "", - Level = 1, - Profile = "civil", - Speed = "walk", - Aggro = 15, - PlayerAttackable = 1, - BotAttackable = 1, - AutoSpawn = 1, - RingAccess = "a1", - BoxSelection=0, --- Angle=0, --- Position={x=0, y=0, z=0}, - } - - r2.addPaletteElement("palette.entities.npc", entries.npc) - - --- creature types - - entries.creature = - { - Base="palette.entities.npc", - IsNpc = 0, - - } - r2.addPaletteElement("palette.entities.creature", entries.creature) - - entries.creature_passive = - { - Base="palette.entities.creature", - IsHerbivore = 1, - IsFauna = 1, - Category = "Herbivore", - } - r2.addPaletteElement("palette.entities.creatures.passive", entries.creature_passive) - - entries.creature_named_passive = - { - Base="palette.entities.creatures.passive", - IsNamed = 1, - } - r2.addPaletteElement("palette.entities.creatures.named_passive", entries.creature_named_passive) - - entries.creature_predator = - { - Base="palette.entities.creature", - Profile="faction", - IsHerbivore = 0, - - IsFauna = 1, - Category = "Carnivore", - } - r2.addPaletteElement("palette.entities.creatures.predator", entries.creature_predator) - - entries.creature_named_predator = - { - Base="palette.entities.creatures.predator", - IsNamed = 1, - - } - r2.addPaletteElement("palette.entities.creatures.named_predator", entries.creature_named_predator) - - - entries.creature_plant = - { - Base="palette.entities.creature", - Profile="faction", - Category = "Plant", - IsPlant = 1, - } - r2.addPaletteElement("palette.entities.creatures.plant", entries.creature_plant) - - entries.creature_degen = - { - Base="palette.entities.creature", - Profile="faction", - Category = "Degen", - } - r2.addPaletteElement("palette.entities.creatures.degen", entries.creature_degen) - - entries.creature_kitin = - { - Base="palette.entities.creature", - Profile="faction", - IsHerbivore = 0, - IsFauna = 1, - IsKitin = 1, - Category = "SoldierKitin", - } - r2.addPaletteElement("palette.entities.creatures.kitin", entries.creature_kitin) - - - entries.creature_kitin_worker = - { - Base="palette.entities.creatures.kitin", - IsHerbivore=1, - Category = "WorkerKitin", - } - r2.addPaletteElement("palette.entities.creatures.kitin_worker", entries.creature_kitin_worker) - - --- npc types - - entries.cuthroat = - { - Base="palette.entities.npc", - Name="Cut Throat", - Level=1, - Profile="bandit", - PlayerAttackable = 1, - BotAttackable = 1, - SubCategory = "Bandit", - } - r2.addPaletteElement("palette.entities.cuthroat", entries.cuthroat) - - entries.guard= - { - Base="palette.entities.npc", - Level=1, - Profile="guard", - PlayerAttackable = 0, - BotAttackable = 1, - SubCategory = "Guard", - } - r2.addPaletteElement("palette.entities.guard", entries.guard) - - - entries.bandit = - { - Base="palette.entities.npc", - Name="Bandit", - Level=1, - Profile="bandit", - PlayerAttackable = 1, - BotAttackable = 1, - SubCategory = "Bandit", - - } - r2.addPaletteElement("palette.entities.bandit", entries.bandit) - - - entries.civil = - { - Base="palette.entities.npc", - Name="Civil", - Level=1, - Profile="civil", - Aggro = 0, - PlayerAttackable = 0, - BotAttackable = 0, - SubCategory = "Civil", - } - r2.addPaletteElement("palette.entities.civil", entries.civil) - - - entries.fyros_male = - { - -- Customization="toto", - Name="Fyros Male", - Class="NpcCustom", - Type="base", - Base="palette.entities.npc", - Equipment="fyros_equipment", - SheetClient="basic_fyros_male.creature" - - } - r2.addPaletteElement("palette.entities.players.fyros_male", entries.fyros_male) - - entries.fyros_equipment = - { - helmet = - { - ["heavy helmet"] = "icfahh.sitem" - }, - - chest_plate = - { - ["refugee vest"] = "icravr.sitem", - ["civilian vest"] = "icfacv_3.sitem", - ["light vest"] = "icfalv.sitem", - ["light vest II"] = "icfalv_3.sitem", - ["medium vest"] = "icfamv.sitem", - ["medium vest II"] = "icfamv_3.sitem", - ["heavy vest"] = "icfahv.sitem", - ["heavy vest II"] = "icfahv_3.sitem" - }, - - legs = - { - ["light pants"] = "icfalp.sitem", - ["medium pants"] = "icfamp.sitem", - ["heavy pants"] = "icfahp.sitem", - ["pants 4"] = "icfacp_3.sitem", - ["pants 5"] = "icfahp_3.sitem", - ["pants 6"] = "icfamp_3.sitem", - ["pants 7"] = "icfalp_3.sitem" - }, - - boots = - { - ["light boots"] = "icfalb.sitem", - ["medium boots"] = "icfamb.sitem", - ["heavy boots"] = "icfahb.sitem", - ["boots 4"] = "icfacb_3.sitem", - ["boots 5"] = "icfahb_3.sitem", - ["boots 6"] = "icfamb_3.sitem", - ["boots 7"] = "icfalb_3.sitem" - }, - - gloves = - { - ["light gloves"] = "icfalg.sitem", - ["medium gloves"] = "icfamg.sitem", - ["heavy gloves"] = "icfahg.sitem" - }, - - arms_guard = - { - ["light sleeves"] = "icfals.sitem", - ["medium sleeves"] = "icfams.sitem", - ["heavy sleeves"] = "icfahs.sitem", - ["sleeves 4"] = "icfacs_3.sitem", - ["sleeves 5"] = "icfahs_3.sitem", - ["sleeves 6"] = "icfams_3.sitem", - ["sleeves 7"] = "icfals_3.sitem" - }, - - right_hand = - { - ["dagger"] = "iccm1pd.sitem", - ["mace"] = "iccm1bm.sitem", - ["dagger"] = "iccm1pd.sitem", - ["axe"] = "iccm1sa.sitem", - ["sword"] = "iccm1ss.sitem" - }, - - left_hand = - { - ["dagger"] = "iccm1pd.sitem" - } - } - r2.addR2PlayerEquipment(entries.fyros_male, entries.fyros_equipment) - - entries.fyros_female = - { - Name="Fyros Female", - Class="NpcCustom", - Type="base", - Equipment="fyros_equipment", - Base="palette.entities.npc", - SheetClient="basic_fyros_female.creature" - } - r2.addPaletteElement("palette.entities.players.fyros_female", entries.fyros_female) - r2.addR2PlayerEquipment(entries.fyros_female, entries.fyros_equipment) - - - entries.matis_male = - { - Name="Matis Male", - Class="NpcCustom", - Type="base", - Equipment="fyros_equipment", - Base="palette.entities.npc", - SheetClient="basic_matis_male.creature" - - } - r2.addPaletteElement("palette.entities.players.matis_male", entries.matis_male) - - entries.matis_equipment = - { - helmet = - { - - }, - - chest_plate = - { - ["vest 1"] = "icmacv_3.sitem", - ["vest 2"] = "icmahv_3.sitem", - ["vest 3"] = "icmamv_3.sitem", - ["vest 4"] = "icmalv_3.sitem", - ["vest 5"] = "icravr.sitem" - }, - - legs = - { - ["pants 1"] = "icmacp_3.sitem", - ["pants 2"] = "icmahp_3.sitem", - ["pants 3"] = "icmamp_3.sitem", - ["pants 4"] = "icmalp_3.sitem" - }, - - boots = - { - ["boots 1"] = "icmacb_3.sitem", - ["boots 2"] = "icmahb_3.sitem", - ["boots 3"] = "icmamb_3.sitem", - ["boots 4"] = "icmalb_3.sitem" - }, - - gloves = - { - - }, - - arms_guard = - { - ["sleeves 1"] = "icmacs_3.sitem", - ["sleeves 2"] = "icmahs_3.sitem", - ["sleeves 3"] = "icmams_3.sitem", - ["sleeves 4"] = "icmals_3.sitem" - }, - - right_hand = - { - ["dagger"] = "iccm1pd.sitem", - ["mace"] = "iccm1bm.sitem", - ["dagger"] = "iccm1pd.sitem", - ["axe"] = "iccm1sa.sitem", - ["sword"] = "iccm1ss.sitem" - }, - - left_hand = - { - ["dagger"] = "iccm1pd.sitem" - } - } --- r2.addR2PlayerEquipment(entries.matis_male, entries.matis_equipment) - r2.addR2PlayerEquipment(entries.matis_male, entries.fyros_equipment) - - entries.matis_female = - { - Name="Matis Female", - Class="NpcCustom", - Type="base", - Base="palette.entities.npc", - Equipment="matis_equipment", - SheetClient="basic_matis_female.creature", - - } - r2.addPaletteElement("palette.entities.players.matis_female", entries.matis_female) - r2.addR2PlayerEquipment(entries.matis_female, entries.matis_equipment) - - entries.tryker_male = - { - Name="Tryker Male", - Class="NpcCustom", - Type="base", - Base="palette.entities.npc", - Equipment="tryker_equipment", - SheetClient="basic_tryker_male.creature", - } - r2.addPaletteElement("palette.entities.players.tryker_male", entries.tryker_male) - - entries.tryker_equipment = - { - helmet = - { - - }, - - chest_plate = - { - ["vest 1"] = "ictacv_3.sitem", - ["vest 2"] = "ictahv_3.sitem", - ["vest 3"] = "ictamv_3.sitem", - ["vest 4"] = "ictalv_3.sitem", - }, - - legs = - { - ["pants 1"] = "ictacp_3.sitem", - ["pants 2"] = "ictahp_3.sitem", - ["pants 3"] = "ictamp_3.sitem", - ["pants 4"] = "ictalp_3.sitem" - }, - - boots = - { - ["boots 1"] = "ictacb_3.sitem", - ["boots 2"] = "ictahb_3.sitem", - ["boots 3"] = "ictamb_3.sitem", - ["boots 4"] = "ictalb_3.sitem" - }, - - gloves = - { - - }, - - arms_guard = - { - ["sleeves 1"] = "ictacs_3.sitem", - ["sleeves 2"] = "ictahs_3.sitem", - ["sleeves 3"] = "ictams_3.sitem", - ["sleeves 4"] = "ictals_3.sitem" - }, - - right_hand = - { - ["dagger"] = "iccm1pd.sitem", - ["mace"] = "iccm1bm.sitem", - ["dagger"] = "iccm1pd.sitem", - ["axe"] = "iccm1sa.sitem", - ["sword"] = "iccm1ss.sitem" - }, - - left_hand = - { - ["dagger"] = "iccm1pd.sitem" - } - } - r2.addR2PlayerEquipment(entries.tryker_male, entries.tryker_equipment) - - entries.tryker_female = - { - Name="Tryker Female", - Class="NpcCustom", - Type="base", - Base="palette.entities.npc", - Equipment="tryker_equipment", - SheetClient="basic_tryker_female.creature" - } - r2.addPaletteElement("palette.entities.players.tryker_female", entries.tryker_female) - r2.addR2PlayerEquipment(entries.tryker_female, entries.tryker_equipment) - - entries.zorai_male = - { - Name="Zorai Male", - Class="NpcCustom", - Type="base", - Base="palette.entities.npc", - Equipment="zorai_equipment", - SheetClient="basic_zorai_male.creature" - } - r2.addPaletteElement("palette.entities.players.zorai_male", entries.zorai_male) - - entries.zorai_equipment = - { - helmet = - { - - }, - - chest_plate = - { - ["vest 1"] = "icmacv_3.sitem", - ["vest 2"] = "icmahv_3.sitem", - ["vest 3"] = "icmamv_3.sitem", - ["vest 4"] = "icmalv_3.sitem", - }, - - legs = - { - ["pants 1"] = "icmacp_3.sitem", - ["pants 2"] = "icmahp_3.sitem", - ["pants 3"] = "icmamp_3.sitem", - ["pants 4"] = "icmalp_3.sitem" - }, - - boots = - { - ["boots 1"] = "icmacb_3.sitem", - ["boots 2"] = "icmahb_3.sitem", - ["boots 3"] = "icmamb_3.sitem", - ["boots 4"] = "icmalb_3.sitem" - }, - - gloves = - { - }, - - arms_guard = - { - ["sleeves 1"] = "icmacs_3.sitem", - ["sleeves 2"] = "icmahs_3.sitem", - ["sleeves 3"] = "icmams_3.sitem", - ["sleeves 4"] = "icmals_3.sitem" - }, - - right_hand = - { - ["dagger"] = "iccm1pd.sitem", - ["mace"] = "iccm1bm.sitem", - ["dagger"] = "iccm1pd.sitem", - ["axe"] = "iccm1sa.sitem", - ["sword"] = "iccm1ss.sitem" - }, - - left_hand = - { - ["dagger"] = "iccm1pd.sitem" - } - } - r2.addR2PlayerEquipment(entries.zorai_male, entries.zorai_equipment) - - entries.zorai_female = - { - Name="Zorai Female", - Class="NpcCustom", - Type="base", - Base="palette.entities.npc", - Equipment="zorai_equipment", - SheetClient="basic_zorai_female.creature" - } - r2.addPaletteElement("palette.entities.players.zorai_female", entries.zorai_female) - r2.addR2PlayerEquipment(entries.zorai_female, entries.zorai_equipment) - - --- - - --- obsolete - entries.guard1 = - { - Base="palette.entities.npc", - Name="guard Matis 1", - SheetClient="fyros.race_stats", - Level=1, - -- SheetClient="matis_guard_m_f.creature", - } - r2.addPaletteElement("palette.entities.npcs.guards.guard1", entries.guard1) --- obsolete - entries.fire4 = - { - Base="palette.entities.npc", - Name="Fire 4", - SheetClient="object_campfire.creature", - Level=1, - IsStuck=1 - } - r2.addPaletteElement("palette.entities.botobjects.fires.fire4", entries.fire4); - --- obsolete - entries.bandit1 = - { - Base="palette.entities.npc", - Name="Le bandit", - SheetClient="zorai_guard_l_b_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.bandits.bandit1", entries.bandit1) - --- NPCs added by Sadge start here -- - - --- fyros cutthroats - - entries.cuthroat_b_melee_a_f_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_a_f_f.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_a_f_f", entries.cuthroat_b_melee_a_f_f) - - entries.cuthroat_b_melee_b_f_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_b_f_f.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_b_f_f", entries.cuthroat_b_melee_b_f_f) - - entries.cuthroat_b_melee_c_f_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_c_f_f.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_c_f_f", entries.cuthroat_b_melee_c_f_f) - - entries.cuthroat_b_range_a_f_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_a_f_f.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_a_f_f", entries.cuthroat_b_range_a_f_f) - - entries.cuthroat_b_range_b_f_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_b_f_f.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_b_f_f", entries.cuthroat_b_range_b_f_f) - - entries.cuthroat_b_range_c_f_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_c_f_f.creature", - Level=1 - - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_c_f_f", entries.cuthroat_b_range_c_f_f) - - entries.cuthroat_b_range_c_f_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_c_f_h.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_c_f_h", entries.cuthroat_b_range_c_f_h) - - entries.cuthroat_b_melee_b_f_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_b_f_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_b_f_h", entries.cuthroat_b_melee_b_f_h) - - entries.cuthroat_b_melee_c_f_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_c_f_h.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_c_f_h", entries.cuthroat_b_melee_c_f_h) - - entries.cuthroat_b_melee_a_f_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_a_f_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_a_f_h", entries.cuthroat_b_melee_a_f_h) - - entries.cuthroat_b_range_a_f_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_a_f_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_a_f_h", entries.cuthroat_b_range_a_f_h) - - entries.cuthroat_b_range_b_f_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_b_f_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_b_f_h", entries.cuthroat_b_range_b_f_h) - - --- matis cutthroats - - entries.cuthroat_b_melee_c_m_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_c_m_f.creature", - Level=51, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_c_m_f", entries.cuthroat_b_melee_c_m_f) - - entries.cuthroat_b_range_b_m_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_b_m_f.creature", - Level=51, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_b_m_f", entries.cuthroat_b_range_b_m_f) - - entries.cuthroat_b_melee_a_m_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_a_m_f.creature", - Level=51, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_a_m_f", entries.cuthroat_b_melee_a_m_f) - - entries.cuthroat_b_melee_b_m_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_b_m_f.creature", - Level=51, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_b_m_f", entries.cuthroat_b_melee_b_m_f) - - entries.cuthroat_b_range_c_m_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_c_m_f.creature", - Level=51, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_c_m_f", entries.cuthroat_b_range_c_m_f) - - entries.cuthroat_b_range_a_m_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_a_m_f.creature", - Level=51, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_a_m_f", entries.cuthroat_b_range_a_m_f) - - entries.cuthroat_b_melee_b_m_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_b_m_h.creature", - Level=51, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_b_m_h", entries.cuthroat_b_melee_b_m_h) - - entries.cuthroat_b_range_a_m_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_a_m_h.creature", - Level=51, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_a_m_h", entries.cuthroat_b_range_a_m_h) - - entries.cuthroat_b_range_c_m_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_c_m_h.creature", - Level=51, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_c_m_h", entries.cuthroat_b_range_c_m_h) - - entries.cuthroat_b_melee_a_m_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_a_m_h.creature", - Level=51, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_a_m_h", entries.cuthroat_b_melee_a_m_h) - - entries.cuthroat_b_range_b_m_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_b_m_h.creature", - Level=51, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_b_m_h", entries.cuthroat_b_range_b_m_h) - - entries.cuthroat_b_melee_c_m_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_c_m_h.creature", - Level=51, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_c_m_h", entries.cuthroat_b_melee_c_m_h) - - --- tryker cutthroats - - entries.cuthroat_b_melee_b_t_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_b_t_f.creature", - Level=101, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_b_t_f", entries.cuthroat_b_melee_b_t_f) - - entries.cuthroat_b_range_b_t_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_b_t_f.creature", - Level=101, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_b_t_f", entries.cuthroat_b_range_b_t_f) - - entries.cuthroat_b_melee_a_t_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_a_t_f.creature", - Level=101, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_a_t_f", entries.cuthroat_b_melee_a_t_f) - - entries.cuthroat_b_melee_c_t_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_c_t_f.creature", - Level=101, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_c_t_f", entries.cuthroat_b_melee_c_t_f) - - entries.cuthroat_b_range_c_t_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_c_t_f.creature", - Level=101, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_c_t_f", entries.cuthroat_b_range_c_t_f) - - entries.cuthroat_b_range_a_t_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_a_t_f.creature", - Level=101, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_a_t_f", entries.cuthroat_b_range_a_t_f) - - entries.cuthroat_b_range_c_t_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_c_t_h.creature", - Level=101, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_c_t_h", entries.cuthroat_b_range_c_t_h) - - entries.cuthroat_b_range_a_t_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_a_t_h.creature", - Level=101, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_a_t_h", entries.cuthroat_b_range_a_t_h) - - entries.cuthroat_b_range_b_t_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_b_t_h.creature", - Level=101, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_b_t_h", entries.cuthroat_b_range_b_t_h) - - entries.cuthroat_b_melee_a_t_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_a_t_h.creature", - Level=101, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_a_t_h", entries.cuthroat_b_melee_a_t_h) - - entries.cuthroat_b_melee_b_t_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_b_t_h.creature", - Level=101, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_b_t_h", entries.cuthroat_b_melee_b_t_h) - - entries.cuthroat_b_melee_c_t_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_c_t_h.creature", - Level=101, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_c_t_h", entries.cuthroat_b_melee_c_t_h) - - --- zorai cutthroats - - entries.cuthroat_b_melee_b_z_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_b_z_f.creature", - Level=151, - RingAccess="p1", - Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_b_z_f", entries.cuthroat_b_melee_b_z_f) - - entries.cuthroat_b_melee_c_z_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_c_z_f.creature", - Level=151, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_c_z_f", entries.cuthroat_b_melee_c_z_f) - - entries.cuthroat_b_range_a_z_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_a_z_f.creature", - Level=151, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_a_z_f", entries.cuthroat_b_range_a_z_f) - - entries.cuthroat_b_range_c_z_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_c_z_f.creature", - Level=151, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_c_z_f", entries.cuthroat_b_range_c_z_f) - - entries.cuthroat_b_range_b_z_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_b_z_f.creature", - Level=151, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_b_z_f", entries.cuthroat_b_range_b_z_f) - - entries.cuthroat_b_melee_a_z_f = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_a_z_f.creature", - Level=151, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_a_z_f", entries.cuthroat_b_melee_a_z_f) - - entries.cuthroat_b_melee_a_z_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_a_z_h.creature", - Level=151, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_a_z_h", entries.cuthroat_b_melee_a_z_h) - - entries.cuthroat_b_range_a_z_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_a_z_h.creature", - Level=151, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_a_z_h", entries.cuthroat_b_range_a_z_h) - - entries.cuthroat_b_melee_b_z_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_b_z_h.creature", - Level=151, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_b_z_h", entries.cuthroat_b_melee_b_z_h) - - entries.cuthroat_b_melee_c_z_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_melee_c_z_h.creature", - Level=151, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_melee_c_z_h", entries.cuthroat_b_melee_c_z_h) - - entries.cuthroat_b_range_b_z_h = - { - Base="palette.entities.cuthroat", - SheetClient="cuthroat_b_range_b_z_h.creature", - Level=151, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_b_z_h", entries.cuthroat_b_range_b_z_h) - - entries.cuthroat_b_range_c_z_h = - { - Base="palette.entities.npc", - SheetClient="cuthroat_b_range_c_z_h.creature", - Level=151, - } - r2.addPaletteElement("palette.entities.npcs.cuthroats.cuthroat_b_range_c_z_h", entries.cuthroat_b_range_c_z_h) - - - - --- fyros guards - - entries.fyros_guard_l_b_f = - { - Base="palette.entities.guard", - SheetClient="fyros_guard_l_b_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.fyros_guard_l_b_f", entries.fyros_guard_l_b_f) - - entries.fyros_guard_l_b_h = - { - Base="palette.entities.guard", - SheetClient="fyros_guard_l_b_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.fyros_guard_l_b_h", entries.fyros_guard_l_b_h) - - entries.fyros_guard_l_c_f = - { - Base="palette.entities.guard", - SheetClient="fyros_guard_l_c_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.fyros_guard_l_c_f", entries.fyros_guard_l_c_f) - - entries.fyros_guard_l_c_h = - { - Base="palette.entities.guard", - SheetClient="fyros_guard_l_c_h.creature", - Level=1, - } - - r2.addPaletteElement("palette.entities.npcs.guards.fyros_guard_l_c_h", entries.fyros_guard_l_c_h) - - entries.fyros_guard_l_d_f = - { - Base="palette.entities.guard", - SheetClient="fyros_guard_l_d_f.creature", - Level=1, - } - - r2.addPaletteElement("palette.entities.npcs.guards.fyros_guard_l_d_f", entries.fyros_guard_l_d_f) - - entries.fyros_guard_l_d_h = - { - Base="palette.entities.guard", - SheetClient="fyros_guard_l_d_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.fyros_guard_l_d_h", entries.fyros_guard_l_d_h) - - entries.fyros_guard_l_e_f = - { - Base="palette.entities.guard", - SheetClient="fyros_guard_l_e_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.fyros_guard_l_e_f", entries.fyros_guard_l_e_f) - - entries.fyros_guard_l_e_h = - { - Base="palette.entities.guard", - SheetClient="fyros_guard_l_e_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.fyros_guard_l_e_h", entries.fyros_guard_l_e_h) - - entries.fyros_guard_l_f_f = - { - Base="palette.entities.guard", - SheetClient="fyros_guard_l_f_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.fyros_guard_l_f_f", entries.fyros_guard_l_f_f) - - entries.fyros_guard_l_f_h = - { - Base="palette.entities.guard", - SheetClient="fyros_guard_l_f_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.fyros_guard_l_f_h", entries.fyros_guard_l_f_h) - - --- matis guards - - entries.matis_guard_l_b_f = - { - Base="palette.entities.guard", - SheetClient="matis_guard_l_b_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.matis_guard_l_b_f", entries.matis_guard_l_b_f) - - entries.matis_guard_l_b_h = - { - Base="palette.entities.guard", - SheetClient="matis_guard_l_b_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.matis_guard_l_b_h", entries.matis_guard_l_b_h) - - - entries.matis_guard_l_c_f = - { - Base="palette.entities.guard", - SheetClient="matis_guard_l_c_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.matis_guard_l_c_f", entries.matis_guard_l_c_f) - - entries.matis_guard_l_c_h = - { - Base="palette.entities.guard", - SheetClient="matis_guard_l_c_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.matis_guard_l_c_h", entries.matis_guard_l_c_h) - - entries.matis_guard_l_d_f = - { - Base="palette.entities.guard", - SheetClient="matis_guard_l_d_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.matis_guard_l_d_f", entries.matis_guard_l_d_f) - - entries.matis_guard_l_d_h = - { - Base="palette.entities.guard", - SheetClient="matis_guard_l_d_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.matis_guard_l_d_h", entries.matis_guard_l_d_h) - - entries.matis_guard_l_e_f = - { - Base="palette.entities.guard", - SheetClient="matis_guard_l_e_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.matis_guard_l_e_f", entries.matis_guard_l_e_f) - - entries.matis_guard_l_e_h = - { - Base="palette.entities.guard", - SheetClient="matis_guard_l_e_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.matis_guard_l_e_h", entries.matis_guard_l_e_h) - - entries.matis_guard_l_f_f = - { - Base="palette.entities.guard", - SheetClient="matis_guard_l_f_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.matis_guard_l_f_f", entries.matis_guard_l_f_f) - - entries.matis_guard_l_f_h = - { - Base="palette.entities.guard", - SheetClient="matis_guard_l_f_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.matis_guard_l_f_h", entries.matis_guard_l_f_h) - - --- tryker guards - - entries.tryker_guard_l_b_f = - { - Base="palette.entities.guard", - SheetClient="tryker_guard_l_b_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.tryker_guard_l_b_f", entries.tryker_guard_l_b_f) - - entries.tryker_guard_l_b_h = - { - Base="palette.entities.guard", - SheetClient="tryker_guard_l_b_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.tryker_guard_l_b_h", entries.tryker_guard_l_b_h) - - entries.tryker_guard_l_c_f = - { - Base="palette.entities.guard", - SheetClient="tryker_guard_l_c_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.tryker_guard_l_c_f", entries.tryker_guard_l_c_f) - - entries.tryker_guard_l_c_h = - { - Base="palette.entities.guard", - SheetClient="tryker_guard_l_c_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.tryker_guard_l_c_h", entries.tryker_guard_l_c_h) - - entries.tryker_guard_l_d_f = - { - Base="palette.entities.guard", - SheetClient="tryker_guard_l_d_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.tryker_guard_l_d_f", entries.tryker_guard_l_d_f) - - entries.tryker_guard_l_d_h = - { - Base="palette.entities.guard", - SheetClient="tryker_guard_l_d_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.tryker_guard_l_d_h", entries.tryker_guard_l_d_h) - - entries.tryker_guard_l_e_f = - { - Base="palette.entities.guard", - SheetClient="tryker_guard_l_e_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.tryker_guard_l_e_f", entries.tryker_guard_l_e_f) - - entries.tryker_guard_l_e_h = - { - Base="palette.entities.guard", - SheetClient="tryker_guard_l_e_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.tryker_guard_l_e_h", entries.tryker_guard_l_e_h) - - entries.tryker_guard_l_f_f = - { - Base="palette.entities.guard", - SheetClient="tryker_guard_l_f_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.tryker_guard_l_f_f", entries.tryker_guard_l_f_f) - - entries.tryker_guard_l_f_h = - { - Base="palette.entities.guard", - SheetClient="tryker_guard_l_f_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.tryker_guard_l_f_h", entries.tryker_guard_l_f_h) - - --- zorai guards - - entries.zorai_guard_l_b_f = - { - Base="palette.entities.guard", - SheetClient="zorai_guard_l_b_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.zorai_guard_l_b_f", entries.zorai_guard_l_b_f) - - entries.zorai_guard_l_b_h = - { - Base="palette.entities.guard", - SheetClient="zorai_guard_l_b_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.zorai_guard_l_b_h", entries.zorai_guard_l_b_h) - - entries.zorai_guard_l_c_f = - { - Base="palette.entities.guard", - SheetClient="zorai_guard_l_c_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.zorai_guard_l_c_f", entries.zorai_guard_l_c_f) - - entries.zorai_guard_l_c_h = - { - Base="palette.entities.guard", - SheetClient="zorai_guard_l_c_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.zorai_guard_l_c_h", entries.zorai_guard_l_c_h) - - entries.zorai_guard_l_d_f = - { - Base="palette.entities.guard", - SheetClient="zorai_guard_l_d_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.zorai_guard_l_d_f", entries.zorai_guard_l_d_f) - - entries.zorai_guard_l_d_h = - { - Base="palette.entities.guard", - SheetClient="zorai_guard_l_d_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.zorai_guard_l_d_h", entries.zorai_guard_l_d_h) - - entries.zorai_guard_l_e_f = - { - Base="palette.entities.guard", - SheetClient="zorai_guard_l_e_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.zorai_guard_l_e_f", entries.zorai_guard_l_e_f) - - entries.zorai_guard_l_e_h = - { - Base="palette.entities.guard", - SheetClient="zorai_guard_l_e_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.zorai_guard_l_e_h", entries.zorai_guard_l_e_h) - - entries.zorai_guard_l_f_f = - { - Base="palette.entities.guard", - SheetClient="zorai_guard_l_f_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.zorai_guard_l_f_f", entries.zorai_guard_l_f_f) - - entries.zorai_guard_l_f_h = - { - Base="palette.entities.guard", - SheetClient="zorai_guard_l_f_h.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.guards.zorai_guard_l_f_h", entries.zorai_guard_l_f_h) - - - --- cute - - entries.npc_cute_mature_b = - { - Base="palette.entities.npc", - Name="Cute", - SheetClient="npc_cute_mature_b.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cute.npc_cute_mature_b", entries.npc_cute_mature_b) - - entries.npc_cute_mature_c = - { - Base="palette.entities.npc", - Name="Cute", - SheetClient="npc_cute_mature_c.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cute.npc_cute_mature_c", entries.npc_cute_mature_c) - - entries.npc_cute_mature_d = - { - Base="palette.entities.npc", - Name="Cute", - SheetClient="npc_cute_mature_d.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cute.npc_cute_mature_d", entries.npc_cute_mature_d) - - entries.npc_cute_mature_e = - { - Base="palette.entities.npc", - Name="Cute", - SheetClient="npc_cute_mature_e.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cute.npc_cute_mature_e", entries.npc_cute_mature_e) - - entries.npc_cute_mature_f = - { - Base="palette.entities.npc", - Name="Cute", - SheetClient="npc_cute_mature_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cute.npc_cute_mature_f", entries.npc_cute_mature_f) - - entries.npc_cute_venerable_b = - { - Base="palette.entities.npc", - Name="Cute", - SheetClient="npc_cute_venerable_b.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cute.npc_cute_venerable_b", entries.npc_cute_venerable_b) - - entries.npc_cute_venerable_c = - { - Base="palette.entities.npc", - Name="Cute", - SheetClient="npc_cute_venerable_c.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cute.npc_cute_venerable_c", entries.npc_cute_venerable_c) - - entries.npc_cute_venerable_d = - { - Base="palette.entities.npc", - Name="Cute", - SheetClient="npc_cute_venerable_d.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cute.npc_cute_venerable_d", entries.npc_cute_venerable_d) - - entries.npc_cute_venerable_e = - { - Base="palette.entities.npc", - Name="Cute", - SheetClient="npc_cute_venerable_e.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cute.npc_cute_venerable_e", entries.npc_cute_venerable_e) - - entries.npc_cute_venerable_f = - { - Base="palette.entities.npc", - Name="Cute", - SheetClient="npc_cute_venerable_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cute.npc_cute_venerable_f", entries.npc_cute_venerable_f) - - entries.npc_cute_weapon_b = - { - Base="palette.entities.npc", - Name="Cute", - SheetClient="npc_cute_weapon_b.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cute.npc_cute_weapon_b", entries.npc_cute_weapon_b) - - entries.npc_cute_weapon_c = - { - Base="palette.entities.npc", - Name="Cute", - SheetClient="npc_cute_weapon_c.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cute.npc_cute_weapon_c", entries.npc_cute_weapon_c) - - entries.npc_cute_weapon_d = - { - Base="palette.entities.npc", - Name="Cute", - SheetClient="npc_cute_weapon_d.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cute.npc_cute_weapon_d", entries.npc_cute_weapon_d) - - entries.npc_cute_weapon_e = - { - Base="palette.entities.npc", - Name="Cute", - SheetClient="npc_cute_weapon_e.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cute.npc_cute_weapon_e", entries.npc_cute_weapon_e) - - entries.npc_cute_weapon_f = - { - Base="palette.entities.npc", - Name="Cute", - SheetClient="npc_cute_weapon_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.cute.npc_cute_weapon_f", entries.npc_cute_weapon_f) - - --- frahar - - entries.npc_frahar_ancient_b = - { - Base="palette.entities.npc", - Name="Frahar", - SheetClient="npc_frahar_ancient_b.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.frahar.npc_frahar_ancient_b", entries.npc_frahar_ancient_b) - - entries.npc_frahar_ancient_c = - { - Base="palette.entities.npc", - Name="Frahar", - SheetClient="npc_frahar_ancient_c.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.frahar.npc_frahar_ancient_c", entries.npc_frahar_ancient_c) - - entries.npc_frahar_ancient_d = - { - Base="palette.entities.npc", - Name="Frahar", - SheetClient="npc_frahar_ancient_d.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.frahar.npc_frahar_ancient_d", entries.npc_frahar_ancient_d) - - entries.npc_frahar_ancient_e = - { - Base="palette.entities.npc", - Name="Frahar", - SheetClient="npc_frahar_ancient_e.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.frahar.npc_frahar_ancient_e", entries.npc_frahar_ancient_e) - - entries.npc_frahar_ancient_f = - { - Base="palette.entities.npc", - Name="Frahar", - SheetClient="npc_frahar_ancient_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.frahar.npc_frahar_ancient_f", entries.npc_frahar_ancient_f) - - entries.npc_frahar_patriarchal_b = - { - - - Base="palette.entities.npc", - Name="Frahar", - SheetClient="npc_frahar_patriarchal_b.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.frahar.npc_frahar_patriarchal_b", entries.npc_frahar_patriarchal_b) - - entries.npc_frahar_patriarchal_c = - { - Base="palette.entities.npc", - Name="Frahar", - SheetClient="npc_frahar_patriarchal_c.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.frahar.npc_frahar_patriarchal_c", entries.npc_frahar_patriarchal_c) - - entries.npc_frahar_patriarchal_d = - { - Base="palette.entities.npc", - Name="Frahar", - SheetClient="npc_frahar_patriarchal_d.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.frahar.npc_frahar_patriarchal_d", entries.npc_frahar_patriarchal_d) - - entries.npc_frahar_patriarchal_e = - { - Base="palette.entities.npc", - Name="Frahar", - SheetClient="npc_frahar_patriarchal_e.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.frahar.npc_frahar_patriarchal_e", entries.npc_frahar_patriarchal_e) - - entries.npc_frahar_patriarchal_f = - { - Base="palette.entities.npc", - Name="Frahar", - SheetClient="npc_frahar_patriarchal_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.frahar.npc_frahar_patriarchal_f", entries.npc_frahar_patriarchal_f) - - entries.npc_frahar_weapon_b = - { - Base="palette.entities.npc", - Name="Frahar", - SheetClient="npc_frahar_weapon_b.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.frahar.npc_frahar_weapon_b", entries.npc_frahar_weapon_b) - - entries.npc_frahar_weapon_c = - { - Base="palette.entities.npc", - Name="Frahar", - SheetClient="npc_frahar_weapon_c.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.frahar.npc_frahar_weapon_c", entries.npc_frahar_weapon_c) - - entries.npc_frahar_weapon_d = - { - Base="palette.entities.npc", - Name="Frahar", - SheetClient="npc_frahar_weapon_d.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.frahar.npc_frahar_weapon_d", entries.npc_frahar_weapon_d) - - entries.npc_frahar_weapon_e = - { - Base="palette.entities.npc", - Name="Frahar", - SheetClient="npc_frahar_weapon_e.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.frahar.npc_frahar_weapon_e", entries.npc_frahar_weapon_e) - - entries.npc_frahar_weapon_f = - { - Base="palette.entities.npc", - Name="Frahar", - SheetClient="npc_frahar_weapon_f.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.npcs.frahar.npc_frahar_weapon_f", entries.npc_frahar_weapon_f) - - --- gibbai - - entries.npc_gibbay_old_b = - { - Base="palette.entities.npc", - Name="Gibbai", - SheetClient="npc_gibbay_old_b.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.gibbai.npc_gibbay_old_b", entries.npc_gibbay_old_b) - - entries.npc_gibbay_old_c = - { - Base="palette.entities.npc", - Name="Gibbai", - SheetClient="npc_gibbay_old_c.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.gibbai.npc_gibbay_old_c", entries.npc_gibbay_old_c) - - entries.npc_gibbay_old_d = - { - Base="palette.entities.npc", - Name="Gibbai", - SheetClient="npc_gibbay_old_d.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.gibbai.npc_gibbay_old_d", entries.npc_gibbay_old_d) - - entries.npc_gibbay_old_e = - { - Base="palette.entities.npc", - Name="Gibbai", - SheetClient="npc_gibbay_old_e.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.gibbai.npc_gibbay_old_e", entries.npc_gibbay_old_e) - - entries.npc_gibbay_old_f = - { - Base="palette.entities.npc", - Name="Gibbai", - SheetClient="npc_gibbay_old_f.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.gibbai.npc_gibbay_old_f", entries.npc_gibbay_old_f) - - entries.npc_gibbay_weapon_b = - { - Base="palette.entities.npc", - Name="Gibbai", - SheetClient="npc_gibbay_weapon_b.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.gibbai.npc_gibbay_weapon_b", entries.npc_gibbay_weapon_b) - - - entries.npc_gibbay_weapon_c = - { - Base="palette.entities.npc", - Name="Gibbai", - SheetClient="npc_gibbay_weapon_c.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.gibbai.npc_gibbay_weapon_c", entries.npc_gibbay_weapon_c) - - entries.npc_gibbay_weapon_d = - { - Base="palette.entities.npc", - Name="Gibbai", - SheetClient="npc_gibbay_weapon_d.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.gibbai.npc_gibbay_weapon_d", entries.npc_gibbay_weapon_d) - - entries.npc_gibbay_weapon_e = - { - Base="palette.entities.npc", - Name="Gibbai", - SheetClient="npc_gibbay_weapon_e.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.gibbai.npc_gibbay_weapon_e", entries.npc_gibbay_weapon_e) - - entries.npc_gibbay_weapon_f = - { - Base="palette.entities.npc", - Name="Gibbai", - SheetClient="npc_gibbay_weapon_f.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.gibbai.npc_gibbay_weapon_f", entries.npc_gibbay_weapon_f) - - entries.npc_gibbay_wise_b = - { - Base="palette.entities.npc", - Name="Gibbai", - SheetClient="npc_gibbay_wise_b.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.gibbai.npc_gibbay_wise_b", entries.npc_gibbay_wise_b) - - entries.npc_gibbay_wise_c = - { - Base="palette.entities.npc", - Name="Gibbai", - SheetClient="npc_gibbay_wise_c.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.gibbai.npc_gibbay_wise_c", entries.npc_gibbay_wise_c) - - entries.npc_gibbay_wise_d = - { - Base="palette.entities.npc", - Name="Gibbai", - SheetClient="npc_gibbay_wise_d.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.gibbai.npc_gibbay_wise_d", entries.npc_gibbay_wise_d) - - entries.npc_gibbay_wise_e = - { - Base="palette.entities.npc", - Name="Gibbai", - SheetClient="npc_gibbay_wise_e.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.gibbai.npc_gibbay_wise_e", entries.npc_gibbay_wise_e) - - entries.npc_gibbay_wise_f = - { - Base="palette.entities.npc", - Name="Gibbai", - SheetClient="npc_gibbay_wise_f.creature", - Level=1 - } - r2.addPaletteElement("palette.entities.npcs.gibbai.npc_gibbay_wise_f", entries.npc_gibbay_wise_f) - - --- kami --- -- abstract class - entries.kami = - { - Base="palette.entities.guard", - Name="Kami Guardian", - CanUpdatePlayerAttackable = 0, - PlayerAttackable = 0, - Profile = "guard", - SubCategory = "Kami", - Fame="kami", - - } - r2.addPaletteElement("palette.entities.kami", entries.kami) - -- concret class - - entries.kami_guardian_2_b = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_2_b.creature", - Level=1, - RingAccess="a1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_2_b", entries.kami_guardian_2_b) - - entries.kami_guardian_2_c = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_2_c.creature", - Level=51, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_2_c", entries.kami_guardian_2_c) - - entries.kami_guardian_2_d = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_2_d.creature", - Level=101, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_2_d", entries.kami_guardian_2_d) - - entries.kami_guardian_2_e = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_2_e.creature", - Level=151, - RingAccess="p4", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_2_e", entries.kami_guardian_2_e) - - entries.kami_guardian_2_f = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_2_f.creature", - Level=201, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_2_f", entries.kami_guardian_2_f) - - entries.kami_guardian_2_g = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_2_g.creature", - Level=1, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_2_g", entries.kami_guardian_2_g) - - entries.kami_guardian_3_b = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_3_b.creature", - Level=1, - RingAccess="a1", - } - - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_3_b", entries.kami_guardian_3_b) - - entries.kami_guardian_3_c = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_3_c.creature", - Level=51, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_3_c", entries.kami_guardian_3_c) - - entries.kami_guardian_3_d = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_3_d.creature", - Level=101, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_3_d", entries.kami_guardian_3_d) - - entries.kami_guardian_3_e = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_3_e.creature", - Level=151, - RingAccess="p4", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_3_e", entries.kami_guardian_3_e) - - entries.kami_guardian_3_f = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_3_f.creature", - Level=201, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_3_f", entries.kami_guardian_3_f) - - entries.kami_guardian_3_g = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_3_g.creature", - Level=1, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_3_g", entries.kami_guardian_3_g) - - entries.kami_guardian_4_b = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_4_b.creature", - Level=1, - RingAccess="a1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_4_b", entries.kami_guardian_4_b) - - entries.kami_guardian_4_c = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_4_c.creature", - Level=51, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_4_c", entries.kami_guardian_4_c) - - entries.kami_guardian_4_d = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_4_d.creature", - Level=101, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_4_d", entries.kami_guardian_4_d) - - entries.kami_guardian_4_e = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_4_e.creature", - Level=151, - RingAccess="p4", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_4_e", entries.kami_guardian_4_e) - - entries.kami_guardian_4_f = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_4_f.creature", - Level=201, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_4_f", entries.kami_guardian_4_f) - - entries.kami_guardian_4_g = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_4_g.creature", - Level=1, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_4_g", entries.kami_guardian_4_g) - - entries.kami_guardian_b = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_b.creature", - Level=1, - RingAccess="a1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_b", entries.kami_guardian_b) - - entries.kami_guardian_c = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_c.creature", - Level=51, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_c", entries.kami_guardian_c) - - entries.kami_guardian_d = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_d.creature", - Level=101, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_d", entries.kami_guardian_d) - - entries.kami_guardian_e = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_e.creature", - Level=151, - RingAccess="p4", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_e", entries.kami_guardian_e) - - entries.kami_guardian_f = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_f.creature", - Level=201, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_f", entries.kami_guardian_f) - - entries.kami_guardian_k_g = - { - Base="palette.entities.kami", - SheetClient="kami_guardian_k_g.creature", - Level=1, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guardian_k_g", entries.kami_guardian_k_g) - - entries.kami_guide_k_g = - { - Base="palette.entities.kami", - Name="Kami Guide", - SheetClient="kami_guide_k_g.creature", - Level=1, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_guide_k_g", entries.kami_guide_k_g) - - entries.kami_preacher_2_b = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_2_b.creature", - Level=1, - RingAccess="a1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_2_b", entries.kami_preacher_2_b) - - entries.kami_preacher_2_c = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_2_c.creature", - Level=51, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_2_c", entries.kami_preacher_2_c) - - entries.kami_preacher_2_d = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_2_d.creature", - Level=101, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_2_d", entries.kami_preacher_2_d) - - entries.kami_preacher_2_e = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_2_e.creature", - Level=151, - RingAccess="p4", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_2_e", entries.kami_preacher_2_e) - - entries.kami_preacher_2_f = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_2_f.creature", - Level=201, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_2_f", entries.kami_preacher_2_f) - - entries.kami_preacher_2_g = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_2_g.creature", - Level=1, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_2_g", entries.kami_preacher_2_g) - - entries.kami_preacher_3_b = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_3_b.creature", - Level=1, - RingAccess="a1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_3_b", entries.kami_preacher_3_b) - - entries.kami_preacher_3_c = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_3_c.creature", - Level=51, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_3_c", entries.kami_preacher_3_c) - - entries.kami_preacher_3_d = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_3_d.creature", - Level=101, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_3_d", entries.kami_preacher_3_d) - - entries.kami_preacher_3_e = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_3_e.creature", - Level=151, - RingAccess="p4", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_3_e", entries.kami_preacher_3_e) - - entries.kami_preacher_3_f = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_3_f.creature", - Level=201, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_3_f", entries.kami_preacher_3_f) - - entries.kami_preacher_3_g = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_3_g.creature", - Level=1, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_3_g", entries.kami_preacher_3_g) - - entries.kami_preacher_4_b = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_4_b.creature", - Level=1, - RingAccess="a1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_4_b", entries.kami_preacher_4_b) - - entries.kami_preacher_4_c = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_4_c.creature", - Level=51, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_4_c", entries.kami_preacher_4_c) - - entries.kami_preacher_4_d = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_4_d.creature", - Level=101, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_4_d", entries.kami_preacher_4_d) - - entries.kami_preacher_4_e = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_4_e.creature", - Level=151, - RingAccess="p4", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_4_e", entries.kami_preacher_4_e) - - entries.kami_preacher_4_f = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_4_f.creature", - Level=201, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_4_f", entries.kami_preacher_4_f) - - entries.kami_preacher_4_g = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_4_g.creature", - Level=1, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_4_g", entries.kami_preacher_4_g) - - entries.kami_preacher_b = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_b.creature", - Level=1, - RingAccess="a1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_b", entries.kami_preacher_b) - - entries.kami_preacher_c = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_c.creature", - Level=51, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_c", entries.kami_preacher_c) - - entries.kami_preacher_d = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_d.creature", - Level=101, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_d", entries.kami_preacher_d) - - entries.kami_preacher_e = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_e.creature", - Level=151, - RingAccess="p4", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_e", entries.kami_preacher_e) - - entries.kami_preacher_f = - { - Base="palette.entities.kami", - SheetClient="kami_preacher_f.creature", - Level=201, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.kami.kami_preacher_f", entries.kami_preacher_f) - - --- karavan --- class abstraite - entries.karavan = - { - Base="palette.entities.npc", - Name="Karavan", - CanUpdatePlayerAttackable = 0, - PlayerAttackable = 0, - Profile = "guard", - SubCategory = "Karavan", - Fame="karavan", - } - r2.addPaletteElement("palette.entities.karavan", entries.karavan) - --- class concretes --- karavan emissary - entries.karavan_guard_k_f = - { - Base="palette.entities.karavan", - SheetClient="karavan_guard_k_f.creature", - Level=201, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_guard_k_f", entries.karavan_guard_k_f) - - entries.karavan_guard_k_f_b = - { - Base="palette.entities.karavan", - SheetClient="karavan_guard_k_f_b.creature", - Level=1, - RingAccess="a1", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_guard_k_f_b", entries.karavan_guard_k_f_b) - - entries.karavan_guard_k_f_c = - { - Base="palette.entities.karavan", - SheetClient="karavan_guard_k_f_c.creature", - Level=51, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_guard_k_f_c", entries.karavan_guard_k_f_c) - - entries.karavan_guard_k_f_d = - { - Base="palette.entities.karavan", - SheetClient="karavan_guard_k_f_d.creature", - Level=101, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_guard_k_f_d", entries.karavan_guard_k_f_d) - - entries.karavan_guard_k_f_e = - { - Base="palette.entities.karavan", - SheetClient="karavan_guard_k_f_e.creature", - Level=151, - RingAccess="p4", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_guard_k_f_e", entries.karavan_guard_k_f_e) - - entries.karavan_guard_k_f_f = - { - Base="palette.entities.karavan", - SheetClient="karavan_guard_k_f_f.creature", - Level=201, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_guard_k_f_f", entries.karavan_guard_k_f_f) - - entries.karavan_guard_k_h = - { - Base="palette.entities.karavan", - SheetClient="karavan_guard_k_h.creature", - Level=1, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_guard_k_h", entries.karavan_guard_k_h) - - entries.karavan_guard_k_h_b = - { - Base="palette.entities.karavan", - SheetClient="karavan_guard_k_h_b.creature", - Level=1, - RingAccess="a1", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_guard_k_h_b", entries.karavan_guard_k_h_b) - - entries.karavan_guard_k_h_c = - { - Base="palette.entities.karavan", - SheetClient="karavan_guard_k_h_c.creature", - Level=51, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_guard_k_h_c", entries.karavan_guard_k_h_c) - - entries.karavan_guard_k_h_d = - { - Base="palette.entities.karavan", - SheetClient="karavan_guard_k_h_d.creature", - Level=101, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_guard_k_h_d", entries.karavan_guard_k_h_d) - - entries.karavan_guard_k_h_e = - { - Base="palette.entities.karavan", - SheetClient="karavan_guard_k_h_e.creature", - Level=151, - RingAccess="p4", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_guard_k_h_e", entries.karavan_guard_k_h_e) - - entries.karavan_guard_k_h_f = - { - Base="palette.entities.karavan", - SheetClient="karavan_guard_k_h_f.creature", - Level=201, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_guard_k_h_f", entries.karavan_guard_k_h_f) --- karavan emissary - entries.karavan_emissary_f = - { - Base="palette.entities.karavan", - SheetClient="karavan_emissary_f.creature", - Level=201, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_emissary_f", entries.karavan_emissary_f) - - entries.karavan_emissary_f_b = - { - Base="palette.entities.karavan", - SheetClient="karavan_emissary_f_b.creature", - Level=1, - RingAccess="a1", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_emissary_f_b", entries.karavan_emissary_f_b) - - entries.karavan_emissary_f_c = - { - Base="palette.entities.karavan", - SheetClient="karavan_emissary_f_c.creature", - Level=51, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_emissary_f_c", entries.karavan_emissary_f_c) - - entries.karavan_emissary_f_d = - { - Base="palette.entities.karavan", - SheetClient="karavan_emissary_f_d.creature", - Level=101, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_emissary_f_d", entries.karavan_emissary_f_d) - - entries.karavan_emissary_f_e = - { - Base="palette.entities.karavan", - SheetClient="karavan_emissary_f_e.creature", - Level=151, - RingAccess="p4", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_emissary_f_e", entries.karavan_emissary_f_e) - - entries.karavan_emissary_f_f = - { - Base="palette.entities.karavan", - SheetClient="karavan_emissary_f_f.creature", - Level=201, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_emissary_f_f", entries.karavan_emissary_f_f) - - entries.karavan_emissary_h = - { - Base="palette.entities.karavan", - SheetClient="karavan_emissary_h.creature", - Level=1, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_emissary_h", entries.karavan_emissary_h) - - entries.karavan_emissary_h_b = - { - Base="palette.entities.karavan", - SheetClient="karavan_emissary_h_b.creature", - Level=1, - RingAccess="a1", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_emissary_h_b", entries.karavan_emissary_h_b) - - entries.karavan_emissary_h_c = - { - Base="palette.entities.karavan", - SheetClient="karavan_emissary_h_c.creature", - Level=51, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_emissary_h_c", entries.karavan_emissary_h_c) - - entries.karavan_emissary_h_d = - { - Base="palette.entities.karavan", - SheetClient="karavan_emissary_h_d.creature", - Level=101, - RingAccess="p1", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_emissary_h_d", entries.karavan_emissary_h_d) - - entries.karavan_emissary_h_e = - { - Base="palette.entities.karavan", - SheetClient="karavan_emissary_h_e.creature", - Level=151, - RingAccess="p4", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_emissary_h_e", entries.karavan_emissary_h_e) - - entries.karavan_emissary_h_f = - { - Base="palette.entities.karavan", - SheetClient="karavan_emissary_h_f.creature", - Level=201, - RingAccess="p10", - } - r2.addPaletteElement("palette.entities.npcs.karavan.karavan_emissary_h_f", entries.karavan_emissary_h_f) - - --- bot objects start here -- --- parent of all bot object (like palette.entities.npc for npcs) --- abstract element(cannot be instanciated) - entries.botobject = - { - BoxSelection=0, - IsStuck=1, - AiMovement="stand_on_start_point", - Profile="no_change", - IsBotObject = 1, - RingAccess = "a1", -- global by default - } - r2.addPaletteElement("palette.entities.botobject", entries.botobject); - - - - entries.barrel1 = - { - Base="palette.entities.botobject", - Name="Barrel 1", - SheetClient="object_1_barrel.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.barrel1", entries.barrel1); - - entries.barrels3 = - { - Base="palette.entities.botobject", - Name="Barrels 3", - SheetClient="object_3_barrels.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.barrels_3", entries.barrels3); - entries.barrelsBroken = - { - Base="palette.entities.botobject", - Name="barrelsBroken", - SheetClient="object_1_barrel_broken.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.barrel_broken_1", entries.barrelsBroken); - - entries.jar1 = - { - Base="palette.entities.botobject", - Name="Jar 1", - SheetClient="object_jar.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.jar1", entries.jar1); - - entries.jar2 = - { - Base="palette.entities.botobject", - Name = "Jar 2", - SheetClient="object_jar_fallen.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.jar2", entries.jar2); - - entries.crate1 = - { - Base="palette.entities.botobject", - Name="Crate 1", - SheetClient="object_1_crate.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.crate1",entries.crate1) - - entries.crate2 = - { - Base="palette.entities.botobject", - Name="Crate 2", - SheetClient="object_3_crate.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.crate2",entries.crate2) - - entries.bones1 = - { - Base="palette.entities.botobject", - Name="Bones 1", - SheetClient="object_bones.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.bones1",entries.bones1) - - entries.tent1 = - { - Base="palette.entities.botobject", - Name="Tent 1", - SheetClient="object_tent.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tent1",entries.tent1) - - entries.pack1 = - { - Base="palette.entities.botobject", - Name="Pack 1", - SheetClient="object_pack_1.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.pack1",entries.pack1) - --- test Bot-object - - entries.jar= - { - Base="palette.entities.botobject", - Name = "jar", - SheetClient="object_jar.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.jar", entries.jar); - entries.jar_3= - { - Base="palette.entities.botobject", - Name = "jar_3", - SheetClient="object_jar_3.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.jar_3", entries.jar_3); - entries.jar_fallen= - { - Base="palette.entities.botobject", - Name = "jar_fallen", - SheetClient="object_jar_fallen.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.jar_fallen", entries.jar_fallen); - entries.hut= - { - Base="palette.entities.botobject", - Name = "hut", - SheetClient="object_hut.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.hut", entries.hut); - entries.paddock= - { - Base="palette.entities.botobject", - Name = "paddock", - SheetClient="object_paddock.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.paddock", entries.paddock); - entries.totem_kami= - { - Base="palette.entities.botobject", - Name = "totem_kami", - SheetClient="object_totem_kami.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.totem_kami", entries.totem_kami); - entries.totem_pachyderm= - { - Base="palette.entities.botobject", - Name = "totem_pachyderm", - SheetClient="object_totem_pachyderm.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.totem_pachyderm", entries.totem_pachyderm); - entries.tent= - { - Base="palette.entities.botobject", - Name = "tent", - SheetClient="object_tent.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tent", entries.tent); - entries.tent_fyros= - { - Base="palette.entities.botobject", - Name = "tent_fyros", - SheetClient="object_tent_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tent_fyros", entries.tent_fyros); - entries.tent_matis= - { - Base="palette.entities.botobject", - Name = "tent_matis", - SheetClient="object_tent_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tent_matis", entries.tent_matis); - entries.tent_tryker= - { - Base="palette.entities.botobject", - Name = "tent_tryker", - SheetClient="object_tent_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tent_tryker", entries.tent_tryker); - entries.tent_zorai= - { - Base="palette.entities.botobject", - Name = "tent_zorai", - SheetClient="object_tent_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tent_zorai", entries.tent_zorai); - entries.totem_kitin= - { - Base="palette.entities.botobject", - Name = "totem_kitin", - SheetClient="object_totem_kitin.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.totem_kitin", entries.totem_kitin); - entries.totem_bird= - { - Base="palette.entities.botobject", - Name = "totem_bird", - SheetClient="object_totem_bird.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.totem_bird", entries.totem_bird); - entries.tower_ruin= - { - Base="palette.entities.botobject", - Name = "tower_ruin", - SheetClient="object_tower_ruin.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tower_ruin", entries.tower_ruin); - entries.stele= - { - Base="palette.entities.botobject", - Name = "stele", - SheetClient="object_stele.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.stele", entries.stele); - entries.chariot= - { - Base="palette.entities.botobject", - Name = "chariot", - SheetClient="object_chariot.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.chariot", entries.chariot); - entries.chariot_working= - { - Base="palette.entities.botobject", - Name = "chariot_working", - SheetClient="object_chariot_working.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.chariot_working", entries.chariot_working); - entries.wind_turbine= - { - Base="palette.entities.botobject", - Name = "wind_turbine", - SheetClient="object_wind_turbine.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.wind_turbine", entries.wind_turbine); - entries.street_lamp= - { - Base="palette.entities.botobject", - Name = "street_lamp", - SheetClient="object_street_lamp.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.street_lamp", entries.street_lamp); - entries.street_lamp_off= - { - Base="palette.entities.botobject", - Name = "street_lamp_off", - SheetClient="object_street_lamp_off.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.street_lamp_off", entries.street_lamp_off); - entries.tomb_1= - { - Base="palette.entities.botobject", - Name = "tomb_1", - SheetClient="object_tomb_1.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tomb_1", entries.tomb_1); - entries.tomb_2= - { - Base="palette.entities.botobject", - Name = "tomb_2", - SheetClient="object_tomb_2.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tomb_2", entries.tomb_2); - entries.tomb_3= - { - Base="palette.entities.botobject", - Name = "tomb_3", - SheetClient="object_tomb_3.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tomb_3", entries.tomb_3); - entries.tomb_4= - { - Base="palette.entities.botobject", - Name = "tomb_4", - SheetClient="object_tomb_4.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tomb_4", entries.tomb_4); - entries.tomb_5= - { - Base="palette.entities.botobject", - Name = "tomb_5", - SheetClient="object_tomb_5.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tomb_5", entries.tomb_5); - entries.campfire= - { - Base="palette.entities.botobject", - Name = "campfire", - SheetClient="object_campfire.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.campfire", entries.campfire); - entries.campfire_out= - { - Base="palette.entities.botobject", - Name = "campfire_out", - SheetClient="object_campfire_out.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.campfire_out", entries.campfire_out); - entries.fire_base= - { - Base="palette.entities.botobject", - Name = "fire_base", - SheetClient="object_fire_base.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fire_base", entries.fire_base); - entries.chest= - { - Base="palette.entities.botobject", - Name = "chest", - SheetClient="object_chest.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.chest", entries.chest); - entries.chest_old= - { - Base="palette.entities.botobject", - Name = "chest_old", - SheetClient="object_chest_old.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.chest_old", entries.chest_old); - entries.stump= - { - Base="palette.entities.botobject", - Name = "stump", - SheetClient="object_stump.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.stump", entries.stump); - entries.carrion_mammal= - { - Base="palette.entities.botobject", - Name = "carrion_mammal", - SheetClient="object_carrion_mammal.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.carrion_mammal", entries.carrion_mammal); - entries.carrion_insect= - { - Base="palette.entities.botobject", - Name = "carrion_insect", - SheetClient="object_carrion_insect.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.carrion_insect", entries.carrion_insect); - entries.bones= - { - Base="palette.entities.botobject", - Name = "bones", - SheetClient="object_bones.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.bones", entries.bones); - entries.bones_b= - { - Base="palette.entities.botobject", - Name = "bones_b", - SheetClient="object_bones_b.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.bones_b", entries.bones_b); - entries.barrier= - { - Base="palette.entities.botobject", - Name = "barrier", - SheetClient="object_barrier.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.barrier", entries.barrier); - entries.barrier_T= - { - Base="palette.entities.botobject", - Name = "barrier_T", - SheetClient="object_barrier_T.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.barrier_T", entries.barrier_T); - entries.house_ruin= - { - Base="palette.entities.botobject", - Name = "house_ruin", - SheetClient="object_house_ruin.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.house_ruin", entries.house_ruin); - entries.roadsign= - { - Base="palette.entities.botobject", - Name = "roadsign", - SheetClient="object_roadsign.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.roadsign", entries.roadsign); - entries.watch_tower= - { - Base="palette.entities.botobject", - Name = "watch_tower", - SheetClient="object_watch_tower.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.watch_tower", entries.watch_tower); - entries.landslide_desert= - { - Base="palette.entities.botobject", - Name = "landslide_desert", - SheetClient="object_landslide_desert.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.landslide_desert", entries.landslide_desert); - entries.tent_cosmetics= - { - Base="palette.entities.botobject", - Name = "tent_cosmetics", - SheetClient="object_tent_cosmetics.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tent_cosmetics", entries.tent_cosmetics); - entries.landslide_jungle= - { - Base="palette.entities.botobject", - Name = "landslide_jungle", - SheetClient="object_landslide_jungle.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.landslide_jungle", entries.landslide_jungle); - entries.landslide_lake= - { - Base="palette.entities.botobject", - Name = "landslide_lake", - SheetClient="object_landslide_lake.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.landslide_lake", entries.landslide_lake); - entries.carapace_bul= - { - Base="palette.entities.botobject", - Name = "carapace_bul", - SheetClient="object_carapace_bul.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.carapace_bul", entries.carapace_bul); - entries.carapace_2= - { - Base="palette.entities.botobject", - Name = "carapace_2", - SheetClient="object_carapace_2.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.carapace_2", entries.carapace_2); - entries.giant_skull= - { - Base="palette.entities.botobject", - Name = "giant_skull", - SheetClient="object_giant_skull.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.giant_skull", entries.giant_skull); - entries.ruin_wall= - { - Base="palette.entities.botobject", - Name = "ruin_wall", - SheetClient="object_ruin_wall.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.ruin_wall", entries.ruin_wall); - entries.ruin_wall_b= - { - Base="palette.entities.botobject", - Name = "ruin_wall_b", - SheetClient="object_ruin_wall_b.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.ruin_wall_b", entries.ruin_wall_b); - entries.karavan_altar= - { - Base="palette.entities.botobject", - Name = "karavan_altar", - SheetClient="object_karavan_altar.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.karavan_altar", entries.karavan_altar); - entries.kami_altar= - { - Base="palette.entities.botobject", - Name = "kami_altar", - SheetClient="object_kami_altar.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.kami_altar", entries.kami_altar); - entries.milestone= - { - Base="palette.entities.botobject", - Name = "milestone", - SheetClient="object_milestone.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.milestone", entries.milestone); - entries.bag_a= - { - Base="palette.entities.botobject", - Name = "bag_a", - SheetClient="object_bag_a.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.bag_a", entries.bag_a); - entries.bag_b= - { - Base="palette.entities.botobject", - Name = "bag_b", - SheetClient="object_bag_b.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.bag_b", entries.bag_b); - entries.pack_1= - { - Base="palette.entities.botobject", - Name = "pack_1", - SheetClient="object_pack_1.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.pack_1", entries.pack_1); - entries.pack_2= - { - Base="palette.entities.botobject", - Name = "pack_2", - SheetClient="object_pack_2.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.pack_2", entries.pack_2); - entries.pack_3= - { - Base="palette.entities.botobject", - Name = "pack_3", - SheetClient="object_pack_3.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.pack_3", entries.pack_3); - entries.pack_4= - { - Base="palette.entities.botobject", - Name = "pack_4", - SheetClient="object_pack_4.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.pack_4", entries.pack_4); - entries.pack_5= - { - Base="palette.entities.botobject", - Name = "pack_5", - SheetClient="object_pack_5.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.pack_5", entries.pack_5); - entries.runic_circle= - { - Base="palette.entities.botobject", - Name = "runic_circle", - SheetClient="object_runic_circle.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.runic_circle", entries.runic_circle); - entries.karavan_device= - { - Base="palette.entities.botobject", - Name = "karavan_device", - SheetClient="object_karavan_device.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.karavan_device", entries.karavan_device); - entries.kitin_egg= - { - Base="palette.entities.botobject", - Name = "kitin_egg", - SheetClient="object_kitin_egg.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.kitin_egg", entries.kitin_egg); - entries.bones_homin_a= - { - Base="palette.entities.botobject", - Name = "bones_homin_a", - SheetClient="object_bones_homin_a.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.bones_homin_a", entries.bones_homin_a); - entries.bones_homin_b= - { - Base="palette.entities.botobject", - Name = "bones_homin_b", - SheetClient="object_bones_homin_b.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.bones_homin_b", entries.bones_homin_b); - entries.spot_kitin= - { - Base="palette.entities.botobject", - Name = "spot_kitin", - SheetClient="object_spot_kitin.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.spot_kitin", entries.spot_kitin); - entries.spot_goo= - { - Base="palette.entities.botobject", - Name = "spot_goo", - SheetClient="object_spot_goo.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.spot_goo", entries.spot_goo); - entries.merchant_melee_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_melee_fyros", - SheetClient="object_merchant_melee_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_melee_fyros", entries.merchant_melee_fyros); - entries.merchant_melee_matis= - { - Base="palette.entities.botobject", - Name = "merchant_melee_matis", - SheetClient="object_merchant_melee_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_melee_matis", entries.merchant_melee_matis); - entries.merchant_melee_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_melee_tryker", - SheetClient="object_merchant_melee_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_melee_tryker", entries.merchant_melee_tryker); - - - - entries.merchant_melee_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_melee_zorai", - SheetClient="object_merchant_melee_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_melee_zorai", entries.merchant_melee_zorai); - entries.merchant_range_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_range_fyros", - SheetClient="object_merchant_range_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_range_fyros", entries.merchant_range_fyros); - entries.merchant_range_matis= - { - Base="palette.entities.botobject", - Name = "merchant_range_matis", - SheetClient="object_merchant_range_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_range_matis", entries.merchant_range_matis); - entries.merchant_range_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_range_tryker", - SheetClient="object_merchant_range_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_range_tryker", entries.merchant_range_tryker); - entries.merchant_range_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_range_zorai", - SheetClient="object_merchant_range_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_range_zorai", entries.merchant_range_zorai); - entries.merchant_armor_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_armor_fyros", - SheetClient="object_merchant_armor_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_armor_fyros", entries.merchant_armor_fyros); - entries.merchant_armor_matis= - { - Base="palette.entities.botobject", - Name = "merchant_armor_matis", - SheetClient="object_merchant_armor_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_armor_matis", entries.merchant_armor_matis); - entries.merchant_armor_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_armor_tryker", - SheetClient="object_merchant_armor_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_armor_tryker", entries.merchant_armor_tryker); - entries.merchant_armor_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_armor_zorai", - SheetClient="object_merchant_armor_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_armor_zorai", entries.merchant_armor_zorai); - entries.merchant_RM_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_RM_fyros", - SheetClient="object_merchant_RM_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_RM_fyros", entries.merchant_RM_fyros); - entries.merchant_RM_matis= - { - Base="palette.entities.botobject", - Name = "merchant_RM_matis", - SheetClient="object_merchant_RM_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_RM_matis", entries.merchant_RM_matis); - entries.merchant_RM_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_RM_tryker", - SheetClient="object_merchant_RM_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_RM_tryker", entries.merchant_RM_tryker); - entries.merchant_RM_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_RM_zorai", - SheetClient="object_merchant_RM_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_RM_zorai", entries.merchant_RM_zorai); - entries.merchant_tool_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_tool_fyros", - SheetClient="object_merchant_tool_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_tool_fyros", entries.merchant_tool_fyros); - entries.merchant_tool_matis= - { - Base="palette.entities.botobject", - Name = "merchant_tool_matis", - SheetClient="object_merchant_tool_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_tool_matis", entries.merchant_tool_matis); - entries.merchant_tool_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_tool_tryker", - SheetClient="object_merchant_tool_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_tool_tryker", entries.merchant_tool_tryker); - entries.merchant_tool_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_tool_zorai", - SheetClient="object_merchant_tool_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_tool_zorai", entries.merchant_tool_zorai); - entries.merchant_focus_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_focus_fyros", - SheetClient="object_merchant_focus_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_focus_fyros", entries.merchant_focus_fyros); - entries.merchant_focus_matis= - { - Base="palette.entities.botobject", - Name = "merchant_focus_matis", - SheetClient="object_merchant_focus_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_focus_matis", entries.merchant_focus_matis); - entries.merchant_focus_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_focus_tryker", - SheetClient="object_merchant_focus_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_focus_tryker", entries.merchant_focus_tryker); - entries.merchant_focus_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_focus_zorai", - SheetClient="object_merchant_focus_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_focus_zorai", entries.merchant_focus_zorai); - entries.merchant_haircut_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_haircut_fyros", - SheetClient="object_merchant_haircut_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_haircut_fyros", entries.merchant_haircut_fyros); - entries.merchant_haircut_matis= - { - Base="palette.entities.botobject", - Name = "merchant_haircut_matis", - SheetClient="object_merchant_haircut_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_haircut_matis", entries.merchant_haircut_matis); - entries.merchant_haircut_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_haircut_tryker", - SheetClient="object_merchant_haircut_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_haircut_tryker", entries.merchant_haircut_tryker); - entries.merchant_haircut_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_haircut_zorai", - SheetClient="object_merchant_haircut_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_haircut_zorai", entries.merchant_haircut_zorai); - entries.merchant_tatoo_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_tatoo_fyros", - SheetClient="object_merchant_tatoo_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_tatoo_fyros", entries.merchant_tatoo_fyros); - entries.merchant_tatoo_matis= - { - Base="palette.entities.botobject", - Name = "merchant_tatoo_matis", - SheetClient="object_merchant_tatoo_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_tatoo_matis", entries.merchant_tatoo_matis); - entries.merchant_tatoo_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_tatoo_tryker", - SheetClient="object_merchant_tatoo_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_tatoo_tryker", entries.merchant_tatoo_tryker); - entries.merchant_tatoo_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_tatoo_zorai", - SheetClient="object_merchant_tatoo_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_tatoo_zorai", entries.merchant_tatoo_zorai); - entries.merchant_bijoux_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_bijoux_fyros", - SheetClient="object_merchant_bijoux_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_bijoux_fyros", entries.merchant_bijoux_fyros); - entries.merchant_bijoux_matis= - { - Base="palette.entities.botobject", - Name = "merchant_bijoux_matis", - SheetClient="object_merchant_bijoux_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_bijoux_matis", entries.merchant_bijoux_matis); - entries.merchant_bijoux_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_bijoux_tryker", - SheetClient="object_merchant_bijoux_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_bijoux_tryker", entries.merchant_bijoux_tryker); - entries.merchant_bijoux_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_bijoux_zorai", - SheetClient="object_merchant_bijoux_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_bijoux_zorai", entries.merchant_bijoux_zorai); - entries.merchant_bar_matis= - { - Base="palette.entities.botobject", - Name = "merchant_bar_matis", - SheetClient="object_merchant_bar_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_bar_matis", entries.merchant_bar_matis); - entries.merchant_bar_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_bar_zorai", - SheetClient="object_merchant_bar_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_bar_zorai", entries.merchant_bar_zorai); - entries.roadsign= - { - Base="palette.entities.botobject", - Name = "roadsign", - SheetClient="object_roadsign.creature", - Level=1, - } --- r2.addPaletteElement("palette.entities.botobjects.roadsign", entries.roadsign); - entries.roadsign_fyros= - { - Base="palette.entities.botobject", - Name = "roadsign_fyros", - SheetClient="object_roadsign_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.roadsign_fyros", entries.roadsign_fyros); - entries.roadsign_zorai= - { - Base="palette.entities.botobject", - Name = "roadsign_zorai", - SheetClient="object_roadsign_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.roadsign_zorai", entries.roadsign_zorai); - entries.roadsign_tryker= - { - Base="palette.entities.botobject", - Name = "roadsign_tryker", - SheetClient="object_roadsign_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.roadsign_tryker", entries.roadsign_tryker); - entries.banner_kami= - { - Base="palette.entities.botobject", - Name = "banner_kami", - SheetClient="object_banner_kami.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.banner_kami", entries.banner_kami); - entries.banner_karavan= - { - Base="palette.entities.botobject", - Name = "banner_karavan", - SheetClient="object_banner_karavan.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.banner_karavan", entries.banner_karavan); - entries.counter= - { - Base="palette.entities.botobject", - Name = "counter", - SheetClient="object_counter.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.counter", entries.counter); - entries.homin_body_fyros_H= - { - Base="palette.entities.botobject", - Name = "homin_body_fyros_H", - SheetClient="object_homin_body_fyros_H.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.homin_body_fyros_H", entries.homin_body_fyros_H); - entries.homin_body_fyros_F= - { - Base="palette.entities.botobject", - Name = "homin_body_fyros_F", - SheetClient="object_homin_body_fyros_F.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.homin_body_fyros_F", entries.homin_body_fyros_F); - entries.homin_body_matis_H= - { - Base="palette.entities.botobject", - Name = "homin_body_matis_H", - SheetClient="object_homin_body_matis_H.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.homin_body_matis_H", entries.homin_body_matis_H); - entries.homin_body_matis_F= - { - Base="palette.entities.botobject", - Name = "homin_body_matis_F", - SheetClient="object_homin_body_matis_F.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.homin_body_matis_F", entries.homin_body_matis_F); - entries.homin_body_tryker_H= - { - Base="palette.entities.botobject", - Name = "homin_body_tryker_H", - SheetClient="object_homin_body_tryker_H.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.homin_body_tryker_H", entries.homin_body_tryker_H); - entries.homin_body_tryker_F= - { - Base="palette.entities.botobject", - Name = "homin_body_tryker_F", - SheetClient="object_homin_body_tryker_F.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.homin_body_tryker_F", entries.homin_body_tryker_F); - entries.homin_body_zorai_H= - { - Base="palette.entities.botobject", - Name = "homin_body_zorai_H", - SheetClient="object_homin_body_zorai_H.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.homin_body_zorai_H", entries.homin_body_zorai_H); - entries.homin_body_zorai_F= - { - Base="palette.entities.botobject", - Name = "homin_body_zorai_F", - SheetClient="object_homin_body_zorai_F.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.homin_body_zorai_F", entries.homin_body_zorai_F); - entries.karavan_standard= - { - Base="palette.entities.botobject", - Name = "karavan_standard", - SheetClient="object_karavan_standard.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.karavan_standard", entries.karavan_standard); - entries.karavan_tent= - { - Base="palette.entities.botobject", - Name = "karavan_tent", - SheetClient="object_karavan_tent.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.karavan_tent", entries.karavan_tent); - entries.karavan_big_wall= - { - Base="palette.entities.botobject", - Name = "karavan_big_wall", - SheetClient="object_karavan_big_wall.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.karavan_big_wall", entries.karavan_big_wall); - entries.construction_site= - { - Base="palette.entities.botobject", - Name = "construction_site", - SheetClient="object_construction_site.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.construction_site", entries.construction_site); - entries.statue_maduk= - { - Base="palette.entities.botobject", - Name = "statue_maduk", - SheetClient="object_statue_maduk.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.statue_maduk", entries.statue_maduk); - entries.statue_jena= - { - Base="palette.entities.botobject", - Name = "statue_jena", - SheetClient="object_statue_jena.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.statue_jena", entries.statue_jena); - entries.hall_of_fame= - { - Base="palette.entities.botobject", - Name = "hall_of_fame", - SheetClient="object_stele_hall_of_fame.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.hall_of_fame", entries.hall_of_fame); - entries.kami_watchtower_off= - { - Base="palette.entities.botobject", - Name = "kami_watchtower_off", - SheetClient="object_kami_watchtower_off.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.kami_watchtower_off", entries.kami_watchtower_off); - entries.spot_goo_off= - { - Base="palette.entities.botobject", - Name = "spot_goo_off", - SheetClient="object_spot_goo_off.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.spot_goo_off", entries.spot_goo_off); - entries.campfire_off= - { - Base="palette.entities.botobject", - Name = "campfire_off", - SheetClient="object_campfire_off.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.campfire_off", entries.campfire_off); - entries.karavan_wall= - { - Base="palette.entities.botobject", - Name = "karavan_wall", - SheetClient="object_karavan_wall.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.karavan_wall", entries.karavan_wall); - entries.karavan_mirador= - { - Base="palette.entities.botobject", - Name = "karavan_mirador", - SheetClient="object_karavan_mirador.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.karavan_mirador", entries.karavan_mirador); - entries.karavan_watchtower_off= - { - Base="palette.entities.botobject", - Name = "karavan_watchtower_off", - SheetClient="object_karavan_watchtower_off.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.karavan_watchtower_off", entries.karavan_watchtower_off); - entries.karavan_gateway= - { - Base="palette.entities.botobject", - Name = "karavan_gateway", - SheetClient="object_karavan_gateway.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.karavan_gateway", entries.karavan_gateway); - entries.kami_standard= - { - Base="palette.entities.botobject", - Name = "kami_standard", - SheetClient="object_kami_standard.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.kami_standard", entries.kami_standard); - entries.kami_hut= - { - Base="palette.entities.botobject", - Name = "kami_hut", - SheetClient="object_kami_hut.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.kami_hut", entries.kami_hut); - entries.vegetable_wall= - { - Base="palette.entities.botobject", - Name = "vegetable_wall", - SheetClient="object_vegetable_wall.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.vegetable_wall", entries.vegetable_wall); - entries.kami_watchtower= - { - Base="palette.entities.botobject", - Name = "kami_watchtower", - SheetClient="object_kami_watchtower.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.kami_watchtower", entries.kami_watchtower); - entries.vegetable_gateway= - { - Base="palette.entities.botobject", - Name = "vegetable_gateway", - SheetClient="object_vegetable_gateway.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.vegetable_gateway", entries.vegetable_gateway); - - entries.fo_milestone= - { - Base="palette.entities.botobject", - Name = "fo_milestone", - SheetClient="object_fo_milestone.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fo_milestone", entries.fo_milestone); - - entries.flame_courage= - { - Base="palette.entities.botobject", - Name = "flame_courage", - SheetClient="object_flame_courage.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.flame_courage", entries.flame_courage); - - entries.flame_justice= - { - Base="palette.entities.botobject", - Name = "flame_justice", - SheetClient="object_flame_justice.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.flame_justice", entries.flame_justice); - - entries.flame_discipline= - { - Base="palette.entities.botobject", - Name = "flame_discipline", - SheetClient="object_flame_discipline.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.flame_discipline", entries.flame_discipline); - - entries.flame_verite= - { - Base="palette.entities.botobject", - Name = "flame_verite", - SheetClient="object_flame_verite.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.flame_verite", entries.flame_verite); - entries.generic_hall= - { - Base="palette.entities.botobject", - Name = "generic_hall", - SheetClient="object_generic_hall.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.generic_hall", entries.generic_hall); --- Dיbut Dיclaration composants et easter eggs - entries.user_event= - { - Base="palette.entities.botobject", - Name = "user_event", - SheetClient="object_component_user_event.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.user_event", entries.user_event); - entries.time_trigger= - { - Base="palette.entities.botobject", - Name = "time_trigger", - SheetClient="object_component_time_trigger.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.time_trigger", entries.time_trigger); - entries.bot_request_item= - { - Base="palette.entities.botobject", - Name = "bot_request_item", - SheetClient="object_component_bot_request_item.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.bot_request_item", entries.bot_request_item); - entries.timer= - { - Base="palette.entities.botobject", - Name = "timer", - SheetClient="object_component_timer.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.timer", entries.timer); - entries.trigger_zone= - { - Base="palette.entities.botobject", - Name = "trigger_zone", - SheetClient="object_component_trigger_zone.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.trigger_zone", entries.trigger_zone); - entries.bot_chat= - { - Base="palette.entities.botobject", - Name = "bot_chat", - SheetClient="object_component_bot_chat.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.bot_chat", entries.bot_chat); - entries.dialog= - { - Base="palette.entities.botobject", - Name = "dialog", - SheetClient="object_component_dialog.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.dialog", entries.dialog); - entries.chest_wisdom_fyros_sel= - { - Base="palette.entities.botobject", - Name = "chest_wisdom_fyros_sel", - SheetClient="object_chest_wisdom_fyros_sel.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.chest_wisdom_fyros_sel", entries.chest_wisdom_fyros_sel); - entries.chest_wisdom_matis_sel= - { - Base="palette.entities.botobject", - Name = "chest_wisdom_matis_sel", - SheetClient="object_chest_wisdom_matis_sel.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.chest_wisdom_matis_sel", entries.chest_wisdom_matis_sel); - entries.chest_wisdom_std_sel= - { - Base="palette.entities.botobject", - Name = "chest_wisdom_std_sel", - SheetClient="object_chest_wisdom_std_sel.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.chest_wisdom_std_sel", entries.chest_wisdom_std_sel); - entries.chest_wisdom_tryker_sel= - { - Base="palette.entities.botobject", - Name = "chest_wisdom_tryker_sel", - SheetClient="object_chest_wisdom_tryker_sel.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.chest_wisdom_tryker_sel", entries.chest_wisdom_tryker_sel); - entries.chest_wisdom_zorai_sel= - { - Base="palette.entities.botobject", - Name = "chest_wisdom_zorai_sel", - SheetClient="object_chest_wisdom_zorai_sel.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.chest_wisdom_zorai_sel", entries.chest_wisdom_zorai_sel); - entries.backpack_loot_player_r2= - { - Base="palette.entities.botobject", - Name = "backpack_loot_player_r2", - SheetClient="object_backpack_loot_player_r2.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.backpack_loot_player_r2", entries.backpack_loot_player_r2); --- Fin dיclaration composants et easter eggs - - --- Bot Object Trees - - entries.fy_s1_baobab_a= - { - Base="palette.entities.botobject", - Name = "fy_s1_baobab_a", - SheetClient="object_fy_s1_baobab_a.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s1_baobab_a", entries.fy_s1_baobab_a); - - entries.fy_s1_baobab_b= - { - Base="palette.entities.botobject", - Name = "fy_s1_baobab_b", - SheetClient="object_fy_s1_baobab_b.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s1_baobab_b", entries.fy_s1_baobab_b); - - entries.fy_s1_baobab_c= - { - Base="palette.entities.botobject", - Name = "fy_s1_baobab_c", - SheetClient="object_fy_s1_baobab_c.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s1_baobab_c", entries.fy_s1_baobab_c); - - - entries.fy_s1_burnedtree_a= - { - Base="palette.entities.botobject", - Name = "fy_s1_burnedtree_a", - SheetClient="object_fy_s1_burnedtree_a.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s1_burnedtree_a", entries.fy_s1_burnedtree_a); - - entries.fy_s1_burnedtree_b= - { - Base="palette.entities.botobject", - Name = "fy_s1_burnedtree_b", - SheetClient="object_fy_s1_burnedtree_b.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s1_burnedtree_b", entries.fy_s1_burnedtree_b); - - entries.fy_s1_burnedtree_c= - { - Base="palette.entities.botobject", - Name = "fy_s1_burnedtree_c", - SheetClient="object_fy_s1_burnedtree_c.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s1_burnedtree_c", entries.fy_s1_burnedtree_c); - - entries.fy_s1_burnedtree_d= - { - Base="palette.entities.botobject", - Name = "fy_s1_burnedtree_d", - SheetClient="object_fy_s1_burnedtree_d.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s1_burnedtree_d", entries.fy_s1_burnedtree_d); - - entries.fy_s1_burnedtree_growth_a= - { - Base="palette.entities.botobject", - Name = "fy_s1_burnedtree_growth_a", - SheetClient="object_fy_s1_burnedtree_growth_a.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s1_burnedtree_growth_a", entries.fy_s1_burnedtree_growth_a); - - entries.fy_s1_burnedtree_growth_b= - { - Base="palette.entities.botobject", - Name = "fy_s1_burnedtree_growth_b", - SheetClient="object_fy_s1_burnedtree_growth_b.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s1_burnedtree_growth_b", entries.fy_s1_burnedtree_growth_b); - - entries.fy_s2_coconuts_a= - { - Base="palette.entities.botobject", - Name = "fy_s2_coconuts_a", - SheetClient="object_fy_s2_coconuts_a.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s2_coconuts_a", entries.fy_s2_coconuts_a); - - entries.fy_s2_coconuts_b= - { - Base="palette.entities.botobject", - Name = "fy_s2_coconuts_b", - SheetClient="object_fy_s2_coconuts_b.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s2_coconuts_b", entries.fy_s2_coconuts_b); - - entries.fy_s2_lovejail_a= - { - Base="palette.entities.botobject", - Name = "fy_s2_lovejail_a", - SheetClient="object_fy_s2_lovejail_a.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s2_lovejail_a", entries.fy_s2_lovejail_a); - - entries.fy_s2_lovejail_b= - { - Base="palette.entities.botobject", - Name = "fy_s2_lovejail_b", - SheetClient="object_fy_s2_lovejail_b.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s2_lovejail_b", entries.fy_s2_lovejail_b); - - entries.fy_s2_lovejail_c= - { - Base="palette.entities.botobject", - Name = "fy_s2_lovejail_c", - SheetClient="object_fy_s2_lovejail_c.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s2_lovejail_c", entries.fy_s2_lovejail_c); - - entries.fy_s2_palmtree_a= - { - Base="palette.entities.botobject", - Name = "fy_s2_palmtree_a", - SheetClient="object_fy_s2_palmtree_a.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s2_palmtree_a", entries.fy_s2_palmtree_a); - - entries.fy_s2_palmtree_b= - { - Base="palette.entities.botobject", - Name = "fy_s2_palmtree_b", - SheetClient="object_fy_s2_palmtree_b.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s2_palmtree_b", entries.fy_s2_palmtree_b); - - entries.fy_s2_palmtree_c= - { - Base="palette.entities.botobject", - Name = "fy_s2_palmtree_c", - SheetClient="object_fy_s2_palmtree_c.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s2_palmtree_c", entries.fy_s2_palmtree_c); - - entries.fy_s2_palmtree_d= - { - Base="palette.entities.botobject", - Name = "fy_s2_palmtree_d", - SheetClient="object_fy_s2_palmtree_d.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s2_palmtree_d", entries.fy_s2_palmtree_d); - - entries.fy_s2_palmtree_e= - { - Base="palette.entities.botobject", - Name = "fy_s2_palmtree_e", - SheetClient="object_fy_s2_palmtree_e.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s2_palmtree_e", entries.fy_s2_palmtree_e); - - entries.fy_s2_papaleaf_a= - { - Base="palette.entities.botobject", - Name = "fy_s2_papaleaf_a", - SheetClient="object_fy_s2_papaleaf_a.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s2_papaleaf_a", entries.fy_s2_papaleaf_a); - - entries.fy_s2_papaleaf_b= - { - Base="palette.entities.botobject", - Name = "fy_s2_papaleaf_b", - SheetClient="object_fy_s2_papaleaf_b.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s2_papaleaf_b", entries.fy_s2_papaleaf_b); - - entries.fy_s2_savantree_a= - { - Base="palette.entities.botobject", - Name = "fy_s2_savantree_a", - SheetClient="object_fy_s2_savantree_a.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s2_savantree_a", entries.fy_s2_savantree_a); - - entries.fy_s2_savantree_b= - { - Base="palette.entities.botobject", - Name = "fy_s2_savantree_b", - SheetClient="object_fy_s2_savantree_b.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s2_savantree_b", entries.fy_s2_savantree_b); - - entries.fy_s2_savantree_c= - { - Base="palette.entities.botobject", - Name = "fy_s2_savantree_c", - SheetClient="object_fy_s2_savantree_c.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s2_savantree_c", entries.fy_s2_savantree_c); - - entries.fy_s3_termitiere_a= - { - Base="palette.entities.botobject", - Name = "fy_s3_termitiere_a", - SheetClient="object_fy_s3_termitiere_a.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s3_termitiere_a", entries.fy_s3_termitiere_a); - - entries.fy_s3_termitiere_b= - { - Base="palette.entities.botobject", - Name = "fy_s3_termitiere_b", - SheetClient="object_fy_s3_termitiere_b.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s3_termitiere_b", entries.fy_s3_termitiere_b); - - entries.fy_s3_termitiere_c= - { - Base="palette.entities.botobject", - Name = "fy_s3_termitiere_c", - SheetClient="object_fy_s3_termitiere_c.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s3_termitiere_c", entries.fy_s3_termitiere_c); - - entries.fy_s3_termitiere_d= - { - Base="palette.entities.botobject", - Name = "fy_s3_termitiere_d", - SheetClient="object_fy_s3_termitiere_d.creature", - Level=1, - -- RingAccess="d1", - Ecosystem="Desert", - } - r2.addPaletteElement("palette.entities.botobjects.fy_s3_termitiere_d", entries.fy_s3_termitiere_d); - - entries.fo_s1_arbragrelot= - { - Base="palette.entities.botobject", - Name = "fo_s1_arbragrelot", - SheetClient="object_fo_s1_arbragrelot.creature", - Level=1, - -- RingAccess="f1", - Ecosystem="Forest", - } - r2.addPaletteElement("palette.entities.botobjects.fo_s1_arbragrelot", entries.fo_s1_arbragrelot); - - entries.fo_s1_arbreagrelot= - { - Base="palette.entities.botobject", - Name = "fo_s1_arbreagrelot", - SheetClient="object_fo_s1_arbreagrelot.creature", - Level=1, - -- RingAccess="f1", - Ecosystem="Forest", - } - r2.addPaletteElement("palette.entities.botobjects.fo_s1_arbreagrelot", entries.fo_s1_arbreagrelot); - - entries.fo_s1_giant_tree= - { - Base="palette.entities.botobject", - Name = "fo_s1_giant_tree", - SheetClient="object_fo_s1_giant_tree.creature", - Level=1, - -- RingAccess="f1", - Ecosystem="Forest", - } - r2.addPaletteElement("palette.entities.botobjects.fo_s1_giant_tree", entries.fo_s1_giant_tree); - - entries.fo_s1_giant_trunk= - { - Base="palette.entities.botobject", - Name = "fo_s1_giant_trunk", - SheetClient="object_fo_s1_giant_trunk.creature", - Level=1, - -- RingAccess="f1", - Ecosystem="Forest", - } - r2.addPaletteElement("palette.entities.botobjects.fo_s1_giant_trunk", entries.fo_s1_giant_trunk); - - entries.fo_s2_arbragrelot= - { - Base="palette.entities.botobject", - Name = "fo_s2_arbragrelot", - SheetClient="object_fo_s2_arbragrelot.creature", - Level=1, - -- RingAccess="f1", - Ecosystem="Forest", - } - r2.addPaletteElement("palette.entities.botobjects.fo_s2_arbragrelot", entries.fo_s2_arbragrelot); - - entries.fo_s2_bigroot_a= - { - Base="palette.entities.botobject", - Name = "fo_s2_bigroot_a", - SheetClient="object_fo_s2_bigroot_a.creature", - Level=1, - -- RingAccess="f1", - Ecosystem="Forest", - } - r2.addPaletteElement("palette.entities.botobjects.fo_s2_bigroot_a", entries.fo_s2_bigroot_a); - - entries.fo_s2_bigroot_b= - { - Base="palette.entities.botobject", - Name = "fo_s2_bigroot_b", - SheetClient="object_fo_s2_bigroot_b.creature", - Level=1, - -- RingAccess="f1", - Ecosystem="Forest", - } - r2.addPaletteElement("palette.entities.botobjects.fo_s2_bigroot_b", entries.fo_s2_bigroot_b); - - entries.fo_s2_bigroot_c= - { - Base="palette.entities.botobject", - Name = "fo_s2_bigroot_c", - SheetClient="object_fo_s2_bigroot_c.creature", - Level=1, - -- RingAccess="f1", - Ecosystem="Forest", - } - r2.addPaletteElement("palette.entities.botobjects.fo_s2_bigroot_c", entries.fo_s2_bigroot_c); - - entries.fo_s2_big_tree= - { - Base="palette.entities.botobject", - Name = "fo_s2_big_tree", - SheetClient="object_fo_s2_big_tree.creature", - Level=1, - -- RingAccess="f1", - Ecosystem="Forest", - } - r2.addPaletteElement("palette.entities.botobjects.fo_s2_big_tree", entries.fo_s2_big_tree); - - entries.fo_s2_birch= - { - Base="palette.entities.botobject", - Name = "fo_s2_birch", - SheetClient="object_fo_s2_birch.creature", - Level=1, - -- RingAccess="f1", - Ecosystem="Forest", - } - r2.addPaletteElement("palette.entities.botobjects.fo_s2_birch", entries.fo_s2_birch); - - entries.fo_s3_birch= - { - Base="palette.entities.botobject", - Name = "fo_s3_birch", - SheetClient="object_fo_s3_birch.creature", - Level=1, - -- RingAccess="f1", - Ecosystem="Forest", - } - r2.addPaletteElement("palette.entities.botobjects.fo_s3_birch", entries.fo_s3_birch); - - entries.fo_s2_spiketree= - { - Base="palette.entities.botobject", - Name = "fo_s2_spiketree", - SheetClient="object_fo_s2_spiketree.creature", - Level=1, - -- RingAccess="f1", - Ecosystem="Forest", - } - r2.addPaletteElement("palette.entities.botobjects.fo_s2_spiketree", entries.fo_s2_spiketree); - - - entries.fo_s3_buissonaepine= - { - Base="palette.entities.botobject", - Name = "fo_s3_buissonaepine", - SheetClient="object_fo_s3_buissonaepine.creature", - Level=1, - -- RingAccess="f1", - Ecosystem="Forest", - } - r2.addPaletteElement("palette.entities.botobjects.fo_s3_buissonaepine", entries.fo_s3_buissonaepine); - - entries.fo_s3_champignou_a= - { - Base="palette.entities.botobject", - Name = "fo_s3_champignou_a", - SheetClient="object_fo_s3_champignou_a.creature", - Level=1, - -- RingAccess="f1", - Ecosystem="Forest", - } - r2.addPaletteElement("palette.entities.botobjects.fo_s3_champignou_a", entries.fo_s3_champignou_a); - - entries.fo_s3_champignou_b= - { - Base="palette.entities.botobject", - Name = "fo_s3_champignou_b", - SheetClient="object_fo_s3_champignou_b.creature", - Level=1, - -- RingAccess="f1", - Ecosystem="Forest", - } - r2.addPaletteElement("palette.entities.botobjects.fo_s3_champignou_b", entries.fo_s3_champignou_b); - - entries.fo_s3_fougere= - { - Base="palette.entities.botobject", - Name = "fo_s3_fougere", - SheetClient="object_fo_s3_fougere.creature", - Level=1, - -- RingAccess="f1", - Ecosystem="Forest", - } - r2.addPaletteElement("palette.entities.botobjects.fo_s3_fougere", entries.fo_s3_fougere); - - entries.fo_s3_tree= - { - Base="palette.entities.botobject", - Name = "fo_s3_tree", - SheetClient="object_fo_s3_tree.creature", - Level=1, - -- RingAccess="f1", - Ecosystem="Forest", - } - r2.addPaletteElement("palette.entities.botobjects.fo_s3_tree", entries.fo_s3_tree); - - entries.ju_s1_bamboo= - { - Base="palette.entities.botobject", - Name = "ju_s1_bamboo", - SheetClient="object_ju_s1_bamboo.creature", - Level=1, - -- RingAccess="j1", - Ecosystem="Jungle", - } - r2.addPaletteElement("palette.entities.botobjects.ju_s1_bamboo", entries.ju_s1_bamboo); - - entries.ju_s1_canopy_tree= - { - Base="palette.entities.botobject", - Name = "ju_s1_canopy_tree", - SheetClient="object_ju_s1_canopy_tree.creature", - Level=1, - -- RingAccess="j1", - Ecosystem="Jungle", - } - r2.addPaletteElement("palette.entities.botobjects.ju_s1_canopy_tree", entries.ju_s1_canopy_tree); - - entries.ju_s2_big_tree= - { - Base="palette.entities.botobject", - Name = "ju_s2_big_tree", - SheetClient="object_ju_s2_big_tree.creature", - Level=1, - -- RingAccess="j1", - Ecosystem="Jungle", - } - r2.addPaletteElement("palette.entities.botobjects.ju_s2_big_tree", entries.ju_s2_big_tree); - - entries.ju_s2_young_tree= - { - Base="palette.entities.botobject", - Name = "ju_s2_young_tree", - SheetClient="object_ju_s2_young_tree.creature", - Level=1, - -- RingAccess="j1", - Ecosystem="Jungle", - } - r2.addPaletteElement("palette.entities.botobjects.ju_s2_young_tree", entries.ju_s2_young_tree); - - entries.ju_s3_bamboo= - { - Base="palette.entities.botobject", - Name = "ju_s3_bamboo", - SheetClient="object_ju_s3_bamboo.creature", - Level=1, - -- RingAccess="j1", - Ecosystem="Jungle", - } - r2.addPaletteElement("palette.entities.botobjects.ju_s3_bamboo", entries.ju_s3_bamboo); - - entries.ju_s3_banana_tree= - { - Base="palette.entities.botobject", - Name = "ju_s3_banana_tree", - SheetClient="object_ju_s3_banana_tree.creature", - Level=1, - -- RingAccess="j1", - Ecosystem="Jungle", - } - r2.addPaletteElement("palette.entities.botobjects.ju_s3_banana_tree", entries.ju_s3_banana_tree); - - entries.ju_s3_bush_tree= - { - Base="palette.entities.botobject", - Name = "ju_s3_bush_tree", - SheetClient="object_ju_s3_bush_tree.creature", - Level=1, - -- RingAccess="j1", - Ecosystem="Jungle", - } - r2.addPaletteElement("palette.entities.botobjects.ju_s3_bush_tree", entries.ju_s3_bush_tree); - - entries.ju_s3_dead_tree= - { - Base="palette.entities.botobject", - Name = "ju_s3_dead_tree", - SheetClient="object_ju_s3_dead_tree.creature", - Level=1, - -- RingAccess="j1", - Ecosystem="Jungle", - } - r2.addPaletteElement("palette.entities.botobjects.ju_s3_dead_tree", entries.ju_s3_dead_tree); - - entries.ju_s3_fantree= - { - Base="palette.entities.botobject", - Name = "ju_s3_fantree", - SheetClient="object_ju_s3_fantree.creature", - Level=1, - -- RingAccess="j1", - Ecosystem="Jungle", - } - r2.addPaletteElement("palette.entities.botobjects.ju_s3_fantree", entries.ju_s3_fantree); - - entries.ju_s3_fougere= - { - Base="palette.entities.botobject", - Name = "ju_s3_fougere", - SheetClient="object_ju_s3_fougere.creature", - Level=1, - -- RingAccess="j1", - Ecosystem="Jungle", - } - r2.addPaletteElement("palette.entities.botobjects.ju_s3_fougere", entries.ju_s3_fougere); - - entries.ju_s3_plante= - { - Base="palette.entities.botobject", - Name = "ju_s3_plante", - SheetClient="object_ju_s3_plante.creature", - Level=1, - -- RingAccess="j1", - Ecosystem="Jungle", - } - r2.addPaletteElement("palette.entities.botobjects.ju_s3_plante", entries.ju_s3_plante); - - entries.ju_s3_plantegrasse= - { - Base="palette.entities.botobject", - Name = "ju_s3_plantegrasse", - SheetClient="object_ju_s3_plantegrasse.creature", - Level=1, - -- RingAccess="j1", - Ecosystem="Jungle", - } - r2.addPaletteElement("palette.entities.botobjects.ju_s3_plantegrasse", entries.ju_s3_plantegrasse); - - entries.ju_s3_tree= - { - Base="palette.entities.botobject", - Name = "ju_s3_tree", - SheetClient="object_ju_s3_tree.creature", - Level=1, - -- RingAccess="j1", - Ecosystem="Jungle", - } - r2.addPaletteElement("palette.entities.botobjects.ju_s3_tree", entries.ju_s3_tree); - - entries.tr_s1_bamboo_a= - { - Base="palette.entities.botobject", - Name = "tr_s1_bamboo_a", - SheetClient="object_tr_s1_bamboo_a.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s1_bamboo_a", entries.tr_s1_bamboo_a); - - entries.tr_s1_kelp_a= - { - Base="palette.entities.botobject", - Name = "tr_s1_kelp_a", - SheetClient="object_tr_s1_kelp_a.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s1_kelp_a", entries.tr_s1_kelp_a); - - entries.tr_s1_kelp_b= - { - Base="palette.entities.botobject", - Name = "tr_s1_kelp_b", - SheetClient="object_tr_s1_kelp_b.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s1_kelp_b", entries.tr_s1_kelp_b); - - entries.tr_s2_bamboo_a= - { - Base="palette.entities.botobject", - Name = "tr_s2_bamboo_a", - SheetClient="object_tr_s2_bamboo_a.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s2_bamboo_a", entries.tr_s2_bamboo_a); - - entries.tr_s2_champiflot_a= - { - Base="palette.entities.botobject", - Name = "tr_s2_champiflot_a", - SheetClient="object_tr_s2_champiflot_a.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s2_champiflot_a", entries.tr_s2_champiflot_a); - - entries.tr_s2_lokness_a= - { - Base="palette.entities.botobject", - Name = "tr_s2_lokness_a", - SheetClient="object_tr_s2_lokness_a.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s2_lokness_a", entries.tr_s2_lokness_a); - - entries.tr_s2_lokness_b= - { - Base="palette.entities.botobject", - Name = "tr_s2_lokness_b", - SheetClient="object_tr_s2_lokness_b.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s2_lokness_b", entries.tr_s2_lokness_b); - - entries.tr_s2_lokness_c= - { - Base="palette.entities.botobject", - Name = "tr_s2_lokness_c", - SheetClient="object_tr_s2_lokness_c.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s2_lokness_c", entries.tr_s2_lokness_c); - - entries.tr_s2_mangrove_a= - { - Base="palette.entities.botobject", - Name = "tr_s2_mangrove_a", - SheetClient="object_tr_s2_mangrove_a.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s2_mangrove_a", entries.tr_s2_mangrove_a); - - entries.tr_s2_mangrove_b= - { - Base="palette.entities.botobject", - Name = "tr_s2_mangrove_b", - SheetClient="object_tr_s2_mangrove_b.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s2_mangrove_b", entries.tr_s2_mangrove_b); - - entries.tr_s2_nenufly_a= - { - Base="palette.entities.botobject", - Name = "tr_s2_nenufly_a", - SheetClient="object_tr_s2_nenufly_a.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s2_nenufly_a", entries.tr_s2_nenufly_a); - - entries.tr_s2_palmtree_a= - { - Base="palette.entities.botobject", - Name = "tr_s2_palmtree_a", - SheetClient="object_tr_s2_palmtree_a.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s2_palmtree_a", entries.tr_s2_palmtree_a); - - entries.tr_s2_palmtree_b= - { - Base="palette.entities.botobject", - Name = "tr_s2_palmtree_b", - SheetClient="object_tr_s2_palmtree_b.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s2_palmtree_b", entries.tr_s2_palmtree_b); - - entries.tr_s2_palmtree_c= - { - Base="palette.entities.botobject", - Name = "tr_s2_palmtree_c", - SheetClient="object_tr_s2_palmtree_c.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s2_palmtree_c", entries.tr_s2_palmtree_c); - - entries.tr_s2_palmtree_d= - { - Base="palette.entities.botobject", - Name = "tr_s2_palmtree_d", - SheetClient="object_tr_s2_palmtree_d.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s2_palmtree_d", entries.tr_s2_palmtree_d); - - entries.tr_s2_palmtree_e= - { - Base="palette.entities.botobject", - Name = "tr_s2_palmtree_e", - SheetClient="object_tr_s2_palmtree_e.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s2_palmtree_e", entries.tr_s2_palmtree_e); - - entries.tr_s2_palmtree_f= - { - Base="palette.entities.botobject", - Name = "tr_s2_palmtree_f", - SheetClient="object_tr_s2_palmtree_f.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s2_palmtree_f", entries.tr_s2_palmtree_f); - - entries.tr_s2_sailtree_a= - { - Base="palette.entities.botobject", - Name = "tr_s2_sailtree_a", - SheetClient="object_tr_s2_sailtree_a.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s2_sailtree_a", entries.tr_s2_sailtree_a); - - entries.tr_s2_wigweed_a= - { - Base="palette.entities.botobject", - Name = "tr_s2_wigweed_a", - SheetClient="object_tr_s2_wigweed_a.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s2_wigweed_a", entries.tr_s2_wigweed_a); - - entries.tr_s3_aquabole_a= - { - Base="palette.entities.botobject", - Name = "tr_s3_aquabole_a", - SheetClient="object_tr_s3_aquabole_a.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s3_aquabole_a", entries.tr_s3_aquabole_a); - - entries.tr_s3_aquabole_b= - { - Base="palette.entities.botobject", - Name = "tr_s3_aquabole_b", - SheetClient="object_tr_s3_aquabole_b.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s3_aquabole_b", entries.tr_s3_aquabole_b); - - entries.tr_s3_aquafeather_a= - { - Base="palette.entities.botobject", - Name = "tr_s3_aquafeather_a", - SheetClient="object_tr_s3_aquafeather_a.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s3_aquafeather_a", entries.tr_s3_aquafeather_a); - - entries.tr_s3_aquafeather_b= - { - Base="palette.entities.botobject", - Name = "tr_s3_aquafeather_b", - SheetClient="object_tr_s3_aquafeather_b.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s3_aquafeather_b", entries.tr_s3_aquafeather_b); - - entries.tr_s3_aquafeather_c= - { - Base="palette.entities.botobject", - Name = "tr_s3_aquafeather_c", - SheetClient="object_tr_s3_aquafeather_c.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s3_aquafeather_c", entries.tr_s3_aquafeather_c); - - entries.tr_s3_flower_a= - { - Base="palette.entities.botobject", - Name = "tr_s3_flower_a", - SheetClient="object_tr_s3_flower_a.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s3_flower_a", entries.tr_s3_flower_a); - - entries.tr_s3_flower_b= - { - Base="palette.entities.botobject", - Name = "tr_s3_flower_b", - SheetClient="object_tr_s3_flower_b.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s3_flower_b", entries.tr_s3_flower_b); - - entries.tr_s3_flower_c= - { - Base="palette.entities.botobject", - Name = "tr_s3_flower_c", - SheetClient="object_tr_s3_flower_c.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s3_flower_c", entries.tr_s3_flower_c); - - entries.tr_s3_nenufly_b= - { - Base="palette.entities.botobject", - Name = "tr_s3_nenufly_b", - SheetClient="object_tr_s3_nenufly_b.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s3_nenufly_b", entries.tr_s3_nenufly_b); - - entries.tr_s3_trumpet_a= - { - Base="palette.entities.botobject", - Name = "tr_s3_trumpet_a", - SheetClient="object_tr_s3_trumpet_a.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s3_trumpet_a", entries.tr_s3_trumpet_a); - - entries.tr_s3_trumpet_b= - { - Base="palette.entities.botobject", - Name = "tr_s3_trumpet_b", - SheetClient="object_tr_s3_trumpet_b.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s3_trumpet_b", entries.tr_s3_trumpet_b); - - entries.tr_s3_trumpet_c= - { - Base="palette.entities.botobject", - Name = "tr_s3_trumpet_c", - SheetClient="object_tr_s3_trumpet_c.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s3_trumpet_c", entries.tr_s3_trumpet_c); - - entries.tr_s3_trumpet_d= - { - Base="palette.entities.botobject", - Name = "tr_s3_trumpet_d", - SheetClient="object_tr_s3_trumpet_d.creature", - Level=1, - -- RingAccess="l1", - Ecosystem="Lacustre", - } - r2.addPaletteElement("palette.entities.botobjects.tr_s3_trumpet_d", entries.tr_s3_trumpet_d); - - entries.pr_s1_lumiseed_a= - { - Base="palette.entities.botobject", - Name = "pr_s1_lumiseed_a", - SheetClient="object_pr_s1_lumiseed_a.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s1_lumiseed_a", entries.pr_s1_lumiseed_a); - - entries.pr_s1_lumiseed_b= - { - Base="palette.entities.botobject", - Name = "pr_s1_lumiseed_b", - SheetClient="object_pr_s1_lumiseed_b.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s1_lumiseed_b", entries.pr_s1_lumiseed_b); - - entries.pr_s1_lumiseed_c= - { - Base="palette.entities.botobject", - Name = "pr_s1_lumiseed_c", - SheetClient="object_pr_s1_lumiseed_c.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s1_lumiseed_c", entries.pr_s1_lumiseed_c); - - entries.pr_s1_lumiseed_d= - { - Base="palette.entities.botobject", - Name = "pr_s1_lumiseed_d", - SheetClient="object_pr_s1_lumiseed_d.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s1_lumiseed_d", entries.pr_s1_lumiseed_d); - - entries.pr_s1_rotaflore_a= - { - Base="palette.entities.botobject", - Name = "pr_s1_rotaflore_a", - SheetClient="object_pr_s1_rotaflore_a.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s1_rotaflore_a", entries.pr_s1_rotaflore_a); - - entries.pr_s1_rotaflore_b= - { - Base="palette.entities.botobject", - Name = "pr_s1_rotaflore_b", - SheetClient="object_pr_s1_rotaflore_b.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s1_rotaflore_b", entries.pr_s1_rotaflore_b); - - entries.pr_s1_rotaflore_c= - { - Base="palette.entities.botobject", - Name = "pr_s1_rotaflore_c", - SheetClient="object_pr_s1_rotaflore_c.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s1_rotaflore_c", entries.pr_s1_rotaflore_c); - - entries.pr_s2_mycotree_a= - { - Base="palette.entities.botobject", - Name = "pr_s2_mycotree_a", - SheetClient="object_pr_s2_mycotree_a.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s2_mycotree_a", entries.pr_s2_mycotree_a); - - entries.pr_s2_mycotree_b= - { - Base="palette.entities.botobject", - Name = "pr_s2_mycotree_b", - SheetClient="object_pr_s2_mycotree_b.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s2_mycotree_b", entries.pr_s2_mycotree_b); - - entries.pr_s2_planipushes_a= - { - Base="palette.entities.botobject", - Name = "pr_s2_planipushes_a", - SheetClient="object_pr_s2_planipushes_a.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s2_planipushes_a", entries.pr_s2_planipushes_a); - - entries.pr_s2_planipushes_b= - { - Base="palette.entities.botobject", - Name = "pr_s2_planipushes_b", - SheetClient="object_pr_s2_planipushes_b.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s2_planipushes_b", entries.pr_s2_planipushes_b); - - entries.pr_s2_planipushes_c= - { - Base="palette.entities.botobject", - Name = "pr_s2_planipushes_c", - SheetClient="object_pr_s2_planipushes_c.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s2_planipushes_c", entries.pr_s2_planipushes_c); - - entries.pr_s2_planipushes_d= - { - Base="palette.entities.botobject", - Name = "pr_s2_planipushes_d", - SheetClient="object_pr_s2_planipushes_d.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s2_planipushes_d", entries.pr_s2_planipushes_d); - - entries.pr_s2_toopetz_a= - { - Base="palette.entities.botobject", - Name = "pr_s2_toopetz_a", - SheetClient="object_pr_s2_toopetz_a.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s2_toopetz_a", entries.pr_s2_toopetz_a); - - entries.pr_s2_toopetz_b= - { - Base="palette.entities.botobject", - Name = "pr_s2_toopetz_b", - SheetClient="object_pr_s2_toopetz_b.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s2_toopetz_b", entries.pr_s2_toopetz_b); - - entries.pr_s2_toopetz_c= - { - Base="palette.entities.botobject", - Name = "pr_s2_toopetz_c", - SheetClient="object_pr_s2_toopetz_c.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s2_toopetz_c", entries.pr_s2_toopetz_c); - - entries.pr_s3_amoeba_a= - { - Base="palette.entities.botobject", - Name = "pr_s3_amoeba_a", - SheetClient="object_pr_s3_amoeba_a.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s3_amoeba_a", entries.pr_s3_amoeba_a); - - entries.pr_s3_amoeba_b= - { - Base="palette.entities.botobject", - Name = "pr_s3_amoeba_b", - SheetClient="object_pr_s3_amoeba_b.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s3_amoeba_b", entries.pr_s3_amoeba_b); - - entries.pr_s3_amoeba_c= - { - Base="palette.entities.botobject", - Name = "pr_s3_amoeba_c", - SheetClient="object_pr_s3_amoeba_c.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s3_amoeba_c", entries.pr_s3_amoeba_c); - - entries.pr_s3_cokamool_a= - { - Base="palette.entities.botobject", - Name = "pr_s3_cokamool_a", - SheetClient="object_pr_s3_cokamool_a.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s3_cokamool_a", entries.pr_s3_cokamool_a); - - entries.pr_s3_cokamool_b= - { - Base="palette.entities.botobject", - Name = "pr_s3_cokamool_b", - SheetClient="object_pr_s3_cokamool_b.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s3_cokamool_b", entries.pr_s3_cokamool_b); - - entries.pr_s3_cokamool_c= - { - Base="palette.entities.botobject", - Name = "pr_s3_cokamool_c", - SheetClient="object_pr_s3_cokamool_c.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s3_cokamool_c", entries.pr_s3_cokamool_c); - - entries.pr_s3_ploomweed_a= - { - Base="palette.entities.botobject", - Name = "pr_s3_ploomweed_a", - SheetClient="object_pr_s3_ploomweed_a.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s3_ploomweed_a", entries.pr_s3_ploomweed_a); - - entries.pr_s3_ploomweed_b= - { - Base="palette.entities.botobject", - Name = "pr_s3_ploomweed_b", - SheetClient="object_pr_s3_ploomweed_b.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s3_ploomweed_b", entries.pr_s3_ploomweed_b); - - entries.pr_s3_small_lumiseed_a= - { - Base="palette.entities.botobject", - Name = "pr_s3_small_lumiseed_a", - SheetClient="object_pr_s3_small_lumiseed_a.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s3_small_lumiseed_a", entries.pr_s3_small_lumiseed_a); - - entries.pr_s3_small_lumiseed_b= - { - Base="palette.entities.botobject", - Name = "pr_s3_small_lumiseed_b", - SheetClient="object_pr_s3_small_lumiseed_b.creature", - Level=1, - -- RingAccess="p1", Ecosystem="PrimeRoots", - } - r2.addPaletteElement("palette.entities.botobjects.pr_s3_small_lumiseed_b", entries.pr_s3_small_lumiseed_b); - - --- Bot Object FX - - - entries.fx_base= - { - Base="palette.entities.botobject", - BoxSelection=1 - } - r2.addPaletteElement("palette.entities.botobjects.fx_base", entries.fx_base); - - entries.fx_fishe= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fishe", - Ecosystem="", - SheetClient="object_fx-fishe.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fishe", entries.fx_fishe); - - entries.fxy_canyon= - { - Base="palette.entities.botobjects.fx_base", - Name = "fxy_canyon", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fxy-canyon.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fxy_canyon", entries.fxy_canyon); - - entries.fxy_cricketa= - { - Base="palette.entities.botobjects.fx_base", - Name = "fxy_cricketa", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fxy-cricketa.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fxy_cricketa", entries.fxy_cricketa); - - entries.fx_desert_sandblasta= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_desert_sandblasta", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_desert-sandblasta.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_desert_sandblasta", entries.fx_desert_sandblasta); - - entries.fx_desert_sandblastb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_desert_sandblastb", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_desert-sandblastb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_desert_sandblastb", entries.fx_desert_sandblastb); - - entries.fx_de_birda= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_de_birda", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_de_birda.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_de_birda", entries.fx_de_birda); - - entries.fx_de_firewave= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_de_firewave", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_de_firewave.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_de_firewave", entries.fx_de_firewave); - - entries.fx_de_fishes= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_de_fishes", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_de_fishes.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_de_fishes", entries.fx_de_fishes); - - entries.fx_de_geyser= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_de_geyser", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_de_geyser.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_de_geyser", entries.fx_de_geyser); - - entries.fx_de_geyser_fumee= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_de_geyser_fumee", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_de_geyser_fumee.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_de_geyser_fumee", entries.fx_de_geyser_fumee); - - entries.fx_de_krevette= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_de_krevette", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_de_krevette.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_de_krevette", entries.fx_de_krevette); - - entries.fx_de_scorpion2= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_de_scorpion2", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_de_scorpion2.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_de_scorpion2", entries.fx_de_scorpion2); - - entries.fx_de_serpent= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_de_serpent", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_de_serpent.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_de_serpent", entries.fx_de_serpent); - - entries.fx_de_vapeurs= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_de_vapeurs", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_de_vapeurs.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_de_vapeurs", entries.fx_de_vapeurs); - - entries.fx_de_ver= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_de_ver", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_de_ver.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_de_ver", entries.fx_de_ver); - - entries.fx_de_waterserpent= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_de_waterserpent", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_de_waterserpent.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_de_waterserpent", entries.fx_de_waterserpent); - - entries.fx_fo_bugsa= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_bugsa", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_fo-bugsa.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_bugsa", entries.fx_fo_bugsa); - - entries.fx_fo_bugsb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_bugsb", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_fo-bugsb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_bugsb", entries.fx_fo_bugsb); - - entries.fx_fo_bugsc= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_bugsc", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_fo-bugsc.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_bugsc", entries.fx_fo_bugsc); - - entries.fx_fo_colibrisb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_colibrisb", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_fo-ju-colibrisb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_colibrisb", entries.fx_fo_colibrisb); - - entries.fx_ju_colibrisb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_colibrisb", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_fo-ju-colibrisb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_colibrisb", entries.fx_ju_colibrisb); - - entries.fx_fo_pollen2= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_pollen2", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_fo-pollen.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_pollen2", entries.fx_fo_pollen2); - - entries.fx_fo_solbirtha= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_solbirtha", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_fo-solbirtha.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_solbirtha", entries.fx_fo_solbirtha); - - entries.fx_fo_solbirthb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_solbirthb", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_fo-solbirthb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_solbirthb", entries.fx_fo_solbirthb); - - entries.fx_fo_solbirthc= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_solbirthc", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_fo-solbirthc.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_solbirthc", entries.fx_fo_solbirthc); - - entries.fx_fo_treefalla= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_treefalla", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_fo-treefalla.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_treefalla", entries.fx_fo_treefalla); - - entries.fx_fo_treefallb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_treefallb", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_fo-treefallb.creature", - Level=1, - - } - - r2.addPaletteElement("palette.entities.botobjects.fx_fo_treefallb", entries.fx_fo_treefallb); - - entries.fx_fo_treefallc= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_treefallc", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_fo-treefallc.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_treefallc", entries.fx_fo_treefallc); - - entries.fx_fo_treefalld= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_treefalld", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_fo-treefalld.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_treefalld", entries.fx_fo_treefalld); - - entries.fx_fo_treefalle= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_treefalle", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_fo-treefalle.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_treefalle", entries.fx_fo_treefalle); - - entries.fx_fo_fishes= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_fishes", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_fo_fishes.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_fishes", entries.fx_fo_fishes); - - entries.fx_fo_flower= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_flower", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_fo_flower.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_flower", entries.fx_fo_flower); - - entries.fx_fo_serpent= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_serpent", - Ecosystem="", - SheetClient="object_fx_fo_ju_serpent.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_serpent", entries.fx_fo_serpent); - - entries.fx_ju_serpent= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_serpent", - Ecosystem="", - SheetClient="object_fx_fo_ju_serpent.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_serpent", entries.fx_ju_serpent); - - entries.fx_fo_pollen= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_pollen", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_fo_pollen.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_pollen", entries.fx_fo_pollen); - - entries.fx_fy_sandblastadesert= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fy_sandblastadesert", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_fy-sandblastadesert.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fy_sandblastadesert", entries.fx_fy_sandblastadesert); - - entries.fx_fy_sandblastdesert= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fy_sandblastdesert", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_fy-sandblastdesert.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fy_sandblastdesert", entries.fx_fy_sandblastdesert); - - entries.fx_fyros_de_scorpion= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fyros_de_scorpion", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_fyros_de_scorpion.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fyros_de_scorpion", entries.fx_fyros_de_scorpion); - - entries.fx_fy_feu_foret= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fy_feu_foret", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_fy_feu_foret.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fy_feu_foret", entries.fx_fy_feu_foret); - - entries.fx_fy_flower= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fy_flower", - -- RingAccess="d1", - Ecosystem="Desert", - SheetClient="object_fx_fy_flower.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fy_flower", entries.fx_fy_flower); - - entries.fx_goo_insect= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_goo_insect", - Ecosystem="", - SheetClient="object_fx_goo_insect.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_goo_insect", entries.fx_goo_insect); - - entries.fx_goo_mamal= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_goo_mamal", - Ecosystem="", - SheetClient="object_fx_goo_mamal.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_goo_mamal", entries.fx_goo_mamal); - - entries.fx_goo_smoke= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_goo_smoke", - Ecosystem="", - SheetClient="object_fx_goo_smoke.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_goo_smoke", entries.fx_goo_smoke); - - entries.fx_ju_bata= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_bata", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju-bata.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_bata", entries.fx_ju_bata); - - entries.fx_ju_bugsa= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_bugsa", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju-bugsa.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_bugsa", entries.fx_ju_bugsa); - - entries.fx_ju_bugsb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_bugsb", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju-bugsb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_bugsb", entries.fx_ju_bugsb); - - entries.fx_ju_dragonflya= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_dragonflya", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju-dragonflya.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_dragonflya", entries.fx_ju_dragonflya); - - entries.fx_ju_ghosta= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_ghosta", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju-ghosta.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_ghosta", entries.fx_ju_ghosta); - - entries.fx_ju_ghostb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_ghostb", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju-ghostb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_ghostb", entries.fx_ju_ghostb); - - entries.fx_ju_solbirtha= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_solbirtha", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju-solbirtha.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_solbirtha", entries.fx_ju_solbirtha); - - entries.fx_ju_solbirthb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_solbirthb", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju-solbirthb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_solbirthb", entries.fx_ju_solbirthb); - - entries.fx_ju_solbirthc= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_solbirthc", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju-solbirthc.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_solbirthc", entries.fx_ju_solbirthc); - - entries.fx_ju_solbirthd= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_solbirthd", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju-solbirthd.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_solbirthd", entries.fx_ju_solbirthd); - - entries.fx_ju_treefalla= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_treefalla", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju-treefalla.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_treefalla", entries.fx_ju_treefalla); - - entries.fx_ju_treefallb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_treefallb", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju-treefallb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_treefallb", entries.fx_ju_treefallb); - - entries.fx_ju_treefallc= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_treefallc", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju-treefallc.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_treefallc", entries.fx_ju_treefallc); - - entries.fx_ju_treefalld= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_treefalld", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju-treefalld.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_treefalld", entries.fx_ju_treefalld); - - entries.fx_ju_bibubirdb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_bibubirdb", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_bibubirdb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_bibubirdb", entries.fx_ju_bibubirdb); - - entries.fx_fo_bibubirdb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_bibubirdb", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_bibubirdb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_bibubirdb", entries.fx_fo_bibubirdb); - - entries.fx_ju_birds= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_birds", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_birds.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_birds", entries.fx_ju_birds); - - entries.fx_fo_birds= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_birds", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_birds.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_birds", entries.fx_fo_birds); - - entries.fx_ju_birdsb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_birdsb", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_birdsb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_birdsb", entries.fx_ju_birdsb); - - entries.fx_fo_birdsb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_birdsb", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_birdsb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_birdsb", entries.fx_fo_birdsb); - - entries.fx_ju_birdsc= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_birdsc", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_birdsc.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_birdsc", entries.fx_ju_birdsc); - - entries.fx_fo_birdsc= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_birdsc", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_birdsc.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_birdsc", entries.fx_fo_birdsc); - - entries.fx_ju_brumes= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_brumes", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_brumes.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_brumes", entries.fx_ju_brumes); - - entries.fx_fo_brumes= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_brumes", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_brumes.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_brumes", entries.fx_fo_brumes); - - entries.fx_ju_brumesb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_brumesb", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_brumesb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_brumesb", entries.fx_ju_brumesb); - - entries.fx_fo_brumesb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_brumesb", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_brumesb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_brumesb", entries.fx_fo_brumesb); - - entries.fx_ju_fee= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_fee", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_fee.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_fee", entries.fx_ju_fee); - - entries.fx_fo_fee= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_fee", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_fee.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_fee", entries.fx_fo_fee); - - entries.fx_ju_geyser4a= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_geyser4a", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_geyser4a.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_geyser4a", entries.fx_ju_geyser4a); - - entries.fx_fo_geyser4a= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_geyser4a", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_geyser4a.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_geyser4a", entries.fx_fo_geyser4a); - - entries.fx_ju_geyser4b= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_geyser4b", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_geyser4b.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_geyser4b", entries.fx_ju_geyser4b); - - entries.fx_fo_geyser4b= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_geyser4b", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_geyser4b.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_geyser4b", entries.fx_fo_geyser4b); - - entries.fx_ju_geyser4c= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_geyser4c", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_geyser4c.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_geyser4c", entries.fx_ju_geyser4c); - - entries.fx_fo_geyser4c= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_geyser4c", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_geyser4c.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_geyser4c", entries.fx_fo_geyser4c); - - entries.fx_ju_grenouille3= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_grenouille3", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_grenouille3.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_grenouille3", entries.fx_ju_grenouille3); - - entries.fx_fo_grenouille3= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_grenouille3", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_grenouille3.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_grenouille3", entries.fx_fo_grenouille3); - - entries.fx_ju_grenouilleb3= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_grenouilleb3", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_grenouilleb3.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_grenouilleb3", entries.fx_ju_grenouilleb3); - - entries.fx_fo_grenouilleb3= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_grenouilleb3", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_grenouilleb3.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_grenouilleb3", entries.fx_fo_grenouilleb3); - - entries.fx_ju_grenouillec3= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_grenouillec3", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_grenouillec3.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_grenouillec3", entries.fx_ju_grenouillec3); - - entries.fx_fo_grenouillec3= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_grenouillec3", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_grenouillec3.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_grenouillec3", entries.fx_fo_grenouillec3); - - entries.fx_ju_ratsc= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_ratsc", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_ratsc.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_ratsc", entries.fx_ju_ratsc); - - entries.fx_fo_ratsc= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_ratsc", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_ratsc.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_ratsc", entries.fx_fo_ratsc); - - entries.fx_ju_rotasecte= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_rotasecte", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_rotasecte.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_rotasecte", entries.fx_ju_rotasecte); - - entries.fx_fo_rotasecte= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_rotasecte", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_rotasecte.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_rotasecte", entries.fx_fo_rotasecte); - - entries.fx_ju_rotasecteb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_rotasecteb", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_rotasecteb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_rotasecteb", entries.fx_ju_rotasecteb); - - entries.fx_fo_rotasecteb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_rotasecteb", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_rotasecteb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_rotasecteb", entries.fx_fo_rotasecteb); - - entries.fx_ju_scorpion2= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_scorpion2", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_scorpion2.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_scorpion2", entries.fx_ju_scorpion2); - - entries.fx_fo_scorpion2= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_scorpion2", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_scorpion2.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_scorpion2", entries.fx_fo_scorpion2); - - entries.fx_ju_taupe= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_taupe", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_taupe.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_taupe", entries.fx_ju_taupe); - - entries.fx_fo_taupe= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_taupe", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_taupe.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_taupe", entries.fx_fo_taupe); - - entries.fx_ju_vent= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_vent", - -- RingAccess="j1", - Ecosystem="Jungle", - SheetClient="object_fx_ju_fo_vent.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_vent", entries.fx_ju_vent); - - entries.fx_fo_vent= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_vent", - -- RingAccess="f1", - Ecosystem="Forest", - SheetClient="object_fx_ju_fo_vent.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_vent", entries.fx_fo_vent); - - entries.fx_la_birds= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_la_birds", - -- RingAccess="l1", - Ecosystem="Lacustre", - SheetClient="object_fx_la_birds.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_la_birds", entries.fx_la_birds); - - entries.fx_la_birdsb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_la_birdsb", - -- RingAccess="l1", - Ecosystem="Lacustre", - SheetClient="object_fx_la_birdsb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_la_birdsb", entries.fx_la_birdsb); - - entries.fx_la_serpent= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_la_serpent", - -- RingAccess="l1", - Ecosystem="Lacustre", - SheetClient="object_fx_la_serpent.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_la_serpent", entries.fx_la_serpent); - - entries.fx_la_serpent_sub= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_la_serpent_sub", - -- RingAccess="l1", - Ecosystem="Lacustre", - SheetClient="object_fx_la_serpent_sub.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_la_serpent_sub", entries.fx_la_serpent_sub); - - entries.fx_la_taupe= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_la_taupe", - -- RingAccess="l1", - Ecosystem="Lacustre", - SheetClient="object_fx_la_taupe.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_la_taupe", entries.fx_la_taupe); - - entries.fx_la_vent= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_la_vent", - -- RingAccess="l1", - Ecosystem="Lacustre", - SheetClient="object_fx_la_vent.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_la_vent", entries.fx_la_vent); - - entries.fx_ju_bibubirdb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_ju_bibubirdb", - Ecosystem="", - SheetClient="object_fx_matis_ju_fo_bibubirdb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_ju_bibubirdb", entries.fx_ju_bibubirdb); - - entries.fx_fo_bibubirdb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_fo_bibubirdb", - Ecosystem="", - SheetClient="object_fx_matis_ju_fo_bibubirdb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_fo_bibubirdb", entries.fx_fo_bibubirdb); - - entries.fx_tr_colibris= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_tr_colibris", - -- RingAccess="l1", - Ecosystem="Lacustre", - SheetClient="object_fx_tr-colibris.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_tr_colibris", entries.fx_tr_colibris); - - entries.fx_tr_cricket_aqua= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_tr_cricket_aqua", - -- RingAccess="l1", - Ecosystem="Lacustre", - SheetClient="object_fx_tr-cricket_aqua.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_tr_cricket_aqua", entries.fx_tr_cricket_aqua); - - entries.fx_tr_dragonflya= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_tr_dragonflya", - -- RingAccess="l1", - Ecosystem="Lacustre", - SheetClient="object_fx_tr-dragonflya.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_tr_dragonflya", entries.fx_tr_dragonflya); - - entries.fx_tr_dragonflyb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_tr_dragonflyb", - -- RingAccess="l1", - Ecosystem="Lacustre", - SheetClient="object_fx_tr-dragonflyb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_tr_dragonflyb", entries.fx_tr_dragonflyb); - - entries.fx_tr_fishes= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_tr_fishes", - -- RingAccess="l1", - Ecosystem="Lacustre", - SheetClient="object_fx_tr-fishes.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_tr_fishes", entries.fx_tr_fishes); - - entries.fx_tr_fishesb= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_tr_fishesb", - -- RingAccess="l1", - Ecosystem="Lacustre", - SheetClient="object_fx_tr-fishesb.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_tr_fishesb", entries.fx_tr_fishesb); - - entries.fx_tr_fishesc= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_tr_fishesc", - -- RingAccess="l1", - Ecosystem="Lacustre", - SheetClient="object_fx_tr-fishesc.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_tr_fishesc", entries.fx_tr_fishesc); - - entries.fx_tr_serpent= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_tr_serpent", - -- RingAccess="l1", - Ecosystem="Lacustre", - SheetClient="object_fx_tr-serpent.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_tr_serpent", entries.fx_tr_serpent); - - entries.fx_tr_pollen= - { - Base="palette.entities.botobjects.fx_base", - Name = "fx_tr_pollen", - -- RingAccess="l1", - Ecosystem="Lacustre", - SheetClient="object_fx_tr_pollen.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.fx_tr_pollen", entries.fx_tr_pollen); - - --- New NPC Bandits added by Max - - - - --- Melee Bandits - - --- Damage dealers - - entries.f_melee_dd_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_slash_b2.creature", SheetModel="ring_melee_damage_dealer_$hands_b$level.creature", SheetClient="basic_fyros_male.creature", Level=20, RingAccess="a1", Equipment="f_melee_dd_20_equipment" }r2.addPaletteElement("palette.entities.npcs.bandits.f_melee_dd_20", entries.f_melee_dd_20) - entries.m_melee_dd_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_slash_b2.creature", SheetModel="ring_melee_damage_dealer_$hands_b$level.creature", SheetClient="basic_matis_male.creature", Level=20, RingAccess="a1", Equipment="m_melee_dd_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_melee_dd_20", entries.m_melee_dd_20) - entries.t_melee_dd_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_slash_b2.creature", SheetModel="ring_melee_damage_dealer_$hands_b$level.creature", SheetClient="basic_tryker_male.creature",Level=20, RingAccess="a1", Equipment="t_melee_dd_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_melee_dd_20", entries.t_melee_dd_20) - entries.z_melee_dd_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_slash_b2.creature", SheetModel="ring_melee_damage_dealer_$hands_b$level.creature", SheetClient="basic_zorai_male.creature", Level=20, RingAccess="a1", Equipment="z_melee_dd_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_melee_dd_20", entries.z_melee_dd_20) - - entries.f_melee_dd_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_slash_c2.creature", SheetModel="ring_melee_damage_dealer_$hands_c$level.creature", SheetClient="basic_fyros_male.creature", Level=70, RingAccess="d2", Equipment="f_melee_dd_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_melee_dd_70", entries.f_melee_dd_70) - entries.m_melee_dd_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_slash_c2.creature", SheetModel="ring_melee_damage_dealer_$hands_c$level.creature", SheetClient="basic_matis_male.creature", Level=70, RingAccess="f5", Equipment="m_melee_dd_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_melee_dd_70", entries.m_melee_dd_70) - entries.t_melee_dd_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_slash_c2.creature", SheetModel="ring_melee_damage_dealer_$hands_c$level.creature", SheetClient="basic_tryker_male.creature", Level=70, RingAccess="l5", Equipment="t_melee_dd_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_melee_dd_70", entries.t_melee_dd_70) - entries.z_melee_dd_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_slash_c2.creature", SheetModel="ring_melee_damage_dealer_$hands_c$level.creature", SheetClient="basic_zorai_male.creature", Level=70, RingAccess="j5", Equipment="z_melee_dd_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_melee_dd_70", entries.z_melee_dd_70) - - entries.f_melee_dd_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_slash_d2.creature", SheetModel="ring_melee_damage_dealer_$hands_d$level.creature", SheetClient="basic_fyros_male.creature", Level=120, RingAccess="d4", Equipment="f_melee_dd_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_melee_dd_120", entries.f_melee_dd_120) - entries.m_melee_dd_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_slash_d2.creature", SheetModel="ring_melee_damage_dealer_$hands_d$level.creature", SheetClient="basic_matis_male.creature", Level=120, RingAccess="f5", Equipment="m_melee_dd_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_melee_dd_120", entries.m_melee_dd_120) - entries.t_melee_dd_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_pierce_d2.creature", SheetModel="ring_melee_damage_dealer_$hands_d$level.creature", SheetClient="basic_tryker_male.creature", Level=120, RingAccess="l5", Equipment="t_melee_dd_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_melee_dd_120", entries.t_melee_dd_120) - entries.z_melee_dd_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_blunt_d2.creature", SheetModel="ring_melee_damage_dealer_$hands_d$level.creature", SheetClient="basic_zorai_male.creature", Level=120, RingAccess="j5", Equipment="z_melee_dd_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_melee_dd_120", entries.z_melee_dd_120) - - entries.f_melee_dd_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_slash_e2.creature", SheetModel="ring_melee_damage_dealer_$hands_e$level.creature", SheetClient="basic_fyros_male.creature", Level=170, RingAccess="d6", Equipment="f_melee_dd_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_melee_dd_170", entries.f_melee_dd_170) - entries.m_melee_dd_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_slash_e2.creature", SheetModel="ring_melee_damage_dealer_$hands_e$level.creature", SheetClient="basic_matis_male.creature", Level=170, RingAccess="f6", Equipment="m_melee_dd_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_melee_dd_170", entries.m_melee_dd_170) - entries.t_melee_dd_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_pierce_e2.creature", SheetModel="ring_melee_damage_dealer_$hands_e$level.creature", SheetClient="basic_tryker_male.creature", Level=170, RingAccess="l5", Equipment="t_melee_dd_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_melee_dd_170", entries.t_melee_dd_170) - entries.z_melee_dd_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_blunt_e2.creature", SheetModel="ring_melee_damage_dealer_$hands_e$level.creature", SheetClient="basic_zorai_male.creature", Level=170, RingAccess="j6", Equipment="z_melee_dd_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_melee_dd_170", entries.z_melee_dd_170) - - entries.f_melee_dd_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_slash_f2.creature", SheetModel="ring_melee_damage_dealer_$hands_f$level.creature", SheetClient="basic_fyros_male.creature", Level=220, RingAccess="d7", Equipment="f_melee_dd_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_melee_dd_220", entries.f_melee_dd_220) - entries.m_melee_dd_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_slash_f2.creature", SheetModel="ring_melee_damage_dealer_$hands_f$level.creature", SheetClient="basic_matis_male.creature", Level=220, RingAccess="f7", Equipment="m_melee_dd_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_melee_dd_220", entries.m_melee_dd_220) - entries.t_melee_dd_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_pierce_f2.creature", SheetModel="ring_melee_damage_dealer_$hands_f$level.creature", SheetClient="basic_tryker_male.creature", Level=220, RingAccess="l6", Equipment="t_melee_dd_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_melee_dd_220", entries.t_melee_dd_220) - entries.z_melee_dd_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_damage_dealer_blunt_f2.creature", SheetModel="ring_melee_damage_dealer_$hands_f$level.creature", SheetClient="basic_zorai_male.creature", Level=220, RingAccess="j7", Equipment="z_melee_dd_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_melee_dd_220", entries.z_melee_dd_220) - - - - entries.f_melee_dd_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfamv"] = "icfamv.sitem", }, legs = { ["uiR2EDequipment_icfalp"] = "icfalp.sitem", ["uiR2EDequipment_icfamp"] = "icfamp.sitem", }, boots = { ["uiR2EDequipment_icfamb"] = "icfamb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfals"] = "icfals.sitem", ["uiR2EDequipment_icfams"] = "icfams.sitem", }, gloves = { ["uiR2EDequipment_icfamg"] = "icfamg.sitem", }, hands = { ["uiR2EDequipment_icfm2ss"] = "icfm2ss.sitem::slash", ["uiR2EDequipment_icfm2sa"] = "icfm2sa.sitem::slash", ["uiR2EDequipment_icfm2bm"] = "icfm2bm.sitem::blunt", ["uiR2EDequipment_icfm2pp"] = "icfm2pp.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.f_melee_dd_20, entries.f_melee_dd_20_equipment) - entries.m_melee_dd_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmamv"] = "icmamv.sitem", }, legs = { ["uiR2EDequipment_icmalp"] = "icmalp.sitem", ["uiR2EDequipment_icmamp"] = "icmamp.sitem", }, boots = { ["uiR2EDequipment_icmamb"] = "icmamb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmals"] = "icmals.sitem", ["uiR2EDequipment_icmams"] = "icmams.sitem", }, gloves = { ["uiR2EDequipment_icmamg"] = "icmamg.sitem", }, hands = { ["uiR2EDequipment_icmm2ss"] = "icmm2ss.sitem::slash", ["uiR2EDequipment_icmm2sa"] = "icmm2sa.sitem::slash", ["uiR2EDequipment_icmm2bm"] = "icmm2bm.sitem::blunt", ["uiR2EDequipment_icmm2pp"] = "icmm2pp.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.m_melee_dd_20, entries.m_melee_dd_20_equipment) - entries.t_melee_dd_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictamv"] = "ictamv.sitem", }, legs = { ["uiR2EDequipment_ictalp"] = "ictalp.sitem", ["uiR2EDequipment_ictamp"] = "ictamp.sitem", }, boots = { ["uiR2EDequipment_ictamb"] = "ictamb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictals"] = "ictals.sitem", ["uiR2EDequipment_ictams"] = "ictams.sitem", }, gloves = { ["uiR2EDequipment_ictamg"] = "ictamg.sitem", }, hands = { ["uiR2EDequipment_ictm2ss"] = "ictm2ss.sitem::slash", ["uiR2EDequipment_ictm2sa"] = "ictm2sa.sitem::slash", ["uiR2EDequipment_ictm2bm"] = "ictm2bm.sitem::blunt", ["uiR2EDequipment_ictm2pp"] = "ictm2pp.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.t_melee_dd_20, entries.t_melee_dd_20_equipment) - entries.z_melee_dd_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczamv"] = "iczamv.sitem", }, legs = { ["uiR2EDequipment_iczalp"] = "iczalp.sitem", ["uiR2EDequipment_iczamp"] = "iczamp.sitem", }, boots = { ["uiR2EDequipment_iczamb"] = "iczamb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczals"] = "iczals.sitem", ["uiR2EDequipment_iczams"] = "iczams.sitem", }, gloves = { ["uiR2EDequipment_iczamg"] = "iczamg.sitem", }, hands = { ["uiR2EDequipment_iczm2ss"] = "iczm2ss.sitem::slash", ["uiR2EDequipment_iczm2sa"] = "iczm2sa.sitem::slash", ["uiR2EDequipment_iczm2bm"] = "iczm2bm.sitem::blunt", ["uiR2EDequipment_iczm2pp"] = "iczm2pp.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.z_melee_dd_20, entries.z_melee_dd_20_equipment) - - entries.f_melee_dd_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfamv"] = "icfamv.sitem", ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", ["uiR2EDequipment_icfamv_2"] = "icfamv_2.sitem", }, legs = { ["uiR2EDequipment_icfalp"] = "icfalp.sitem", ["uiR2EDequipment_icfamp"] = "icfamp.sitem", ["uiR2EDequipment_icfalp_2"] = "icfalp_2.sitem", ["uiR2EDequipment_icfamp_2"] = "icfamp_2.sitem", }, boots = { ["uiR2EDequipment_icfamb"] = "icfamb.sitem", ["uiR2EDequipment_icfamb_2"] = "icfamb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfals"] = "icfals.sitem", ["uiR2EDequipment_icfams"] = "icfams.sitem", ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", ["uiR2EDequipment_icfams_2"] = "icfams_2.sitem", }, gloves = { ["uiR2EDequipment_icfamg"] = "icfamg.sitem", ["uiR2EDequipment_icfamg_2"] = "icfamg_2.sitem", }, hands = { ["uiR2EDequipment_icfm2ss"] = "icfm2ss.sitem::slash", ["uiR2EDequipment_icfm2ss_2"] = "icfm2ss_2.sitem::slash", ["uiR2EDequipment_icfm2sa"] = "icfm2sa.sitem::slash", ["uiR2EDequipment_icfm2sa_2"] = "icfm2sa_2.sitem::slash", ["uiR2EDequipment_icfm2bm"] = "icfm2bm.sitem::blunt", ["uiR2EDequipment_icfm2bm_2"] = "icfm2bm_2.sitem::blunt", ["uiR2EDequipment_icfm2pp"] = "icfm2pp.sitem::pierce", ["uiR2EDequipment_icfm2pp_2"] = "icfm2pp_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.f_melee_dd_70, entries.f_melee_dd_70_equipment) - entries.m_melee_dd_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmamv"] = "icmamv.sitem", ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", ["uiR2EDequipment_icmamv_2"] = "icmamv_2.sitem", }, legs = { ["uiR2EDequipment_icmalp"] = "icmalp.sitem", ["uiR2EDequipment_icmamp"] = "icmamp.sitem", ["uiR2EDequipment_icmalp_2"] = "icmalp_2.sitem", ["uiR2EDequipment_icmamp_2"] = "icmamp_2.sitem", }, boots = { ["uiR2EDequipment_icmamb"] = "icmamb.sitem", ["uiR2EDequipment_icmamb_2"] = "icmamb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmals"] = "icmals.sitem", ["uiR2EDequipment_icmams"] = "icmams.sitem", ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", ["uiR2EDequipment_icmams_2"] = "icmams_2.sitem", }, gloves = { ["uiR2EDequipment_icmamg"] = "icmamg.sitem", ["uiR2EDequipment_icmamg_2"] = "icmamg_2.sitem", }, hands = { ["uiR2EDequipment_icmm2ss"] = "icmm2ss.sitem::slash", ["uiR2EDequipment_icmm2ss_2"] = "icmm2ss_2.sitem::slash", ["uiR2EDequipment_icmm2sa"] = "icmm2sa.sitem::slash", ["uiR2EDequipment_icmm2sa_2"] = "icmm2sa_2.sitem::slash", ["uiR2EDequipment_icmm2bm"] = "icmm2bm.sitem::blunt", ["uiR2EDequipment_icmm2bm_2"] = "icmm2bm_2.sitem::blunt", ["uiR2EDequipment_icmm2pp"] = "icmm2pp.sitem::pierce", ["uiR2EDequipment_icmm2pp_2"] = "icmm2pp_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.m_melee_dd_70, entries.m_melee_dd_70_equipment) - entries.t_melee_dd_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictamv"] = "ictamv.sitem", ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", ["uiR2EDequipment_ictamv_2"] = "ictamv_2.sitem", }, legs = { ["uiR2EDequipment_ictalp"] = "ictalp.sitem", ["uiR2EDequipment_ictamp"] = "ictamp.sitem", ["uiR2EDequipment_ictalp_2"] = "ictalp_2.sitem", ["uiR2EDequipment_ictamp_2"] = "ictamp_2.sitem", }, boots = { ["uiR2EDequipment_ictamb"] = "ictamb.sitem", ["uiR2EDequipment_ictamb_2"] = "ictamb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictals"] = "ictals.sitem", ["uiR2EDequipment_ictams"] = "ictams.sitem", ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", ["uiR2EDequipment_ictams_2"] = "ictams_2.sitem", }, gloves = { ["uiR2EDequipment_ictamg"] = "ictamg.sitem", ["uiR2EDequipment_ictamg_2"] = "ictamg_2.sitem", }, hands = { ["uiR2EDequipment_ictm2ss"] = "ictm2ss.sitem::slash", ["uiR2EDequipment_ictm2ss_2"] = "ictm2ss_2.sitem::slash", ["uiR2EDequipment_ictm2sa"] = "ictm2sa.sitem::slash", ["uiR2EDequipment_ictm2sa_2"] = "ictm2sa_2.sitem::slash", ["uiR2EDequipment_ictm2bm"] = "ictm2bm.sitem::blunt", ["uiR2EDequipment_ictm2bm_2"] = "ictm2bm_2.sitem::blunt", ["uiR2EDequipment_ictm2pp"] = "ictm2pp.sitem::pierce", ["uiR2EDequipment_ictm2pp_2"] = "ictm2pp_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.t_melee_dd_70, entries.t_melee_dd_70_equipment) - entries.z_melee_dd_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczamv"] = "iczamv.sitem", ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", ["uiR2EDequipment_iczamv_2"] = "iczamv_2.sitem", }, legs = { ["uiR2EDequipment_iczalp"] = "iczalp.sitem", ["uiR2EDequipment_iczamp"] = "iczamp.sitem", ["uiR2EDequipment_iczalp_2"] = "iczalp_2.sitem", ["uiR2EDequipment_iczamp_2"] = "iczamp_2.sitem", }, boots = { ["uiR2EDequipment_iczamb"] = "iczamb.sitem", ["uiR2EDequipment_iczamb_2"] = "iczamb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczals"] = "iczals.sitem", ["uiR2EDequipment_iczams"] = "iczams.sitem", ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", ["uiR2EDequipment_iczams_2"] = "iczams_2.sitem", }, gloves = { ["uiR2EDequipment_iczamg"] = "iczamg.sitem", ["uiR2EDequipment_iczamg_2"] = "iczamg_2.sitem", }, hands = { ["uiR2EDequipment_iczm2ss"] = "iczm2ss.sitem::slash", ["uiR2EDequipment_iczm2ss_2"] = "iczm2ss_2.sitem::slash", ["uiR2EDequipment_iczm2sa"] = "iczm2sa.sitem::slash", ["uiR2EDequipment_iczm2sa_2"] = "iczm2sa_2.sitem::slash", ["uiR2EDequipment_iczm2bm"] = "iczm2bm.sitem::blunt", ["uiR2EDequipment_iczm2bm_2"] = "iczm2bm_2.sitem::blunt", ["uiR2EDequipment_iczm2pp"] = "iczm2pp.sitem::pierce", ["uiR2EDequipment_iczm2pp_2"] = "iczm2pp_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.z_melee_dd_70, entries.z_melee_dd_70_equipment) - - entries.f_melee_dd_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfamv"] = "icfamv.sitem", ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", ["uiR2EDequipment_icfamv_2"] = "icfamv_2.sitem", }, legs = { ["uiR2EDequipment_icfamp"] = "icfamp.sitem", ["uiR2EDequipment_icfamp_2"] = "icfamp_2.sitem", }, boots = { ["uiR2EDequipment_icfamb"] = "icfamb.sitem", ["uiR2EDequipment_icfamb_2"] = "icfamb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfals"] = "icfals.sitem", ["uiR2EDequipment_icfams"] = "icfams.sitem", ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", ["uiR2EDequipment_icfams_2"] = "icfams_2.sitem", }, gloves = { ["uiR2EDequipment_icfamg"] = "icfamg.sitem", ["uiR2EDequipment_icfamg_2"] = "icfamg_2.sitem", }, hands = { ["uiR2EDequipment_icfm2ss"] = "icfm2ss.sitem::slash", ["uiR2EDequipment_icfm2ss_2"] = "icfm2ss_2.sitem::slash", ["uiR2EDequipment_icfm2sa"] = "icfm2sa.sitem::slash", ["uiR2EDequipment_icfm2sa_2"] = "icfm2sa_2.sitem::slash", ["uiR2EDequipment_icfm2bm"] = "icfm2bm.sitem::blunt", ["uiR2EDequipment_icfm2bm_2"] = "icfm2bm_2.sitem::blunt", ["uiR2EDequipment_icfm2pp"] = "icfm2pp.sitem::pierce", ["uiR2EDequipment_icfm2pp_2"] = "icfm2pp_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.f_melee_dd_120, entries.f_melee_dd_120_equipment) - entries.m_melee_dd_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmamv"] = "icmamv.sitem", ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", ["uiR2EDequipment_icmamv_2"] = "icmamv_2.sitem", }, legs = { ["uiR2EDequipment_icmamp"] = "icmamp.sitem", ["uiR2EDequipment_icmamp_2"] = "icmamp_2.sitem", }, boots = { ["uiR2EDequipment_icmamb"] = "icmamb.sitem", ["uiR2EDequipment_icmamb_2"] = "icmamb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmals"] = "icmals.sitem", ["uiR2EDequipment_icmams"] = "icmams.sitem", ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", ["uiR2EDequipment_icmams_2"] = "icmams_2.sitem", }, gloves = { ["uiR2EDequipment_icmamg"] = "icmamg.sitem", ["uiR2EDequipment_icmamg_2"] = "icmamg_2.sitem", }, hands = { ["uiR2EDequipment_icmm2ss"] = "icmm2ss.sitem::slash", ["uiR2EDequipment_icmm2ss_2"] = "icmm2ss_2.sitem::slash", ["uiR2EDequipment_icmm2sa"] = "icmm2sa.sitem::slash", ["uiR2EDequipment_icmm2sa_2"] = "icmm2sa_2.sitem::slash", ["uiR2EDequipment_icmm2bm"] = "icmm2bm.sitem::blunt", ["uiR2EDequipment_icmm2bm_2"] = "icmm2bm_2.sitem::blunt", ["uiR2EDequipment_icmm2pp"] = "icmm2pp.sitem::pierce", ["uiR2EDequipment_icmm2pp_2"] = "icmm2pp_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.m_melee_dd_120, entries.m_melee_dd_120_equipment) - entries.t_melee_dd_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictamv"] = "ictamv.sitem", ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", ["uiR2EDequipment_ictamv_2"] = "ictamv_2.sitem", }, legs = { ["uiR2EDequipment_ictamp"] = "ictamp.sitem", ["uiR2EDequipment_ictamp_2"] = "ictamp_2.sitem", }, boots = { ["uiR2EDequipment_ictamb"] = "ictamb.sitem", ["uiR2EDequipment_ictamb_2"] = "ictamb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictals"] = "ictals.sitem", ["uiR2EDequipment_ictams"] = "ictams.sitem", ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", ["uiR2EDequipment_ictams_2"] = "ictams_2.sitem", }, gloves = { ["uiR2EDequipment_ictamg"] = "ictamg.sitem", ["uiR2EDequipment_ictamg_2"] = "ictamg_2.sitem", }, hands = { ["uiR2EDequipment_ictm2ss"] = "ictm2ss.sitem::slash", ["uiR2EDequipment_ictm2ss_2"] = "ictm2ss_2.sitem::slash", ["uiR2EDequipment_ictm2sa"] = "ictm2sa.sitem::slash", ["uiR2EDequipment_ictm2sa_2"] = "ictm2sa_2.sitem::slash", ["uiR2EDequipment_ictm2bm"] = "ictm2bm.sitem::blunt", ["uiR2EDequipment_ictm2bm_2"] = "ictm2bm_2.sitem::blunt", ["uiR2EDequipment_ictm2pp"] = "ictm2pp.sitem::pierce", ["uiR2EDequipment_ictm2pp_2"] = "ictm2pp_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.t_melee_dd_120, entries.t_melee_dd_120_equipment) - entries.z_melee_dd_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczamv"] = "iczamv.sitem", ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", ["uiR2EDequipment_iczamv_2"] = "iczamv_2.sitem", }, legs = { ["uiR2EDequipment_iczamp"] = "iczamp.sitem", ["uiR2EDequipment_iczamp_2"] = "iczamp_2.sitem", }, boots = { ["uiR2EDequipment_iczamb"] = "iczamb.sitem", ["uiR2EDequipment_iczamb_2"] = "iczamb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczals"] = "iczals.sitem", ["uiR2EDequipment_iczams"] = "iczams.sitem", ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", ["uiR2EDequipment_iczams_2"] = "iczams_2.sitem", }, gloves = { ["uiR2EDequipment_iczamg"] = "iczamg.sitem", ["uiR2EDequipment_iczamg_2"] = "iczamg_2.sitem", }, hands = { ["uiR2EDequipment_iczm2ss"] = "iczm2ss.sitem::slash", ["uiR2EDequipment_iczm2ss_2"] = "iczm2ss_2.sitem::slash", ["uiR2EDequipment_iczm2sa"] = "iczm2sa.sitem::slash", ["uiR2EDequipment_iczm2sa_2"] = "iczm2sa_2.sitem::slash", ["uiR2EDequipment_iczm2bm"] = "iczm2bm.sitem::blunt", ["uiR2EDequipment_iczm2bm_2"] = "iczm2bm_2.sitem::blunt", ["uiR2EDequipment_iczm2pp"] = "iczm2pp.sitem::pierce", ["uiR2EDequipment_iczm2pp_2"] = "iczm2pp_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.z_melee_dd_120, entries.z_melee_dd_120_equipment) - - entries.f_melee_dd_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfamv_2"] = "icfamv_2.sitem", ["uiR2EDequipment_icfahv_2"] = "icfahv_2.sitem", ["uiR2EDequipment_icfamv_3"] = "icfamv_3.sitem", ["uiR2EDequipment_icfahv_3"] = "icfahv_3.sitem", }, legs = { ["uiR2EDequipment_icfamp_2"] = "icfamp_2.sitem", ["uiR2EDequipment_icfamp_3"] = "icfamp_3.sitem", }, boots = { ["uiR2EDequipment_icfamb_2"] = "icfamb_2.sitem", ["uiR2EDequipment_icfamb_3"] = "icfamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", ["uiR2EDequipment_icfams_2"] = "icfams_2.sitem", ["uiR2EDequipment_icfals_3"] = "icfals_3.sitem", ["uiR2EDequipment_icfams_3"] = "icfams_3.sitem", }, gloves = { ["uiR2EDequipment_icfamg_2"] = "icfamg_2.sitem", ["uiR2EDequipment_icfamg_3"] = "icfamg_3.sitem", }, hands = { ["uiR2EDequipment_icfm2ss_2"] = "icfm2ss_2.sitem::slash", ["uiR2EDequipment_icfm2ss_3"] = "icfm2ss_3.sitem::slash", ["uiR2EDequipment_icfm2sa_2"] = "icfm2sa_2.sitem::slash", ["uiR2EDequipment_icfm2sa_3"] = "icfm2sa_3.sitem::slash", ["uiR2EDequipment_icfm2bm_2"] = "icfm2bm_2.sitem::blunt", ["uiR2EDequipment_icfm2bm_3"] = "icfm2bm_3.sitem::blunt", ["uiR2EDequipment_icfm2pp_2"] = "icfm2pp_2.sitem::pierce", ["uiR2EDequipment_icfm2pp_3"] = "icfm2pp_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.f_melee_dd_170, entries.f_melee_dd_170_equipment) - entries.m_melee_dd_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmamv_2"] = "icmamv_2.sitem", ["uiR2EDequipment_icmahv_2"] = "icmahv_2.sitem", ["uiR2EDequipment_icmamv_3"] = "icmamv_3.sitem", ["uiR2EDequipment_icmahv_3"] = "icmahv_3.sitem", }, legs = { ["uiR2EDequipment_icmamp_2"] = "icmamp_2.sitem", ["uiR2EDequipment_icmamp_3"] = "icmamp_3.sitem", }, boots = { ["uiR2EDequipment_icmamb_2"] = "icmamb_2.sitem", ["uiR2EDequipment_icmamb_3"] = "icmamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", ["uiR2EDequipment_icmams_2"] = "icmams_2.sitem", ["uiR2EDequipment_icmals_3"] = "icmals_3.sitem", ["uiR2EDequipment_icmams_3"] = "icmams_3.sitem", }, gloves = { ["uiR2EDequipment_icmamg_2"] = "icmamg_2.sitem", ["uiR2EDequipment_icmamg_3"] = "icmamg_3.sitem", }, hands = { ["uiR2EDequipment_icmm2ss_2"] = "icmm2ss_2.sitem::slash", ["uiR2EDequipment_icmm2ss_3"] = "icmm2ss_3.sitem::slash", ["uiR2EDequipment_icmm2sa_2"] = "icmm2sa_2.sitem::slash", ["uiR2EDequipment_icmm2sa_3"] = "icmm2sa_3.sitem::slash", ["uiR2EDequipment_icmm2bm_2"] = "icmm2bm_2.sitem::blunt", ["uiR2EDequipment_icmm2bm_3"] = "icmm2bm_3.sitem::blunt", ["uiR2EDequipment_icmm2pp_2"] = "icmm2pp_2.sitem::pierce", ["uiR2EDequipment_icmm2pp_3"] = "icmm2pp_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.m_melee_dd_170, entries.m_melee_dd_170_equipment) - entries.t_melee_dd_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictamv_2"] = "ictamv_2.sitem", ["uiR2EDequipment_ictahv_2"] = "ictahv_2.sitem", ["uiR2EDequipment_ictamv_3"] = "ictamv_3.sitem", ["uiR2EDequipment_ictahv_3"] = "ictahv_3.sitem", }, legs = { ["uiR2EDequipment_ictamp_2"] = "ictamp_2.sitem", ["uiR2EDequipment_ictamp_3"] = "ictamp_3.sitem", }, boots = { ["uiR2EDequipment_ictamb_2"] = "ictamb_2.sitem", ["uiR2EDequipment_ictamb_3"] = "ictamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", ["uiR2EDequipment_ictams_2"] = "ictams_2.sitem", ["uiR2EDequipment_ictals_3"] = "ictals_3.sitem", ["uiR2EDequipment_ictams_3"] = "ictams_3.sitem", }, gloves = { ["uiR2EDequipment_ictamg_2"] = "ictamg_2.sitem", ["uiR2EDequipment_ictamg_3"] = "ictamg_3.sitem", }, hands = { ["uiR2EDequipment_ictm2ss_2"] = "ictm2ss_2.sitem::slash", ["uiR2EDequipment_ictm2ss_3"] = "ictm2ss_3.sitem::slash", ["uiR2EDequipment_ictm2sa_2"] = "ictm2sa_2.sitem::slash", ["uiR2EDequipment_ictm2sa_3"] = "ictm2sa_3.sitem::slash", ["uiR2EDequipment_ictm2bm_2"] = "ictm2bm_2.sitem::blunt", ["uiR2EDequipment_ictm2bm_3"] = "ictm2bm_3.sitem::blunt", ["uiR2EDequipment_ictm2pp_2"] = "ictm2pp_2.sitem::pierce", ["uiR2EDequipment_ictm2pp_3"] = "ictm2pp_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.t_melee_dd_170, entries.t_melee_dd_170_equipment) - entries.z_melee_dd_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczamv_2"] = "iczamv_2.sitem", ["uiR2EDequipment_iczahv_2"] = "iczahv_2.sitem", ["uiR2EDequipment_iczamv_3"] = "iczamv_3.sitem", ["uiR2EDequipment_iczahv_3"] = "iczahv_3.sitem", }, legs = { ["uiR2EDequipment_iczamp_2"] = "iczamp_2.sitem", ["uiR2EDequipment_iczamp_3"] = "iczamp_3.sitem", }, boots = { ["uiR2EDequipment_iczamb_2"] = "iczamb_2.sitem", ["uiR2EDequipment_iczamb_3"] = "iczamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", ["uiR2EDequipment_iczams_2"] = "iczams_2.sitem", ["uiR2EDequipment_iczals_3"] = "iczals_3.sitem", ["uiR2EDequipment_iczams_3"] = "iczams_3.sitem", }, gloves = { ["uiR2EDequipment_iczamg_2"] = "iczamg_2.sitem", ["uiR2EDequipment_iczamg_3"] = "iczamg_3.sitem", }, hands = { ["uiR2EDequipment_iczm2ss_2"] = "iczm2ss_2.sitem::slash", ["uiR2EDequipment_iczm2ss_3"] = "iczm2ss_3.sitem::slash", ["uiR2EDequipment_iczm2sa_2"] = "iczm2sa_2.sitem::slash", ["uiR2EDequipment_iczm2sa_3"] = "iczm2sa_3.sitem::slash", ["uiR2EDequipment_iczm2bm_2"] = "iczm2bm_2.sitem::blunt", ["uiR2EDequipment_iczm2bm_3"] = "iczm2bm_3.sitem::blunt", ["uiR2EDequipment_iczm2pp_2"] = "iczm2pp_2.sitem::pierce", ["uiR2EDequipment_iczm2pp_3"] = "iczm2pp_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.z_melee_dd_170, entries.z_melee_dd_170_equipment) - - entries.f_melee_dd_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfamv_2"] = "icfamv_2.sitem", ["uiR2EDequipment_icfahv_2"] = "icfahv_2.sitem", ["uiR2EDequipment_icfamv_3"] = "icfamv_3.sitem", ["uiR2EDequipment_icfahv_3"] = "icfahv_3.sitem", }, legs = { ["uiR2EDequipment_icfamp_2"] = "icfamp_2.sitem", ["uiR2EDequipment_icfamp_3"] = "icfamp_3.sitem", }, boots = { ["uiR2EDequipment_icfamb_2"] = "icfamb_2.sitem", ["uiR2EDequipment_icfahb_2"] = "icfahb_2.sitem", ["uiR2EDequipment_icfamb_3"] = "icfamb_3.sitem", ["uiR2EDequipment_icfahb_3"] = "icfahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfams_2"] = "icfams_2.sitem", ["uiR2EDequipment_icfams_3"] = "icfams_3.sitem", }, gloves = { ["uiR2EDequipment_icfamg_2"] = "icfamg_2.sitem", ["uiR2EDequipment_icfamg_3"] = "icfamg_3.sitem", }, hands = { ["uiR2EDequipment_icfm2ss_2"] = "icfm2ss_2.sitem::slash", ["uiR2EDequipment_icfm2ss_3"] = "icfm2ss_3.sitem::slash", ["uiR2EDequipment_icfm2sa_2"] = "icfm2sa_2.sitem::slash", ["uiR2EDequipment_icfm2sa_3"] = "icfm2sa_3.sitem::slash", ["uiR2EDequipment_icfm2bm_2"] = "icfm2bm_2.sitem::blunt", ["uiR2EDequipment_icfm2bm_3"] = "icfm2bm_3.sitem::blunt", ["uiR2EDequipment_icfm2pp_2"] = "icfm2pp_2.sitem::pierce", ["uiR2EDequipment_icfm2pp_3"] = "icfm2pp_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.f_melee_dd_220, entries.f_melee_dd_220_equipment) - entries.m_melee_dd_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmamv_2"] = "icmamv_2.sitem", ["uiR2EDequipment_icmahv_2"] = "icmahv_2.sitem", ["uiR2EDequipment_icmamv_3"] = "icmamv_3.sitem", ["uiR2EDequipment_icmahv_3"] = "icmahv_3.sitem", }, legs = { ["uiR2EDequipment_icmamp_2"] = "icmamp_2.sitem", ["uiR2EDequipment_icmamp_3"] = "icmamp_3.sitem", }, boots = { ["uiR2EDequipment_icmamb_2"] = "icmamb_2.sitem", ["uiR2EDequipment_icmahb_2"] = "icmahb_2.sitem", ["uiR2EDequipment_icmamb_3"] = "icmamb_3.sitem", ["uiR2EDequipment_icmahb_3"] = "icmahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmams_2"] = "icmams_2.sitem", ["uiR2EDequipment_icmams_3"] = "icmams_3.sitem", }, gloves = { ["uiR2EDequipment_icmamg_2"] = "icmamg_2.sitem", ["uiR2EDequipment_icmamg_3"] = "icmamg_3.sitem", }, hands = { ["uiR2EDequipment_icmm2ss_2"] = "icmm2ss_2.sitem::slash", ["uiR2EDequipment_icmm2ss_3"] = "icmm2ss_3.sitem::slash", ["uiR2EDequipment_icmm2sa_2"] = "icmm2sa_2.sitem::slash", ["uiR2EDequipment_icmm2sa_3"] = "icmm2sa_3.sitem::slash", ["uiR2EDequipment_icmm2bm_2"] = "icmm2bm_2.sitem::blunt", ["uiR2EDequipment_icmm2bm_3"] = "icmm2bm_3.sitem::blunt", ["uiR2EDequipment_icmm2pp_2"] = "icmm2pp_2.sitem::pierce", ["uiR2EDequipment_icmm2pp_3"] = "icmm2pp_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.m_melee_dd_220, entries.m_melee_dd_220_equipment) - entries.t_melee_dd_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictamv_2"] = "ictamv_2.sitem", ["uiR2EDequipment_ictahv_2"] = "ictahv_2.sitem", ["uiR2EDequipment_ictamv_3"] = "ictamv_3.sitem", ["uiR2EDequipment_ictahv_3"] = "ictahv_3.sitem", }, legs = { ["uiR2EDequipment_ictamp_2"] = "ictamp_2.sitem", ["uiR2EDequipment_ictamp_3"] = "ictamp_3.sitem", }, boots = { ["uiR2EDequipment_ictamb_2"] = "ictamb_2.sitem", ["uiR2EDequipment_ictahb_2"] = "ictahb_2.sitem", ["uiR2EDequipment_ictamb_3"] = "ictamb_3.sitem", ["uiR2EDequipment_ictahb_3"] = "ictahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictams_2"] = "ictams_2.sitem", ["uiR2EDequipment_ictams_3"] = "ictams_3.sitem", }, gloves = { ["uiR2EDequipment_ictamg_2"] = "ictamg_2.sitem", ["uiR2EDequipment_ictamg_3"] = "ictamg_3.sitem", }, hands = { ["uiR2EDequipment_ictm2ss_2"] = "ictm2ss_2.sitem::slash", ["uiR2EDequipment_ictm2ss_3"] = "ictm2ss_3.sitem::slash", ["uiR2EDequipment_ictm2sa_2"] = "ictm2sa_2.sitem::slash", ["uiR2EDequipment_ictm2sa_3"] = "ictm2sa_3.sitem::slash", ["uiR2EDequipment_ictm2bm_2"] = "ictm2bm_2.sitem::blunt", ["uiR2EDequipment_ictm2bm_3"] = "ictm2bm_3.sitem::blunt", ["uiR2EDequipment_ictm2pp_2"] = "ictm2pp_2.sitem::pierce", ["uiR2EDequipment_ictm2pp_3"] = "ictm2pp_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.t_melee_dd_220, entries.t_melee_dd_220_equipment) - entries.z_melee_dd_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczamv_2"] = "iczamv_2.sitem", ["uiR2EDequipment_iczahv_2"] = "iczahv_2.sitem", ["uiR2EDequipment_iczamv_3"] = "iczamv_3.sitem", ["uiR2EDequipment_iczahv_3"] = "iczahv_3.sitem", }, legs = { ["uiR2EDequipment_iczamp_2"] = "iczamp_2.sitem", ["uiR2EDequipment_iczamp_3"] = "iczamp_3.sitem", }, boots = { ["uiR2EDequipment_iczamb_2"] = "iczamb_2.sitem", ["uiR2EDequipment_iczahb_2"] = "iczahb_2.sitem", ["uiR2EDequipment_iczamb_3"] = "iczamb_3.sitem", ["uiR2EDequipment_iczahb_3"] = "iczahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczams_2"] = "iczams_2.sitem", ["uiR2EDequipment_iczams_3"] = "iczams_3.sitem", }, gloves = { ["uiR2EDequipment_iczamg_2"] = "iczamg_2.sitem", ["uiR2EDequipment_iczamg_3"] = "iczamg_3.sitem", }, hands = { ["uiR2EDequipment_iczm2ss_2"] = "iczm2ss_2.sitem::slash", ["uiR2EDequipment_iczm2ss_3"] = "iczm2ss_3.sitem::slash", ["uiR2EDequipment_iczm2sa_2"] = "iczm2sa_2.sitem::slash", ["uiR2EDequipment_iczm2sa_3"] = "iczm2sa_3.sitem::slash", ["uiR2EDequipment_iczm2bm_2"] = "iczm2bm_2.sitem::blunt", ["uiR2EDequipment_iczm2bm_3"] = "iczm2bm_3.sitem::blunt", ["uiR2EDequipment_iczm2pp_2"] = "iczm2pp_2.sitem::pierce", ["uiR2EDequipment_iczm2pp_3"] = "iczm2pp_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.z_melee_dd_220, entries.z_melee_dd_220_equipment) - - - --- Tanks - - entries.f_melee_tank_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_b2.creature", SheetModel="ring_melee_tank_$hands_b$level.creature", SheetClient="basic_fyros_male.creature", Level=20, RingAccess="a1", Equipment="f_melee_tank_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_melee_tank_20", entries.f_melee_tank_20) - entries.m_melee_tank_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_b2.creature", SheetModel="ring_melee_tank_$hands_b$level.creature", SheetClient="basic_matis_male.creature", Level=20, RingAccess="a1", Equipment="m_melee_tank_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_melee_tank_20", entries.m_melee_tank_20) - entries.t_melee_tank_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_b2.creature", SheetModel="ring_melee_tank_$hands_b$level.creature", SheetClient="basic_tryker_male.creature", Level=20, RingAccess="a1", Equipment="t_melee_tank_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_melee_tank_20", entries.t_melee_tank_20) - entries.z_melee_tank_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_b2.creature", SheetModel="ring_melee_tank_$hands_b$level.creature", SheetClient="basic_zorai_male.creature", Level=20, RingAccess="a1", Equipment="z_melee_tank_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_melee_tank_20", entries.z_melee_tank_20) - - entries.f_melee_tank_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_c2.creature", SheetModel="ring_melee_tank_$hands_c$level.creature", SheetClient="basic_fyros_male.creature", Level=70, RingAccess="d2", Equipment="f_melee_tank_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_melee_tank_70", entries.f_melee_tank_70) - entries.m_melee_tank_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_c2.creature", SheetModel="ring_melee_tank_$hands_c$level.creature", SheetClient="basic_matis_male.creature", Level=70, RingAccess="f5", Equipment="m_melee_tank_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_melee_tank_70", entries.m_melee_tank_70) - entries.t_melee_tank_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_c2.creature", SheetModel="ring_melee_tank_$hands_c$level.creature", SheetClient="basic_tryker_male.creature", Level=70, RingAccess="l5", Equipment="t_melee_tank_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_melee_tank_70", entries.t_melee_tank_70) - entries.z_melee_tank_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_c2.creature", SheetModel="ring_melee_tank_$hands_c$level.creature", SheetClient="basic_zorai_male.creature", Level=70, RingAccess="j5", Equipment="z_melee_tank_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_melee_tank_70", entries.z_melee_tank_70) - - entries.f_melee_tank_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_d2.creature", SheetModel="ring_melee_tank_$hands_d$level.creature", SheetClient="basic_fyros_male.creature", Level=120, RingAccess="d4", Equipment="f_melee_tank_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_melee_tank_120", entries.f_melee_tank_120) - entries.m_melee_tank_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_d2.creature", SheetModel="ring_melee_tank_$hands_d$level.creature", SheetClient="basic_matis_male.creature", Level=120, RingAccess="f5", Equipment="m_melee_tank_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_melee_tank_120", entries.m_melee_tank_120) - entries.t_melee_tank_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_d2.creature", SheetModel="ring_melee_tank_$hands_d$level.creature", SheetClient="basic_tryker_male.creature", Level=120, RingAccess="l5", Equipment="t_melee_tank_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_melee_tank_120", entries.t_melee_tank_120) - entries.z_melee_tank_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_d2.creature", SheetModel="ring_melee_tank_$hands_d$level.creature", SheetClient="basic_zorai_male.creature", Level=120, RingAccess="j5", Equipment="z_melee_tank_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_melee_tank_120", entries.z_melee_tank_120) - - entries.f_melee_tank_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_e2.creature", SheetModel="ring_melee_tank_$hands_e$level.creature", SheetClient="basic_fyros_male.creature", Level=170, RingAccess="d6", Equipment="f_melee_tank_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_melee_tank_170", entries.f_melee_tank_170) - entries.m_melee_tank_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_e2.creature", SheetModel="ring_melee_tank_$hands_e$level.creature", SheetClient="basic_matis_male.creature", Level=170, RingAccess="f6", Equipment="m_melee_tank_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_melee_tank_170", entries.m_melee_tank_170) - entries.t_melee_tank_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_e2.creature", SheetModel="ring_melee_tank_$hands_e$level.creature", SheetClient="basic_tryker_male.creature", Level=170, RingAccess="l5", Equipment="t_melee_tank_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_melee_tank_170", entries.t_melee_tank_170) - entries.z_melee_tank_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_e2.creature", SheetModel="ring_melee_tank_$hands_e$level.creature", SheetClient="basic_zorai_male.creature", Level=170, RingAccess="j6", Equipment="z_melee_tank_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_melee_tank_170", entries.z_melee_tank_170) - - entries.f_melee_tank_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_f2.creature", SheetModel="ring_melee_tank_$hands_f$level.creature", SheetClient="basic_fyros_male.creature", Level=220, RingAccess="d7", Equipment="f_melee_tank_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_melee_tank_220", entries.f_melee_tank_220) - entries.m_melee_tank_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_f2.creature", SheetModel="ring_melee_tank_$hands_f$level.creature", SheetClient="basic_matis_male.creature", Level=220, RingAccess="f7", Equipment="m_melee_tank_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_melee_tank_220", entries.m_melee_tank_220) - entries.t_melee_tank_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_f2.creature", SheetModel="ring_melee_tank_$hands_f$level.creature", SheetClient="basic_tryker_male.creature", Level=220, RingAccess="l6", Equipment="t_melee_tank_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_melee_tank_220", entries.t_melee_tank_220) - entries.z_melee_tank_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_melee_tank_slash_f2.creature", SheetModel="ring_melee_tank_$hands_f$level.creature", SheetClient="basic_zorai_male.creature", Level=220, RingAccess="j7", Equipment="z_melee_tank_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_melee_tank_220", entries.z_melee_tank_220) - - - - entries.f_melee_tank_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfamv"] = "icfamv.sitem", }, legs = { ["uiR2EDequipment_icfalp"] = "icfalp.sitem", ["uiR2EDequipment_icfamp"] = "icfamp.sitem", }, boots = { ["uiR2EDequipment_icfamb"] = "icfamb.sitem", }, arms_guard = { ["uiR2EDequipment_icfals"] = "icfals.sitem", ["uiR2EDequipment_icfams"] = "icfams.sitem", }, gloves = { ["uiR2EDequipment_icfahg"] = "icfahg.sitem", }, hands = { ["uiR2EDequipment_icfm1ss"] = "icfm1ss.sitem:icfsb.sitem:slash", ["uiR2EDequipment_icfm1ss"] = "icfm1ss.sitem:icfss.sitem:slash", ["uiR2EDequipment_icfm1sa"] = "icfm1sa.sitem:icfsb.sitem:slash", ["uiR2EDequipment_icfm1sa"] = "icfm1sa.sitem:icfss.sitem:slash", ["uiR2EDequipment_icfm1bm"] = "icfm1bm.sitem:icfsb.sitem:blunt", ["uiR2EDequipment_icfm1bm"] = "icfm1bm.sitem:icfss.sitem:blunt", ["uiR2EDequipment_icfm1ps"] = "icfm1ps.sitem:icfsb.sitem:pierce", ["uiR2EDequipment_icfm1ps"] = "icfm1ps.sitem:icfss.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.f_melee_tank_20, entries.f_melee_tank_20_equipment) - entries.m_melee_tank_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmamv"] = "icmamv.sitem", }, legs = { ["uiR2EDequipment_icmalp"] = "icmalp.sitem", ["uiR2EDequipment_icmamp"] = "icmamp.sitem", }, boots = { ["uiR2EDequipment_icmamb"] = "icmamb.sitem", }, arms_guard = { ["uiR2EDequipment_icmals"] = "icmals.sitem", ["uiR2EDequipment_icmams"] = "icmams.sitem", }, gloves = { ["uiR2EDequipment_icmahg"] = "icmahg.sitem", }, hands = { ["uiR2EDequipment_icmm1ss"] = "icmm1ss.sitem:icmsb.sitem:slash", ["uiR2EDequipment_icmm1ss"] = "icmm1ss.sitem:icmss.sitem:slash", ["uiR2EDequipment_icmm1sa"] = "icmm1sa.sitem:icmsb.sitem:slash", ["uiR2EDequipment_icmm1sa"] = "icmm1sa.sitem:icmss.sitem:slash", ["uiR2EDequipment_icmm1bm"] = "icmm1bm.sitem:icmsb.sitem:blunt", ["uiR2EDequipment_icmm1bm"] = "icmm1bm.sitem:icmss.sitem:blunt", ["uiR2EDequipment_icmm1ps"] = "icmm1ps.sitem:icmsb.sitem:pierce", ["uiR2EDequipment_icmm1ps"] = "icmm1ps.sitem:icmss.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.m_melee_tank_20, entries.m_melee_tank_20_equipment) - entries.t_melee_tank_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictamv"] = "ictamv.sitem", }, legs = { ["uiR2EDequipment_ictalp"] = "ictalp.sitem", ["uiR2EDequipment_ictamp"] = "ictamp.sitem", }, boots = { ["uiR2EDequipment_ictamb"] = "ictamb.sitem", }, arms_guard = { ["uiR2EDequipment_ictals"] = "ictals.sitem", ["uiR2EDequipment_ictams"] = "ictams.sitem", }, gloves = { ["uiR2EDequipment_ictahg"] = "ictahg.sitem", }, hands = { ["uiR2EDequipment_ictm1ss"] = "ictm1ss.sitem:ictsb.sitem:slash", ["uiR2EDequipment_ictm1ss"] = "ictm1ss.sitem:ictss.sitem:slash", ["uiR2EDequipment_ictm1sa"] = "ictm1sa.sitem:ictsb.sitem:slash", ["uiR2EDequipment_ictm1sa"] = "ictm1sa.sitem:ictss.sitem:slash", ["uiR2EDequipment_ictm1bm"] = "ictm1bm.sitem:ictsb.sitem:blunt", ["uiR2EDequipment_ictm1bm"] = "ictm1bm.sitem:ictss.sitem:blunt", ["uiR2EDequipment_ictm1ps"] = "ictm1ps.sitem:ictsb.sitem:pierce", ["uiR2EDequipment_ictm1ps"] = "ictm1ps.sitem:ictss.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.t_melee_tank_20, entries.t_melee_tank_20_equipment) - entries.z_melee_tank_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczamv"] = "iczamv.sitem", }, legs = { ["uiR2EDequipment_iczalp"] = "iczalp.sitem", ["uiR2EDequipment_iczamp"] = "iczamp.sitem", }, boots = { ["uiR2EDequipment_iczamb"] = "iczamb.sitem", }, arms_guard = { ["uiR2EDequipment_iczals"] = "iczals.sitem", ["uiR2EDequipment_iczams"] = "iczams.sitem", }, gloves = { ["uiR2EDequipment_iczahg"] = "iczahg.sitem", }, hands = { ["uiR2EDequipment_iczm1ss"] = "iczm1ss.sitem:iczsb.sitem:slash", ["uiR2EDequipment_iczm1ss"] = "iczm1ss.sitem:iczss.sitem:slash", ["uiR2EDequipment_iczm1sa"] = "iczm1sa.sitem:iczsb.sitem:slash", ["uiR2EDequipment_iczm1sa"] = "iczm1sa.sitem:iczss.sitem:slash", ["uiR2EDequipment_iczm1bm"] = "iczm1bm.sitem:iczsb.sitem:blunt", ["uiR2EDequipment_iczm1bm"] = "iczm1bm.sitem:iczss.sitem:blunt", ["uiR2EDequipment_iczm1ps"] = "iczm1ps.sitem:iczsb.sitem:pierce", ["uiR2EDequipment_iczm1ps"] = "iczm1ps.sitem:iczss.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.z_melee_tank_20, entries.z_melee_tank_20_equipment) - - entries.f_melee_tank_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfahh"] = "icfahh.sitem", ["uiR2EDequipment_icfahh_2"] = "icfahh_2.sitem", }, chest_plate = { ["uiR2EDequipment_icfamv"] = "icfamv.sitem", ["uiR2EDequipment_icfamv_2"] = "icfamv_2.sitem", }, legs = { ["uiR2EDequipment_icfamp"] = "icfamp.sitem", ["uiR2EDequipment_icfamp_2"] = "icfamp_2.sitem", }, boots = { ["uiR2EDequipment_icfamb"] = "icfamb.sitem", ["uiR2EDequipment_icfamb_2"] = "icfamb_2.sitem", }, arms_guard = { ["uiR2EDequipment_icfams"] = "icfams.sitem", ["uiR2EDequipment_icfams_2"] = "icfams_2.sitem", }, gloves = { ["uiR2EDequipment_icfahg"] = "icfahg.sitem", ["uiR2EDequipment_icfahg_2"] = "icfahg_2.sitem", }, hands = { ["uiR2EDequipment_icfm1ss"] = "icfm1ss.sitem:icfsb.sitem:slash", ["uiR2EDequipment_icfm1ss"] = "icfm1ss.sitem:icfss.sitem:slash", ["uiR2EDequipment_icfm1ss_2"] = "icfm1ss_2.sitem:icfsb_2.sitem:slash", ["uiR2EDequipment_icfm1ss_2"] = "icfm1ss_2.sitem:icfss_2.sitem:slash", ["uiR2EDequipment_icfm1sa"] = "icfm1sa.sitem:icfsb.sitem:slash", ["uiR2EDequipment_icfm1sa"] = "icfm1sa.sitem:icfss.sitem:slash", ["uiR2EDequipment_icfm1sa_2"] = "icfm1sa_2.sitem:icfsb_2.sitem:slash", ["uiR2EDequipment_icfm1sa_2"] = "icfm1sa_2.sitem:icfss_2.sitem:slash", ["uiR2EDequipment_icfm1bm"] = "icfm1bm.sitem:icfsb.sitem:blunt", ["uiR2EDequipment_icfm1bm"] = "icfm1bm.sitem:icfss.sitem:blunt", ["uiR2EDequipment_icfm1bm_2"] = "icfm1bm_2.sitem:icfsb_2.sitem:blunt", ["uiR2EDequipment_icfm1bm_2"] = "icfm1bm_2.sitem:icfss_2.sitem:blunt", ["uiR2EDequipment_icfm1ps"] = "icfm1ps.sitem:icfsb.sitem:pierce", ["uiR2EDequipment_icfm1ps"] = "icfm1ps.sitem:icfss.sitem:pierce", ["uiR2EDequipment_icfm1ps_2"] = "icfm1ps_2.sitem:icfsb_2.sitem:pierce", ["uiR2EDequipment_icfm1ps_2"] = "icfm1ps_2.sitem:icfss_2.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.f_melee_tank_70, entries.f_melee_tank_70_equipment) - entries.m_melee_tank_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmahh"] = "icmahh.sitem", ["uiR2EDequipment_icmahh_2"] = "icmahh_2.sitem", }, chest_plate = { ["uiR2EDequipment_icmamv"] = "icmamv.sitem", ["uiR2EDequipment_icmamv_2"] = "icmamv_2.sitem", }, legs = { ["uiR2EDequipment_icmamp"] = "icmamp.sitem", ["uiR2EDequipment_icmamp_2"] = "icmamp_2.sitem", }, boots = { ["uiR2EDequipment_icmamb"] = "icmamb.sitem", ["uiR2EDequipment_icmamb_2"] = "icmamb_2.sitem", }, arms_guard = { ["uiR2EDequipment_icmams"] = "icmams.sitem", ["uiR2EDequipment_icmams_2"] = "icmams_2.sitem", }, gloves = { ["uiR2EDequipment_icmahg"] = "icmahg.sitem", ["uiR2EDequipment_icmahg_2"] = "icmahg_2.sitem", }, hands = { ["uiR2EDequipment_icmm1ss"] = "icmm1ss.sitem:icmsb.sitem:slash", ["uiR2EDequipment_icmm1ss"] = "icmm1ss.sitem:icmss.sitem:slash", ["uiR2EDequipment_icmm1ss_2"] = "icmm1ss_2.sitem:icmsb_2.sitem:slash", ["uiR2EDequipment_icmm1ss_2"] = "icmm1ss_2.sitem:icmss_2.sitem:slash", ["uiR2EDequipment_icmm1sa"] = "icmm1sa.sitem:icmsb.sitem:slash", ["uiR2EDequipment_icmm1sa"] = "icmm1sa.sitem:icmss.sitem:slash", ["uiR2EDequipment_icmm1sa_2"] = "icmm1sa_2.sitem:icmsb_2.sitem:slash", ["uiR2EDequipment_icmm1sa_2"] = "icmm1sa_2.sitem:icmss_2.sitem:slash", ["uiR2EDequipment_icmm1bm"] = "icmm1bm.sitem:icmsb.sitem:blunt", ["uiR2EDequipment_icmm1bm"] = "icmm1bm.sitem:icmss.sitem:blunt", ["uiR2EDequipment_icmm1bm_2"] = "icmm1bm_2.sitem:icmsb_2.sitem:blunt", ["uiR2EDequipment_icmm1bm_2"] = "icmm1bm_2.sitem:icmss_2.sitem:blunt", ["uiR2EDequipment_icmm1ps"] = "icmm1ps.sitem:icmsb.sitem:pierce", ["uiR2EDequipment_icmm1ps"] = "icmm1ps.sitem:icmss.sitem:pierce", ["uiR2EDequipment_icmm1ps_2"] = "icmm1ps_2.sitem:icmsb_2.sitem:pierce", ["uiR2EDequipment_icmm1ps_2"] = "icmm1ps_2.sitem:icmss_2.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.m_melee_tank_70, entries.m_melee_tank_70_equipment) - entries.t_melee_tank_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictahh"] = "ictahh.sitem", ["uiR2EDequipment_ictahh_2"] = "ictahh_2.sitem", }, chest_plate = { ["uiR2EDequipment_ictamv"] = "ictamv.sitem", ["uiR2EDequipment_ictamv_2"] = "ictamv_2.sitem", }, legs = { ["uiR2EDequipment_ictamp"] = "ictamp.sitem", ["uiR2EDequipment_ictamp_2"] = "ictamp_2.sitem", }, boots = { ["uiR2EDequipment_ictamb"] = "ictamb.sitem", ["uiR2EDequipment_ictamb_2"] = "ictamb_2.sitem", }, arms_guard = { ["uiR2EDequipment_ictams"] = "ictams.sitem", ["uiR2EDequipment_ictams_2"] = "ictams_2.sitem", }, gloves = { ["uiR2EDequipment_ictahg"] = "ictahg.sitem", ["uiR2EDequipment_ictahg_2"] = "ictahg_2.sitem", }, hands = { ["uiR2EDequipment_ictm1ss"] = "ictm1ss.sitem:ictsb.sitem:slash", ["uiR2EDequipment_ictm1ss"] = "ictm1ss.sitem:ictss.sitem:slash", ["uiR2EDequipment_ictm1ss_2"] = "ictm1ss_2.sitem:ictsb_2.sitem:slash", ["uiR2EDequipment_ictm1ss_2"] = "ictm1ss_2.sitem:ictss_2.sitem:slash", ["uiR2EDequipment_ictm1sa"] = "ictm1sa.sitem:ictsb.sitem:slash", ["uiR2EDequipment_ictm1sa"] = "ictm1sa.sitem:ictss.sitem:slash", ["uiR2EDequipment_ictm1sa_2"] = "ictm1sa_2.sitem:ictsb_2.sitem:slash", ["uiR2EDequipment_ictm1sa_2"] = "ictm1sa_2.sitem:ictss_2.sitem:slash", ["uiR2EDequipment_ictm1bm"] = "ictm1bm.sitem:ictsb.sitem:blunt", ["uiR2EDequipment_ictm1bm"] = "ictm1bm.sitem:ictss.sitem:blunt", ["uiR2EDequipment_ictm1bm_2"] = "ictm1bm_2.sitem:ictsb_2.sitem:blunt", ["uiR2EDequipment_ictm1bm_2"] = "ictm1bm_2.sitem:ictss_2.sitem:blunt", ["uiR2EDequipment_ictm1ps"] = "ictm1ps.sitem:ictsb.sitem:pierce", ["uiR2EDequipment_ictm1ps"] = "ictm1ps.sitem:ictss.sitem:pierce", ["uiR2EDequipment_ictm1ps_2"] = "ictm1ps_2.sitem:ictsb_2.sitem:pierce", ["uiR2EDequipment_ictm1ps_2"] = "ictm1ps_2.sitem:ictss_2.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.t_melee_tank_70, entries.t_melee_tank_70_equipment) - entries.z_melee_tank_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczahh"] = "iczahh.sitem", ["uiR2EDequipment_iczahh_2"] = "iczahh_2.sitem", }, chest_plate = { ["uiR2EDequipment_iczamv"] = "iczamv.sitem", ["uiR2EDequipment_iczamv_2"] = "iczamv_2.sitem", }, legs = { ["uiR2EDequipment_iczamp"] = "iczamp.sitem", ["uiR2EDequipment_iczamp_2"] = "iczamp_2.sitem", }, boots = { ["uiR2EDequipment_iczamb"] = "iczamb.sitem", ["uiR2EDequipment_iczamb_2"] = "iczamb_2.sitem", }, arms_guard = { ["uiR2EDequipment_iczams"] = "iczams.sitem", ["uiR2EDequipment_iczams_2"] = "iczams_2.sitem", }, gloves = { ["uiR2EDequipment_iczahg"] = "iczahg.sitem", ["uiR2EDequipment_iczahg_2"] = "iczahg_2.sitem", }, hands = { ["uiR2EDequipment_iczm1ss"] = "iczm1ss.sitem:iczsb.sitem:slash", ["uiR2EDequipment_iczm1ss"] = "iczm1ss.sitem:iczss.sitem:slash", ["uiR2EDequipment_iczm1ss_2"] = "iczm1ss_2.sitem:iczsb_2.sitem:slash", ["uiR2EDequipment_iczm1ss_2"] = "iczm1ss_2.sitem:iczss_2.sitem:slash", ["uiR2EDequipment_iczm1sa"] = "iczm1sa.sitem:iczsb.sitem:slash", ["uiR2EDequipment_iczm1sa"] = "iczm1sa.sitem:iczss.sitem:slash", ["uiR2EDequipment_iczm1sa_2"] = "iczm1sa_2.sitem:iczsb_2.sitem:slash", ["uiR2EDequipment_iczm1sa_2"] = "iczm1sa_2.sitem:iczss_2.sitem:slash", ["uiR2EDequipment_iczm1bm"] = "iczm1bm.sitem:iczsb.sitem:blunt", ["uiR2EDequipment_iczm1bm"] = "iczm1bm.sitem:iczss.sitem:blunt", ["uiR2EDequipment_iczm1bm_2"] = "iczm1bm_2.sitem:iczsb_2.sitem:blunt", ["uiR2EDequipment_iczm1bm_2"] = "iczm1bm_2.sitem:iczss_2.sitem:blunt", ["uiR2EDequipment_iczm1ps"] = "iczm1ps.sitem:iczsb.sitem:pierce", ["uiR2EDequipment_iczm1ps"] = "iczm1ps.sitem:iczss.sitem:pierce", ["uiR2EDequipment_iczm1ps_2"] = "iczm1ps_2.sitem:iczsb_2.sitem:pierce", ["uiR2EDequipment_iczm1ps_2"] = "iczm1ps_2.sitem:iczss_2.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.z_melee_tank_70, entries.z_melee_tank_70_equipment) - - entries.f_melee_tank_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfahh"] = "icfahh.sitem", ["uiR2EDequipment_icfahh_2"] = "icfahh_2.sitem", }, chest_plate = { ["uiR2EDequipment_icfamv"] = "icfamv.sitem", ["uiR2EDequipment_icfahv"] = "icfahv.sitem", ["uiR2EDequipment_icfamv_2"] = "icfamv_2.sitem", ["uiR2EDequipment_icfahv_2"] = "icfahv_2.sitem", }, legs = { ["uiR2EDequipment_icfamp"] = "icfamp.sitem", ["uiR2EDequipment_icfahp"] = "icfahp.sitem", ["uiR2EDequipment_icfamp_2"] = "icfamp_2.sitem", ["uiR2EDequipment_icfahp_2"] = "icfahp_2.sitem", }, boots = { ["uiR2EDequipment_icfamb"] = "icfamb.sitem", ["uiR2EDequipment_icfahb"] = "icfahb.sitem", ["uiR2EDequipment_icfamb_2"] = "icfamb_2.sitem", ["uiR2EDequipment_icfahb_2"] = "icfahb_2.sitem", }, arms_guard = { ["uiR2EDequipment_icfams"] = "icfams.sitem", ["uiR2EDequipment_icfahs"] = "icfahs.sitem", ["uiR2EDequipment_icfams_2"] = "icfams_2.sitem", ["uiR2EDequipment_icfahs_2"] = "icfahs_2.sitem", }, gloves = { ["uiR2EDequipment_icfahg"] = "icfahg.sitem", ["uiR2EDequipment_icfahg_2"] = "icfahg_2.sitem", }, hands = { ["uiR2EDequipment_icfm1ss"] = "icfm1ss.sitem:icfsb.sitem:slash", ["uiR2EDequipment_icfm1ss"] = "icfm1ss.sitem:icfss.sitem:slash", ["uiR2EDequipment_icfm1ss_2"] = "icfm1ss_2.sitem:icfsb_2.sitem:slash", ["uiR2EDequipment_icfm1ss_2"] = "icfm1ss_2.sitem:icfss_2.sitem:slash", ["uiR2EDequipment_icfm1sa"] = "icfm1sa.sitem:icfsb.sitem:slash", ["uiR2EDequipment_icfm1sa"] = "icfm1sa.sitem:icfss.sitem:slash", ["uiR2EDequipment_icfm1sa_2"] = "icfm1sa_2.sitem:icfsb_2.sitem:slash", ["uiR2EDequipment_icfm1sa_2"] = "icfm1sa_2.sitem:icfss_2.sitem:slash", ["uiR2EDequipment_icfm1bm"] = "icfm1bm.sitem:icfsb.sitem:blunt", ["uiR2EDequipment_icfm1bm"] = "icfm1bm.sitem:icfss.sitem:blunt", ["uiR2EDequipment_icfm1bm_2"] = "icfm1bm_2.sitem:icfsb_2.sitem:blunt", ["uiR2EDequipment_icfm1bm_2"] = "icfm1bm_2.sitem:icfss_2.sitem:blunt", ["uiR2EDequipment_icfm1ps"] = "icfm1ps.sitem:icfsb.sitem:pierce", ["uiR2EDequipment_icfm1ps"] = - "icfm1ps.sitem:icfss.sitem:pierce", ["uiR2EDequipment_icfm1ps_2"] = "icfm1ps_2.sitem:icfsb_2.sitem:pierce", ["uiR2EDequipment_icfm1ps_2"] = "icfm1ps_2.sitem:icfss_2.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.f_melee_tank_120, entries.f_melee_tank_120_equipment) - entries.m_melee_tank_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmahh"] = "icmahh.sitem", ["uiR2EDequipment_icmahh_2"] = "icmahh_2.sitem", }, chest_plate = { ["uiR2EDequipment_icmamv"] = "icmamv.sitem", ["uiR2EDequipment_icmahv"] = "icmahv.sitem", ["uiR2EDequipment_icmamv_2"] = "icmamv_2.sitem", ["uiR2EDequipment_icmahv_2"] = "icmahv_2.sitem", }, legs = { ["uiR2EDequipment_icmamp"] = "icmamp.sitem", ["uiR2EDequipment_icmahp"] = "icmahp.sitem", ["uiR2EDequipment_icmamp_2"] = "icmamp_2.sitem", ["uiR2EDequipment_icmahp_2"] = "icmahp_2.sitem", }, boots = { ["uiR2EDequipment_icmamb"] = "icmamb.sitem", ["uiR2EDequipment_icmahb"] = "icmahb.sitem", ["uiR2EDequipment_icmamb_2"] = "icmamb_2.sitem", ["uiR2EDequipment_icmahb_2"] = "icmahb_2.sitem", }, arms_guard = { ["uiR2EDequipment_icmams"] = "icmams.sitem", ["uiR2EDequipment_icmahs"] = "icmahs.sitem", ["uiR2EDequipment_icmams_2"] = "icmams_2.sitem", ["uiR2EDequipment_icmahs_2"] = "icmahs_2.sitem", }, gloves = { ["uiR2EDequipment_icmahg"] = "icmahg.sitem", ["uiR2EDequipment_icmahg_2"] = "icmahg_2.sitem", }, hands = { ["uiR2EDequipment_icmm1ss"] = "icmm1ss.sitem:icmsb.sitem:slash", ["uiR2EDequipment_icmm1ss"] = "icmm1ss.sitem:icmss.sitem:slash", ["uiR2EDequipment_icmm1ss_2"] = "icmm1ss_2.sitem:icmsb_2.sitem:slash", ["uiR2EDequipment_icmm1ss_2"] = "icmm1ss_2.sitem:icmss_2.sitem:slash", ["uiR2EDequipment_icmm1sa"] = "icmm1sa.sitem:icmsb.sitem:slash", ["uiR2EDequipment_icmm1sa"] = "icmm1sa.sitem:icmss.sitem:slash", ["uiR2EDequipment_icmm1sa_2"] = "icmm1sa_2.sitem:icmsb_2.sitem:slash", ["uiR2EDequipment_icmm1sa_2"] = "icmm1sa_2.sitem:icmss_2.sitem:slash", ["uiR2EDequipment_icmm1bm"] = "icmm1bm.sitem:icmsb.sitem:blunt", ["uiR2EDequipment_icmm1bm"] = "icmm1bm.sitem:icmss.sitem:blunt", ["uiR2EDequipment_icmm1bm_2"] = "icmm1bm_2.sitem:icmsb_2.sitem:blunt", ["uiR2EDequipment_icmm1bm_2"] = "icmm1bm_2.sitem:icmss_2.sitem:blunt", ["uiR2EDequipment_icmm1ps"] = "icmm1ps.sitem:icmsb.sitem:pierce", ["uiR2EDequipment_icmm1ps"] = - "icmm1ps.sitem:icmss.sitem:pierce", ["uiR2EDequipment_icmm1ps_2"] = "icmm1ps_2.sitem:icmsb_2.sitem:pierce", ["uiR2EDequipment_icmm1ps_2"] = "icmm1ps_2.sitem:icmss_2.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.m_melee_tank_120, entries.m_melee_tank_120_equipment) - entries.t_melee_tank_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictahh"] = "ictahh.sitem", ["uiR2EDequipment_ictahh_2"] = "ictahh_2.sitem", }, chest_plate = { ["uiR2EDequipment_ictamv"] = "ictamv.sitem", ["uiR2EDequipment_ictahv"] = "ictahv.sitem", ["uiR2EDequipment_ictamv_2"] = "ictamv_2.sitem", ["uiR2EDequipment_ictahv_2"] = "ictahv_2.sitem", }, legs = { ["uiR2EDequipment_ictamp"] = "ictamp.sitem", ["uiR2EDequipment_ictahp"] = "ictahp.sitem", ["uiR2EDequipment_ictamp_2"] = "ictamp_2.sitem", ["uiR2EDequipment_ictahp_2"] = "ictahp_2.sitem", }, boots = { ["uiR2EDequipment_ictamb"] = "ictamb.sitem", ["uiR2EDequipment_ictahb"] = "ictahb.sitem", ["uiR2EDequipment_ictamb_2"] = "ictamb_2.sitem", ["uiR2EDequipment_ictahb_2"] = "ictahb_2.sitem", }, arms_guard = { ["uiR2EDequipment_ictams"] = "ictams.sitem", ["uiR2EDequipment_ictahs"] = "ictahs.sitem", ["uiR2EDequipment_ictams_2"] = "ictams_2.sitem", ["uiR2EDequipment_ictahs_2"] = "ictahs_2.sitem", }, gloves = { ["uiR2EDequipment_ictahg"] = "ictahg.sitem", ["uiR2EDequipment_ictahg_2"] = "ictahg_2.sitem", }, hands = { ["uiR2EDequipment_ictm1ss"] = "ictm1ss.sitem:ictsb.sitem:slash", ["uiR2EDequipment_ictm1ss"] = "ictm1ss.sitem:ictss.sitem:slash", ["uiR2EDequipment_ictm1ss_2"] = "ictm1ss_2.sitem:ictsb_2.sitem:slash", ["uiR2EDequipment_ictm1ss_2"] = "ictm1ss_2.sitem:ictss_2.sitem:slash", ["uiR2EDequipment_ictm1sa"] = "ictm1sa.sitem:ictsb.sitem:slash", ["uiR2EDequipment_ictm1sa"] = "ictm1sa.sitem:ictss.sitem:slash", ["uiR2EDequipment_ictm1sa_2"] = "ictm1sa_2.sitem:ictsb_2.sitem:slash", ["uiR2EDequipment_ictm1sa_2"] = "ictm1sa_2.sitem:ictss_2.sitem:slash", ["uiR2EDequipment_ictm1bm"] = "ictm1bm.sitem:ictsb.sitem:blunt", ["uiR2EDequipment_ictm1bm"] = "ictm1bm.sitem:ictss.sitem:blunt", ["uiR2EDequipment_ictm1bm_2"] = "ictm1bm_2.sitem:ictsb_2.sitem:blunt", ["uiR2EDequipment_ictm1bm_2"] = "ictm1bm_2.sitem:ictss_2.sitem:blunt", ["uiR2EDequipment_ictm1ps"] = "ictm1ps.sitem:ictsb.sitem:pierce", ["uiR2EDequipment_ictm1ps"] = - "ictm1ps.sitem:ictss.sitem:pierce", ["uiR2EDequipment_ictm1ps_2"] = "ictm1ps_2.sitem:ictsb_2.sitem:pierce", ["uiR2EDequipment_ictm1ps_2"] = "ictm1ps_2.sitem:ictss_2.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.t_melee_tank_120, entries.t_melee_tank_120_equipment) - entries.z_melee_tank_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczahh"] = "iczahh.sitem", ["uiR2EDequipment_iczahh_2"] = "iczahh_2.sitem", }, chest_plate = { ["uiR2EDequipment_iczamv"] = "iczamv.sitem", ["uiR2EDequipment_iczahv"] = "iczahv.sitem", ["uiR2EDequipment_iczamv_2"] = "iczamv_2.sitem", ["uiR2EDequipment_iczahv_2"] = "iczahv_2.sitem", }, legs = { ["uiR2EDequipment_iczamp"] = "iczamp.sitem", ["uiR2EDequipment_iczahp"] = "iczahp.sitem", ["uiR2EDequipment_iczamp_2"] = "iczamp_2.sitem", ["uiR2EDequipment_iczahp_2"] = "iczahp_2.sitem", }, boots = { ["uiR2EDequipment_iczamb"] = "iczamb.sitem", ["uiR2EDequipment_iczahb"] = "iczahb.sitem", ["uiR2EDequipment_iczamb_2"] = "iczamb_2.sitem", ["uiR2EDequipment_iczahb_2"] = "iczahb_2.sitem", }, arms_guard = { ["uiR2EDequipment_iczams"] = "iczams.sitem", ["uiR2EDequipment_iczahs"] = "iczahs.sitem", ["uiR2EDequipment_iczams_2"] = "iczams_2.sitem", ["uiR2EDequipment_iczahs_2"] = "iczahs_2.sitem", }, gloves = { ["uiR2EDequipment_iczahg"] = "iczahg.sitem", ["uiR2EDequipment_iczahg_2"] = "iczahg_2.sitem", }, hands = { ["uiR2EDequipment_iczm1ss"] = "iczm1ss.sitem:iczsb.sitem:slash", ["uiR2EDequipment_iczm1ss"] = "iczm1ss.sitem:iczss.sitem:slash", ["uiR2EDequipment_iczm1ss_2"] = "iczm1ss_2.sitem:iczsb_2.sitem:slash", ["uiR2EDequipment_iczm1ss_2"] = "iczm1ss_2.sitem:iczss_2.sitem:slash", ["uiR2EDequipment_iczm1sa"] = "iczm1sa.sitem:iczsb.sitem:slash", ["uiR2EDequipment_iczm1sa"] = "iczm1sa.sitem:iczss.sitem:slash", ["uiR2EDequipment_iczm1sa_2"] = "iczm1sa_2.sitem:iczsb_2.sitem:slash", ["uiR2EDequipment_iczm1sa_2"] = "iczm1sa_2.sitem:iczss_2.sitem:slash", ["uiR2EDequipment_iczm1bm"] = "iczm1bm.sitem:iczsb.sitem:blunt", ["uiR2EDequipment_iczm1bm"] = "iczm1bm.sitem:iczss.sitem:blunt", ["uiR2EDequipment_iczm1bm_2"] = "iczm1bm_2.sitem:iczsb_2.sitem:blunt", ["uiR2EDequipment_iczm1bm_2"] = "iczm1bm_2.sitem:iczss_2.sitem:blunt", ["uiR2EDequipment_iczm1ps"] = "iczm1ps.sitem:iczsb.sitem:pierce", ["uiR2EDequipment_iczm1ps"] = - "iczm1ps.sitem:iczss.sitem:pierce", ["uiR2EDequipment_iczm1ps_2"] = "iczm1ps_2.sitem:iczsb_2.sitem:pierce", ["uiR2EDequipment_iczm1ps_2"] = "iczm1ps_2.sitem:iczss_2.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.z_melee_tank_120, entries.z_melee_tank_120_equipment) - - entries.f_melee_tank_170_equipment = { helmet = { ["uiR2EDequipment_icfahh_2"] = "icfahh_2.sitem", ["uiR2EDequipment_icfahh_3"] = "icfahh_3.sitem", }, chest_plate = { ["uiR2EDequipment_icfahv_2"] = "icfahv_2.sitem", ["uiR2EDequipment_icfahv_3"] = "icfahv_3.sitem", }, legs = { ["uiR2EDequipment_icfahp_2"] = "icfahp_2.sitem", ["uiR2EDequipment_icfahp_3"] = "icfahp_3.sitem", }, boots = { ["uiR2EDequipment_icfahb_2"] = "icfahb_2.sitem", ["uiR2EDequipment_icfahb_3"] = "icfahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icfahs_2"] = "icfahs_2.sitem", ["uiR2EDequipment_icfahs_3"] = "icfahs_3.sitem", }, gloves = { ["uiR2EDequipment_icfahg_2"] = "icfahg_2.sitem", ["uiR2EDequipment_icfahg_3"] = "icfahg_3.sitem", }, hands = { ["uiR2EDequipment_icfm1ss_2"] = "icfm1ss_2.sitem:icfsb_2.sitem:slash", ["uiR2EDequipment_icfm1ss_2"] = "icfm1ss_2.sitem:icfss_2.sitem:slash", ["uiR2EDequipment_icfm1ss_3"] = "icfm1ss_3.sitem:icfsb_3.sitem:slash", ["uiR2EDequipment_icfm1ss_3"] = "icfm1ss_3.sitem:icfss_3.sitem:slash", ["uiR2EDequipment_icfm1sa_2"] = "icfm1sa_2.sitem:icfsb_2.sitem:slash", ["uiR2EDequipment_icfm1sa_2"] = "icfm1sa_2.sitem:icfss_2.sitem:slash", ["uiR2EDequipment_icfm1sa_3"] = "icfm1sa_3.sitem:icfsb_3.sitem:slash", ["uiR2EDequipment_icfm1sa_3"] = "icfm1sa_3.sitem:icfss_3.sitem:slash", ["uiR2EDequipment_icfm1bm_2"] = "icfm1bm_2.sitem:icfsb_2.sitem:blunt", ["uiR2EDequipment_icfm1bm_2"] = "icfm1bm_2.sitem:icfss_2.sitem:blunt", ["uiR2EDequipment_icfm1bm_3"] = "icfm1bm_3.sitem:icfsb_3.sitem:blunt", ["uiR2EDequipment_icfm1bm_3"] = "icfm1bm_3.sitem:icfss_3.sitem:blunt", ["uiR2EDequipment_icfm1ps_2"] = "icfm1ps_2.sitem:icfsb_2.sitem:pierce", ["uiR2EDequipment_icfm1ps_2"] = "icfm1ps_2.sitem:icfss_2.sitem:pierce", ["uiR2EDequipment_icfm1ps_3"] = "icfm1ps_3.sitem:icfsb_3.sitem:pierce", ["uiR2EDequipment_icfm1ps_3"] = "icfm1ps_3.sitem:icfss_3.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.f_melee_tank_170, entries.f_melee_tank_170_equipment) - entries.m_melee_tank_170_equipment = { helmet = { ["uiR2EDequipment_icmahh_2"] = "icmahh_2.sitem", ["uiR2EDequipment_icmahh_3"] = "icmahh_3.sitem", }, chest_plate = { ["uiR2EDequipment_icmahv_2"] = "icmahv_2.sitem", ["uiR2EDequipment_icmahv_3"] = "icmahv_3.sitem", }, legs = { ["uiR2EDequipment_icmahp_2"] = "icmahp_2.sitem", ["uiR2EDequipment_icmahp_3"] = "icmahp_3.sitem", }, boots = { ["uiR2EDequipment_icmahb_2"] = "icmahb_2.sitem", ["uiR2EDequipment_icmahb_3"] = "icmahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icmahs_2"] = "icmahs_2.sitem", ["uiR2EDequipment_icmahs_3"] = "icmahs_3.sitem", }, gloves = { ["uiR2EDequipment_icmahg_2"] = "icmahg_2.sitem", ["uiR2EDequipment_icmahg_3"] = "icmahg_3.sitem", }, hands = { ["uiR2EDequipment_icmm1ss_2"] = "icmm1ss_2.sitem:icmsb_2.sitem:slash", ["uiR2EDequipment_icmm1ss_2"] = "icmm1ss_2.sitem:icmss_2.sitem:slash", ["uiR2EDequipment_icmm1ss_3"] = "icmm1ss_3.sitem:icmsb_3.sitem:slash", ["uiR2EDequipment_icmm1ss_3"] = "icmm1ss_3.sitem:icmss_3.sitem:slash", ["uiR2EDequipment_icmm1sa_2"] = "icmm1sa_2.sitem:icmsb_2.sitem:slash", ["uiR2EDequipment_icmm1sa_2"] = "icmm1sa_2.sitem:icmss_2.sitem:slash", ["uiR2EDequipment_icmm1sa_3"] = "icmm1sa_3.sitem:icmsb_3.sitem:slash", ["uiR2EDequipment_icmm1sa_3"] = "icmm1sa_3.sitem:icmss_3.sitem:slash", ["uiR2EDequipment_icmm1bm_2"] = "icmm1bm_2.sitem:icmsb_2.sitem:blunt", ["uiR2EDequipment_icmm1bm_2"] = "icmm1bm_2.sitem:icmss_2.sitem:blunt", ["uiR2EDequipment_icmm1bm_3"] = "icmm1bm_3.sitem:icmsb_3.sitem:blunt", ["uiR2EDequipment_icmm1bm_3"] = "icmm1bm_3.sitem:icmss_3.sitem:blunt", ["uiR2EDequipment_icmm1ps_2"] = "icmm1ps_2.sitem:icmsb_2.sitem:pierce", ["uiR2EDequipment_icmm1ps_2"] = "icmm1ps_2.sitem:icmss_2.sitem:pierce", ["uiR2EDequipment_icmm1ps_3"] = "icmm1ps_3.sitem:icmsb_3.sitem:pierce", ["uiR2EDequipment_icmm1ps_3"] = "icmm1ps_3.sitem:icmss_3.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.m_melee_tank_170, entries.m_melee_tank_170_equipment) - entries.t_melee_tank_170_equipment = { helmet = { ["uiR2EDequipment_ictahh_2"] = "ictahh_2.sitem", ["uiR2EDequipment_ictahh_3"] = "ictahh_3.sitem", }, chest_plate = { ["uiR2EDequipment_ictahv_2"] = "ictahv_2.sitem", ["uiR2EDequipment_ictahv_3"] = "ictahv_3.sitem", }, legs = { ["uiR2EDequipment_ictahp_2"] = "ictahp_2.sitem", ["uiR2EDequipment_ictahp_3"] = "ictahp_3.sitem", }, boots = { ["uiR2EDequipment_ictahb_2"] = "ictahb_2.sitem", ["uiR2EDequipment_ictahb_3"] = "ictahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_ictahs_2"] = "ictahs_2.sitem", ["uiR2EDequipment_ictahs_3"] = "ictahs_3.sitem", }, gloves = { ["uiR2EDequipment_ictahg_2"] = "ictahg_2.sitem", ["uiR2EDequipment_ictahg_3"] = "ictahg_3.sitem", }, hands = { ["uiR2EDequipment_ictm1ss_2"] = "ictm1ss_2.sitem:ictsb_2.sitem:slash", ["uiR2EDequipment_ictm1ss_2"] = "ictm1ss_2.sitem:ictss_2.sitem:slash", ["uiR2EDequipment_ictm1ss_3"] = "ictm1ss_3.sitem:ictsb_3.sitem:slash", ["uiR2EDequipment_ictm1ss_3"] = "ictm1ss_3.sitem:ictss_3.sitem:slash", ["uiR2EDequipment_ictm1sa_2"] = "ictm1sa_2.sitem:ictsb_2.sitem:slash", ["uiR2EDequipment_ictm1sa_2"] = "ictm1sa_2.sitem:ictss_2.sitem:slash", ["uiR2EDequipment_ictm1sa_3"] = "ictm1sa_3.sitem:ictsb_3.sitem:slash", ["uiR2EDequipment_ictm1sa_3"] = "ictm1sa_3.sitem:ictss_3.sitem:slash", ["uiR2EDequipment_ictm1bm_2"] = "ictm1bm_2.sitem:ictsb_2.sitem:blunt", ["uiR2EDequipment_ictm1bm_2"] = "ictm1bm_2.sitem:ictss_2.sitem:blunt", ["uiR2EDequipment_ictm1bm_3"] = "ictm1bm_3.sitem:ictsb_3.sitem:blunt", ["uiR2EDequipment_ictm1bm_3"] = "ictm1bm_3.sitem:ictss_3.sitem:blunt", ["uiR2EDequipment_ictm1ps_2"] = "ictm1ps_2.sitem:ictsb_2.sitem:pierce", ["uiR2EDequipment_ictm1ps_2"] = "ictm1ps_2.sitem:ictss_2.sitem:pierce", ["uiR2EDequipment_ictm1ps_3"] = "ictm1ps_3.sitem:ictsb_3.sitem:pierce", ["uiR2EDequipment_ictm1ps_3"] = "ictm1ps_3.sitem:ictss_3.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.t_melee_tank_170, entries.t_melee_tank_170_equipment) - entries.z_melee_tank_170_equipment = { helmet = { ["uiR2EDequipment_iczahh_2"] = "iczahh_2.sitem", ["uiR2EDequipment_iczahh_3"] = "iczahh_3.sitem", }, chest_plate = { ["uiR2EDequipment_iczahv_2"] = "iczahv_2.sitem", ["uiR2EDequipment_iczahv_3"] = "iczahv_3.sitem", }, legs = { ["uiR2EDequipment_iczahp_2"] = "iczahp_2.sitem", ["uiR2EDequipment_iczahp_3"] = "iczahp_3.sitem", }, boots = { ["uiR2EDequipment_iczahb_2"] = "iczahb_2.sitem", ["uiR2EDequipment_iczahb_3"] = "iczahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_iczahs_2"] = "iczahs_2.sitem", ["uiR2EDequipment_iczahs_3"] = "iczahs_3.sitem", }, gloves = { ["uiR2EDequipment_iczahg_2"] = "iczahg_2.sitem", ["uiR2EDequipment_iczahg_3"] = "iczahg_3.sitem", }, hands = { ["uiR2EDequipment_iczm1ss_2"] = "iczm1ss_2.sitem:iczsb_2.sitem:slash", ["uiR2EDequipment_iczm1ss_2"] = "iczm1ss_2.sitem:iczss_2.sitem:slash", ["uiR2EDequipment_iczm1ss_3"] = "iczm1ss_3.sitem:iczsb_3.sitem:slash", ["uiR2EDequipment_iczm1ss_3"] = "iczm1ss_3.sitem:iczss_3.sitem:slash", ["uiR2EDequipment_iczm1sa_2"] = "iczm1sa_2.sitem:iczsb_2.sitem:slash", ["uiR2EDequipment_iczm1sa_2"] = "iczm1sa_2.sitem:iczss_2.sitem:slash", ["uiR2EDequipment_iczm1sa_3"] = "iczm1sa_3.sitem:iczsb_3.sitem:slash", ["uiR2EDequipment_iczm1sa_3"] = "iczm1sa_3.sitem:iczss_3.sitem:slash", ["uiR2EDequipment_iczm1bm_2"] = "iczm1bm_2.sitem:iczsb_2.sitem:blunt", ["uiR2EDequipment_iczm1bm_2"] = "iczm1bm_2.sitem:iczss_2.sitem:blunt", ["uiR2EDequipment_iczm1bm_3"] = "iczm1bm_3.sitem:iczsb_3.sitem:blunt", ["uiR2EDequipment_iczm1bm_3"] = "iczm1bm_3.sitem:iczss_3.sitem:blunt", ["uiR2EDequipment_iczm1ps_2"] = "iczm1ps_2.sitem:iczsb_2.sitem:pierce", ["uiR2EDequipment_iczm1ps_2"] = "iczm1ps_2.sitem:iczss_2.sitem:pierce", ["uiR2EDequipment_iczm1ps_3"] = "iczm1ps_3.sitem:iczsb_3.sitem:pierce", ["uiR2EDequipment_iczm1ps_3"] = "iczm1ps_3.sitem:iczss_3.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.z_melee_tank_170, entries.z_melee_tank_170_equipment) - - entries.f_melee_tank_220_equipment = { helmet = { ["uiR2EDequipment_icfahh_2"] = "icfahh_2.sitem", ["uiR2EDequipment_icfahh_3"] = "icfahh_3.sitem", }, chest_plate = { ["uiR2EDequipment_icfahv_2"] = "icfahv_2.sitem", ["uiR2EDequipment_icfahv_3"] = "icfahv_3.sitem", }, legs = { ["uiR2EDequipment_icfahp_2"] = "icfahp_2.sitem", ["uiR2EDequipment_icfahp_3"] = "icfahp_3.sitem", }, boots = { ["uiR2EDequipment_icfahb_2"] = "icfahb_2.sitem", ["uiR2EDequipment_icfahb_3"] = "icfahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icfahs_2"] = "icfahs_2.sitem", ["uiR2EDequipment_icfahs_3"] = "icfahs_3.sitem", }, gloves = { ["uiR2EDequipment_icfahg_2"] = "icfahg_2.sitem", ["uiR2EDequipment_icfahg_3"] = "icfahg_3.sitem", }, hands = { ["uiR2EDequipment_icfm1ss_2"] = "icfm1ss_2.sitem:icfsb_2.sitem:slash", ["uiR2EDequipment_icfm1ss_2"] = "icfm1ss_2.sitem:icfss_2.sitem:slash", ["uiR2EDequipment_icfm1ss_3"] = "icfm1ss_3.sitem:icfsb_3.sitem:slash", ["uiR2EDequipment_icfm1ss_3"] = "icfm1ss_3.sitem:icfss_3.sitem:slash", ["uiR2EDequipment_icfm1sa_2"] = "icfm1sa_2.sitem:icfsb_2.sitem:slash", ["uiR2EDequipment_icfm1sa_2"] = "icfm1sa_2.sitem:icfss_2.sitem:slash", ["uiR2EDequipment_icfm1sa_3"] = "icfm1sa_3.sitem:icfsb_3.sitem:slash", ["uiR2EDequipment_icfm1sa_3"] = "icfm1sa_3.sitem:icfss_3.sitem:slash", ["uiR2EDequipment_icfm1bm_2"] = "icfm1bm_2.sitem:icfsb_2.sitem:blunt", ["uiR2EDequipment_icfm1bm_2"] = "icfm1bm_2.sitem:icfss_2.sitem:blunt", ["uiR2EDequipment_icfm1bm_3"] = "icfm1bm_3.sitem:icfsb_3.sitem:blunt", ["uiR2EDequipment_icfm1bm_3"] = "icfm1bm_3.sitem:icfss_3.sitem:blunt", ["uiR2EDequipment_icfm1ps_2"] = "icfm1ps_2.sitem:icfsb_2.sitem:pierce", ["uiR2EDequipment_icfm1ps_2"] = "icfm1ps_2.sitem:icfss_2.sitem:pierce", ["uiR2EDequipment_icfm1ps_3"] = "icfm1ps_3.sitem:icfsb_3.sitem:pierce", ["uiR2EDequipment_icfm1ps_3"] = "icfm1ps_3.sitem:icfss_3.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.f_melee_tank_220, entries.f_melee_tank_220_equipment) - entries.m_melee_tank_220_equipment = { helmet = { ["uiR2EDequipment_icmahh_2"] = "icmahh_2.sitem", ["uiR2EDequipment_icmahh_3"] = "icmahh_3.sitem", }, chest_plate = { ["uiR2EDequipment_icmahv_2"] = "icmahv_2.sitem", ["uiR2EDequipment_icmahv_3"] = "icmahv_3.sitem", }, legs = { ["uiR2EDequipment_icmahp_2"] = "icmahp_2.sitem", ["uiR2EDequipment_icmahp_3"] = "icmahp_3.sitem", }, boots = { ["uiR2EDequipment_icmahb_2"] = "icmahb_2.sitem", ["uiR2EDequipment_icmahb_3"] = "icmahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icmahs_2"] = "icmahs_2.sitem", ["uiR2EDequipment_icmahs_3"] = "icmahs_3.sitem", }, gloves = { ["uiR2EDequipment_icmahg_2"] = "icmahg_2.sitem", ["uiR2EDequipment_icmahg_3"] = "icmahg_3.sitem", }, hands = { ["uiR2EDequipment_icmm1ss_2"] = "icmm1ss_2.sitem:icmsb_2.sitem:slash", ["uiR2EDequipment_icmm1ss_2"] = "icmm1ss_2.sitem:icmss_2.sitem:slash", ["uiR2EDequipment_icmm1ss_3"] = "icmm1ss_3.sitem:icmsb_3.sitem:slash", ["uiR2EDequipment_icmm1ss_3"] = "icmm1ss_3.sitem:icmss_3.sitem:slash", ["uiR2EDequipment_icmm1sa_2"] = "icmm1sa_2.sitem:icmsb_2.sitem:slash", ["uiR2EDequipment_icmm1sa_2"] = "icmm1sa_2.sitem:icmss_2.sitem:slash", ["uiR2EDequipment_icmm1sa_3"] = "icmm1sa_3.sitem:icmsb_3.sitem:slash", ["uiR2EDequipment_icmm1sa_3"] = "icmm1sa_3.sitem:icmss_3.sitem:slash", ["uiR2EDequipment_icmm1bm_2"] = "icmm1bm_2.sitem:icmsb_2.sitem:blunt", ["uiR2EDequipment_icmm1bm_2"] = "icmm1bm_2.sitem:icmss_2.sitem:blunt", ["uiR2EDequipment_icmm1bm_3"] = "icmm1bm_3.sitem:icmsb_3.sitem:blunt", ["uiR2EDequipment_icmm1bm_3"] = "icmm1bm_3.sitem:icmss_3.sitem:blunt", ["uiR2EDequipment_icmm1ps_2"] = "icmm1ps_2.sitem:icmsb_2.sitem:pierce", ["uiR2EDequipment_icmm1ps_2"] = "icmm1ps_2.sitem:icmss_2.sitem:pierce", ["uiR2EDequipment_icmm1ps_3"] = "icmm1ps_3.sitem:icmsb_3.sitem:pierce", ["uiR2EDequipment_icmm1ps_3"] = "icmm1ps_3.sitem:icmss_3.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.m_melee_tank_220, entries.m_melee_tank_220_equipment) - entries.t_melee_tank_220_equipment = { helmet = { ["uiR2EDequipment_ictahh_2"] = "ictahh_2.sitem", ["uiR2EDequipment_ictahh_3"] = "ictahh_3.sitem", }, chest_plate = { ["uiR2EDequipment_ictahv_2"] = "ictahv_2.sitem", ["uiR2EDequipment_ictahv_3"] = "ictahv_3.sitem", }, legs = { ["uiR2EDequipment_ictahp_2"] = "ictahp_2.sitem", ["uiR2EDequipment_ictahp_3"] = "ictahp_3.sitem", }, boots = { ["uiR2EDequipment_ictahb_2"] = "ictahb_2.sitem", ["uiR2EDequipment_ictahb_3"] = "ictahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_ictahs_2"] = "ictahs_2.sitem", ["uiR2EDequipment_ictahs_3"] = "ictahs_3.sitem", }, gloves = { ["uiR2EDequipment_ictahg_2"] = "ictahg_2.sitem", ["uiR2EDequipment_ictahg_3"] = "ictahg_3.sitem", }, hands = { ["uiR2EDequipment_ictm1ss_2"] = "ictm1ss_2.sitem:ictsb_2.sitem:slash", ["uiR2EDequipment_ictm1ss_2"] = "ictm1ss_2.sitem:ictss_2.sitem:slash", ["uiR2EDequipment_ictm1ss_3"] = "ictm1ss_3.sitem:ictsb_3.sitem:slash", ["uiR2EDequipment_ictm1ss_3"] = "ictm1ss_3.sitem:ictss_3.sitem:slash", ["uiR2EDequipment_ictm1sa_2"] = "ictm1sa_2.sitem:ictsb_2.sitem:slash", ["uiR2EDequipment_ictm1sa_2"] = "ictm1sa_2.sitem:ictss_2.sitem:slash", ["uiR2EDequipment_ictm1sa_3"] = "ictm1sa_3.sitem:ictsb_3.sitem:slash", ["uiR2EDequipment_ictm1sa_3"] = "ictm1sa_3.sitem:ictss_3.sitem:slash", ["uiR2EDequipment_ictm1bm_2"] = "ictm1bm_2.sitem:ictsb_2.sitem:blunt", ["uiR2EDequipment_ictm1bm_2"] = "ictm1bm_2.sitem:ictss_2.sitem:blunt", ["uiR2EDequipment_ictm1bm_3"] = "ictm1bm_3.sitem:ictsb_3.sitem:blunt", ["uiR2EDequipment_ictm1bm_3"] = "ictm1bm_3.sitem:ictss_3.sitem:blunt", ["uiR2EDequipment_ictm1ps_2"] = "ictm1ps_2.sitem:ictsb_2.sitem:pierce", ["uiR2EDequipment_ictm1ps_2"] = "ictm1ps_2.sitem:ictss_2.sitem:pierce", ["uiR2EDequipment_ictm1ps_3"] = "ictm1ps_3.sitem:ictsb_3.sitem:pierce", ["uiR2EDequipment_ictm1ps_3"] = "ictm1ps_3.sitem:ictss_3.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.t_melee_tank_220, entries.t_melee_tank_220_equipment) - entries.z_melee_tank_220_equipment = { helmet = { ["uiR2EDequipment_iczahh_2"] = "iczahh_2.sitem", ["uiR2EDequipment_iczahh_3"] = "iczahh_3.sitem", }, chest_plate = { ["uiR2EDequipment_iczahv_2"] = "iczahv_2.sitem", ["uiR2EDequipment_iczahv_3"] = "iczahv_3.sitem", }, legs = { ["uiR2EDequipment_iczahp_2"] = "iczahp_2.sitem", ["uiR2EDequipment_iczahp_3"] = "iczahp_3.sitem", }, boots = { ["uiR2EDequipment_iczahb_2"] = "iczahb_2.sitem", ["uiR2EDequipment_iczahb_3"] = "iczahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_iczahs_2"] = "iczahs_2.sitem", ["uiR2EDequipment_iczahs_3"] = "iczahs_3.sitem", }, gloves = { ["uiR2EDequipment_iczahg_2"] = "iczahg_2.sitem", ["uiR2EDequipment_iczahg_3"] = "iczahg_3.sitem", }, hands = { ["uiR2EDequipment_iczm1ss_2"] = "iczm1ss_2.sitem:iczsb_2.sitem:slash", ["uiR2EDequipment_iczm1ss_2"] = "iczm1ss_2.sitem:iczss_2.sitem:slash", ["uiR2EDequipment_iczm1ss_3"] = "iczm1ss_3.sitem:iczsb_3.sitem:slash", ["uiR2EDequipment_iczm1ss_3"] = "iczm1ss_3.sitem:iczss_3.sitem:slash", ["uiR2EDequipment_iczm1sa_2"] = "iczm1sa_2.sitem:iczsb_2.sitem:slash", ["uiR2EDequipment_iczm1sa_2"] = "iczm1sa_2.sitem:iczss_2.sitem:slash", ["uiR2EDequipment_iczm1sa_3"] = "iczm1sa_3.sitem:iczsb_3.sitem:slash", ["uiR2EDequipment_iczm1sa_3"] = "iczm1sa_3.sitem:iczss_3.sitem:slash", ["uiR2EDequipment_iczm1bm_2"] = "iczm1bm_2.sitem:iczsb_2.sitem:blunt", ["uiR2EDequipment_iczm1bm_2"] = "iczm1bm_2.sitem:iczss_2.sitem:blunt", ["uiR2EDequipment_iczm1bm_3"] = "iczm1bm_3.sitem:iczsb_3.sitem:blunt", ["uiR2EDequipment_iczm1bm_3"] = "iczm1bm_3.sitem:iczss_3.sitem:blunt", ["uiR2EDequipment_iczm1ps_2"] = "iczm1ps_2.sitem:iczsb_2.sitem:pierce", ["uiR2EDequipment_iczm1ps_2"] = "iczm1ps_2.sitem:iczss_2.sitem:pierce", ["uiR2EDequipment_iczm1ps_3"] = "iczm1ps_3.sitem:iczsb_3.sitem:pierce", ["uiR2EDequipment_iczm1ps_3"] = "iczm1ps_3.sitem:iczss_3.sitem:pierce", }, } r2.addR2PlayerEquipment(entries.z_melee_tank_220, entries.z_melee_tank_220_equipment) - - - --- Light - - entries.f_light_melee_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_pierce_b2.creature", SheetModel="ring_light_melee_$hands_b$level.creature", SheetClient="basic_fyros_male.creature", Level=20, RingAccess="a1", Equipment="f_light_melee_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_light_melee_20", entries.f_light_melee_20) - entries.m_light_melee_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_pierce_b2.creature", SheetModel="ring_light_melee_$hands_b$level.creature", SheetClient="basic_matis_male.creature", Level=20, RingAccess="a1", Equipment="m_light_melee_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_light_melee_20", entries.m_light_melee_20) - entries.t_light_melee_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_pierce_b2.creature", SheetModel="ring_light_melee_$hands_b$level.creature", SheetClient="basic_tryker_male.creature", Level=20, RingAccess="a1", Equipment="t_light_melee_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_light_melee_20", entries.t_light_melee_20) - entries.z_light_melee_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_pierce_b2.creature", SheetModel="ring_light_melee_$hands_b$level.creature", SheetClient="basic_zorai_male.creature", Level=20, RingAccess="a1", Equipment="z_light_melee_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_light_melee_20", entries.z_light_melee_20) - - entries.f_light_melee_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_pierce_c2.creature", SheetModel="ring_light_melee_$hands_c$level.creature", SheetClient="basic_fyros_male.creature", Level=70, RingAccess="d2", Equipment="f_light_melee_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_light_melee_70", entries.f_light_melee_70) - entries.m_light_melee_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_pierce_c2.creature", SheetModel="ring_light_melee_$hands_c$level.creature", SheetClient="basic_matis_male.creature", Level=70, RingAccess="f5", Equipment="m_light_melee_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_light_melee_70", entries.m_light_melee_70) - entries.t_light_melee_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_pierce_c2.creature", SheetModel="ring_light_melee_$hands_c$level.creature", SheetClient="basic_tryker_male.creature", Level=70, RingAccess="l5", Equipment="t_light_melee_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_light_melee_70", entries.t_light_melee_70) - entries.z_light_melee_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_pierce_c2.creature", SheetModel="ring_light_melee_$hands_c$level.creature", SheetClient="basic_zorai_male.creature", Level=70, RingAccess="j5", Equipment="z_light_melee_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_light_melee_70", entries.z_light_melee_70) - - entries.f_light_melee_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_slash_d2.creature", SheetModel="ring_light_melee_$hands_d$level.creature", SheetClient="basic_fyros_male.creature", Level=120, RingAccess="d4", Equipment="f_light_melee_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_light_melee_120", entries.f_light_melee_120) - entries.m_light_melee_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_slash_d2.creature", SheetModel="ring_light_melee_$hands_d$level.creature", SheetClient="basic_matis_male.creature", Level=120, RingAccess="f5", Equipment="m_light_melee_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_light_melee_120", entries.m_light_melee_120) - entries.t_light_melee_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_slash_d2.creature", SheetModel="ring_light_melee_$hands_d$level.creature", SheetClient="basic_tryker_male.creature", Level=120, RingAccess="l5", Equipment="t_light_melee_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_light_melee_120", entries.t_light_melee_120) - entries.z_light_melee_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_slash_d2.creature", SheetModel="ring_light_melee_$hands_d$level.creature", SheetClient="basic_zorai_male.creature", Level=120, RingAccess="j5", Equipment="z_light_melee_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_light_melee_120", entries.z_light_melee_120) - - entries.f_light_melee_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_slash_e2.creature", SheetModel="ring_light_melee_$hands_e$level.creature", SheetClient="basic_fyros_male.creature", Level=170, RingAccess="d6", Equipment="f_light_melee_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_light_melee_170", entries.f_light_melee_170) - entries.m_light_melee_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_slash_e2.creature", SheetModel="ring_light_melee_$hands_e$level.creature", SheetClient="basic_matis_male.creature", Level=170, RingAccess="f6", Equipment="m_light_melee_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_light_melee_170", entries.m_light_melee_170) - entries.t_light_melee_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_slash_e2.creature", SheetModel="ring_light_melee_$hands_e$level.creature", SheetClient="basic_tryker_male.creature", Level=170, RingAccess="l5", Equipment="t_light_melee_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_light_melee_170", entries.t_light_melee_170) - entries.z_light_melee_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_slash_e2.creature", SheetModel="ring_light_melee_$hands_e$level.creature", SheetClient="basic_zorai_male.creature", Level=170, RingAccess="j6", Equipment="z_light_melee_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_light_melee_170", entries.z_light_melee_170) - - entries.f_light_melee_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_slash_f2.creature", SheetModel="ring_light_melee_$hands_f$level.creature", SheetClient="basic_fyros_male.creature", Level=220, RingAccess="d7", Equipment="f_light_melee_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_light_melee_220", entries.f_light_melee_220) - entries.m_light_melee_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_slash_f2.creature", SheetModel="ring_light_melee_$hands_f$level.creature", SheetClient="basic_matis_male.creature", Level=220, RingAccess="f7", Equipment="m_light_melee_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_light_melee_220", entries.m_light_melee_220) - entries.t_light_melee_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_slash_f2.creature", SheetModel="ring_light_melee_$hands_f$level.creature", SheetClient="basic_tryker_male.creature", Level=220, RingAccess="l6", Equipment="t_light_melee_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_light_melee_220", entries.t_light_melee_220) - entries.z_light_melee_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_light_melee_slash_f2.creature", SheetModel="ring_light_melee_$hands_f$level.creature", SheetClient="basic_zorai_male.creature", Level=220, RingAccess="j7", Equipment="z_light_melee_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_light_melee_220", entries.z_light_melee_220) - - - - entries.f_light_melee_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalv"] = "icfalv.sitem", }, legs = { ["uiR2EDequipment_icfalp"] = "icfalp.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalg"] = "icfalg.sitem", }, hands = { ["uiR2EDequipment_icfm1ss"] = "icfm1ss.sitem::slash", ["uiR2EDequipment_icfm1sa"] = "icfm1sa.sitem::slash", ["uiR2EDequipment_icfm1pd"] = "icfm1pd.sitem:icfm1pd.sitem:pierce", ["uiR2EDequipment_icfm1bm"] = "icfm1bm.sitem::blunt", ["uiR2EDequipment_icfm1ps"] = "icfm1ps.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.f_light_melee_20, entries.f_light_melee_20_equipment) - entries.m_light_melee_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalv"] = "icmalv.sitem", }, legs = { ["uiR2EDequipment_icmalp"] = "icmalp.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalg"] = "icmalg.sitem", }, hands = { ["uiR2EDequipment_icmm1ss"] = "icmm1ss.sitem::slash", ["uiR2EDequipment_icmm1sa"] = "icmm1sa.sitem::slash", ["uiR2EDequipment_icmm1pd"] = "icmm1pd.sitem:icmm1pd.sitem:pierce", ["uiR2EDequipment_icmm1bm"] = "icmm1bm.sitem::blunt", ["uiR2EDequipment_icmm1ps"] = "icmm1ps.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.m_light_melee_20, entries.m_light_melee_20_equipment) - entries.t_light_melee_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalv"] = "ictalv.sitem", }, legs = { ["uiR2EDequipment_ictalp"] = "ictalp.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalg"] = "ictalg.sitem", }, hands = { ["uiR2EDequipment_ictm1ss"] = "ictm1ss.sitem::slash", ["uiR2EDequipment_ictm1sa"] = "ictm1sa.sitem::slash", ["uiR2EDequipment_ictm1pd"] = "ictm1pd.sitem:ictm1pd.sitem:pierce", ["uiR2EDequipment_ictm1bm"] = "ictm1bm.sitem::blunt", ["uiR2EDequipment_ictm1ps"] = "ictm1ps.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.t_light_melee_20, entries.t_light_melee_20_equipment) - entries.z_light_melee_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalv"] = "iczalv.sitem", }, legs = { ["uiR2EDequipment_iczalp"] = "iczalp.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalg"] = "iczalg.sitem", }, hands = { ["uiR2EDequipment_iczm1ss"] = "iczm1ss.sitem::slash", ["uiR2EDequipment_iczm1sa"] = "iczm1sa.sitem::slash", ["uiR2EDequipment_iczm1pd"] = "iczm1pd.sitem:iczm1pd.sitem:pierce", ["uiR2EDequipment_iczm1bm"] = "iczm1bm.sitem::blunt", ["uiR2EDequipment_iczm1ps"] = "iczm1ps.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.z_light_melee_20, entries.z_light_melee_20_equipment) - - entries.f_light_melee_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", }, legs = { ["uiR2EDequipment_icfalp"] = "icfalp.sitem", ["uiR2EDequipment_icfalp_2"] = "icfalp_2.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalg"] = "icfalg.sitem", ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", }, hands = { ["uiR2EDequipment_icfm1ss"] = "icfm1ss.sitem::slash", ["uiR2EDequipment_icfm1ss_2"] = "icfm1ss_2.sitem::slash", ["uiR2EDequipment_icfm1sa"] = "icfm1sa.sitem::slash", ["uiR2EDequipment_icfm1sa_2"] = "icfm1sa_2.sitem::slash", ["uiR2EDequipment_icfm1pd"] = "icfm1pd.sitem:icfm1pd.sitem:pierce", ["uiR2EDequipment_icfm1pd_2"] = "icfm1pd_2.sitem:icfm1pd_2.sitem:pierce", ["uiR2EDequipment_icfm1bm"] = "icfm1bm.sitem::blunt", ["uiR2EDequipment_icfm1bm_2"] = "icfm1bm_2.sitem::blunt", ["uiR2EDequipment_icfm1ps"] = "icfm1ps.sitem::pierce", ["uiR2EDequipment_icfm1ps_2"] = "icfm1ps_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.f_light_melee_70, entries.f_light_melee_70_equipment) - entries.m_light_melee_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", }, legs = { ["uiR2EDequipment_icmalp"] = "icmalp.sitem", ["uiR2EDequipment_icmalp_2"] = "icmalp_2.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalg"] = "icmalg.sitem", ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", }, hands = { ["uiR2EDequipment_icmm1ss"] = "icmm1ss.sitem::slash", ["uiR2EDequipment_icmm1ss_2"] = "icmm1ss_2.sitem::slash", ["uiR2EDequipment_icmm1sa"] = "icmm1sa.sitem::slash", ["uiR2EDequipment_icmm1sa_2"] = "icmm1sa_2.sitem::slash", ["uiR2EDequipment_icmm1pd"] = "icmm1pd.sitem:icmm1pd.sitem:pierce", ["uiR2EDequipment_icmm1pd_2"] = "icmm1pd_2.sitem:icmm1pd_2.sitem:pierce", ["uiR2EDequipment_icmm1bm"] = "icmm1bm.sitem::blunt", ["uiR2EDequipment_icmm1bm_2"] = "icmm1bm_2.sitem::blunt", ["uiR2EDequipment_icmm1ps"] = "icmm1ps.sitem::pierce", ["uiR2EDequipment_icmm1ps_2"] = "icmm1ps_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.m_light_melee_70, entries.m_light_melee_70_equipment) - entries.t_light_melee_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", }, legs = { ["uiR2EDequipment_ictalp"] = "ictalp.sitem", ["uiR2EDequipment_ictalp_2"] = "ictalp_2.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalg"] = "ictalg.sitem", ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", }, hands = { ["uiR2EDequipment_ictm1ss"] = "ictm1ss.sitem::slash", ["uiR2EDequipment_ictm1ss_2"] = "ictm1ss_2.sitem::slash", ["uiR2EDequipment_ictm1sa"] = "ictm1sa.sitem::slash", ["uiR2EDequipment_ictm1sa_2"] = "ictm1sa_2.sitem::slash", ["uiR2EDequipment_ictm1pd"] = "ictm1pd.sitem:ictm1pd.sitem:pierce", ["uiR2EDequipment_ictm1pd_2"] = "ictm1pd_2.sitem:ictm1pd_2.sitem:pierce", ["uiR2EDequipment_ictm1bm"] = "ictm1bm.sitem::blunt", ["uiR2EDequipment_ictm1bm_2"] = "ictm1bm_2.sitem::blunt", ["uiR2EDequipment_ictm1ps"] = "ictm1ps.sitem::pierce", ["uiR2EDequipment_ictm1ps_2"] = "ictm1ps_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.t_light_melee_70, entries.t_light_melee_70_equipment) - entries.z_light_melee_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", }, legs = { ["uiR2EDequipment_iczalp"] = "iczalp.sitem", ["uiR2EDequipment_iczalp_2"] = "iczalp_2.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalg"] = "iczalg.sitem", ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", }, hands = { ["uiR2EDequipment_iczm1ss"] = "iczm1ss.sitem::slash", ["uiR2EDequipment_iczm1ss_2"] = "iczm1ss_2.sitem::slash", ["uiR2EDequipment_iczm1sa"] = "iczm1sa.sitem::slash", ["uiR2EDequipment_iczm1sa_2"] = "iczm1sa_2.sitem::slash", ["uiR2EDequipment_iczm1pd"] = "iczm1pd.sitem:iczm1pd.sitem:pierce", ["uiR2EDequipment_iczm1pd_2"] = "iczm1pd_2.sitem:iczm1pd_2.sitem:pierce", ["uiR2EDequipment_iczm1bm"] = "iczm1bm.sitem::blunt", ["uiR2EDequipment_iczm1bm_2"] = "iczm1bm_2.sitem::blunt", ["uiR2EDequipment_iczm1ps"] = "iczm1ps.sitem::pierce", ["uiR2EDequipment_iczm1ps_2"] = "iczm1ps_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.z_light_melee_70, entries.z_light_melee_70_equipment) - - entries.f_light_melee_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfamv"] = "icfamv.sitem", ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", ["uiR2EDequipment_icfamv_2"] = "icfamv_2.sitem", }, legs = { ["uiR2EDequipment_icfalp"] = "icfalp.sitem", ["uiR2EDequipment_icfalp_2"] = "icfalp_2.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfamg"] = "icfamg.sitem", ["uiR2EDequipment_icfamg_2"] = "icfamg_2.sitem", }, hands = { ["uiR2EDequipment_icfm1ss"] = "icfm1ss.sitem::slash", ["uiR2EDequipment_icfm1ss_2"] = "icfm1ss_2.sitem::slash", ["uiR2EDequipment_icfm1sa"] = "icfm1sa.sitem::slash", ["uiR2EDequipment_icfm1sa_2"] = "icfm1sa_2.sitem::slash", ["uiR2EDequipment_icfm1pd"] = "icfm1pd.sitem:icfm1pd.sitem:pierce", ["uiR2EDequipment_icfm1pd_2"] = "icfm1pd_2.sitem:icfm1pd_2.sitem:pierce", ["uiR2EDequipment_icfm1bm"] = "icfm1bm.sitem::blunt", ["uiR2EDequipment_icfm1bm_2"] = "icfm1bm_2.sitem::blunt", ["uiR2EDequipment_icfm1ps"] = "icfm1ps.sitem::pierce", ["uiR2EDequipment_icfm1ps_2"] = "icfm1ps_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.f_light_melee_120, entries.f_light_melee_120_equipment) - entries.m_light_melee_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmamv"] = "icmamv.sitem", ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", ["uiR2EDequipment_icmamv_2"] = "icmamv_2.sitem", }, legs = { ["uiR2EDequipment_icmalp"] = "icmalp.sitem", ["uiR2EDequipment_icmalp_2"] = "icmalp_2.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmamg"] = "icmamg.sitem", ["uiR2EDequipment_icmamg_2"] = "icmamg_2.sitem", }, hands = { ["uiR2EDequipment_icmm1ss"] = "icmm1ss.sitem::slash", ["uiR2EDequipment_icmm1ss_2"] = "icmm1ss_2.sitem::slash", ["uiR2EDequipment_icmm1sa"] = "icmm1sa.sitem::slash", ["uiR2EDequipment_icmm1sa_2"] = "icmm1sa_2.sitem::slash", ["uiR2EDequipment_icmm1pd"] = "icmm1pd.sitem:icmm1pd.sitem:pierce", ["uiR2EDequipment_icmm1pd_2"] = "icmm1pd_2.sitem:icmm1pd_2.sitem:pierce", ["uiR2EDequipment_icmm1bm"] = "icmm1bm.sitem::blunt", ["uiR2EDequipment_icmm1bm_2"] = "icmm1bm_2.sitem::blunt", ["uiR2EDequipment_icmm1ps"] = "icmm1ps.sitem::pierce", ["uiR2EDequipment_icmm1ps_2"] = "icmm1ps_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.m_light_melee_120, entries.m_light_melee_120_equipment) - entries.t_light_melee_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictamv"] = "ictamv.sitem", ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", ["uiR2EDequipment_ictamv_2"] = "ictamv_2.sitem", }, legs = { ["uiR2EDequipment_ictalp"] = "ictalp.sitem", ["uiR2EDequipment_ictalp_2"] = "ictalp_2.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictamg"] = "ictamg.sitem", ["uiR2EDequipment_ictamg_2"] = "ictamg_2.sitem", }, hands = { ["uiR2EDequipment_ictm1ss"] = "ictm1ss.sitem::slash", ["uiR2EDequipment_ictm1ss_2"] = "ictm1ss_2.sitem::slash", ["uiR2EDequipment_ictm1sa"] = "ictm1sa.sitem::slash", ["uiR2EDequipment_ictm1sa_2"] = "ictm1sa_2.sitem::slash", ["uiR2EDequipment_ictm1pd"] = "ictm1pd.sitem:ictm1pd.sitem:pierce", ["uiR2EDequipment_ictm1pd_2"] = "ictm1pd_2.sitem:ictm1pd_2.sitem:pierce", ["uiR2EDequipment_ictm1bm"] = "ictm1bm.sitem::blunt", ["uiR2EDequipment_ictm1bm_2"] = "ictm1bm_2.sitem::blunt", ["uiR2EDequipment_ictm1ps"] = "ictm1ps.sitem::pierce", ["uiR2EDequipment_ictm1ps_2"] = "ictm1ps_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.t_light_melee_120, entries.t_light_melee_120_equipment) - entries.z_light_melee_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczamv"] = "iczamv.sitem", ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", ["uiR2EDequipment_iczamv_2"] = "iczamv_2.sitem", }, legs = { ["uiR2EDequipment_iczalp"] = "iczalp.sitem", ["uiR2EDequipment_iczalp_2"] = "iczalp_2.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczamg"] = "iczamg.sitem", ["uiR2EDequipment_iczamg_2"] = "iczamg_2.sitem", }, hands = { ["uiR2EDequipment_iczm1ss"] = "iczm1ss.sitem::slash", ["uiR2EDequipment_iczm1ss_2"] = "iczm1ss_2.sitem::slash", ["uiR2EDequipment_iczm1sa"] = "iczm1sa.sitem::slash", ["uiR2EDequipment_iczm1sa_2"] = "iczm1sa_2.sitem::slash", ["uiR2EDequipment_iczm1pd"] = "iczm1pd.sitem:iczm1pd.sitem:pierce", ["uiR2EDequipment_iczm1pd_2"] = "iczm1pd_2.sitem:iczm1pd_2.sitem:pierce", ["uiR2EDequipment_iczm1bm"] = "iczm1bm.sitem::blunt", ["uiR2EDequipment_iczm1bm_2"] = "iczm1bm_2.sitem::blunt", ["uiR2EDequipment_iczm1ps"] = "iczm1ps.sitem::pierce", ["uiR2EDequipment_iczm1ps_2"] = "iczm1ps_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.z_light_melee_120, entries.z_light_melee_120_equipment) - - entries.f_light_melee_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", ["uiR2EDequipment_icfamv_2"] = "icfamv_2.sitem", ["uiR2EDequipment_icfalv_3"] = "icfalv_3.sitem", ["uiR2EDequipment_icfamv_3"] = "icfamv_3.sitem", }, legs = { ["uiR2EDequipment_icfalp_2"] = "icfalp_2.sitem", ["uiR2EDequipment_icfamp_2"] = "icfamp_2.sitem", ["uiR2EDequipment_icfalp_3"] = "icfalp_3.sitem", ["uiR2EDequipment_icfamp_3"] = "icfamp_3.sitem", }, boots = { ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", ["uiR2EDequipment_icfamb_2"] = "icfamb_2.sitem", ["uiR2EDequipment_icfalb_3"] = "icfalb_3.sitem", ["uiR2EDequipment_icfamb_3"] = "icfamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", ["uiR2EDequipment_icfals_3"] = "icfals_3.sitem", }, gloves = { ["uiR2EDequipment_icfamg_2"] = "icfamg_2.sitem", ["uiR2EDequipment_icfamg_3"] = "icfamg_3.sitem", }, hands = { ["uiR2EDequipment_icfm1ss_2"] = "icfm1ss_2.sitem::slash", ["uiR2EDequipment_icfm1ss_3"] = "icfm1ss_3.sitem::slash", ["uiR2EDequipment_icfm1sa_2"] = "icfm1sa_2.sitem::slash", ["uiR2EDequipment_icfm1sa_3"] = "icfm1sa_3.sitem::slash", ["uiR2EDequipment_icfm1pd_2"] = "icfm1pd_2.sitem:icfm1pd_2.sitem:pierce", ["uiR2EDequipment_icfm1pd_3"] = "icfm1pd_3.sitem:icfm1pd_3.sitem:pierce", ["uiR2EDequipment_icfm1bm_2"] = "icfm1bm_2.sitem::blunt", ["uiR2EDequipment_icfm1bm_3"] = "icfm1bm_3.sitem::blunt", ["uiR2EDequipment_icfm1ps_2"] = "icfm1ps_2.sitem::pierce", ["uiR2EDequipment_icfm1ps_3"] = "icfm1ps_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.f_light_melee_170, entries.f_light_melee_170_equipment) - entries.m_light_melee_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", ["uiR2EDequipment_icmamv_2"] = "icmamv_2.sitem", ["uiR2EDequipment_icmalv_3"] = "icmalv_3.sitem", ["uiR2EDequipment_icmamv_3"] = "icmamv_3.sitem", }, legs = { ["uiR2EDequipment_icmalp_2"] = "icmalp_2.sitem", ["uiR2EDequipment_icmamp_2"] = "icmamp_2.sitem", ["uiR2EDequipment_icmalp_3"] = "icmalp_3.sitem", ["uiR2EDequipment_icmamp_3"] = "icmamp_3.sitem", }, boots = { ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", ["uiR2EDequipment_icmamb_2"] = "icmamb_2.sitem", ["uiR2EDequipment_icmalb_3"] = "icmalb_3.sitem", ["uiR2EDequipment_icmamb_3"] = "icmamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", ["uiR2EDequipment_icmals_3"] = "icmals_3.sitem", }, gloves = { ["uiR2EDequipment_icmamg_2"] = "icmamg_2.sitem", ["uiR2EDequipment_icmamg_3"] = "icmamg_3.sitem", }, hands = { ["uiR2EDequipment_icmm1ss_2"] = "icmm1ss_2.sitem::slash", ["uiR2EDequipment_icmm1ss_3"] = "icmm1ss_3.sitem::slash", ["uiR2EDequipment_icmm1sa_2"] = "icmm1sa_2.sitem::slash", ["uiR2EDequipment_icmm1sa_3"] = "icmm1sa_3.sitem::slash", ["uiR2EDequipment_icmm1pd_2"] = "icmm1pd_2.sitem:icmm1pd_2.sitem:pierce", ["uiR2EDequipment_icmm1pd_3"] = "icmm1pd_3.sitem:icmm1pd_3.sitem:pierce", ["uiR2EDequipment_icmm1bm_2"] = "icmm1bm_2.sitem::blunt", ["uiR2EDequipment_icmm1bm_3"] = "icmm1bm_3.sitem::blunt", ["uiR2EDequipment_icmm1ps_2"] = "icmm1ps_2.sitem::pierce", ["uiR2EDequipment_icmm1ps_3"] = "icmm1ps_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.m_light_melee_170, entries.m_light_melee_170_equipment) - entries.t_light_melee_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", ["uiR2EDequipment_ictamv_2"] = "ictamv_2.sitem", ["uiR2EDequipment_ictalv_3"] = "ictalv_3.sitem", ["uiR2EDequipment_ictamv_3"] = "ictamv_3.sitem", }, legs = { ["uiR2EDequipment_ictalp_2"] = "ictalp_2.sitem", ["uiR2EDequipment_ictamp_2"] = "ictamp_2.sitem", ["uiR2EDequipment_ictalp_3"] = "ictalp_3.sitem", ["uiR2EDequipment_ictamp_3"] = "ictamp_3.sitem", }, boots = { ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", ["uiR2EDequipment_ictamb_2"] = "ictamb_2.sitem", ["uiR2EDequipment_ictalb_3"] = "ictalb_3.sitem", ["uiR2EDequipment_ictamb_3"] = "ictamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", ["uiR2EDequipment_ictals_3"] = "ictals_3.sitem", }, gloves = { ["uiR2EDequipment_ictamg_2"] = "ictamg_2.sitem", ["uiR2EDequipment_ictamg_3"] = "ictamg_3.sitem", }, hands = { ["uiR2EDequipment_ictm1ss_2"] = "ictm1ss_2.sitem::slash", ["uiR2EDequipment_ictm1ss_3"] = "ictm1ss_3.sitem::slash", ["uiR2EDequipment_ictm1sa_2"] = "ictm1sa_2.sitem::slash", ["uiR2EDequipment_ictm1sa_3"] = "ictm1sa_3.sitem::slash", ["uiR2EDequipment_ictm1pd_2"] = "ictm1pd_2.sitem:ictm1pd_2.sitem:pierce", ["uiR2EDequipment_ictm1pd_3"] = "ictm1pd_3.sitem:ictm1pd_3.sitem:pierce", ["uiR2EDequipment_ictm1bm_2"] = "ictm1bm_2.sitem::blunt", ["uiR2EDequipment_ictm1bm_3"] = "ictm1bm_3.sitem::blunt", ["uiR2EDequipment_ictm1ps_2"] = "ictm1ps_2.sitem::pierce", ["uiR2EDequipment_ictm1ps_3"] = "ictm1ps_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.t_light_melee_170, entries.t_light_melee_170_equipment) - entries.z_light_melee_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", ["uiR2EDequipment_iczamv_2"] = "iczamv_2.sitem", ["uiR2EDequipment_iczalv_3"] = "iczalv_3.sitem", ["uiR2EDequipment_iczamv_3"] = "iczamv_3.sitem", }, legs = { ["uiR2EDequipment_iczalp_2"] = "iczalp_2.sitem", ["uiR2EDequipment_iczamp_2"] = "iczamp_2.sitem", ["uiR2EDequipment_iczalp_3"] = "iczalp_3.sitem", ["uiR2EDequipment_iczamp_3"] = "iczamp_3.sitem", }, boots = { ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", ["uiR2EDequipment_iczamb_2"] = "iczamb_2.sitem", ["uiR2EDequipment_iczalb_3"] = "iczalb_3.sitem", ["uiR2EDequipment_iczamb_3"] = "iczamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", ["uiR2EDequipment_iczals_3"] = "iczals_3.sitem", }, gloves = { ["uiR2EDequipment_iczamg_2"] = "iczamg_2.sitem", ["uiR2EDequipment_iczamg_3"] = "iczamg_3.sitem", }, hands = { ["uiR2EDequipment_iczm1ss_2"] = "iczm1ss_2.sitem::slash", ["uiR2EDequipment_iczm1ss_3"] = "iczm1ss_3.sitem::slash", ["uiR2EDequipment_iczm1sa_2"] = "iczm1sa_2.sitem::slash", ["uiR2EDequipment_iczm1sa_3"] = "iczm1sa_3.sitem::slash", ["uiR2EDequipment_iczm1pd_2"] = "iczm1pd_2.sitem:iczm1pd_2.sitem:pierce", ["uiR2EDequipment_iczm1pd_3"] = "iczm1pd_3.sitem:iczm1pd_3.sitem:pierce", ["uiR2EDequipment_iczm1bm_2"] = "iczm1bm_2.sitem::blunt", ["uiR2EDequipment_iczm1bm_3"] = "iczm1bm_3.sitem::blunt", ["uiR2EDequipment_iczm1ps_2"] = "iczm1ps_2.sitem::pierce", ["uiR2EDequipment_iczm1ps_3"] = "iczm1ps_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.z_light_melee_170, entries.z_light_melee_170_equipment) - - entries.f_light_melee_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", ["uiR2EDequipment_icfamv_2"] = "icfamv_2.sitem", ["uiR2EDequipment_icfalv_3"] = "icfalv_3.sitem", ["uiR2EDequipment_icfamv_3"] = "icfamv_3.sitem", }, legs = { ["uiR2EDequipment_icfalp_2"] = "icfalp_2.sitem", ["uiR2EDequipment_icfamp_2"] = "icfamp_2.sitem", ["uiR2EDequipment_icfalp_3"] = "icfalp_3.sitem", ["uiR2EDequipment_icfamp_3"] = "icfamp_3.sitem", }, boots = { ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", ["uiR2EDequipment_icfamb_2"] = "icfamb_2.sitem", ["uiR2EDequipment_icfalb_3"] = "icfalb_3.sitem", ["uiR2EDequipment_icfamb_3"] = "icfamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", ["uiR2EDequipment_icfams_2"] = "icfams_2.sitem", ["uiR2EDequipment_icfals_3"] = "icfals_3.sitem", ["uiR2EDequipment_icfams_3"] = "icfams_3.sitem", }, gloves = { ["uiR2EDequipment_icfamg_2"] = "icfamg_2.sitem", ["uiR2EDequipment_icfamg_3"] = "icfamg_3.sitem", }, hands = { ["uiR2EDequipment_icfm1ss_2"] = "icfm1ss_2.sitem::slash", ["uiR2EDequipment_icfm1ss_3"] = "icfm1ss_3.sitem::slash", ["uiR2EDequipment_icfm1sa_2"] = "icfm1sa_2.sitem::slash", ["uiR2EDequipment_icfm1sa_3"] = "icfm1sa_3.sitem::slash", ["uiR2EDequipment_icfm1pd_2"] = "icfm1pd_2.sitem:icfm1pd_2.sitem:pierce", ["uiR2EDequipment_icfm1pd_3"] = "icfm1pd_3.sitem:icfm1pd_3.sitem:pierce", ["uiR2EDequipment_icfm1bm_2"] = "icfm1bm_2.sitem::blunt", ["uiR2EDequipment_icfm1bm_3"] = "icfm1bm_3.sitem::blunt", ["uiR2EDequipment_icfm1ps_2"] = "icfm1ps_2.sitem::pierce", ["uiR2EDequipment_icfm1ps_3"] = "icfm1ps_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.f_light_melee_220, entries.f_light_melee_220_equipment) - entries.m_light_melee_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", ["uiR2EDequipment_icmamv_2"] = "icmamv_2.sitem", ["uiR2EDequipment_icmalv_3"] = "icmalv_3.sitem", ["uiR2EDequipment_icmamv_3"] = "icmamv_3.sitem", }, legs = { ["uiR2EDequipment_icmalp_2"] = "icmalp_2.sitem", ["uiR2EDequipment_icmamp_2"] = "icmamp_2.sitem", ["uiR2EDequipment_icmalp_3"] = "icmalp_3.sitem", ["uiR2EDequipment_icmamp_3"] = "icmamp_3.sitem", }, boots = { ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", ["uiR2EDequipment_icmamb_2"] = "icmamb_2.sitem", ["uiR2EDequipment_icmalb_3"] = "icmalb_3.sitem", ["uiR2EDequipment_icmamb_3"] = "icmamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", ["uiR2EDequipment_icmams_2"] = "icmams_2.sitem", ["uiR2EDequipment_icmals_3"] = "icmals_3.sitem", ["uiR2EDequipment_icmams_3"] = "icmams_3.sitem", }, gloves = { ["uiR2EDequipment_icmamg_2"] = "icmamg_2.sitem", ["uiR2EDequipment_icmamg_3"] = "icmamg_3.sitem", }, hands = { ["uiR2EDequipment_icmm1ss_2"] = "icmm1ss_2.sitem::slash", ["uiR2EDequipment_icmm1ss_3"] = "icmm1ss_3.sitem::slash", ["uiR2EDequipment_icmm1sa_2"] = "icmm1sa_2.sitem::slash", ["uiR2EDequipment_icmm1sa_3"] = "icmm1sa_3.sitem::slash", ["uiR2EDequipment_icmm1pd_2"] = "icmm1pd_2.sitem:icmm1pd_2.sitem:pierce", ["uiR2EDequipment_icmm1pd_3"] = "icmm1pd_3.sitem:icmm1pd_3.sitem:pierce", ["uiR2EDequipment_icmm1bm_2"] = "icmm1bm_2.sitem::blunt", ["uiR2EDequipment_icmm1bm_3"] = "icmm1bm_3.sitem::blunt", ["uiR2EDequipment_icmm1ps_2"] = "icmm1ps_2.sitem::pierce", ["uiR2EDequipment_icmm1ps_3"] = "icmm1ps_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.m_light_melee_220, entries.m_light_melee_220_equipment) - entries.t_light_melee_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", ["uiR2EDequipment_ictamv_2"] = "ictamv_2.sitem", ["uiR2EDequipment_ictalv_3"] = "ictalv_3.sitem", ["uiR2EDequipment_ictamv_3"] = "ictamv_3.sitem", }, legs = { ["uiR2EDequipment_ictalp_2"] = "ictalp_2.sitem", ["uiR2EDequipment_ictamp_2"] = "ictamp_2.sitem", ["uiR2EDequipment_ictalp_3"] = "ictalp_3.sitem", ["uiR2EDequipment_ictamp_3"] = "ictamp_3.sitem", }, boots = { ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", ["uiR2EDequipment_ictamb_2"] = "ictamb_2.sitem", ["uiR2EDequipment_ictalb_3"] = "ictalb_3.sitem", ["uiR2EDequipment_ictamb_3"] = "ictamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", ["uiR2EDequipment_ictams_2"] = "ictams_2.sitem", ["uiR2EDequipment_ictals_3"] = "ictals_3.sitem", ["uiR2EDequipment_ictams_3"] = "ictams_3.sitem", }, gloves = { ["uiR2EDequipment_ictamg_2"] = "ictamg_2.sitem", ["uiR2EDequipment_ictamg_3"] = "ictamg_3.sitem", }, hands = { ["uiR2EDequipment_ictm1ss_2"] = "ictm1ss_2.sitem::slash", ["uiR2EDequipment_ictm1ss_3"] = "ictm1ss_3.sitem::slash", ["uiR2EDequipment_ictm1sa_2"] = "ictm1sa_2.sitem::slash", ["uiR2EDequipment_ictm1sa_3"] = "ictm1sa_3.sitem::slash", ["uiR2EDequipment_ictm1pd_2"] = "ictm1pd_2.sitem:ictm1pd_2.sitem:pierce", ["uiR2EDequipment_ictm1pd_3"] = "ictm1pd_3.sitem:ictm1pd_3.sitem:pierce", ["uiR2EDequipment_ictm1bm_2"] = "ictm1bm_2.sitem::blunt", ["uiR2EDequipment_ictm1bm_3"] = "ictm1bm_3.sitem::blunt", ["uiR2EDequipment_ictm1ps_2"] = "ictm1ps_2.sitem::pierce", ["uiR2EDequipment_ictm1ps_3"] = "ictm1ps_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.t_light_melee_220, entries.t_light_melee_220_equipment) - entries.z_light_melee_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", ["uiR2EDequipment_iczamv_2"] = "iczamv_2.sitem", ["uiR2EDequipment_iczalv_3"] = "iczalv_3.sitem", ["uiR2EDequipment_iczamv_3"] = "iczamv_3.sitem", }, legs = { ["uiR2EDequipment_iczalp_2"] = "iczalp_2.sitem", ["uiR2EDequipment_iczamp_2"] = "iczamp_2.sitem", ["uiR2EDequipment_iczalp_3"] = "iczalp_3.sitem", ["uiR2EDequipment_iczamp_3"] = "iczamp_3.sitem", }, boots = { ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", ["uiR2EDequipment_iczamb_2"] = "iczamb_2.sitem", ["uiR2EDequipment_iczalb_3"] = "iczalb_3.sitem", ["uiR2EDequipment_iczamb_3"] = "iczamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", ["uiR2EDequipment_iczams_2"] = "iczams_2.sitem", ["uiR2EDequipment_iczals_3"] = "iczals_3.sitem", ["uiR2EDequipment_iczams_3"] = "iczams_3.sitem", }, gloves = { ["uiR2EDequipment_iczamg_2"] = "iczamg_2.sitem", ["uiR2EDequipment_iczamg_3"] = "iczamg_3.sitem", }, hands = { ["uiR2EDequipment_iczm1ss_2"] = "iczm1ss_2.sitem::slash", ["uiR2EDequipment_iczm1ss_3"] = "iczm1ss_3.sitem::slash", ["uiR2EDequipment_iczm1sa_2"] = "iczm1sa_2.sitem::slash", ["uiR2EDequipment_iczm1sa_3"] = "iczm1sa_3.sitem::slash", ["uiR2EDequipment_iczm1pd_2"] = "iczm1pd_2.sitem:iczm1pd_2.sitem:pierce", ["uiR2EDequipment_iczm1pd_3"] = "iczm1pd_3.sitem:iczm1pd_3.sitem:pierce", ["uiR2EDequipment_iczm1bm_2"] = "iczm1bm_2.sitem::blunt", ["uiR2EDequipment_iczm1bm_3"] = "iczm1bm_3.sitem::blunt", ["uiR2EDequipment_iczm1ps_2"] = "iczm1ps_2.sitem::pierce", ["uiR2EDequipment_iczm1ps_3"] = "iczm1ps_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.z_light_melee_220, entries.z_light_melee_220_equipment) - - - - --- Mages - - --- Healers - - entries.f_healer_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_b2.creature", SheetClient="basic_fyros_male.creature", Level=20, RingAccess="a1", Equipment="f_healer_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_healer_20", entries.f_healer_20) - entries.m_healer_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_b2.creature", SheetClient="basic_matis_male.creature", Level=20, RingAccess="a1", Equipment="m_healer_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_healer_20", entries.m_healer_20) - entries.t_healer_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_b2.creature", SheetClient="basic_tryker_male.creature", Level=20, RingAccess="a1", Equipment="t_healer_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_healer_20", entries.t_healer_20) - entries.z_healer_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_b2.creature", SheetClient="basic_zorai_male.creature", Level=20, RingAccess="a1", Equipment="z_healer_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_healer_20", entries.z_healer_20) - - entries.f_healer_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_c2.creature", SheetClient="basic_fyros_male.creature", Level=70, RingAccess="d2", Equipment="f_healer_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_healer_70", entries.f_healer_70) - entries.m_healer_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_c2.creature", SheetClient="basic_matis_male.creature", Level=70, RingAccess="f5", Equipment="m_healer_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_healer_70", entries.m_healer_70) - entries.t_healer_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_c2.creature", SheetClient="basic_tryker_male.creature", Level=70, RingAccess="l5", Equipment="t_healer_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_healer_70", entries.t_healer_70) - entries.z_healer_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_c2.creature", SheetClient="basic_zorai_male.creature", Level=70, RingAccess="j5", Equipment="z_healer_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_healer_70", entries.z_healer_70) - - entries.f_healer_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_d2.creature", SheetClient="basic_fyros_male.creature", Level=120, RingAccess="d4", Equipment="f_healer_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_healer_120", entries.f_healer_120) - entries.m_healer_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_d2.creature", SheetClient="basic_matis_male.creature", Level=120, RingAccess="f5", Equipment="m_healer_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_healer_120", entries.m_healer_120) - entries.t_healer_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_d2.creature", SheetClient="basic_tryker_male.creature", Level=120, RingAccess="l5", Equipment="t_healer_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_healer_120", entries.t_healer_120) - entries.z_healer_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_d2.creature", SheetClient="basic_zorai_male.creature", Level=120, RingAccess="j5", Equipment="z_healer_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_healer_120", entries.z_healer_120) - - entries.f_healer_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_e2.creature", SheetClient="basic_fyros_male.creature", Level=170, RingAccess="d6", Equipment="f_healer_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_healer_170", entries.f_healer_170) - entries.m_healer_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_e2.creature", SheetClient="basic_matis_male.creature", Level=170, RingAccess="f6", Equipment="m_healer_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_healer_170", entries.m_healer_170) - entries.t_healer_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_e2.creature", SheetClient="basic_tryker_male.creature", Level=170, RingAccess="l5", Equipment="t_healer_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_healer_170", entries.t_healer_170) - entries.z_healer_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_e2.creature", SheetClient="basic_zorai_male.creature", Level=170, RingAccess="j6", Equipment="z_healer_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_healer_170", entries.z_healer_170) - - entries.f_healer_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_f2.creature", SheetClient="basic_fyros_male.creature", Level=220, RingAccess="d7", Equipment="f_healer_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_healer_220", entries.f_healer_220) - entries.m_healer_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_f2.creature", SheetClient="basic_matis_male.creature", Level=220, RingAccess="f7", Equipment="m_healer_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_healer_220", entries.m_healer_220) - entries.t_healer_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_f2.creature", SheetClient="basic_tryker_male.creature", Level=220, RingAccess="l6", Equipment="t_healer_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_healer_220", entries.t_healer_220) - entries.z_healer_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_healer_f2.creature", SheetClient="basic_zorai_male.creature", Level=220, RingAccess="j7", Equipment="z_healer_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_healer_220", entries.z_healer_220) - - - entries.f_healer_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalv"] = "icfalv.sitem", }, legs = { ["uiR2EDequipment_icfacp"] = "icfacp.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", }, right_hand = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfm2ms"] = "icfm2ms.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.f_healer_20, entries.f_healer_20_equipment) - entries.m_healer_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalv"] = "icmalv.sitem", }, legs = { ["uiR2EDequipment_icm"] = "icm.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", }, right_hand = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmm2ms"] = "icmm2ms.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.m_healer_20, entries.m_healer_20_equipment) - entries.t_healer_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalv"] = "ictalv.sitem", }, legs = { ["uiR2EDequipment_ict"] = "ict.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", }, right_hand = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictm2ms"] = "ictm2ms.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.t_healer_20, entries.t_healer_20_equipment) - entries.z_healer_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalv"] = "iczalv.sitem", }, legs = { ["uiR2EDequipment_icz"] = "icz.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", }, right_hand = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczm2ms"] = "iczm2ms.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.z_healer_20, entries.z_healer_20_equipment) - - entries.f_healer_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", }, legs = { ["uiR2EDequipment_icf"] = "icf.sitem", ["uiR2EDequipment_icf_2"] = "icf_2.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfals"] = "icfals.sitem", ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalg"] = "icfalg.sitem", ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", }, right_hand = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfm2ms"] = "icfm2ms.sitem", ["uiR2EDequipment_icfm2ms_2"] = "icfm2ms_2.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.f_healer_70, entries.f_healer_70_equipment) - entries.m_healer_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", }, legs = { ["uiR2EDequipment_icm"] = "icm.sitem", ["uiR2EDequipment_icm_2"] = "icm_2.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmals"] = "icmals.sitem", ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalg"] = "icmalg.sitem", ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", }, right_hand = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmm2ms"] = "icmm2ms.sitem", ["uiR2EDequipment_icmm2ms_2"] = "icmm2ms_2.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.m_healer_70, entries.m_healer_70_equipment) - entries.t_healer_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", }, legs = { ["uiR2EDequipment_ict"] = "ict.sitem", ["uiR2EDequipment_ict_2"] = "ict_2.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictals"] = "ictals.sitem", ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalg"] = "ictalg.sitem", ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", }, right_hand = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictm2ms"] = "ictm2ms.sitem", ["uiR2EDequipment_ictm2ms_2"] = "ictm2ms_2.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.t_healer_70, entries.t_healer_70_equipment) - entries.z_healer_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", }, legs = { ["uiR2EDequipment_icz"] = "icz.sitem", ["uiR2EDequipment_icz_2"] = "icz_2.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczals"] = "iczals.sitem", ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalg"] = "iczalg.sitem", ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", }, right_hand = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczm2ms"] = "iczm2ms.sitem", ["uiR2EDequipment_iczm2ms_2"] = "iczm2ms_2.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.z_healer_70, entries.z_healer_70_equipment) - - entries.f_healer_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", }, legs = { ["uiR2EDequipment_icf"] = "icf.sitem", ["uiR2EDequipment_icf_2"] = "icf_2.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfals"] = "icfals.sitem", ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalg"] = "icfalg.sitem", ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", }, right_hand = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfm2ms"] = "icfm2ms.sitem", ["uiR2EDequipment_icfm2ms_2"] = "icfm2ms_2.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.f_healer_120, entries.f_healer_120_equipment) - entries.m_healer_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", }, legs = { ["uiR2EDequipment_icm"] = "icm.sitem", ["uiR2EDequipment_icm_2"] = "icm_2.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmals"] = "icmals.sitem", ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalg"] = "icmalg.sitem", ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", }, right_hand = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmm2ms"] = "icmm2ms.sitem", ["uiR2EDequipment_icmm2ms_2"] = "icmm2ms_2.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.m_healer_120, entries.m_healer_120_equipment) - entries.t_healer_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", }, legs = { ["uiR2EDequipment_ict"] = "ict.sitem", ["uiR2EDequipment_ict_2"] = "ict_2.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictals"] = "ictals.sitem", ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalg"] = "ictalg.sitem", ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", }, right_hand = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictm2ms"] = "ictm2ms.sitem", ["uiR2EDequipment_ictm2ms_2"] = "ictm2ms_2.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.t_healer_120, entries.t_healer_120_equipment) - entries.z_healer_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", }, legs = { ["uiR2EDequipment_icz"] = "icz.sitem", ["uiR2EDequipment_icz_2"] = "icz_2.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczals"] = "iczals.sitem", ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalg"] = "iczalg.sitem", ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", }, right_hand = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczm2ms"] = "iczm2ms.sitem", ["uiR2EDequipment_iczm2ms_2"] = "iczm2ms_2.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.z_healer_120, entries.z_healer_120_equipment) - - entries.f_healer_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", ["uiR2EDequipment_icfalv_3"] = "icfalv_3.sitem", }, legs = { ["uiR2EDequipment_icf_2"] = "icf_2.sitem", ["uiR2EDequipment_icf_3"] = "icf_3.sitem", }, boots = { ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", ["uiR2EDequipment_icfalb_3"] = "icfalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", ["uiR2EDequipment_icfals_3"] = "icfals_3.sitem", }, gloves = { ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", ["uiR2EDequipment_icfalg_3"] = "icfalg_3.sitem", }, right_hand = { ["uiR2EDequipment_icfm2ms_2"] = "icfm2ms_2.sitem", ["uiR2EDequipment_icfm2ms_3"] = "icfm2ms_3.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.f_healer_170, entries.f_healer_170_equipment) - entries.m_healer_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", ["uiR2EDequipment_icmalv_3"] = "icmalv_3.sitem", }, legs = { ["uiR2EDequipment_icm_2"] = "icm_2.sitem", ["uiR2EDequipment_icm_3"] = "icm_3.sitem", }, boots = { ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", ["uiR2EDequipment_icmalb_3"] = "icmalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", ["uiR2EDequipment_icmals_3"] = "icmals_3.sitem", }, gloves = { ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", ["uiR2EDequipment_icmalg_3"] = "icmalg_3.sitem", }, right_hand = { ["uiR2EDequipment_icmm2ms_2"] = "icmm2ms_2.sitem", ["uiR2EDequipment_icmm2ms_3"] = "icmm2ms_3.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.m_healer_170, entries.m_healer_170_equipment) - entries.t_healer_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", ["uiR2EDequipment_ictalv_3"] = "ictalv_3.sitem", }, legs = { ["uiR2EDequipment_ict_2"] = "ict_2.sitem", ["uiR2EDequipment_ict_3"] = "ict_3.sitem", }, boots = { ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", ["uiR2EDequipment_ictalb_3"] = "ictalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", ["uiR2EDequipment_ictals_3"] = "ictals_3.sitem", }, gloves = { ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", ["uiR2EDequipment_ictalg_3"] = "ictalg_3.sitem", }, right_hand = { ["uiR2EDequipment_ictm2ms_2"] = "ictm2ms_2.sitem", ["uiR2EDequipment_ictm2ms_3"] = "ictm2ms_3.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.t_healer_170, entries.t_healer_170_equipment) - entries.z_healer_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", ["uiR2EDequipment_iczalv_3"] = "iczalv_3.sitem", }, legs = { ["uiR2EDequipment_icz_2"] = "icz_2.sitem", ["uiR2EDequipment_icz_3"] = "icz_3.sitem", }, boots = { ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", ["uiR2EDequipment_iczalb_3"] = "iczalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", ["uiR2EDequipment_iczals_3"] = "iczals_3.sitem", }, gloves = { ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", ["uiR2EDequipment_iczalg_3"] = "iczalg_3.sitem", }, right_hand = { ["uiR2EDequipment_iczm2ms_2"] = "iczm2ms_2.sitem", ["uiR2EDequipment_iczm2ms_3"] = "iczm2ms_3.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.z_healer_170, entries.z_healer_170_equipment) - - entries.f_healer_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", ["uiR2EDequipment_icfalv_3"] = "icfalv_3.sitem", }, legs = { ["uiR2EDequipment_icf_2"] = "icf_2.sitem", ["uiR2EDequipment_icf_3"] = "icf_3.sitem", }, boots = { ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", ["uiR2EDequipment_icfalb_3"] = "icfalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", ["uiR2EDequipment_icfals_3"] = "icfals_3.sitem", }, gloves = { ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", ["uiR2EDequipment_icfalg_3"] = "icfalg_3.sitem", }, right_hand = { ["uiR2EDequipment_icfm2ms_2"] = "icfm2ms_2.sitem", ["uiR2EDequipment_icfm2ms_3"] = "icfm2ms_3.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.f_healer_220, entries.f_healer_220_equipment) - entries.m_healer_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", ["uiR2EDequipment_icmalv_3"] = "icmalv_3.sitem", }, legs = { ["uiR2EDequipment_icm_2"] = "icm_2.sitem", ["uiR2EDequipment_icm_3"] = "icm_3.sitem", }, boots = { ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", ["uiR2EDequipment_icmalb_3"] = "icmalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", ["uiR2EDequipment_icmals_3"] = "icmals_3.sitem", }, gloves = { ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", ["uiR2EDequipment_icmalg_3"] = "icmalg_3.sitem", }, right_hand = { ["uiR2EDequipment_icmm2ms_2"] = "icmm2ms_2.sitem", ["uiR2EDequipment_icmm2ms_3"] = "icmm2ms_3.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.m_healer_220, entries.m_healer_220_equipment) - entries.t_healer_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", ["uiR2EDequipment_ictalv_3"] = "ictalv_3.sitem", }, legs = { ["uiR2EDequipment_ict_2"] = "ict_2.sitem", ["uiR2EDequipment_ict_3"] = "ict_3.sitem", }, boots = { ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", ["uiR2EDequipment_ictalb_3"] = "ictalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", ["uiR2EDequipment_ictals_3"] = "ictals_3.sitem", }, gloves = { ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", ["uiR2EDequipment_ictalg_3"] = "ictalg_3.sitem", }, right_hand = { ["uiR2EDequipment_ictm2ms_2"] = "ictm2ms_2.sitem", ["uiR2EDequipment_ictm2ms_3"] = "ictm2ms_3.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.t_healer_220, entries.t_healer_220_equipment) - entries.z_healer_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", ["uiR2EDequipment_iczalv_3"] = "iczalv_3.sitem", }, legs = { ["uiR2EDequipment_icz_2"] = "icz_2.sitem", ["uiR2EDequipment_icz_3"] = "icz_3.sitem", }, boots = { ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", ["uiR2EDequipment_iczalb_3"] = "iczalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", ["uiR2EDequipment_iczals_3"] = "iczals_3.sitem", }, gloves = { ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", ["uiR2EDequipment_iczalg_3"] = "iczalg_3.sitem", }, right_hand = { ["uiR2EDequipment_iczm2ms_2"] = "iczm2ms_2.sitem", ["uiR2EDequipment_iczm2ms_3"] = "iczm2ms_3.sitem", }, left_hand = { ["uiR2EDequipment_none"] = "", }, } r2.addR2PlayerEquipment(entries.z_healer_220, entries.z_healer_220_equipment) - - --- Damage Dealers - - entries.f_mage_damage_dealer_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_acid_b2.creature", SheetModel="ring_magic_damage_dealer_$hands_b$level.creature", SheetClient="basic_fyros_male.creature", Level=20, RingAccess="a1", Equipment="f_mage_damage_dealer_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_damage_dealer_20", entries.f_mage_damage_dealer_20) - entries.m_mage_damage_dealer_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_acid_b2.creature", SheetModel="ring_magic_damage_dealer_$hands_b$level.creature", SheetClient="basic_matis_male.creature", Level=20, RingAccess="a1", Equipment="m_mage_damage_dealer_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_damage_dealer_20", entries.m_mage_damage_dealer_20) - entries.t_mage_damage_dealer_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_cold_b2.creature", SheetModel="ring_magic_damage_dealer_$hands_b$level.creature", SheetClient="basic_tryker_male.creature", Level=20, RingAccess="a1", Equipment="t_mage_damage_dealer_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_damage_dealer_20", entries.t_mage_damage_dealer_20) - entries.z_mage_damage_dealer_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_rot_b2.creature", SheetModel="ring_magic_damage_dealer_$hands_b$level.creature", SheetClient="basic_zorai_male.creature", Level=20, RingAccess="a1", Equipment="z_mage_damage_dealer_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_damage_dealer_20", entries.z_mage_damage_dealer_20) - - entries.f_mage_damage_dealer_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_acid_c2.creature", SheetModel="ring_magic_damage_dealer_$hands_c$level.creature", SheetClient="basic_fyros_male.creature", Level=70, RingAccess="d2", Equipment="f_mage_damage_dealer_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_damage_dealer_70", entries.f_mage_damage_dealer_70) - entries.m_mage_damage_dealer_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_acid_c2.creature", SheetModel="ring_magic_damage_dealer_$hands_c$level.creature", SheetClient="basic_matis_male.creature", Level=70, RingAccess="f5", Equipment="m_mage_damage_dealer_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_damage_dealer_70", entries.m_mage_damage_dealer_70) - entries.t_mage_damage_dealer_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_cold_c2.creature", SheetModel="ring_magic_damage_dealer_$hands_c$level.creature", SheetClient="basic_tryker_male.creature", Level=70, RingAccess="l5", Equipment="t_mage_damage_dealer_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_damage_dealer_70", entries.t_mage_damage_dealer_70) - entries.z_mage_damage_dealer_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_rot_c2.creature", SheetModel="ring_magic_damage_dealer_$hands_c$level.creature", SheetClient="basic_zorai_male.creature", Level=70, RingAccess="j5", Equipment="z_mage_damage_dealer_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_damage_dealer_70", entries.z_mage_damage_dealer_70) - - entries.f_mage_damage_dealer_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_fire_d2.creature", SheetModel="ring_magic_damage_dealer_$hands_d$level.creature", SheetClient="basic_fyros_male.creature", Level=120, RingAccess="d4", Equipment="f_mage_damage_dealer_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_damage_dealer_120", entries.f_mage_damage_dealer_120) - entries.m_mage_damage_dealer_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_poison_d2.creature", SheetModel="ring_magic_damage_dealer_$hands_d$level.creature", SheetClient="basic_matis_male.creature", Level=120, RingAccess="f5", Equipment="m_mage_damage_dealer_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_damage_dealer_120", entries.m_mage_damage_dealer_120) - entries.t_mage_damage_dealer_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_shockwave_d2.creature", SheetModel="ring_magic_damage_dealer_$hands_d$level.creature", SheetClient="basic_tryker_male.creature", Level=120, RingAccess="l5", Equipment="t_mage_damage_dealer_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_damage_dealer_120", entries.t_mage_damage_dealer_120) - entries.z_mage_damage_dealer_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_electricity_d2.creature", SheetModel="ring_magic_damage_dealer_$hands_d$level.creature", SheetClient="basic_zorai_male.creature", Level=120, RingAccess="j5", Equipment="z_mage_damage_dealer_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_damage_dealer_120", entries.z_mage_damage_dealer_120) - - entries.f_mage_damage_dealer_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_fire_e2.creature", SheetModel="ring_magic_damage_dealer_$hands_e$level.creature", SheetClient="basic_fyros_male.creature", Level=170, RingAccess="d6", Equipment="f_mage_damage_dealer_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_damage_dealer_170", entries.f_mage_damage_dealer_170) - entries.m_mage_damage_dealer_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_poison_e2.creature", SheetModel="ring_magic_damage_dealer_$hands_e$level.creature", SheetClient="basic_matis_male.creature", Level=170, RingAccess="f6", Equipment="m_mage_damage_dealer_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_damage_dealer_170", entries.m_mage_damage_dealer_170) - entries.t_mage_damage_dealer_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_shockwave_e2.creature", SheetModel="ring_magic_damage_dealer_$hands_e$level.creature", SheetClient="basic_tryker_male.creature", Level=170, RingAccess="l5", Equipment="t_mage_damage_dealer_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_damage_dealer_170", entries.t_mage_damage_dealer_170) - entries.z_mage_damage_dealer_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_electricity_e2.creature", SheetModel="ring_magic_damage_dealer_$hands_e$level.creature", SheetClient="basic_zorai_male.creature", Level=170, RingAccess="j6", Equipment="z_mage_damage_dealer_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_damage_dealer_170", entries.z_mage_damage_dealer_170) - - entries.f_mage_damage_dealer_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_fire_f2.creature", SheetModel="ring_magic_damage_dealer_$hands_f$level.creature", SheetClient="basic_fyros_male.creature", Level=220, RingAccess="d7", Equipment="f_mage_damage_dealer_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_damage_dealer_220", entries.f_mage_damage_dealer_220) - entries.m_mage_damage_dealer_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_poison_f2.creature", SheetModel="ring_magic_damage_dealer_$hands_f$level.creature", SheetClient="basic_matis_male.creature", Level=220, RingAccess="f7", Equipment="m_mage_damage_dealer_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_damage_dealer_220", entries.m_mage_damage_dealer_220) - entries.t_mage_damage_dealer_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_shockwave_f2.creature", SheetModel="ring_magic_damage_dealer_$hands_f$level.creature", SheetClient="basic_tryker_male.creature", Level=220, RingAccess="l6", Equipment="t_mage_damage_dealer_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_damage_dealer_220", entries.t_mage_damage_dealer_220) - entries.z_mage_damage_dealer_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_damage_dealer_electricity_f2.creature", SheetModel="ring_magic_damage_dealer_$hands_f$level.creature", SheetClient="basic_zorai_male.creature", Level=220, RingAccess="j7", Equipment="z_mage_damage_dealer_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_damage_dealer_220", entries.z_mage_damage_dealer_220) - - - entries.f_mage_damage_dealer_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalv"] = "icfalv.sitem", }, legs = { ["uiR2EDequipment_icfalp"] = "icfalp.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalg"] = "icfalg.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icfm2ms.sitem::acid", ["uiR2EDequipment_cold"] = "icfm2ms.sitem::cold", ["uiR2EDequipment_rot"] = "icfm2ms.sitem::rot", }, } r2.addR2PlayerEquipment(entries.f_mage_damage_dealer_20, entries.f_mage_damage_dealer_20_equipment) - entries.m_mage_damage_dealer_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalv"] = "icmalv.sitem", }, legs = { ["uiR2EDequipment_icmalp"] = "icmalp.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalg"] = "icmalg.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icmm2ms.sitem::acid", ["uiR2EDequipment_cold"] = "icmm2ms.sitem::cold", ["uiR2EDequipment_rot"] = "icmm2ms.sitem::rot", }, } r2.addR2PlayerEquipment(entries.m_mage_damage_dealer_20, entries.m_mage_damage_dealer_20_equipment) - entries.t_mage_damage_dealer_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalv"] = "ictalv.sitem", }, legs = { ["uiR2EDequipment_ictalp"] = "ictalp.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalg"] = "ictalg.sitem", }, hands = { ["uiR2EDequipment_acid"] = "ictm2ms.sitem::acid", ["uiR2EDequipment_cold"] = "ictm2ms.sitem::cold", ["uiR2EDequipment_rot"] = "ictm2ms.sitem::rot", }, } r2.addR2PlayerEquipment(entries.t_mage_damage_dealer_20, entries.t_mage_damage_dealer_20_equipment) - entries.z_mage_damage_dealer_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalv"] = "iczalv.sitem", }, legs = { ["uiR2EDequipment_iczalp"] = "iczalp.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalg"] = "iczalg.sitem", }, hands = { ["uiR2EDequipment_acid"] = "iczm2ms.sitem::acid", ["uiR2EDequipment_cold"] = "iczm2ms.sitem::cold", ["uiR2EDequipment_rot"] = "iczm2ms.sitem::rot", }, } r2.addR2PlayerEquipment(entries.z_mage_damage_dealer_20, entries.z_mage_damage_dealer_20_equipment) - - entries.f_mage_damage_dealer_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", }, legs = { ["uiR2EDequipment_icfalp"] = "icfalp.sitem", ["uiR2EDequipment_icfalp_2"] = "icfalp_2.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_icfalg"] = "icfalg.sitem", ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icfm2ms_2.sitem::acid", ["uiR2EDequipment_cold"] = "icfm2ms_2.sitem::cold", ["uiR2EDequipment_rot"] = "icfm2ms_2.sitem::rot", }, } r2.addR2PlayerEquipment(entries.f_mage_damage_dealer_70, entries.f_mage_damage_dealer_70_equipment) - entries.m_mage_damage_dealer_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", }, legs = { ["uiR2EDequipment_icmalp"] = "icmalp.sitem", ["uiR2EDequipment_icmalp_2"] = "icmalp_2.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_icmalg"] = "icmalg.sitem", ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icmm2ms_2.sitem::acid", ["uiR2EDequipment_cold"] = "icmm2ms_2.sitem::cold", ["uiR2EDequipment_rot"] = "icmm2ms_2.sitem::rot", }, } r2.addR2PlayerEquipment(entries.m_mage_damage_dealer_70, entries.m_mage_damage_dealer_70_equipment) - entries.t_mage_damage_dealer_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", }, legs = { ["uiR2EDequipment_ictalp"] = "ictalp.sitem", ["uiR2EDequipment_ictalp_2"] = "ictalp_2.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_ictalg"] = "ictalg.sitem", ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", }, hands = { ["uiR2EDequipment_acid"] = "ictm2ms_2.sitem::acid", ["uiR2EDequipment_cold"] = "ictm2ms_2.sitem::cold", ["uiR2EDequipment_rot"] = "ictm2ms_2.sitem::rot", }, } r2.addR2PlayerEquipment(entries.t_mage_damage_dealer_70, entries.t_mage_damage_dealer_70_equipment) - entries.z_mage_damage_dealer_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", }, legs = { ["uiR2EDequipment_iczalp"] = "iczalp.sitem", ["uiR2EDequipment_iczalp_2"] = "iczalp_2.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_iczalg"] = "iczalg.sitem", ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", }, hands = { ["uiR2EDequipment_acid"] = "iczm2ms_2.sitem::acid", ["uiR2EDequipment_cold"] = "iczm2ms_2.sitem::cold", ["uiR2EDequipment_rot"] = "iczm2ms_2.sitem::rot", }, } r2.addR2PlayerEquipment(entries.z_mage_damage_dealer_70, entries.z_mage_damage_dealer_70_equipment) - - entries.f_mage_damage_dealer_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", }, legs = { ["uiR2EDequipment_icfalp"] = "icfalp.sitem", ["uiR2EDequipment_icfalp_2"] = "icfalp_2.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_icfals"] = "icfals.sitem", ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", }, gloves = { ["uiR2EDequipment_icfalg"] = "icfalg.sitem", ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icfm2ms_2.sitem::acid", ["uiR2EDequipment_cold"] = "icfm2ms_2.sitem::cold", ["uiR2EDequipment_rot"] = "icfm2ms_2.sitem::rot", ["uiR2EDequipment_fire"] = "icfm2ms_2.sitem::fire", }, } r2.addR2PlayerEquipment(entries.f_mage_damage_dealer_120, entries.f_mage_damage_dealer_120_equipment) - entries.m_mage_damage_dealer_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", }, legs = { ["uiR2EDequipment_icmalp"] = "icmalp.sitem", ["uiR2EDequipment_icmalp_2"] = "icmalp_2.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_icmals"] = "icmals.sitem", ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", }, gloves = { ["uiR2EDequipment_icmalg"] = "icmalg.sitem", ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icmm2ms_2.sitem::acid", ["uiR2EDequipment_cold"] = "icmm2ms_2.sitem::cold", ["uiR2EDequipment_rot"] = "icmm2ms_2.sitem::rot", ["uiR2EDequipment_poison"] = "icmm2ms_2.sitem::poison", }, } r2.addR2PlayerEquipment(entries.m_mage_damage_dealer_120, entries.m_mage_damage_dealer_120_equipment) - entries.t_mage_damage_dealer_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", }, legs = { ["uiR2EDequipment_ictalp"] = "ictalp.sitem", ["uiR2EDequipment_ictalp_2"] = "ictalp_2.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_ictals"] = "ictals.sitem", ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", }, gloves = { ["uiR2EDequipment_ictalg"] = "ictalg.sitem", ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", }, hands = { ["uiR2EDequipment_acid"] = "ictm2ms_2.sitem::acid", ["uiR2EDequipment_cold"] = "ictm2ms_2.sitem::cold", ["uiR2EDequipment_rot"] = "ictm2ms_2.sitem::rot", ["uiR2EDequipment_shockwave"] = "ictm2ms_2.sitem::shockwave", }, } r2.addR2PlayerEquipment(entries.t_mage_damage_dealer_120, entries.t_mage_damage_dealer_120_equipment) - entries.z_mage_damage_dealer_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", }, legs = { ["uiR2EDequipment_iczalp"] = "iczalp.sitem", ["uiR2EDequipment_iczalp_2"] = "iczalp_2.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_iczals"] = "iczals.sitem", ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", }, gloves = { ["uiR2EDequipment_iczalg"] = "iczalg.sitem", ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", }, hands = { ["uiR2EDequipment_acid"] = "iczm2ms_2.sitem::acid", ["uiR2EDequipment_cold"] = "iczm2ms_2.sitem::cold", ["uiR2EDequipment_rot"] = "iczm2ms_2.sitem::rot", ["uiR2EDequipment_electricity"] = "iczm2ms_2.sitem::electricity", }, } r2.addR2PlayerEquipment(entries.z_mage_damage_dealer_120, entries.z_mage_damage_dealer_120_equipment) - - entries.f_mage_damage_dealer_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", ["uiR2EDequipment_icfalv_3"] = "icfalv_3.sitem", }, legs = { ["uiR2EDequipment_icfalp_2"] = "icfalp_2.sitem", ["uiR2EDequipment_icfalp_3"] = "icfalp_3.sitem", }, boots = { ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", ["uiR2EDequipment_icfalb_3"] = "icfalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", ["uiR2EDequipment_icfals_3"] = "icfals_3.sitem", }, gloves = { ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", ["uiR2EDequipment_icfalg_3"] = "icfalg_3.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icfm2ms_3.sitem::acid", ["uiR2EDequipment_cold"] = "icfm2ms_3.sitem::cold", ["uiR2EDequipment_rot"] = "icfm2ms_3.sitem::rot", ["uiR2EDequipment_fire"] = "icfm2ms_3.sitem::fire", }, } r2.addR2PlayerEquipment(entries.f_mage_damage_dealer_170, entries.f_mage_damage_dealer_170_equipment) - entries.m_mage_damage_dealer_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", ["uiR2EDequipment_icmalv_3"] = "icmalv_3.sitem", }, legs = { ["uiR2EDequipment_icmalp_2"] = "icmalp_2.sitem", ["uiR2EDequipment_icmalp_3"] = "icmalp_3.sitem", }, boots = { ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", ["uiR2EDequipment_icmalb_3"] = "icmalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", ["uiR2EDequipment_icmals_3"] = "icmals_3.sitem", }, gloves = { ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", ["uiR2EDequipment_icmalg_3"] = "icmalg_3.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icmm2ms_3.sitem::acid", ["uiR2EDequipment_cold"] = "icmm2ms_3.sitem::cold", ["uiR2EDequipment_rot"] = "icmm2ms_3.sitem::rot", ["uiR2EDequipment_poison"] = "icmm2ms_3.sitem::poison", }, } r2.addR2PlayerEquipment(entries.m_mage_damage_dealer_170, entries.m_mage_damage_dealer_170_equipment) - entries.t_mage_damage_dealer_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", ["uiR2EDequipment_ictalv_3"] = "ictalv_3.sitem", }, legs = { ["uiR2EDequipment_ictalp_2"] = "ictalp_2.sitem", ["uiR2EDequipment_ictalp_3"] = "ictalp_3.sitem", }, boots = { ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", ["uiR2EDequipment_ictalb_3"] = "ictalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", ["uiR2EDequipment_ictals_3"] = "ictals_3.sitem", }, gloves = { ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", ["uiR2EDequipment_ictalg_3"] = "ictalg_3.sitem", }, hands = { ["uiR2EDequipment_acid"] = "ictm2ms_3.sitem::acid", ["uiR2EDequipment_cold"] = "ictm2ms_3.sitem::cold", ["uiR2EDequipment_rot"] = "ictm2ms_3.sitem::rot", ["uiR2EDequipment_shockwave"] = "ictm2ms_3.sitem::shockwave", }, } r2.addR2PlayerEquipment(entries.t_mage_damage_dealer_170, entries.t_mage_damage_dealer_170_equipment) - entries.z_mage_damage_dealer_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", ["uiR2EDequipment_iczalv_3"] = "iczalv_3.sitem", }, legs = { ["uiR2EDequipment_iczalp_2"] = "iczalp_2.sitem", ["uiR2EDequipment_iczalp_3"] = "iczalp_3.sitem", }, boots = { ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", ["uiR2EDequipment_iczalb_3"] = "iczalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", ["uiR2EDequipment_iczals_3"] = "iczals_3.sitem", }, gloves = { ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", ["uiR2EDequipment_iczalg_3"] = "iczalg_3.sitem", }, hands = { ["uiR2EDequipment_acid"] = "iczm2ms_3.sitem::acid", ["uiR2EDequipment_cold"] = "iczm2ms_3.sitem::cold", ["uiR2EDequipment_rot"] = "iczm2ms_3.sitem::rot", ["uiR2EDequipment_electricity"] = "iczm2ms_3.sitem::electricity", }, } r2.addR2PlayerEquipment(entries.z_mage_damage_dealer_170, entries.z_mage_damage_dealer_170_equipment) - - entries.f_mage_damage_dealer_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", ["uiR2EDequipment_icfalv_3"] = "icfalv_3.sitem", }, legs = { ["uiR2EDequipment_icfalp_2"] = "icfalp_2.sitem", ["uiR2EDequipment_icfalp_3"] = "icfalp_3.sitem", }, boots = { ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", ["uiR2EDequipment_icfalb_3"] = "icfalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", ["uiR2EDequipment_icfals_3"] = "icfals_3.sitem", }, gloves = { ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", ["uiR2EDequipment_icfalg_3"] = "icfalg_3.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icfm2ms_3.sitem::acid", ["uiR2EDequipment_cold"] = "icfm2ms_3.sitem::cold", ["uiR2EDequipment_rot"] = "icfm2ms_3.sitem::rot", ["uiR2EDequipment_fire"] = "icfm2ms_3.sitem::fire", }, } r2.addR2PlayerEquipment(entries.f_mage_damage_dealer_220, entries.f_mage_damage_dealer_220_equipment) - entries.m_mage_damage_dealer_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", ["uiR2EDequipment_icmalv_3"] = "icmalv_3.sitem", }, legs = { ["uiR2EDequipment_icmalp_2"] = "icmalp_2.sitem", ["uiR2EDequipment_icmalp_3"] = "icmalp_3.sitem", }, boots = { ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", ["uiR2EDequipment_icmalb_3"] = "icmalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", ["uiR2EDequipment_icmals_3"] = "icmals_3.sitem", }, gloves = { ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", ["uiR2EDequipment_icmalg_3"] = "icmalg_3.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icmm2ms_3.sitem::acid", ["uiR2EDequipment_cold"] = "icmm2ms_3.sitem::cold", ["uiR2EDequipment_rot"] = "icmm2ms_3.sitem::rot", ["uiR2EDequipment_poison"] = "icmm2ms_3.sitem::poison", }, } r2.addR2PlayerEquipment(entries.m_mage_damage_dealer_220, entries.m_mage_damage_dealer_220_equipment) - entries.t_mage_damage_dealer_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", ["uiR2EDequipment_ictalv_3"] = "ictalv_3.sitem", }, legs = { ["uiR2EDequipment_ictalp_2"] = "ictalp_2.sitem", ["uiR2EDequipment_ictalp_3"] = "ictalp_3.sitem", }, boots = { ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", ["uiR2EDequipment_ictalb_3"] = "ictalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", ["uiR2EDequipment_ictals_3"] = "ictals_3.sitem", }, gloves = { ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", ["uiR2EDequipment_ictalg_3"] = "ictalg_3.sitem", }, hands = { ["uiR2EDequipment_acid"] = "ictm2ms_3.sitem::acid", ["uiR2EDequipment_cold"] = "ictm2ms_3.sitem::cold", ["uiR2EDequipment_rot"] = "ictm2ms_3.sitem::rot", ["uiR2EDequipment_shockwave"] = "ictm2ms_3.sitem::shockwave", }, } r2.addR2PlayerEquipment(entries.t_mage_damage_dealer_220, entries.t_mage_damage_dealer_220_equipment) - entries.z_mage_damage_dealer_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", ["uiR2EDequipment_iczalv_3"] = "iczalv_3.sitem", }, legs = { ["uiR2EDequipment_iczalp_2"] = "iczalp_2.sitem", ["uiR2EDequipment_iczalp_3"] = "iczalp_3.sitem", }, boots = { ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", ["uiR2EDequipment_iczalb_3"] = "iczalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", ["uiR2EDequipment_iczals_3"] = "iczals_3.sitem", }, gloves = { ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", ["uiR2EDequipment_iczalg_3"] = "iczalg_3.sitem", }, hands = { ["uiR2EDequipment_acid"] = "iczm2ms_3.sitem::acid", ["uiR2EDequipment_cold"] = "iczm2ms_3.sitem::cold", ["uiR2EDequipment_rot"] = "iczm2ms_3.sitem::rot", ["uiR2EDequipment_electricity"] = "iczm2ms_3.sitem::electricity", }, } r2.addR2PlayerEquipment(entries.z_mage_damage_dealer_220, entries.z_mage_damage_dealer_220_equipment) - - - --- AOE - - entries.f_mage_aoe_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_acid_b2.creature", SheetModel="ring_magic_aoe_$hands_b$level.creature", SheetClient="basic_fyros_male.creature", Level=20, RingAccess="a1", Equipment="f_mage_aoe_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_aoe_20", entries.f_mage_aoe_20) - entries.m_mage_aoe_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_acid_b2.creature", SheetModel="ring_magic_aoe_$hands_b$level.creature", SheetClient="basic_matis_male.creature", Level=20, RingAccess="a1", Equipment="m_mage_aoe_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_aoe_20", entries.m_mage_aoe_20) - entries.t_mage_aoe_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_cold_b2.creature", SheetModel="ring_magic_aoe_$hands_b$level.creature", SheetClient="basic_tryker_male.creature", Level=20, RingAccess="a1", Equipment="t_mage_aoe_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_aoe_20", entries.t_mage_aoe_20) - entries.z_mage_aoe_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_rot_b2.creature", SheetModel="ring_magic_aoe_$hands_b$level.creature", SheetClient="basic_zorai_male.creature", Level=20, RingAccess="a1", Equipment="z_mage_aoe_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_aoe_20", entries.z_mage_aoe_20) - - entries.f_mage_aoe_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_acid_c2.creature", SheetModel="ring_magic_aoe_$hands_c$level.creature", SheetClient="basic_fyros_male.creature", Level=70, RingAccess="d2", Equipment="f_mage_aoe_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_aoe_70", entries.f_mage_aoe_70) - entries.m_mage_aoe_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_acid_c2.creature", SheetModel="ring_magic_aoe_$hands_c$level.creature", SheetClient="basic_matis_male.creature", Level=70, RingAccess="f5", Equipment="m_mage_aoe_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_aoe_70", entries.m_mage_aoe_70) - entries.t_mage_aoe_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_cold_c2.creature", SheetModel="ring_magic_aoe_$hands_c$level.creature", SheetClient="basic_tryker_male.creature", Level=70, RingAccess="l5", Equipment="t_mage_aoe_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_aoe_70", entries.t_mage_aoe_70) - entries.z_mage_aoe_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_rot_c2.creature", SheetModel="ring_magic_aoe_$hands_c$level.creature", SheetClient="basic_zorai_male.creature", Level=70, RingAccess="j5", Equipment="z_mage_aoe_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_aoe_70", entries.z_mage_aoe_70) - - entries.f_mage_aoe_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_fire_d2.creature", SheetModel="ring_magic_aoe_$hands_d$level.creature", SheetClient="basic_fyros_male.creature", Level=120, RingAccess="d4", Equipment="f_mage_aoe_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_aoe_120", entries.f_mage_aoe_120) - entries.m_mage_aoe_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_poison_d2.creature", SheetModel="ring_magic_aoe_$hands_d$level.creature", SheetClient="basic_matis_male.creature", Level=120, RingAccess="f5", Equipment="m_mage_aoe_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_aoe_120", entries.m_mage_aoe_120) - entries.t_mage_aoe_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_shockwave_d2.creature", SheetModel="ring_magic_aoe_$hands_d$level.creature", SheetClient="basic_tryker_male.creature", Level=120, RingAccess="l5", Equipment="t_mage_aoe_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_aoe_120", entries.t_mage_aoe_120) - entries.z_mage_aoe_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_electricity_d2.creature", SheetModel="ring_magic_aoe_$hands_d$level.creature", SheetClient="basic_zorai_male.creature", Level=120, RingAccess="j5", Equipment="z_mage_aoe_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_aoe_120", entries.z_mage_aoe_120) - - entries.f_mage_aoe_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_fire_e2.creature", SheetModel="ring_magic_aoe_$hands_e$level.creature", SheetClient="basic_fyros_male.creature", Level=170, RingAccess="d6", Equipment="f_mage_aoe_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_aoe_170", entries.f_mage_aoe_170) - entries.m_mage_aoe_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_poison_e2.creature", SheetModel="ring_magic_aoe_$hands_e$level.creature", SheetClient="basic_matis_male.creature", Level=170, RingAccess="f6", Equipment="m_mage_aoe_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_aoe_170", entries.m_mage_aoe_170) - entries.t_mage_aoe_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_shockwave_e2.creature", SheetModel="ring_magic_aoe_$hands_e$level.creature", SheetClient="basic_tryker_male.creature", Level=170, RingAccess="l5", Equipment="t_mage_aoe_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_aoe_170", entries.t_mage_aoe_170) - entries.z_mage_aoe_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_electricity_e2.creature", SheetModel="ring_magic_aoe_$hands_e$level.creature", SheetClient="basic_zorai_male.creature", Level=170, RingAccess="j6", Equipment="z_mage_aoe_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_aoe_170", entries.z_mage_aoe_170) - - entries.f_mage_aoe_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_fire_f2.creature", SheetModel="ring_magic_aoe_$hands_f$level.creature", SheetClient="basic_fyros_male.creature", Level=220, RingAccess="d7", Equipment="f_mage_aoe_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_aoe_220", entries.f_mage_aoe_220) - entries.m_mage_aoe_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_poison_f2.creature", SheetModel="ring_magic_aoe_$hands_f$level.creature", SheetClient="basic_matis_male.creature", Level=220, RingAccess="f7", Equipment="m_mage_aoe_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_aoe_220", entries.m_mage_aoe_220) - entries.t_mage_aoe_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_shockwave_f2.creature", SheetModel="ring_magic_aoe_$hands_f$level.creature", SheetClient="basic_tryker_male.creature", Level=220, RingAccess="l6", Equipment="t_mage_aoe_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_aoe_220", entries.t_mage_aoe_220) - entries.z_mage_aoe_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_aoe_electricity_f2.creature", SheetModel="ring_magic_aoe_$hands_f$level.creature", SheetClient="basic_zorai_male.creature", Level=220, RingAccess="j7", Equipment="z_mage_aoe_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_aoe_220", entries.z_mage_aoe_220) - - - entries.f_mage_aoe_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalv"] = "icfalv.sitem", }, legs = { ["uiR2EDequipment_icfacp"] = "icfacp.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalg"] = "icfalg.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icfm2ms.sitem::acid", ["uiR2EDequipment_cold"] = "icfm2ms.sitem::cold", ["uiR2EDequipment_rot"] = "icfm2ms.sitem::rot", }, } r2.addR2PlayerEquipment(entries.f_mage_aoe_20, entries.f_mage_aoe_20_equipment) - entries.m_mage_aoe_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalv"] = "icmalv.sitem", }, legs = { ["uiR2EDequipment_icmacp"] = "icmacp.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalg"] = "icmalg.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icmm2ms.sitem::acid", ["uiR2EDequipment_cold"] = "icmm2ms.sitem::cold", ["uiR2EDequipment_rot"] = "icmm2ms.sitem::rot", }, } r2.addR2PlayerEquipment(entries.m_mage_aoe_20, entries.m_mage_aoe_20_equipment) - entries.t_mage_aoe_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalv"] = "ictalv.sitem", }, legs = { ["uiR2EDequipment_ictacp"] = "ictacp.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalg"] = "ictalg.sitem", }, hands = { ["uiR2EDequipment_acid"] = "ictm2ms.sitem::acid", ["uiR2EDequipment_cold"] = "ictm2ms.sitem::cold", ["uiR2EDequipment_rot"] = "ictm2ms.sitem::rot", }, } r2.addR2PlayerEquipment(entries.t_mage_aoe_20, entries.t_mage_aoe_20_equipment) - entries.z_mage_aoe_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalv"] = "iczalv.sitem", }, legs = { ["uiR2EDequipment_iczacp"] = "iczacp.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalg"] = "iczalg.sitem", }, hands = { ["uiR2EDequipment_acid"] = "iczm2ms.sitem::acid", ["uiR2EDequipment_cold"] = "iczm2ms.sitem::cold", ["uiR2EDequipment_rot"] = "iczm2ms.sitem::rot", }, } r2.addR2PlayerEquipment(entries.z_mage_aoe_20, entries.z_mage_aoe_20_equipment) - - entries.f_mage_aoe_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", }, legs = { ["uiR2EDequipment_icfacp"] = "icfacp.sitem", ["uiR2EDequipment_icfacp_2"] = "icfacp_2.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_icfalg"] = "icfalg.sitem", ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icfm2ms_2.sitem::acid", ["uiR2EDequipment_cold"] = "icfm2ms_2.sitem::cold", ["uiR2EDequipment_rot"] = "icfm2ms_2.sitem::rot", }, } r2.addR2PlayerEquipment(entries.f_mage_aoe_70, entries.f_mage_aoe_70_equipment) - entries.m_mage_aoe_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", }, legs = { ["uiR2EDequipment_icmacp"] = "icmacp.sitem", ["uiR2EDequipment_icmacp_2"] = "icmacp_2.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_icmalg"] = "icmalg.sitem", ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icmm2ms_2.sitem::acid", ["uiR2EDequipment_cold"] = "icmm2ms_2.sitem::cold", ["uiR2EDequipment_rot"] = "icmm2ms_2.sitem::rot", }, } r2.addR2PlayerEquipment(entries.m_mage_aoe_70, entries.m_mage_aoe_70_equipment) - entries.t_mage_aoe_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", }, legs = { ["uiR2EDequipment_ictacp"] = "ictacp.sitem", ["uiR2EDequipment_ictacp_2"] = "ictacp_2.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_ictalg"] = "ictalg.sitem", ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", }, hands = { ["uiR2EDequipment_acid"] = "ictm2ms_2.sitem::acid", ["uiR2EDequipment_cold"] = "ictm2ms_2.sitem::cold", ["uiR2EDequipment_rot"] = "ictm2ms_2.sitem::rot", }, } r2.addR2PlayerEquipment(entries.t_mage_aoe_70, entries.t_mage_aoe_70_equipment) - entries.z_mage_aoe_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", }, legs = { ["uiR2EDequipment_iczacp"] = "iczacp.sitem", ["uiR2EDequipment_iczacp_2"] = "iczacp_2.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_iczalg"] = "iczalg.sitem", ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", }, hands = { ["uiR2EDequipment_acid"] = "iczm2ms_2.sitem::acid", ["uiR2EDequipment_cold"] = "iczm2ms_2.sitem::cold", ["uiR2EDequipment_rot"] = "iczm2ms_2.sitem::rot", }, } r2.addR2PlayerEquipment(entries.z_mage_aoe_70, entries.z_mage_aoe_70_equipment) - - entries.f_mage_aoe_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", }, legs = { ["uiR2EDequipment_icfacp"] = "icfacp.sitem", ["uiR2EDequipment_icfacp_2"] = "icfacp_2.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_icfals"] = "icfals.sitem", ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", }, gloves = { ["uiR2EDequipment_icfalg"] = "icfalg.sitem", ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icfm2ms_2.sitem::acid", ["uiR2EDequipment_cold"] = "icfm2ms_2.sitem::cold", ["uiR2EDequipment_rot"] = "icfm2ms_2.sitem::rot", ["uiR2EDequipment_fire"] = "icfm2ms_2.sitem::fire", }, } r2.addR2PlayerEquipment(entries.f_mage_aoe_120, entries.f_mage_aoe_120_equipment) - entries.m_mage_aoe_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", }, legs = { ["uiR2EDequipment_icmacp"] = "icmacp.sitem", ["uiR2EDequipment_icmacp_2"] = "icmacp_2.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_icmals"] = "icmals.sitem", ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", }, gloves = { ["uiR2EDequipment_icmalg"] = "icmalg.sitem", ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icmm2ms_2.sitem::acid", ["uiR2EDequipment_cold"] = "icmm2ms_2.sitem::cold", ["uiR2EDequipment_rot"] = "icmm2ms_2.sitem::rot", ["uiR2EDequipment_poison"] = "icmm2ms_2.sitem::poison", }, } r2.addR2PlayerEquipment(entries.m_mage_aoe_120, entries.m_mage_aoe_120_equipment) - entries.t_mage_aoe_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", }, legs = { ["uiR2EDequipment_ictacp"] = "ictacp.sitem", ["uiR2EDequipment_ictacp_2"] = "ictacp_2.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_ictals"] = "ictals.sitem", ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", }, gloves = { ["uiR2EDequipment_ictalg"] = "ictalg.sitem", ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", }, hands = { ["uiR2EDequipment_acid"] = "ictm2ms_2.sitem::acid", ["uiR2EDequipment_cold"] = "ictm2ms_2.sitem::cold", ["uiR2EDequipment_rot"] = "ictm2ms_2.sitem::rot", ["uiR2EDequipment_shockwave"] = "ictm2ms_2.sitem::shockwave", }, } r2.addR2PlayerEquipment(entries.t_mage_aoe_120, entries.t_mage_aoe_120_equipment) - entries.z_mage_aoe_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", }, legs = { ["uiR2EDequipment_iczacp"] = "iczacp.sitem", ["uiR2EDequipment_iczacp_2"] = "iczacp_2.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_iczals"] = "iczals.sitem", ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", }, gloves = { ["uiR2EDequipment_iczalg"] = "iczalg.sitem", ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", }, hands = { ["uiR2EDequipment_acid"] = "iczm2ms_2.sitem::acid", ["uiR2EDequipment_cold"] = "iczm2ms_2.sitem::cold", ["uiR2EDequipment_rot"] = "iczm2ms_2.sitem::rot", ["uiR2EDequipment_electricity"] = "iczm2ms_2.sitem::electricity", }, } r2.addR2PlayerEquipment(entries.z_mage_aoe_120, entries.z_mage_aoe_120_equipment) - - entries.f_mage_aoe_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", ["uiR2EDequipment_icfalv_3"] = "icfalv_3.sitem", }, legs = { ["uiR2EDequipment_icfacp_2"] = "icfacp_2.sitem", ["uiR2EDequipment_icfacp_3"] = "icfacp_3.sitem", }, boots = { ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", ["uiR2EDequipment_icfalb_3"] = "icfalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", ["uiR2EDequipment_icfals_3"] = "icfals_3.sitem", }, gloves = { ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", ["uiR2EDequipment_icfalg_3"] = "icfalg_3.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icfm2ms_3.sitem::acid", ["uiR2EDequipment_cold"] = "icfm2ms_3.sitem::cold", ["uiR2EDequipment_rot"] = "icfm2ms_3.sitem::rot", ["uiR2EDequipment_fire"] = "icfm2ms_3.sitem::fire", }, } r2.addR2PlayerEquipment(entries.f_mage_aoe_170, entries.f_mage_aoe_170_equipment) - entries.m_mage_aoe_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", ["uiR2EDequipment_icmalv_3"] = "icmalv_3.sitem", }, legs = { ["uiR2EDequipment_icmacp_2"] = "icmacp_2.sitem", ["uiR2EDequipment_icmacp_3"] = "icmacp_3.sitem", }, boots = { ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", ["uiR2EDequipment_icmalb_3"] = "icmalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", ["uiR2EDequipment_icmals_3"] = "icmals_3.sitem", }, gloves = { ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", ["uiR2EDequipment_icmalg_3"] = "icmalg_3.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icmm2ms_3.sitem::acid", ["uiR2EDequipment_cold"] = "icmm2ms_3.sitem::cold", ["uiR2EDequipment_rot"] = "icmm2ms_3.sitem::rot", ["uiR2EDequipment_poison"] = "icmm2ms_3.sitem::poison", }, } r2.addR2PlayerEquipment(entries.m_mage_aoe_170, entries.m_mage_aoe_170_equipment) - entries.t_mage_aoe_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", ["uiR2EDequipment_ictalv_3"] = "ictalv_3.sitem", }, legs = { ["uiR2EDequipment_ictacp_2"] = "ictacp_2.sitem", ["uiR2EDequipment_ictacp_3"] = "ictacp_3.sitem", }, boots = { ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", ["uiR2EDequipment_ictalb_3"] = "ictalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", ["uiR2EDequipment_ictals_3"] = "ictals_3.sitem", }, gloves = { ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", ["uiR2EDequipment_ictalg_3"] = "ictalg_3.sitem", }, hands = { ["uiR2EDequipment_acid"] = "ictm2ms_3.sitem::acid", ["uiR2EDequipment_cold"] = "ictm2ms_3.sitem::cold", ["uiR2EDequipment_rot"] = "ictm2ms_3.sitem::rot", ["uiR2EDequipment_shockwave"] = "ictm2ms_3.sitem::shockwave", }, } r2.addR2PlayerEquipment(entries.t_mage_aoe_170, entries.t_mage_aoe_170_equipment) - entries.z_mage_aoe_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", ["uiR2EDequipment_iczalv_3"] = "iczalv_3.sitem", }, legs = { ["uiR2EDequipment_iczacp_2"] = "iczacp_2.sitem", ["uiR2EDequipment_iczacp_3"] = "iczacp_3.sitem", }, boots = { ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", ["uiR2EDequipment_iczalb_3"] = "iczalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", ["uiR2EDequipment_iczals_3"] = "iczals_3.sitem", }, gloves = { ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", ["uiR2EDequipment_iczalg_3"] = "iczalg_3.sitem", }, hands = { ["uiR2EDequipment_acid"] = "iczm2ms_3.sitem::acid", ["uiR2EDequipment_cold"] = "iczm2ms_3.sitem::cold", ["uiR2EDequipment_rot"] = "iczm2ms_3.sitem::rot", ["uiR2EDequipment_electricity"] = "iczm2ms_3.sitem::electricity", }, } r2.addR2PlayerEquipment(entries.z_mage_aoe_170, entries.z_mage_aoe_170_equipment) - - entries.f_mage_aoe_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", ["uiR2EDequipment_icfalv_3"] = "icfalv_3.sitem", }, legs = { ["uiR2EDequipment_icfacp_2"] = "icfacp_2.sitem", ["uiR2EDequipment_icfacp_3"] = "icfacp_3.sitem", }, boots = { ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", ["uiR2EDequipment_icfalb_3"] = "icfalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", ["uiR2EDequipment_icfals_3"] = "icfals_3.sitem", }, gloves = { ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", ["uiR2EDequipment_icfalg_3"] = "icfalg_3.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icfm2ms_3.sitem::acid", ["uiR2EDequipment_cold"] = "icfm2ms_3.sitem::cold", ["uiR2EDequipment_rot"] = "icfm2ms_3.sitem::rot", ["uiR2EDequipment_fire"] = "icfm2ms_3.sitem::fire", }, } r2.addR2PlayerEquipment(entries.f_mage_aoe_220, entries.f_mage_aoe_220_equipment) - entries.m_mage_aoe_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", ["uiR2EDequipment_icmalv_3"] = "icmalv_3.sitem", }, legs = { ["uiR2EDequipment_icmacp_2"] = "icmacp_2.sitem", ["uiR2EDequipment_icmacp_3"] = "icmacp_3.sitem", }, boots = { ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", ["uiR2EDequipment_icmalb_3"] = "icmalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", ["uiR2EDequipment_icmals_3"] = "icmals_3.sitem", }, gloves = { ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", ["uiR2EDequipment_icmalg_3"] = "icmalg_3.sitem", }, hands = { ["uiR2EDequipment_acid"] = "icmm2ms_3.sitem::acid", ["uiR2EDequipment_cold"] = "icmm2ms_3.sitem::cold", ["uiR2EDequipment_rot"] = "icmm2ms_3.sitem::rot", ["uiR2EDequipment_poison"] = "icmm2ms_3.sitem::poison", }, } r2.addR2PlayerEquipment(entries.m_mage_aoe_220, entries.m_mage_aoe_220_equipment) - entries.t_mage_aoe_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", ["uiR2EDequipment_ictalv_3"] = "ictalv_3.sitem", }, legs = { ["uiR2EDequipment_ictacp_2"] = "ictacp_2.sitem", ["uiR2EDequipment_ictacp_3"] = "ictacp_3.sitem", }, boots = { ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", ["uiR2EDequipment_ictalb_3"] = "ictalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", ["uiR2EDequipment_ictals_3"] = "ictals_3.sitem", }, gloves = { ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", ["uiR2EDequipment_ictalg_3"] = "ictalg_3.sitem", }, hands = { ["uiR2EDequipment_acid"] = "ictm2ms_3.sitem::acid", ["uiR2EDequipment_cold"] = "ictm2ms_3.sitem::cold", ["uiR2EDequipment_rot"] = "ictm2ms_3.sitem::rot", ["uiR2EDequipment_shockwave"] = "ictm2ms_3.sitem::shockwave", }, } r2.addR2PlayerEquipment(entries.t_mage_aoe_220, entries.t_mage_aoe_220_equipment) - entries.z_mage_aoe_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", ["uiR2EDequipment_iczalv_3"] = "iczalv_3.sitem", }, legs = { ["uiR2EDequipment_iczacp_2"] = "iczacp_2.sitem", ["uiR2EDequipment_iczacp_3"] = "iczacp_3.sitem", }, boots = { ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", ["uiR2EDequipment_iczalb_3"] = "iczalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", ["uiR2EDequipment_iczals_3"] = "iczals_3.sitem", }, gloves = { ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", ["uiR2EDequipment_iczalg_3"] = "iczalg_3.sitem", }, hands = { ["uiR2EDequipment_acid"] = "iczm2ms_3.sitem::acid", ["uiR2EDequipment_cold"] = "iczm2ms_3.sitem::cold", ["uiR2EDequipment_rot"] = "iczm2ms_3.sitem::rot", ["uiR2EDequipment_electricity"] = "iczm2ms_3.sitem::electricity", }, } r2.addR2PlayerEquipment(entries.z_mage_aoe_220, entries.z_mage_aoe_220_equipment) - - --- Atysian Cursers - - entries.f_mage_atysian_curser_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_b2.creature", SheetModel="ring_magic_curser_$hands_b$level.creature", SheetClient="basic_fyros_male.creature", Level=20, RingAccess="a1", Equipment="f_mage_atysian_curser_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_atysian_curser_20", entries.f_mage_atysian_curser_20) - entries.m_mage_atysian_curser_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_b2.creature", SheetModel="ring_magic_curser_$hands_b$level.creature", SheetClient="basic_matis_male.creature", Level=20, RingAccess="a1", Equipment="m_mage_atysian_curser_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_atysian_curser_20", entries.m_mage_atysian_curser_20) - entries.t_mage_atysian_curser_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_b2.creature", SheetModel="ring_magic_curser_$hands_b$level.creature", SheetClient="basic_tryker_male.creature", Level=20, RingAccess="a1", Equipment="t_mage_atysian_curser_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_atysian_curser_20", entries.t_mage_atysian_curser_20) - entries.z_mage_atysian_curser_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_b2.creature", SheetModel="ring_magic_curser_$hands_b$level.creature", SheetClient="basic_zorai_male.creature", Level=20, RingAccess="a1", Equipment="z_mage_atysian_curser_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_atysian_curser_20", entries.z_mage_atysian_curser_20) - - entries.f_mage_atysian_curser_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_c2.creature", SheetModel="ring_magic_curser_$hands_c$level.creature", SheetClient="basic_fyros_male.creature", Level=70, RingAccess="d2", Equipment="f_mage_atysian_curser_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_atysian_curser_70", entries.f_mage_atysian_curser_70) - entries.m_mage_atysian_curser_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_c2.creature", SheetModel="ring_magic_curser_$hands_c$level.creature", SheetClient="basic_matis_male.creature", Level=70, RingAccess="f5", Equipment="m_mage_atysian_curser_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_atysian_curser_70", entries.m_mage_atysian_curser_70) - entries.t_mage_atysian_curser_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_c2.creature", SheetModel="ring_magic_curser_$hands_c$level.creature", SheetClient="basic_tryker_male.creature", Level=70, RingAccess="l5", Equipment="t_mage_atysian_curser_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_atysian_curser_70", entries.t_mage_atysian_curser_70) - entries.z_mage_atysian_curser_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_c2.creature", SheetModel="ring_magic_curser_$hands_c$level.creature", SheetClient="basic_zorai_male.creature", Level=70, RingAccess="j5", Equipment="z_mage_atysian_curser_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_atysian_curser_70", entries.z_mage_atysian_curser_70) - - entries.f_mage_atysian_curser_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_d2.creature", SheetModel="ring_magic_curser_$hands_d$level.creature", SheetClient="basic_fyros_male.creature", Level=120, RingAccess="d4", Equipment="f_mage_atysian_curser_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_atysian_curser_120", entries.f_mage_atysian_curser_120) - entries.m_mage_atysian_curser_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_d2.creature", SheetModel="ring_magic_curser_$hands_d$level.creature", SheetClient="basic_matis_male.creature", Level=120, RingAccess="f5", Equipment="m_mage_atysian_curser_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_atysian_curser_120", entries.m_mage_atysian_curser_120) - entries.t_mage_atysian_curser_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_d2.creature", SheetModel="ring_magic_curser_$hands_d$level.creature", SheetClient="basic_tryker_male.creature", Level=120, RingAccess="l5", Equipment="t_mage_atysian_curser_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_atysian_curser_120", entries.t_mage_atysian_curser_120) - entries.z_mage_atysian_curser_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_d2.creature", SheetModel="ring_magic_curser_$hands_d$level.creature", SheetClient="basic_zorai_male.creature", Level=120, RingAccess="j5", Equipment="z_mage_atysian_curser_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_atysian_curser_120", entries.z_mage_atysian_curser_120) - - entries.f_mage_atysian_curser_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_e2.creature", SheetModel="ring_magic_curser_$hands_e$level.creature", SheetClient="basic_fyros_male.creature", Level=170, RingAccess="d6", Equipment="f_mage_atysian_curser_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_atysian_curser_170", entries.f_mage_atysian_curser_170) - entries.m_mage_atysian_curser_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_e2.creature", SheetModel="ring_magic_curser_$hands_e$level.creature", SheetClient="basic_matis_male.creature", Level=170, RingAccess="f6", Equipment="m_mage_atysian_curser_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_atysian_curser_170", entries.m_mage_atysian_curser_170) - entries.t_mage_atysian_curser_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_e2.creature", SheetModel="ring_magic_curser_$hands_e$level.creature", SheetClient="basic_tryker_male.creature", Level=170, RingAccess="l5", Equipment="t_mage_atysian_curser_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_atysian_curser_170", entries.t_mage_atysian_curser_170) - entries.z_mage_atysian_curser_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_e2.creature", SheetModel="ring_magic_curser_$hands_e$level.creature", SheetClient="basic_zorai_male.creature", Level=170, RingAccess="j6", Equipment="z_mage_atysian_curser_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_atysian_curser_170", entries.z_mage_atysian_curser_170) - - entries.f_mage_atysian_curser_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_f2.creature", SheetModel="ring_magic_curser_$hands_f$level.creature", SheetClient="basic_fyros_male.creature", Level=220, RingAccess="d7", Equipment="f_mage_atysian_curser_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_atysian_curser_220", entries.f_mage_atysian_curser_220) - entries.m_mage_atysian_curser_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_f2.creature", SheetModel="ring_magic_curser_$hands_f$level.creature", SheetClient="basic_matis_male.creature", Level=220, RingAccess="f7", Equipment="m_mage_atysian_curser_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_atysian_curser_220", entries.m_mage_atysian_curser_220) - entries.t_mage_atysian_curser_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_f2.creature", SheetModel="ring_magic_curser_$hands_f$level.creature", SheetClient="basic_tryker_male.creature", Level=220, RingAccess="l6", Equipment="t_mage_atysian_curser_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_atysian_curser_220", entries.t_mage_atysian_curser_220) - entries.z_mage_atysian_curser_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_blind_f2.creature", SheetModel="ring_magic_curser_$hands_f$level.creature", SheetClient="basic_zorai_male.creature", Level=220, RingAccess="j7", Equipment="z_mage_atysian_curser_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_atysian_curser_220", entries.z_mage_atysian_curser_220) - - - entries.f_mage_atysian_curser_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalv"] = "icfalv.sitem", }, legs = { ["uiR2EDequipment_icfacp"] = "icfacp.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalg"] = "icfalg.sitem", }, hands = { ["uiR2EDequipment_root"] = "icfm2ms.sitem::root", ["uiR2EDequipment_blind"] = "icfm2ms.sitem::blind", ["uiR2EDequipment_snare"] = "icfm2ms.sitem::snare", ["uiR2EDequipment_slow"] = "icfm2ms.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms.sitem::madness", }, } r2.addR2PlayerEquipment(entries.f_mage_atysian_curser_20, entries.f_mage_atysian_curser_20_equipment) - entries.m_mage_atysian_curser_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalv"] = "icmalv.sitem", }, legs = { ["uiR2EDequipment_icmacp"] = "icmacp.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalg"] = "icmalg.sitem", }, hands = { ["uiR2EDequipment_root"] = "icmm2ms.sitem::root", ["uiR2EDequipment_blind"] = "icmm2ms.sitem::blind", ["uiR2EDequipment_snare"] = "icmm2ms.sitem::snare", ["uiR2EDequipment_slow"] = "icmm2ms.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms.sitem::madness", }, } r2.addR2PlayerEquipment(entries.m_mage_atysian_curser_20, entries.m_mage_atysian_curser_20_equipment) - entries.t_mage_atysian_curser_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalv"] = "ictalv.sitem", }, legs = { ["uiR2EDequipment_ictacp"] = "ictacp.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalg"] = "ictalg.sitem", }, hands = { ["uiR2EDequipment_root"] = "ictm2ms.sitem::root", ["uiR2EDequipment_blind"] = "ictm2ms.sitem::blind", ["uiR2EDequipment_snare"] = "ictm2ms.sitem::snare", ["uiR2EDequipment_slow"] = "ictm2ms.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms.sitem::madness", }, } r2.addR2PlayerEquipment(entries.t_mage_atysian_curser_20, entries.t_mage_atysian_curser_20_equipment) - entries.z_mage_atysian_curser_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalv"] = "iczalv.sitem", }, legs = { ["uiR2EDequipment_iczacp"] = "iczacp.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalg"] = "iczalg.sitem", }, hands = { ["uiR2EDequipment_root"] = "iczm2ms.sitem::root", ["uiR2EDequipment_blind"] = "iczm2ms.sitem::blind", ["uiR2EDequipment_snare"] = "iczm2ms.sitem::snare", ["uiR2EDequipment_slow"] = "iczm2ms.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms.sitem::madness", }, } r2.addR2PlayerEquipment(entries.z_mage_atysian_curser_20, entries.z_mage_atysian_curser_20_equipment) - - entries.f_mage_atysian_curser_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", }, legs = { ["uiR2EDequipment_icfacp"] = "icfacp.sitem", ["uiR2EDequipment_icfacp_2"] = "icfacp_2.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfals"] = "icfals.sitem", ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", }, gloves = { ["uiR2EDequipment_icfalg"] = "icfalg.sitem", ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", }, hands = { ["uiR2EDequipment_root"] = "icfm2ms_2.sitem::root", ["uiR2EDequipment_blind"] = "icfm2ms_2.sitem::blind", ["uiR2EDequipment_snare"] = "icfm2ms_2.sitem::snare", ["uiR2EDequipment_slow"] = "icfm2ms_2.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms_2.sitem::madness", }, } r2.addR2PlayerEquipment(entries.f_mage_atysian_curser_70, entries.f_mage_atysian_curser_70_equipment) - entries.m_mage_atysian_curser_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", }, legs = { ["uiR2EDequipment_icmacp"] = "icmacp.sitem", ["uiR2EDequipment_icmacp_2"] = "icmacp_2.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmals"] = "icmals.sitem", ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", }, gloves = { ["uiR2EDequipment_icmalg"] = "icmalg.sitem", ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", }, hands = { ["uiR2EDequipment_root"] = "icmm2ms_2.sitem::root", ["uiR2EDequipment_blind"] = "icmm2ms_2.sitem::blind", ["uiR2EDequipment_snare"] = "icmm2ms_2.sitem::snare", ["uiR2EDequipment_slow"] = "icmm2ms_2.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms_2.sitem::madness", }, } r2.addR2PlayerEquipment(entries.m_mage_atysian_curser_70, entries.m_mage_atysian_curser_70_equipment) - entries.t_mage_atysian_curser_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", }, legs = { ["uiR2EDequipment_ictacp"] = "ictacp.sitem", ["uiR2EDequipment_ictacp_2"] = "ictacp_2.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictals"] = "ictals.sitem", ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", }, gloves = { ["uiR2EDequipment_ictalg"] = "ictalg.sitem", ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", }, hands = { ["uiR2EDequipment_root"] = "ictm2ms_2.sitem::root", ["uiR2EDequipment_blind"] = "ictm2ms_2.sitem::blind", ["uiR2EDequipment_snare"] = "ictm2ms_2.sitem::snare", ["uiR2EDequipment_slow"] = "ictm2ms_2.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms_2.sitem::madness", }, } r2.addR2PlayerEquipment(entries.t_mage_atysian_curser_70, entries.t_mage_atysian_curser_70_equipment) - entries.z_mage_atysian_curser_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", }, legs = { ["uiR2EDequipment_iczacp"] = "iczacp.sitem", ["uiR2EDequipment_iczacp_2"] = "iczacp_2.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczals"] = "iczals.sitem", ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", }, gloves = { ["uiR2EDequipment_iczalg"] = "iczalg.sitem", ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", }, hands = { ["uiR2EDequipment_root"] = "iczm2ms_2.sitem::root", ["uiR2EDequipment_blind"] = "iczm2ms_2.sitem::blind", ["uiR2EDequipment_snare"] = "iczm2ms_2.sitem::snare", ["uiR2EDequipment_slow"] = "iczm2ms_2.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms_2.sitem::madness", }, } r2.addR2PlayerEquipment(entries.z_mage_atysian_curser_70, entries.z_mage_atysian_curser_70_equipment) - - entries.f_mage_atysian_curser_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", }, legs = { ["uiR2EDequipment_icfacp"] = "icfacp.sitem", ["uiR2EDequipment_icfacp_2"] = "icfacp_2.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfals"] = "icfals.sitem", ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", }, gloves = { ["uiR2EDequipment_icfalg"] = "icfalg.sitem", ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", }, hands = { ["uiR2EDequipment_root"] = "icfm2ms_2.sitem::root", ["uiR2EDequipment_blind"] = "icfm2ms_2.sitem::blind", ["uiR2EDequipment_snare"] = "icfm2ms_2.sitem::snare", ["uiR2EDequipment_slow"] = "icfm2ms_2.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms_2.sitem::madness", }, } r2.addR2PlayerEquipment(entries.f_mage_atysian_curser_120, entries.f_mage_atysian_curser_120_equipment) - entries.m_mage_atysian_curser_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", }, legs = { ["uiR2EDequipment_icmacp"] = "icmacp.sitem", ["uiR2EDequipment_icmacp_2"] = "icmacp_2.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmals"] = "icmals.sitem", ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", }, gloves = { ["uiR2EDequipment_icmalg"] = "icmalg.sitem", ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", }, hands = { ["uiR2EDequipment_root"] = "icmm2ms_2.sitem::root", ["uiR2EDequipment_blind"] = "icmm2ms_2.sitem::blind", ["uiR2EDequipment_snare"] = "icmm2ms_2.sitem::snare", ["uiR2EDequipment_slow"] = "icmm2ms_2.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms_2.sitem::madness", }, } r2.addR2PlayerEquipment(entries.m_mage_atysian_curser_120, entries.m_mage_atysian_curser_120_equipment) - entries.t_mage_atysian_curser_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", }, legs = { ["uiR2EDequipment_ictacp"] = "ictacp.sitem", ["uiR2EDequipment_ictacp_2"] = "ictacp_2.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictals"] = "ictals.sitem", ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", }, gloves = { ["uiR2EDequipment_ictalg"] = "ictalg.sitem", ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", }, hands = { ["uiR2EDequipment_root"] = "ictm2ms_2.sitem::root", ["uiR2EDequipment_blind"] = "ictm2ms_2.sitem::blind", ["uiR2EDequipment_snare"] = "ictm2ms_2.sitem::snare", ["uiR2EDequipment_slow"] = "ictm2ms_2.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms_2.sitem::madness", }, } r2.addR2PlayerEquipment(entries.t_mage_atysian_curser_120, entries.t_mage_atysian_curser_120_equipment) - entries.z_mage_atysian_curser_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", }, legs = { ["uiR2EDequipment_iczacp"] = "iczacp.sitem", ["uiR2EDequipment_iczacp_2"] = "iczacp_2.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczals"] = "iczals.sitem", ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", }, gloves = { ["uiR2EDequipment_iczalg"] = "iczalg.sitem", ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", }, hands = { ["uiR2EDequipment_root"] = "iczm2ms_2.sitem::root", ["uiR2EDequipment_blind"] = "iczm2ms_2.sitem::blind", ["uiR2EDequipment_snare"] = "iczm2ms_2.sitem::snare", ["uiR2EDequipment_slow"] = "iczm2ms_2.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms_2.sitem::madness", }, } r2.addR2PlayerEquipment(entries.z_mage_atysian_curser_120, entries.z_mage_atysian_curser_120_equipment) - - entries.f_mage_atysian_curser_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", ["uiR2EDequipment_icfalv_3"] = "icfalv_3.sitem", }, legs = { ["uiR2EDequipment_icfacp_2"] = "icfacp_2.sitem", ["uiR2EDequipment_icfacp_3"] = "icfacp_3.sitem", }, boots = { ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", ["uiR2EDequipment_icfalb_3"] = "icfalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", ["uiR2EDequipment_icfals_3"] = "icfals_3.sitem", }, gloves = { ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", ["uiR2EDequipment_icfalg_3"] = "icfalg_3.sitem", }, hands = { ["uiR2EDequipment_root"] = "icfm2ms_3.sitem::root", ["uiR2EDequipment_blind"] = "icfm2ms_3.sitem::blind", ["uiR2EDequipment_snare"] = "icfm2ms_3.sitem::snare", ["uiR2EDequipment_slow"] = "icfm2ms_3.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms_3.sitem::madness", }, } r2.addR2PlayerEquipment(entries.f_mage_atysian_curser_170, entries.f_mage_atysian_curser_170_equipment) - entries.m_mage_atysian_curser_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", ["uiR2EDequipment_icmalv_3"] = "icmalv_3.sitem", }, legs = { ["uiR2EDequipment_icmacp_2"] = "icmacp_2.sitem", ["uiR2EDequipment_icmacp_3"] = "icmacp_3.sitem", }, boots = { ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", ["uiR2EDequipment_icmalb_3"] = "icmalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", ["uiR2EDequipment_icmals_3"] = "icmals_3.sitem", }, gloves = { ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", ["uiR2EDequipment_icmalg_3"] = "icmalg_3.sitem", }, hands = { ["uiR2EDequipment_root"] = "icmm2ms_3.sitem::root", ["uiR2EDequipment_blind"] = "icmm2ms_3.sitem::blind", ["uiR2EDequipment_snare"] = "icmm2ms_3.sitem::snare", ["uiR2EDequipment_slow"] = "icmm2ms_3.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms_3.sitem::madness", }, } r2.addR2PlayerEquipment(entries.m_mage_atysian_curser_170, entries.m_mage_atysian_curser_170_equipment) - entries.t_mage_atysian_curser_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", ["uiR2EDequipment_ictalv_3"] = "ictalv_3.sitem", }, legs = { ["uiR2EDequipment_ictacp_2"] = "ictacp_2.sitem", ["uiR2EDequipment_ictacp_3"] = "ictacp_3.sitem", }, boots = { ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", ["uiR2EDequipment_ictalb_3"] = "ictalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", ["uiR2EDequipment_ictals_3"] = "ictals_3.sitem", }, gloves = { ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", ["uiR2EDequipment_ictalg_3"] = "ictalg_3.sitem", }, hands = { ["uiR2EDequipment_root"] = "ictm2ms_3.sitem::root", ["uiR2EDequipment_blind"] = "ictm2ms_3.sitem::blind", ["uiR2EDequipment_snare"] = "ictm2ms_3.sitem::snare", ["uiR2EDequipment_slow"] = "ictm2ms_3.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms_3.sitem::madness", }, } r2.addR2PlayerEquipment(entries.t_mage_atysian_curser_170, entries.t_mage_atysian_curser_170_equipment) - entries.z_mage_atysian_curser_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", ["uiR2EDequipment_iczalv_3"] = "iczalv_3.sitem", }, legs = { ["uiR2EDequipment_iczacp_2"] = "iczacp_2.sitem", ["uiR2EDequipment_iczacp_3"] = "iczacp_3.sitem", }, boots = { ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", ["uiR2EDequipment_iczalb_3"] = "iczalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", ["uiR2EDequipment_iczals_3"] = "iczals_3.sitem", }, gloves = { ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", ["uiR2EDequipment_iczalg_3"] = "iczalg_3.sitem", }, hands = { ["uiR2EDequipment_root"] = "iczm2ms_3.sitem::root", ["uiR2EDequipment_blind"] = "iczm2ms_3.sitem::blind", ["uiR2EDequipment_snare"] = "iczm2ms_3.sitem::snare", ["uiR2EDequipment_slow"] = "iczm2ms_3.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms_3.sitem::madness", }, } r2.addR2PlayerEquipment(entries.z_mage_atysian_curser_170, entries.z_mage_atysian_curser_170_equipment) - - entries.f_mage_atysian_curser_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", ["uiR2EDequipment_icfalv_3"] = "icfalv_3.sitem", }, legs = { ["uiR2EDequipment_icfacp_2"] = "icfacp_2.sitem", ["uiR2EDequipment_icfacp_3"] = "icfacp_3.sitem", }, boots = { ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", ["uiR2EDequipment_icfalb_3"] = "icfalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", ["uiR2EDequipment_icfals_3"] = "icfals_3.sitem", }, gloves = { ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", ["uiR2EDequipment_icfalg_3"] = "icfalg_3.sitem", }, hands = { ["uiR2EDequipment_root"] = "icfm2ms_3.sitem::root", ["uiR2EDequipment_blind"] = "icfm2ms_3.sitem::blind", ["uiR2EDequipment_snare"] = "icfm2ms_3.sitem::snare", ["uiR2EDequipment_slow"] = "icfm2ms_3.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms_3.sitem::madness", }, } r2.addR2PlayerEquipment(entries.f_mage_atysian_curser_220, entries.f_mage_atysian_curser_220_equipment) - entries.m_mage_atysian_curser_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", ["uiR2EDequipment_icmalv_3"] = "icmalv_3.sitem", }, legs = { ["uiR2EDequipment_icmacp_2"] = "icmacp_2.sitem", ["uiR2EDequipment_icmacp_3"] = "icmacp_3.sitem", }, boots = { ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", ["uiR2EDequipment_icmalb_3"] = "icmalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", ["uiR2EDequipment_icmals_3"] = "icmals_3.sitem", }, gloves = { ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", ["uiR2EDequipment_icmalg_3"] = "icmalg_3.sitem", }, hands = { ["uiR2EDequipment_root"] = "icmm2ms_3.sitem::root", ["uiR2EDequipment_blind"] = "icmm2ms_3.sitem::blind", ["uiR2EDequipment_snare"] = "icmm2ms_3.sitem::snare", ["uiR2EDequipment_slow"] = "icmm2ms_3.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms_3.sitem::madness", }, } r2.addR2PlayerEquipment(entries.m_mage_atysian_curser_220, entries.m_mage_atysian_curser_220_equipment) - entries.t_mage_atysian_curser_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", ["uiR2EDequipment_ictalv_3"] = "ictalv_3.sitem", }, legs = { ["uiR2EDequipment_ictacp_2"] = "ictacp_2.sitem", ["uiR2EDequipment_ictacp_3"] = "ictacp_3.sitem", }, boots = { ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", ["uiR2EDequipment_ictalb_3"] = "ictalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", ["uiR2EDequipment_ictals_3"] = "ictals_3.sitem", }, gloves = { ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", ["uiR2EDequipment_ictalg_3"] = "ictalg_3.sitem", }, hands = { ["uiR2EDequipment_root"] = "ictm2ms_3.sitem::root", ["uiR2EDequipment_blind"] = "ictm2ms_3.sitem::blind", ["uiR2EDequipment_snare"] = "ictm2ms_3.sitem::snare", ["uiR2EDequipment_slow"] = "ictm2ms_3.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms_3.sitem::madness", }, } r2.addR2PlayerEquipment(entries.t_mage_atysian_curser_220, entries.t_mage_atysian_curser_220_equipment) - entries.z_mage_atysian_curser_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", ["uiR2EDequipment_iczalv_3"] = "iczalv_3.sitem", }, legs = { ["uiR2EDequipment_iczacp_2"] = "iczacp_2.sitem", ["uiR2EDequipment_iczacp_3"] = "iczacp_3.sitem", }, boots = { ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", ["uiR2EDequipment_iczalb_3"] = "iczalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", ["uiR2EDequipment_iczals_3"] = "iczals_3.sitem", }, gloves = { ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", ["uiR2EDequipment_iczalg_3"] = "iczalg_3.sitem", }, hands = { ["uiR2EDequipment_root"] = "iczm2ms_3.sitem::root", ["uiR2EDequipment_blind"] = "iczm2ms_3.sitem::blind", ["uiR2EDequipment_snare"] = "iczm2ms_3.sitem::snare", ["uiR2EDequipment_slow"] = "iczm2ms_3.sitem::slow", ["uiR2EDequipment_madness"] = "icfm2ms_3.sitem::madness", }, } r2.addR2PlayerEquipment(entries.z_mage_atysian_curser_220, entries.z_mage_atysian_curser_220_equipment) - - - --- Celestial Cursers - - entries.f_mage_celestial_curser_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_sleep_b2.creature", SheetModel="ring_magic_curser_$hands_b$level.creature", SheetClient="basic_fyros_male.creature", Level=20, RingAccess="a1", Equipment="f_mage_celestial_curser_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_celestial_curser_20", entries.f_mage_celestial_curser_20) - entries.m_mage_celestial_curser_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_sleep_b2.creature", SheetModel="ring_magic_curser_$hands_b$level.creature", SheetClient="basic_matis_male.creature", Level=20, RingAccess="a1", Equipment="m_mage_celestial_curser_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_celestial_curser_20", entries.m_mage_celestial_curser_20) - entries.t_mage_celestial_curser_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_stun_b2.creature", SheetModel="ring_magic_curser_$hands_b$level.creature", SheetClient="basic_tryker_male.creature", Level=20, RingAccess="a1", Equipment="t_mage_celestial_curser_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_celestial_curser_20", entries.t_mage_celestial_curser_20) - entries.z_mage_celestial_curser_20 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_fear_b2.creature", SheetModel="ring_magic_curser_$hands_b$level.creature", SheetClient="basic_zorai_male.creature", Level=20, RingAccess="a1", Equipment="z_mage_celestial_curser_20_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_celestial_curser_20", entries.z_mage_celestial_curser_20) - - entries.f_mage_celestial_curser_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_sleep_c2.creature", SheetModel="ring_magic_curser_$hands_c$level.creature", SheetClient="basic_fyros_male.creature", Level=70, RingAccess="d2", Equipment="f_mage_celestial_curser_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_celestial_curser_70", entries.f_mage_celestial_curser_70) - entries.m_mage_celestial_curser_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_sleep_c2.creature", SheetModel="ring_magic_curser_$hands_c$level.creature", SheetClient="basic_matis_male.creature", Level=70, RingAccess="f5", Equipment="m_mage_celestial_curser_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_celestial_curser_70", entries.m_mage_celestial_curser_70) - entries.t_mage_celestial_curser_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_stun_c2.creature", SheetModel="ring_magic_curser_$hands_c$level.creature", SheetClient="basic_tryker_male.creature", Level=70, RingAccess="l5", Equipment="t_mage_celestial_curser_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_celestial_curser_70", entries.t_mage_celestial_curser_70) - entries.z_mage_celestial_curser_70 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_fear_c2.creature", SheetModel="ring_magic_curser_$hands_c$level.creature", SheetClient="basic_zorai_male.creature", Level=70, RingAccess="j5", Equipment="z_mage_celestial_curser_70_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_celestial_curser_70", entries.z_mage_celestial_curser_70) - - entries.f_mage_celestial_curser_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_sleep_d2.creature", SheetModel="ring_magic_curser_$hands_d$level.creature", SheetClient="basic_fyros_male.creature", Level=120, RingAccess="d4", Equipment="f_mage_celestial_curser_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_celestial_curser_120", entries.f_mage_celestial_curser_120) - entries.m_mage_celestial_curser_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_sleep_d2.creature", SheetModel="ring_magic_curser_$hands_d$level.creature", SheetClient="basic_matis_male.creature", Level=120, RingAccess="f5", Equipment="m_mage_celestial_curser_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_celestial_curser_120", entries.m_mage_celestial_curser_120) - entries.t_mage_celestial_curser_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_stun_d2.creature", SheetModel="ring_magic_curser_$hands_d$level.creature", SheetClient="basic_tryker_male.creature", Level=120, RingAccess="l5", Equipment="t_mage_celestial_curser_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_celestial_curser_120", entries.t_mage_celestial_curser_120) - entries.z_mage_celestial_curser_120 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_fear_d2.creature", SheetModel="ring_magic_curser_$hands_d$level.creature", SheetClient="basic_zorai_male.creature", Level=120, RingAccess="j5", Equipment="z_mage_celestial_curser_120_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_celestial_curser_120", entries.z_mage_celestial_curser_120) - - entries.f_mage_celestial_curser_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_sleep_e2.creature", SheetModel="ring_magic_curser_$hands_e$level.creature", SheetClient="basic_fyros_male.creature", Level=170, RingAccess="d6", Equipment="f_mage_celestial_curser_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_celestial_curser_170", entries.f_mage_celestial_curser_170) - entries.m_mage_celestial_curser_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_sleep_e2.creature", SheetModel="ring_magic_curser_$hands_e$level.creature", SheetClient="basic_matis_male.creature", Level=170, RingAccess="f6", Equipment="m_mage_celestial_curser_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_celestial_curser_170", entries.m_mage_celestial_curser_170) - entries.t_mage_celestial_curser_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_stun_e2.creature", SheetModel="ring_magic_curser_$hands_e$level.creature", SheetClient="basic_tryker_male.creature", Level=170, RingAccess="l5", Equipment="t_mage_celestial_curser_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_celestial_curser_170", entries.t_mage_celestial_curser_170) - entries.z_mage_celestial_curser_170 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_fear_e2.creature", SheetModel="ring_magic_curser_$hands_e$level.creature", SheetClient="basic_zorai_male.creature", Level=170, RingAccess="j6", Equipment="z_mage_celestial_curser_170_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_celestial_curser_170", entries.z_mage_celestial_curser_170) - - entries.f_mage_celestial_curser_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_sleep_f2.creature", SheetModel="ring_magic_curser_$hands_f$level.creature", SheetClient="basic_fyros_male.creature", Level=220, RingAccess="d7", Equipment="f_mage_celestial_curser_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.f_mage_celestial_curser_220", entries.f_mage_celestial_curser_220) - entries.m_mage_celestial_curser_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_sleep_f2.creature", SheetModel="ring_magic_curser_$hands_f$level.creature", SheetClient="basic_matis_male.creature", Level=220, RingAccess="f7", Equipment="m_mage_celestial_curser_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.m_mage_celestial_curser_220", entries.m_mage_celestial_curser_220) - entries.t_mage_celestial_curser_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_stun_f2.creature", SheetModel="ring_magic_curser_$hands_f$level.creature", SheetClient="basic_tryker_male.creature", Level=220, RingAccess="l6", Equipment="t_mage_celestial_curser_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.t_mage_celestial_curser_220", entries.t_mage_celestial_curser_220) - entries.z_mage_celestial_curser_220 = { Class="NpcCustom", Type="base", Base="palette.entities.bandit", Sheet="ring_magic_curser_fear_f2.creature", SheetModel="ring_magic_curser_$hands_f$level.creature", SheetClient="basic_zorai_male.creature", Level=220, RingAccess="j7", Equipment="z_mage_celestial_curser_220_equipment" } r2.addPaletteElement("palette.entities.npcs.bandits.z_mage_celestial_curser_220", entries.z_mage_celestial_curser_220) - - - entries.f_mage_celestial_curser_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalv"] = "icfalv.sitem", }, legs = { ["uiR2EDequipment_icfacp"] = "icfacp.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalg"] = "icfalg.sitem", }, hands = { ["uiR2EDequipment_fear"] = "icfm2ms.sitem::fear", ["uiR2EDequipment_stun"] = "icfm2ms.sitem::stun", ["uiR2EDequipment_sleep"] = "icfm2ms.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.f_mage_celestial_curser_20, entries.f_mage_celestial_curser_20_equipment) - entries.m_mage_celestial_curser_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalv"] = "icmalv.sitem", }, legs = { ["uiR2EDequipment_icmacp"] = "icmacp.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalg"] = "icmalg.sitem", }, hands = { ["uiR2EDequipment_fear"] = "icmm2ms.sitem::fear", ["uiR2EDequipment_stun"] = "icmm2ms.sitem::stun", ["uiR2EDequipment_sleep"] = "icmm2ms.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.m_mage_celestial_curser_20, entries.m_mage_celestial_curser_20_equipment) - entries.t_mage_celestial_curser_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalv"] = "ictalv.sitem", }, legs = { ["uiR2EDequipment_ictacp"] = "ictacp.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalg"] = "ictalg.sitem", }, hands = { ["uiR2EDequipment_fear"] = "ictm2ms.sitem::fear", ["uiR2EDequipment_stun"] = "ictm2ms.sitem::stun", ["uiR2EDequipment_sleep"] = "ictm2ms.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.t_mage_celestial_curser_20, entries.t_mage_celestial_curser_20_equipment) - entries.z_mage_celestial_curser_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalv"] = "iczalv.sitem", }, legs = { ["uiR2EDequipment_iczacp"] = "iczacp.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalg"] = "iczalg.sitem", }, hands = { ["uiR2EDequipment_fear"] = "iczm2ms.sitem::fear", ["uiR2EDequipment_stun"] = "iczm2ms.sitem::stun", ["uiR2EDequipment_sleep"] = "iczm2ms.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.z_mage_celestial_curser_20, entries.z_mage_celestial_curser_20_equipment) - - entries.f_mage_celestial_curser_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", }, legs = { ["uiR2EDequipment_icfacp"] = "icfacp.sitem", ["uiR2EDequipment_icfacp_2"] = "icfacp_2.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfals"] = "icfals.sitem", ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", }, gloves = { ["uiR2EDequipment_icfalg"] = "icfalg.sitem", ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", }, hands = { ["uiR2EDequipment_fear"] = "icfm2ms_2.sitem::fear", ["uiR2EDequipment_stun"] = "icfm2ms_2.sitem::stun", ["uiR2EDequipment_sleep"] = "icfm2ms_2.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.f_mage_celestial_curser_70, entries.f_mage_celestial_curser_70_equipment) - entries.m_mage_celestial_curser_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", }, legs = { ["uiR2EDequipment_icmacp"] = "icmacp.sitem", ["uiR2EDequipment_icmacp_2"] = "icmacp_2.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmals"] = "icmals.sitem", ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", }, gloves = { ["uiR2EDequipment_icmalg"] = "icmalg.sitem", ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", }, hands = { ["uiR2EDequipment_fear"] = "icmm2ms_2.sitem::fear", ["uiR2EDequipment_stun"] = "icmm2ms_2.sitem::stun", ["uiR2EDequipment_sleep"] = "icmm2ms_2.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.m_mage_celestial_curser_70, entries.m_mage_celestial_curser_70_equipment) - entries.t_mage_celestial_curser_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", }, legs = { ["uiR2EDequipment_ictacp"] = "ictacp.sitem", ["uiR2EDequipment_ictacp_2"] = "ictacp_2.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictals"] = "ictals.sitem", ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", }, gloves = { ["uiR2EDequipment_ictalg"] = "ictalg.sitem", ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", }, hands = { ["uiR2EDequipment_fear"] = "ictm2ms_2.sitem::fear", ["uiR2EDequipment_stun"] = "ictm2ms_2.sitem::stun", ["uiR2EDequipment_sleep"] = "ictm2ms_2.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.t_mage_celestial_curser_70, entries.t_mage_celestial_curser_70_equipment) - entries.z_mage_celestial_curser_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", }, legs = { ["uiR2EDequipment_iczacp"] = "iczacp.sitem", ["uiR2EDequipment_iczacp_2"] = "iczacp_2.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczals"] = "iczals.sitem", ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", }, gloves = { ["uiR2EDequipment_iczalg"] = "iczalg.sitem", ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", }, hands = { ["uiR2EDequipment_fear"] = "iczm2ms_2.sitem::fear", ["uiR2EDequipment_stun"] = "iczm2ms_2.sitem::stun", ["uiR2EDequipment_sleep"] = "iczm2ms_2.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.z_mage_celestial_curser_70, entries.z_mage_celestial_curser_70_equipment) - - entries.f_mage_celestial_curser_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", }, legs = { ["uiR2EDequipment_icfacp"] = "icfacp.sitem", ["uiR2EDequipment_icfacp_2"] = "icfacp_2.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfals"] = "icfals.sitem", ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", }, gloves = { ["uiR2EDequipment_icfalg"] = "icfalg.sitem", ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", }, hands = { ["uiR2EDequipment_fear"] = "icfm2ms_2.sitem::fear", ["uiR2EDequipment_stun"] = "icfm2ms_2.sitem::stun", ["uiR2EDequipment_sleep"] = "icfm2ms_2.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.f_mage_celestial_curser_120, entries.f_mage_celestial_curser_120_equipment) - entries.m_mage_celestial_curser_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", }, legs = { ["uiR2EDequipment_icmacp"] = "icmacp.sitem", ["uiR2EDequipment_icmacp_2"] = "icmacp_2.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmals"] = "icmals.sitem", ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", }, gloves = { ["uiR2EDequipment_icmalg"] = "icmalg.sitem", ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", }, hands = { ["uiR2EDequipment_fear"] = "icmm2ms_2.sitem::fear", ["uiR2EDequipment_stun"] = "icmm2ms_2.sitem::stun", ["uiR2EDequipment_sleep"] = "icmm2ms_2.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.m_mage_celestial_curser_120, entries.m_mage_celestial_curser_120_equipment) - entries.t_mage_celestial_curser_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", }, legs = { ["uiR2EDequipment_ictacp"] = "ictacp.sitem", ["uiR2EDequipment_ictacp_2"] = "ictacp_2.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictals"] = "ictals.sitem", ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", }, gloves = { ["uiR2EDequipment_ictalg"] = "ictalg.sitem", ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", }, hands = { ["uiR2EDequipment_fear"] = "ictm2ms_2.sitem::fear", ["uiR2EDequipment_stun"] = "ictm2ms_2.sitem::stun", ["uiR2EDequipment_sleep"] = "ictm2ms_2.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.t_mage_celestial_curser_120, entries.t_mage_celestial_curser_120_equipment) - entries.z_mage_celestial_curser_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", }, legs = { ["uiR2EDequipment_iczacp"] = "iczacp.sitem", ["uiR2EDequipment_iczacp_2"] = "iczacp_2.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczals"] = "iczals.sitem", ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", }, gloves = { ["uiR2EDequipment_iczalg"] = "iczalg.sitem", ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", }, hands = { ["uiR2EDequipment_fear"] = "iczm2ms_2.sitem::fear", ["uiR2EDequipment_stun"] = "iczm2ms_2.sitem::stun", ["uiR2EDequipment_sleep"] = "iczm2ms_2.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.z_mage_celestial_curser_120, entries.z_mage_celestial_curser_120_equipment) - - entries.f_mage_celestial_curser_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", ["uiR2EDequipment_icfalv_3"] = "icfalv_3.sitem", }, legs = { ["uiR2EDequipment_icfacp_2"] = "icfacp_2.sitem", ["uiR2EDequipment_icfacp_3"] = "icfacp_3.sitem", }, boots = { ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", ["uiR2EDequipment_icfalb_3"] = "icfalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", ["uiR2EDequipment_icfals_3"] = "icfals_3.sitem", }, gloves = { ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", ["uiR2EDequipment_icfalg_3"] = "icfalg_3.sitem", }, hands = { ["uiR2EDequipment_fear"] = "icfm2ms_3.sitem::fear", ["uiR2EDequipment_stun"] = "icfm2ms_3.sitem::stun", ["uiR2EDequipment_sleep"] = "icfm2ms_3.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.f_mage_celestial_curser_170, entries.f_mage_celestial_curser_170_equipment) - entries.m_mage_celestial_curser_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", ["uiR2EDequipment_icmalv_3"] = "icmalv_3.sitem", }, legs = { ["uiR2EDequipment_icmacp_2"] = "icmacp_2.sitem", ["uiR2EDequipment_icmacp_3"] = "icmacp_3.sitem", }, boots = { ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", ["uiR2EDequipment_icmalb_3"] = "icmalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", ["uiR2EDequipment_icmals_3"] = "icmals_3.sitem", }, gloves = { ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", ["uiR2EDequipment_icmalg_3"] = "icmalg_3.sitem", }, hands = { ["uiR2EDequipment_fear"] = "icmm2ms_3.sitem::fear", ["uiR2EDequipment_stun"] = "icmm2ms_3.sitem::stun", ["uiR2EDequipment_sleep"] = "icmm2ms_3.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.m_mage_celestial_curser_170, entries.m_mage_celestial_curser_170_equipment) - entries.t_mage_celestial_curser_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", ["uiR2EDequipment_ictalv_3"] = "ictalv_3.sitem", }, legs = { ["uiR2EDequipment_ictacp_2"] = "ictacp_2.sitem", ["uiR2EDequipment_ictacp_3"] = "ictacp_3.sitem", }, boots = { ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", ["uiR2EDequipment_ictalb_3"] = "ictalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", ["uiR2EDequipment_ictals_3"] = "ictals_3.sitem", }, gloves = { ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", ["uiR2EDequipment_ictalg_3"] = "ictalg_3.sitem", }, hands = { ["uiR2EDequipment_fear"] = "ictm2ms_3.sitem::fear", ["uiR2EDequipment_stun"] = "ictm2ms_3.sitem::stun", ["uiR2EDequipment_sleep"] = "ictm2ms_3.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.t_mage_celestial_curser_170, entries.t_mage_celestial_curser_170_equipment) - entries.z_mage_celestial_curser_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", ["uiR2EDequipment_iczalv_3"] = "iczalv_3.sitem", }, legs = { ["uiR2EDequipment_iczacp_2"] = "iczacp_2.sitem", ["uiR2EDequipment_iczacp_3"] = "iczacp_3.sitem", }, boots = { ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", ["uiR2EDequipment_iczalb_3"] = "iczalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", ["uiR2EDequipment_iczals_3"] = "iczals_3.sitem", }, gloves = { ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", ["uiR2EDequipment_iczalg_3"] = "iczalg_3.sitem", }, hands = { ["uiR2EDequipment_fear"] = "iczm2ms_3.sitem::fear", ["uiR2EDequipment_stun"] = "iczm2ms_3.sitem::stun", ["uiR2EDequipment_sleep"] = "iczm2ms_3.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.z_mage_celestial_curser_170, entries.z_mage_celestial_curser_170_equipment) - - entries.f_mage_celestial_curser_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", ["uiR2EDequipment_icfalv_3"] = "icfalv_3.sitem", }, legs = { ["uiR2EDequipment_icfacp_2"] = "icfacp_2.sitem", ["uiR2EDequipment_icfacp_3"] = "icfacp_3.sitem", }, boots = { ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", ["uiR2EDequipment_icfalb_3"] = "icfalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", ["uiR2EDequipment_icfals_3"] = "icfals_3.sitem", }, gloves = { ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", ["uiR2EDequipment_icfalg_3"] = "icfalg_3.sitem", }, hands = { ["uiR2EDequipment_fear"] = "icfm2ms_3.sitem::fear", ["uiR2EDequipment_stun"] = "icfm2ms_3.sitem::stun", ["uiR2EDequipment_sleep"] = "icfm2ms_3.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.f_mage_celestial_curser_220, entries.f_mage_celestial_curser_220_equipment) - entries.m_mage_celestial_curser_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", ["uiR2EDequipment_icmalv_3"] = "icmalv_3.sitem", }, legs = { ["uiR2EDequipment_icmacp_2"] = "icmacp_2.sitem", ["uiR2EDequipment_icmacp_3"] = "icmacp_3.sitem", }, boots = { ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", ["uiR2EDequipment_icmalb_3"] = "icmalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", ["uiR2EDequipment_icmals_3"] = "icmals_3.sitem", }, gloves = { ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", ["uiR2EDequipment_icmalg_3"] = "icmalg_3.sitem", }, hands = { ["uiR2EDequipment_fear"] = "icmm2ms_3.sitem::fear", ["uiR2EDequipment_stun"] = "icmm2ms_3.sitem::stun", ["uiR2EDequipment_sleep"] = "icmm2ms_3.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.m_mage_celestial_curser_220, entries.m_mage_celestial_curser_220_equipment) - entries.t_mage_celestial_curser_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", ["uiR2EDequipment_ictalv_3"] = "ictalv_3.sitem", }, legs = { ["uiR2EDequipment_ictacp_2"] = "ictacp_2.sitem", ["uiR2EDequipment_ictacp_3"] = "ictacp_3.sitem", }, boots = { ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", ["uiR2EDequipment_ictalb_3"] = "ictalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", ["uiR2EDequipment_ictals_3"] = "ictals_3.sitem", }, gloves = { ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", ["uiR2EDequipment_ictalg_3"] = "ictalg_3.sitem", }, hands = { ["uiR2EDequipment_fear"] = "ictm2ms_3.sitem::fear", ["uiR2EDequipment_stun"] = "ictm2ms_3.sitem::stun", ["uiR2EDequipment_sleep"] = "ictm2ms_3.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.t_mage_celestial_curser_220, entries.t_mage_celestial_curser_220_equipment) - entries.z_mage_celestial_curser_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", ["uiR2EDequipment_iczalv_3"] = "iczalv_3.sitem", }, legs = { ["uiR2EDequipment_iczacp_2"] = "iczacp_2.sitem", ["uiR2EDequipment_iczacp_3"] = "iczacp_3.sitem", }, boots = { ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", ["uiR2EDequipment_iczalb_3"] = "iczalb_3.sitem", }, arms_guard = { ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", ["uiR2EDequipment_iczals_3"] = "iczals_3.sitem", }, gloves = { ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", ["uiR2EDequipment_iczalg_3"] = "iczalg_3.sitem", }, hands = { ["uiR2EDequipment_fear"] = "iczm2ms_3.sitem::fear", ["uiR2EDequipment_stun"] = "iczm2ms_3.sitem::stun", ["uiR2EDequipment_sleep"] = "iczm2ms_3.sitem::sleep", }, } r2.addR2PlayerEquipment(entries.z_mage_celestial_curser_220, entries.z_mage_celestial_curser_220_equipment) - - - - --- Civilians - - entries.f_civil_20 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_b2.creature", SheetModel="ring_civil_light_melee_$hands_b$level.creature", SheetClient="basic_fyros_male.creature", Level=20, RingAccess="a1", Equipment="f_civil_20_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.f_civil_20", entries.f_civil_20) - entries.m_civil_20 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_b2.creature", SheetModel="ring_civil_light_melee_$hands_b$level.creature", SheetClient="basic_matis_male.creature", Level=20, RingAccess="a1", Equipment="m_civil_20_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.m_civil_20", entries.m_civil_20) - entries.t_civil_20 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_b2.creature", SheetModel="ring_civil_light_melee_$hands_b$level.creature", SheetClient="basic_tryker_male.creature", Level=20, RingAccess="a1", Equipment="t_civil_20_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.t_civil_20", entries.t_civil_20) - entries.z_civil_20 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_b2.creature", SheetModel="ring_civil_light_melee_$hands_b$level.creature", SheetClient="basic_zorai_male.creature", Level=20, RingAccess="a1", Equipment="z_civil_20_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.z_civil_20", entries.z_civil_20) - - entries.f_civil_70 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_c2.creature", SheetModel="ring_civil_light_melee_$hands_c$level.creature", SheetClient="basic_fyros_male.creature", Level=70, RingAccess="d2", Equipment="f_civil_70_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.f_civil_70", entries.f_civil_70) - entries.m_civil_70 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_c2.creature", SheetModel="ring_civil_light_melee_$hands_c$level.creature", SheetClient="basic_matis_male.creature", Level=70, RingAccess="f5", Equipment="m_civil_70_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.m_civil_70", entries.m_civil_70) - entries.t_civil_70 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_c2.creature", SheetModel="ring_civil_light_melee_$hands_c$level.creature", SheetClient="basic_tryker_male.creature", Level=70, RingAccess="l5", Equipment="t_civil_70_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.t_civil_70", entries.t_civil_70) - entries.z_civil_70 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_c2.creature", SheetModel="ring_civil_light_melee_$hands_c$level.creature", SheetClient="basic_zorai_male.creature", Level=70, RingAccess="j5", Equipment="z_civil_70_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.z_civil_70", entries.z_civil_70) - - entries.f_civil_120 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_d2.creature", SheetModel="ring_civil_light_melee_$hands_d$level.creature", SheetClient="basic_fyros_male.creature", Level=120, RingAccess="d4", Equipment="f_civil_120_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.f_civil_120", entries.f_civil_120) - entries.m_civil_120 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_d2.creature", SheetModel="ring_civil_light_melee_$hands_d$level.creature", SheetClient="basic_matis_male.creature", Level=120, RingAccess="f5", Equipment="m_civil_120_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.m_civil_120", entries.m_civil_120) - entries.t_civil_120 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_d2.creature", SheetModel="ring_civil_light_melee_$hands_d$level.creature", SheetClient="basic_tryker_male.creature", Level=120, RingAccess="l5", Equipment="t_civil_120_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.t_civil_120", entries.t_civil_120) - entries.z_civil_120 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_d2.creature", SheetModel="ring_civil_light_melee_$hands_d$level.creature", SheetClient="basic_zorai_male.creature", Level=120, RingAccess="j5", Equipment="z_civil_120_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.z_civil_120", entries.z_civil_120) - - entries.f_civil_170 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_e2.creature", SheetModel="ring_civil_light_melee_$hands_e$level.creature", SheetClient="basic_fyros_male.creature", Level=170, RingAccess="d6", Equipment="f_civil_170_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.f_civil_170", entries.f_civil_170) - entries.m_civil_170 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_e2.creature", SheetModel="ring_civil_light_melee_$hands_e$level.creature", SheetClient="basic_matis_male.creature", Level=170, RingAccess="f6", Equipment="m_civil_170_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.m_civil_170", entries.m_civil_170) - entries.t_civil_170 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_e2.creature", SheetModel="ring_civil_light_melee_$hands_e$level.creature", SheetClient="basic_tryker_male.creature", Level=170, RingAccess="l5", Equipment="t_civil_170_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.t_civil_170", entries.t_civil_170) - entries.z_civil_170 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_e2.creature", SheetModel="ring_civil_light_melee_$hands_e$level.creature", SheetClient="basic_zorai_male.creature", Level=170, RingAccess="j6", Equipment="z_civil_170_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.z_civil_170", entries.z_civil_170) - - entries.f_civil_220 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_f2.creature", SheetModel="ring_civil_light_melee_$hands_f$level.creature", SheetClient="basic_fyros_male.creature", Level=220, RingAccess="d7", Equipment="f_civil_220_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.f_civil_220", entries.f_civil_220) - entries.m_civil_220 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_f2.creature", SheetModel="ring_civil_light_melee_$hands_f$level.creature", SheetClient="basic_matis_male.creature", Level=220, RingAccess="f7", Equipment="m_civil_220_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.m_civil_220", entries.m_civil_220) - entries.t_civil_220 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_f2.creature", SheetModel="ring_civil_light_melee_$hands_f$level.creature", SheetClient="basic_tryker_male.creature", Level=220, RingAccess="l6", Equipment="t_civil_220_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.t_civil_220", entries.t_civil_220) - entries.z_civil_220 = { Class="NpcCustom", Type="base", Base="palette.entities.civil", Sheet="ring_civil_light_melee_blunt_f2.creature", SheetModel="ring_civil_light_melee_$hands_f$level.creature", SheetClient="basic_zorai_male.creature", Level=220, RingAccess="j7", Equipment="z_civil_220_equipment" } r2.addPaletteElement("palette.entities.npcs.civils.z_civil_220", entries.z_civil_220) - - - entries.f_civil_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalv"] = "icfalv.sitem", }, legs = { ["uiR2EDequipment_icfalp"] = "icfalp.sitem", }, boots = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalb"] = "icfalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalg"] = "icfalg.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.f_civil_20, entries.f_civil_20_equipment) - entries.m_civil_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalv"] = "icmalv.sitem", }, legs = { ["uiR2EDequipment_icmalp"] = "icmalp.sitem", }, boots = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalb"] = "icmalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalg"] = "icmalg.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.m_civil_20, entries.m_civil_20_equipment) - entries.t_civil_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalv"] = "ictalv.sitem", }, legs = { ["uiR2EDequipment_ictalp"] = "ictalp.sitem", }, boots = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalb"] = "ictalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalg"] = "ictalg.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.t_civil_20, entries.t_civil_20_equipment) - entries.z_civil_20_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalv"] = "iczalv.sitem", }, legs = { ["uiR2EDequipment_iczalp"] = "iczalp.sitem", }, boots = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalb"] = "iczalb.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalg"] = "iczalg.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.z_civil_20, entries.z_civil_20_equipment) - - entries.f_civil_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", }, legs = { ["uiR2EDequipment_icfalp"] = "icfalp.sitem", ["uiR2EDequipment_icfalp_2"] = "icfalp_2.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfals"] = "icfals.sitem", ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalg"] = "icfalg.sitem", ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.f_civil_70, entries.f_civil_70_equipment) - entries.m_civil_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", }, legs = { ["uiR2EDequipment_icmalp"] = "icmalp.sitem", ["uiR2EDequipment_icmalp_2"] = "icmalp_2.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmals"] = "icmals.sitem", ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalg"] = "icmalg.sitem", ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.m_civil_70, entries.m_civil_70_equipment) - entries.t_civil_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", }, legs = { ["uiR2EDequipment_ictalp"] = "ictalp.sitem", ["uiR2EDequipment_ictalp_2"] = "ictalp_2.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictals"] = "ictals.sitem", ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalg"] = "ictalg.sitem", ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.t_civil_70, entries.t_civil_70_equipment) - entries.z_civil_70_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", }, legs = { ["uiR2EDequipment_iczalp"] = "iczalp.sitem", ["uiR2EDequipment_iczalp_2"] = "iczalp_2.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczals"] = "iczals.sitem", ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalg"] = "iczalg.sitem", ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.z_civil_70, entries.z_civil_70_equipment) - - entries.f_civil_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv"] = "icfalv.sitem", ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", }, legs = { ["uiR2EDequipment_icfalp"] = "icfalp.sitem", ["uiR2EDequipment_icfalp_2"] = "icfalp_2.sitem", }, boots = { ["uiR2EDequipment_icfalb"] = "icfalb.sitem", ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfals"] = "icfals.sitem", ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfalg"] = "icfalg.sitem", ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.f_civil_120, entries.f_civil_120_equipment) - entries.m_civil_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv"] = "icmalv.sitem", ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", }, legs = { ["uiR2EDequipment_icmalp"] = "icmalp.sitem", ["uiR2EDequipment_icmalp_2"] = "icmalp_2.sitem", }, boots = { ["uiR2EDequipment_icmalb"] = "icmalb.sitem", ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmals"] = "icmals.sitem", ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmalg"] = "icmalg.sitem", ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.m_civil_120, entries.m_civil_120_equipment) - entries.t_civil_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv"] = "ictalv.sitem", ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", }, legs = { ["uiR2EDequipment_ictalp"] = "ictalp.sitem", ["uiR2EDequipment_ictalp_2"] = "ictalp_2.sitem", }, boots = { ["uiR2EDequipment_ictalb"] = "ictalb.sitem", ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictals"] = "ictals.sitem", ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictalg"] = "ictalg.sitem", ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.t_civil_120, entries.t_civil_120_equipment) - entries.z_civil_120_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv"] = "iczalv.sitem", ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", }, legs = { ["uiR2EDequipment_iczalp"] = "iczalp.sitem", ["uiR2EDequipment_iczalp_2"] = "iczalp_2.sitem", }, boots = { ["uiR2EDequipment_iczalb"] = "iczalb.sitem", ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczals"] = "iczals.sitem", ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", }, gloves = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczalg"] = "iczalg.sitem", ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.z_civil_120, entries.z_civil_120_equipment) - - entries.f_civil_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", ["uiR2EDequipment_icfamv_2"] = "icfamv_2.sitem", ["uiR2EDequipment_icfalv_3"] = "icfalv_3.sitem", ["uiR2EDequipment_icfamv_3"] = "icfamv_3.sitem", }, legs = { ["uiR2EDequipment_icfalp_2"] = "icfalp_2.sitem", ["uiR2EDequipment_icfamp_2"] = "icfamp_2.sitem", ["uiR2EDequipment_icfalp_3"] = "icfalp_3.sitem", ["uiR2EDequipment_icfamp_3"] = "icfamp_3.sitem", }, boots = { ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", ["uiR2EDequipment_icfamb_2"] = "icfamb_2.sitem", ["uiR2EDequipment_icfalb_3"] = "icfalb_3.sitem", ["uiR2EDequipment_icfamb_3"] = "icfamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", ["uiR2EDequipment_icfams_2"] = "icfams_2.sitem", ["uiR2EDequipment_icfals_3"] = "icfals_3.sitem", ["uiR2EDequipment_icfams_3"] = "icfams_3.sitem", }, gloves = { ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", ["uiR2EDequipment_icfalg_3"] = "icfalg_3.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.f_civil_170, entries.f_civil_170_equipment) - entries.m_civil_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", ["uiR2EDequipment_icmamv_2"] = "icmamv_2.sitem", ["uiR2EDequipment_icmalv_3"] = "icmalv_3.sitem", ["uiR2EDequipment_icmamv_3"] = "icmamv_3.sitem", }, legs = { ["uiR2EDequipment_icmalp_2"] = "icmalp_2.sitem", ["uiR2EDequipment_icmamp_2"] = "icmamp_2.sitem", ["uiR2EDequipment_icmalp_3"] = "icmalp_3.sitem", ["uiR2EDequipment_icmamp_3"] = "icmamp_3.sitem", }, boots = { ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", ["uiR2EDequipment_icmamb_2"] = "icmamb_2.sitem", ["uiR2EDequipment_icmalb_3"] = "icmalb_3.sitem", ["uiR2EDequipment_icmamb_3"] = "icmamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", ["uiR2EDequipment_icmams_2"] = "icmams_2.sitem", ["uiR2EDequipment_icmals_3"] = "icmals_3.sitem", ["uiR2EDequipment_icmams_3"] = "icmams_3.sitem", }, gloves = { ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", ["uiR2EDequipment_icmalg_3"] = "icmalg_3.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.m_civil_170, entries.m_civil_170_equipment) - entries.t_civil_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", ["uiR2EDequipment_ictamv_2"] = "ictamv_2.sitem", ["uiR2EDequipment_ictalv_3"] = "ictalv_3.sitem", ["uiR2EDequipment_ictamv_3"] = "ictamv_3.sitem", }, legs = { ["uiR2EDequipment_ictalp_2"] = "ictalp_2.sitem", ["uiR2EDequipment_ictamp_2"] = "ictamp_2.sitem", ["uiR2EDequipment_ictalp_3"] = "ictalp_3.sitem", ["uiR2EDequipment_ictamp_3"] = "ictamp_3.sitem", }, boots = { ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", ["uiR2EDequipment_ictamb_2"] = "ictamb_2.sitem", ["uiR2EDequipment_ictalb_3"] = "ictalb_3.sitem", ["uiR2EDequipment_ictamb_3"] = "ictamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", ["uiR2EDequipment_ictams_2"] = "ictams_2.sitem", ["uiR2EDequipment_ictals_3"] = "ictals_3.sitem", ["uiR2EDequipment_ictams_3"] = "ictams_3.sitem", }, gloves = { ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", ["uiR2EDequipment_ictalg_3"] = "ictalg_3.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.t_civil_170, entries.t_civil_170_equipment) - entries.z_civil_170_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", ["uiR2EDequipment_iczamv_2"] = "iczamv_2.sitem", ["uiR2EDequipment_iczalv_3"] = "iczalv_3.sitem", ["uiR2EDequipment_iczamv_3"] = "iczamv_3.sitem", }, legs = { ["uiR2EDequipment_iczalp_2"] = "iczalp_2.sitem", ["uiR2EDequipment_iczamp_2"] = "iczamp_2.sitem", ["uiR2EDequipment_iczalp_3"] = "iczalp_3.sitem", ["uiR2EDequipment_iczamp_3"] = "iczamp_3.sitem", }, boots = { ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", ["uiR2EDequipment_iczamb_2"] = "iczamb_2.sitem", ["uiR2EDequipment_iczalb_3"] = "iczalb_3.sitem", ["uiR2EDequipment_iczamb_3"] = "iczamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", ["uiR2EDequipment_iczams_2"] = "iczams_2.sitem", ["uiR2EDequipment_iczals_3"] = "iczals_3.sitem", ["uiR2EDequipment_iczams_3"] = "iczams_3.sitem", }, gloves = { ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", ["uiR2EDequipment_iczalg_3"] = "iczalg_3.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.z_civil_170, entries.z_civil_170_equipment) - - entries.f_civil_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icfalv_2"] = "icfalv_2.sitem", ["uiR2EDequipment_icfamv_2"] = "icfamv_2.sitem", ["uiR2EDequipment_icfalv_3"] = "icfalv_3.sitem", ["uiR2EDequipment_icfamv_3"] = "icfamv_3.sitem", }, legs = { ["uiR2EDequipment_icfalp_2"] = "icfalp_2.sitem", ["uiR2EDequipment_icfamp_2"] = "icfamp_2.sitem", ["uiR2EDequipment_icfalp_3"] = "icfalp_3.sitem", ["uiR2EDequipment_icfamp_3"] = "icfamp_3.sitem", }, boots = { ["uiR2EDequipment_icfalb_2"] = "icfalb_2.sitem", ["uiR2EDequipment_icfamb_2"] = "icfamb_2.sitem", ["uiR2EDequipment_icfalb_3"] = "icfalb_3.sitem", ["uiR2EDequipment_icfamb_3"] = "icfamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfals_2"] = "icfals_2.sitem", ["uiR2EDequipment_icfams_2"] = "icfams_2.sitem", ["uiR2EDequipment_icfals_3"] = "icfals_3.sitem", ["uiR2EDequipment_icfams_3"] = "icfams_3.sitem", }, gloves = { ["uiR2EDequipment_icfalg_2"] = "icfalg_2.sitem", ["uiR2EDequipment_icfalg_3"] = "icfalg_3.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.f_civil_220, entries.f_civil_220_equipment) - entries.m_civil_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_icmalv_2"] = "icmalv_2.sitem", ["uiR2EDequipment_icmamv_2"] = "icmamv_2.sitem", ["uiR2EDequipment_icmalv_3"] = "icmalv_3.sitem", ["uiR2EDequipment_icmamv_3"] = "icmamv_3.sitem", }, legs = { ["uiR2EDequipment_icmalp_2"] = "icmalp_2.sitem", ["uiR2EDequipment_icmamp_2"] = "icmamp_2.sitem", ["uiR2EDequipment_icmalp_3"] = "icmalp_3.sitem", ["uiR2EDequipment_icmamp_3"] = "icmamp_3.sitem", }, boots = { ["uiR2EDequipment_icmalb_2"] = "icmalb_2.sitem", ["uiR2EDequipment_icmamb_2"] = "icmamb_2.sitem", ["uiR2EDequipment_icmalb_3"] = "icmalb_3.sitem", ["uiR2EDequipment_icmamb_3"] = "icmamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmals_2"] = "icmals_2.sitem", ["uiR2EDequipment_icmams_2"] = "icmams_2.sitem", ["uiR2EDequipment_icmals_3"] = "icmals_3.sitem", ["uiR2EDequipment_icmams_3"] = "icmams_3.sitem", }, gloves = { ["uiR2EDequipment_icmalg_2"] = "icmalg_2.sitem", ["uiR2EDequipment_icmalg_3"] = "icmalg_3.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.m_civil_220, entries.m_civil_220_equipment) - entries.t_civil_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_ictalv_2"] = "ictalv_2.sitem", ["uiR2EDequipment_ictamv_2"] = "ictamv_2.sitem", ["uiR2EDequipment_ictalv_3"] = "ictalv_3.sitem", ["uiR2EDequipment_ictamv_3"] = "ictamv_3.sitem", }, legs = { ["uiR2EDequipment_ictalp_2"] = "ictalp_2.sitem", ["uiR2EDequipment_ictamp_2"] = "ictamp_2.sitem", ["uiR2EDequipment_ictalp_3"] = "ictalp_3.sitem", ["uiR2EDequipment_ictamp_3"] = "ictamp_3.sitem", }, boots = { ["uiR2EDequipment_ictalb_2"] = "ictalb_2.sitem", ["uiR2EDequipment_ictamb_2"] = "ictamb_2.sitem", ["uiR2EDequipment_ictalb_3"] = "ictalb_3.sitem", ["uiR2EDequipment_ictamb_3"] = "ictamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictals_2"] = "ictals_2.sitem", ["uiR2EDequipment_ictams_2"] = "ictams_2.sitem", ["uiR2EDequipment_ictals_3"] = "ictals_3.sitem", ["uiR2EDequipment_ictams_3"] = "ictams_3.sitem", }, gloves = { ["uiR2EDequipment_ictalg_2"] = "ictalg_2.sitem", ["uiR2EDequipment_ictalg_3"] = "ictalg_3.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.t_civil_220, entries.t_civil_220_equipment) - entries.z_civil_220_equipment = { helmet = { ["uiR2EDequipment_none"] = "", }, chest_plate = { ["uiR2EDequipment_iczalv_2"] = "iczalv_2.sitem", ["uiR2EDequipment_iczamv_2"] = "iczamv_2.sitem", ["uiR2EDequipment_iczalv_3"] = "iczalv_3.sitem", ["uiR2EDequipment_iczamv_3"] = "iczamv_3.sitem", }, legs = { ["uiR2EDequipment_iczalp_2"] = "iczalp_2.sitem", ["uiR2EDequipment_iczamp_2"] = "iczamp_2.sitem", ["uiR2EDequipment_iczalp_3"] = "iczalp_3.sitem", ["uiR2EDequipment_iczamp_3"] = "iczamp_3.sitem", }, boots = { ["uiR2EDequipment_iczalb_2"] = "iczalb_2.sitem", ["uiR2EDequipment_iczamb_2"] = "iczamb_2.sitem", ["uiR2EDequipment_iczalb_3"] = "iczalb_3.sitem", ["uiR2EDequipment_iczamb_3"] = "iczamb_3.sitem", }, arms_guard = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczals_2"] = "iczals_2.sitem", ["uiR2EDequipment_iczams_2"] = "iczams_2.sitem", ["uiR2EDequipment_iczals_3"] = "iczals_3.sitem", ["uiR2EDequipment_iczams_3"] = "iczams_3.sitem", }, gloves = { ["uiR2EDequipment_iczalg_2"] = "iczalg_2.sitem", ["uiR2EDequipment_iczalg_3"] = "iczalg_3.sitem", }, hands = { ["uiR2EDequipment_none"] = "::blunt", }, } r2.addR2PlayerEquipment(entries.z_civil_220, entries.z_civil_220_equipment) - - --- Melee Guards - - entries.f_guard_45 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_slash_b4.creature", SheetModel="ring_guard_melee_tank_$hands_b$level.creature", SheetClient="basic_fyros_male.creature", Level=45, RingAccess="a1", Equipment="f_guard_45_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.f_guard_45", entries.f_guard_45) - entries.m_guard_45 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_pierce_b4.creature", SheetModel="ring_guard_melee_tank_$hands_b$level.creature", SheetClient="basic_matis_male.creature", Level=45, RingAccess="a1", Equipment="m_guard_45_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.m_guard_45", entries.m_guard_45) - entries.t_guard_45 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_pierce_b4.creature", SheetModel="ring_guard_melee_tank_$hands_b$level.creature", SheetClient="basic_tryker_male.creature", Level=45, RingAccess="a1", Equipment="t_guard_45_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.t_guard_45", entries.t_guard_45) - entries.z_guard_45 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_blunt_b4.creature", SheetModel="ring_guard_melee_tank_$hands_b$level.creature", SheetClient="basic_zorai_male.creature", Level=45, RingAccess="a1", Equipment="z_guard_45_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.z_guard_45", entries.z_guard_45) - - entries.f_guard_95 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_slash_c4.creature", SheetModel="ring_guard_melee_tank_$hands_c$level.creature", SheetClient="basic_fyros_male.creature", Level=95, RingAccess="d2", Equipment="f_guard_95_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.f_guard_95", entries.f_guard_95) - entries.m_guard_95 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_slash_c4.creature", SheetModel="ring_guard_melee_tank_$hands_c$level.creature", SheetClient="basic_matis_male.creature", Level=95, RingAccess="f5", Equipment="m_guard_95_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.m_guard_95", entries.m_guard_95) - entries.t_guard_95 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_slash_c4.creature", SheetModel="ring_guard_melee_tank_$hands_c$level.creature", SheetClient="basic_tryker_male.creature", Level=95, RingAccess="l5", Equipment="t_guard_95_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.t_guard_95", entries.t_guard_95) - entries.z_guard_95 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_slash_c4.creature", SheetModel="ring_guard_melee_tank_$hands_c$level.creature", SheetClient="basic_zorai_male.creature", Level=95, RingAccess="j5", Equipment="z_guard_95_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.z_guard_95", entries.z_guard_95) - - entries.f_guard_145 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_slash_d4.creature", SheetModel="ring_guard_melee_tank_$hands_d$level.creature", SheetClient="basic_fyros_male.creature", Level=145, RingAccess="d4", Equipment="f_guard_145_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.f_guard_145", entries.f_guard_145) - entries.m_guard_145 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_slash_d4.creature", SheetModel="ring_guard_melee_tank_$hands_d$level.creature", SheetClient="basic_matis_male.creature", Level=145, RingAccess="f5", Equipment="m_guard_145_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.m_guard_145", entries.m_guard_145) - entries.t_guard_145 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_slash_d4.creature", SheetModel="ring_guard_melee_tank_$hands_d$level.creature", SheetClient="basic_tryker_male.creature", Level=145, RingAccess="l5", Equipment="t_guard_145_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.t_guard_145", entries.t_guard_145) - entries.z_guard_145 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_slash_d4.creature", SheetModel="ring_guard_melee_tank_$hands_d$level.creature", SheetClient="basic_zorai_male.creature", Level=145, RingAccess="j5", Equipment="z_guard_145_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.z_guard_145", entries.z_guard_145) - - entries.f_guard_195 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_slash_e4.creature", SheetModel="ring_guard_melee_tank_$hands_e$level.creature", SheetClient="basic_fyros_male.creature", Level=195, RingAccess="d6", Equipment="f_guard_195_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.f_guard_195", entries.f_guard_195) - entries.m_guard_195 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_slash_e4.creature", SheetModel="ring_guard_melee_tank_$hands_e$level.creature", SheetClient="basic_matis_male.creature", Level=195, RingAccess="f6", Equipment="m_guard_195_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.m_guard_195", entries.m_guard_195) - entries.t_guard_195 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_slash_e4.creature", SheetModel="ring_guard_melee_tank_$hands_e$level.creature", SheetClient="basic_tryker_male.creature", Level=195, RingAccess="l5", Equipment="t_guard_195_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.t_guard_195", entries.t_guard_195) - entries.z_guard_195 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_slash_e4.creature", SheetModel="ring_guard_melee_tank_$hands_e$level.creature", SheetClient="basic_zorai_male.creature", Level=195, RingAccess="j6", Equipment="z_guard_195_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.z_guard_195", entries.z_guard_195) - - entries.f_guard_245 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_slash_f4.creature", SheetModel="ring_guard_melee_tank_$hands_f$level.creature", SheetClient="basic_fyros_male.creature", Level=245, RingAccess="d7", Equipment="f_guard_245_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.f_guard_245", entries.f_guard_245) - entries.m_guard_245 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_slash_f4.creature", SheetModel="ring_guard_melee_tank_$hands_f$level.creature", SheetClient="basic_matis_male.creature", Level=245, RingAccess="f7", Equipment="m_guard_245_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.m_guard_245", entries.m_guard_245) - entries.t_guard_245 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_slash_f4.creature", SheetModel="ring_guard_melee_tank_$hands_f$level.creature", SheetClient="basic_tryker_male.creature", Level=245, RingAccess="l6", Equipment="t_guard_245_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.t_guard_245", entries.t_guard_245) - entries.z_guard_245 = { Class="NpcCustom", Type="base", Base="palette.entities.guard", Sheet="ring_guard_melee_tank_slash_f4.creature", SheetModel="ring_guard_melee_tank_$hands_f$level.creature", SheetClient="basic_zorai_male.creature", Level=245, RingAccess="j7", Equipment="z_guard_245_equipment" } r2.addPaletteElement("palette.entities.npcs.guards.z_guard_245", entries.z_guard_245) - - - entries.f_guard_45_equipment = { helmet = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icfahh"] = "icfahh.sitem", }, chest_plate = { ["uiR2EDequipment_icfamv"] = "icfamv.sitem", ["uiR2EDequipment_icfahv"] = "icfahv.sitem", }, legs = { ["uiR2EDequipment_icfamp"] = "icfamp.sitem", ["uiR2EDequipment_icfahp"] = "icfahp.sitem", }, boots = { ["uiR2EDequipment_icfamb"] = "icfamb.sitem", ["uiR2EDequipment_icfahb"] = "icfahb.sitem", }, arms_guard = { ["uiR2EDequipment_icfams"] = "icfams.sitem", ["uiR2EDequipment_icfahs"] = "icfahs.sitem", }, gloves = { ["uiR2EDequipment_icfamg"] = "icfamg.sitem", ["uiR2EDequipment_icfahg"] = "icfahg.sitem", }, hands = { ["uiR2EDequipment_icfm2ss"] = "icfm2ss.sitem::slash", ["uiR2EDequipment_icfm2sa"] = "icfm2sa.sitem::slash", ["uiR2EDequipment_icfm2bm"] = "icfm2bm.sitem::blunt", ["uiR2EDequipment_icfm2pp"] = "icfm2pp.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.f_guard_45, entries.f_guard_45_equipment) - entries.m_guard_45_equipment = { helmet = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_icmahh"] = "icmahh.sitem", }, chest_plate = { ["uiR2EDequipment_icmamv"] = "icmamv.sitem", ["uiR2EDequipment_icmahv"] = "icmahv.sitem", }, legs = { ["uiR2EDequipment_icmamp"] = "icmamp.sitem", ["uiR2EDequipment_icmahp"] = "icmahp.sitem", }, boots = { ["uiR2EDequipment_icmamb"] = "icmamb.sitem", ["uiR2EDequipment_icmahb"] = "icmahb.sitem", }, arms_guard = { ["uiR2EDequipment_icmams"] = "icmams.sitem", ["uiR2EDequipment_icmahs"] = "icmahs.sitem", }, gloves = { ["uiR2EDequipment_icmamg"] = "icmamg.sitem", ["uiR2EDequipment_icmahg"] = "icmahg.sitem", }, hands = { ["uiR2EDequipment_icmm2ss"] = "icmm2ss.sitem::slash", ["uiR2EDequipment_icmm2sa"] = "icmm2sa.sitem::slash", ["uiR2EDequipment_icmm2bm"] = "icmm2bm.sitem::blunt", ["uiR2EDequipment_icmm2pp"] = "icmm2pp.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.m_guard_45, entries.m_guard_45_equipment) - entries.t_guard_45_equipment = { helmet = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_ictahh"] = "ictahh.sitem", }, chest_plate = { ["uiR2EDequipment_ictamv"] = "ictamv.sitem", ["uiR2EDequipment_ictahv"] = "ictahv.sitem", }, legs = { ["uiR2EDequipment_ictamp"] = "ictamp.sitem", ["uiR2EDequipment_ictahp"] = "ictahp.sitem", }, boots = { ["uiR2EDequipment_ictamb"] = "ictamb.sitem", ["uiR2EDequipment_ictahb"] = "ictahb.sitem", }, arms_guard = { ["uiR2EDequipment_ictams"] = "ictams.sitem", ["uiR2EDequipment_ictahs"] = "ictahs.sitem", }, gloves = { ["uiR2EDequipment_ictamg"] = "ictamg.sitem", ["uiR2EDequipment_ictahg"] = "ictahg.sitem", }, hands = { ["uiR2EDequipment_ictm2ss"] = "ictm2ss.sitem::slash", ["uiR2EDequipment_ictm2sa"] = "ictm2sa.sitem::slash", ["uiR2EDequipment_ictm2bm"] = "ictm2bm.sitem::blunt", ["uiR2EDequipment_ictm2pp"] = "ictm2pp.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.t_guard_45, entries.t_guard_45_equipment) - entries.z_guard_45_equipment = { helmet = { ["uiR2EDequipment_none"] = "", ["uiR2EDequipment_iczahh"] = "iczahh.sitem", }, chest_plate = { ["uiR2EDequipment_iczamv"] = "iczamv.sitem", ["uiR2EDequipment_iczahv"] = "iczahv.sitem", }, legs = { ["uiR2EDequipment_iczamp"] = "iczamp.sitem", ["uiR2EDequipment_iczahp"] = "iczahp.sitem", }, boots = { ["uiR2EDequipment_iczamb"] = "iczamb.sitem", ["uiR2EDequipment_iczahb"] = "iczahb.sitem", }, arms_guard = { ["uiR2EDequipment_iczams"] = "iczams.sitem", ["uiR2EDequipment_iczahs"] = "iczahs.sitem", }, gloves = { ["uiR2EDequipment_iczamg"] = "iczamg.sitem", ["uiR2EDequipment_iczahg"] = "iczahg.sitem", }, hands = { ["uiR2EDequipment_iczm2ss"] = "iczm2ss.sitem::slash", ["uiR2EDequipment_iczm2sa"] = "iczm2sa.sitem::slash", ["uiR2EDequipment_iczm2bm"] = "iczm2bm.sitem::blunt", ["uiR2EDequipment_iczm2pp"] = "iczm2pp.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.z_guard_45, entries.z_guard_45_equipment) - - entries.f_guard_95_equipment = { helmet = { ["uiR2EDequipment_icfahh"] = "icfahh.sitem", ["uiR2EDequipment_icfahh_2"] = "icfahh_2.sitem", }, chest_plate = { ["uiR2EDequipment_icfahv"] = "icfahv.sitem", ["uiR2EDequipment_icfahv_2"] = "icfahv_2.sitem", }, legs = { ["uiR2EDequipment_icfahp"] = "icfahp.sitem", ["uiR2EDequipment_icfahp_2"] = "icfahp_2.sitem", }, boots = { ["uiR2EDequipment_icfahb"] = "icfahb.sitem", ["uiR2EDequipment_icfahb_2"] = "icfahb_2.sitem", }, arms_guard = { ["uiR2EDequipment_icfahs"] = "icfahs.sitem", ["uiR2EDequipment_icfahs_2"] = "icfahs_2.sitem", }, gloves = { ["uiR2EDequipment_icfahg"] = "icfahg.sitem", ["uiR2EDequipment_icfahg_2"] = "icfahg_2.sitem", }, hands = { ["uiR2EDequipment_icfm2ss"] = "icfm2ss.sitem::slash", ["uiR2EDequipment_icfm2ss_2"] = "icfm2ss_2.sitem::slash", ["uiR2EDequipment_icfm2sa"] = "icfm2sa.sitem::slash", ["uiR2EDequipment_icfm2sa_2"] = "icfm2sa_2.sitem::slash", ["uiR2EDequipment_icfm2bm"] = "icfm2bm.sitem::blunt", ["uiR2EDequipment_icfm2bm_2"] = "icfm2bm_2.sitem::blunt", ["uiR2EDequipment_icfm2pp"] = "icfm2pp.sitem::pierce", ["uiR2EDequipment_icfm2pp_2"] = "icfm2pp_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.f_guard_95, entries.f_guard_95_equipment) - entries.m_guard_95_equipment = { helmet = { ["uiR2EDequipment_icmahh"] = "icmahh.sitem", ["uiR2EDequipment_icmahh_2"] = "icmahh_2.sitem", }, chest_plate = { ["uiR2EDequipment_icmahv"] = "icmahv.sitem", ["uiR2EDequipment_icmahv_2"] = "icmahv_2.sitem", }, legs = { ["uiR2EDequipment_icmahp"] = "icmahp.sitem", ["uiR2EDequipment_icmahp_2"] = "icmahp_2.sitem", }, boots = { ["uiR2EDequipment_icmahb"] = "icmahb.sitem", ["uiR2EDequipment_icmahb_2"] = "icmahb_2.sitem", }, arms_guard = { ["uiR2EDequipment_icmahs"] = "icmahs.sitem", ["uiR2EDequipment_icmahs_2"] = "icmahs_2.sitem", }, gloves = { ["uiR2EDequipment_icmahg"] = "icmahg.sitem", ["uiR2EDequipment_icmahg_2"] = "icmahg_2.sitem", }, hands = { ["uiR2EDequipment_icmm2ss"] = "icmm2ss.sitem::slash", ["uiR2EDequipment_icmm2ss_2"] = "icmm2ss_2.sitem::slash", ["uiR2EDequipment_icmm2sa"] = "icmm2sa.sitem::slash", ["uiR2EDequipment_icmm2sa_2"] = "icmm2sa_2.sitem::slash", ["uiR2EDequipment_icmm2bm"] = "icmm2bm.sitem::blunt", ["uiR2EDequipment_icmm2bm_2"] = "icmm2bm_2.sitem::blunt", ["uiR2EDequipment_icmm2pp"] = "icmm2pp.sitem::pierce", ["uiR2EDequipment_icmm2pp_2"] = "icmm2pp_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.m_guard_95, entries.m_guard_95_equipment) - entries.t_guard_95_equipment = { helmet = { ["uiR2EDequipment_ictahh"] = "ictahh.sitem", ["uiR2EDequipment_ictahh_2"] = "ictahh_2.sitem", }, chest_plate = { ["uiR2EDequipment_ictahv"] = "ictahv.sitem", ["uiR2EDequipment_ictahv_2"] = "ictahv_2.sitem", }, legs = { ["uiR2EDequipment_ictahp"] = "ictahp.sitem", ["uiR2EDequipment_ictahp_2"] = "ictahp_2.sitem", }, boots = { ["uiR2EDequipment_ictahb"] = "ictahb.sitem", ["uiR2EDequipment_ictahb_2"] = "ictahb_2.sitem", }, arms_guard = { ["uiR2EDequipment_ictahs"] = "ictahs.sitem", ["uiR2EDequipment_ictahs_2"] = "ictahs_2.sitem", }, gloves = { ["uiR2EDequipment_ictahg"] = "ictahg.sitem", ["uiR2EDequipment_ictahg_2"] = "ictahg_2.sitem", }, hands = { ["uiR2EDequipment_ictm2ss"] = "ictm2ss.sitem::slash", ["uiR2EDequipment_ictm2ss_2"] = "ictm2ss_2.sitem::slash", ["uiR2EDequipment_ictm2sa"] = "ictm2sa.sitem::slash", ["uiR2EDequipment_ictm2sa_2"] = "ictm2sa_2.sitem::slash", ["uiR2EDequipment_ictm2bm"] = "ictm2bm.sitem::blunt", ["uiR2EDequipment_ictm2bm_2"] = "ictm2bm_2.sitem::blunt", ["uiR2EDequipment_ictm2pp"] = "ictm2pp.sitem::pierce", ["uiR2EDequipment_ictm2pp_2"] = "ictm2pp_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.t_guard_95, entries.t_guard_95_equipment) - entries.z_guard_95_equipment = { helmet = { ["uiR2EDequipment_iczahh"] = "iczahh.sitem", ["uiR2EDequipment_iczahh_2"] = "iczahh_2.sitem", }, chest_plate = { ["uiR2EDequipment_iczahv"] = "iczahv.sitem", ["uiR2EDequipment_iczahv_2"] = "iczahv_2.sitem", }, legs = { ["uiR2EDequipment_iczahp"] = "iczahp.sitem", ["uiR2EDequipment_iczahp_2"] = "iczahp_2.sitem", }, boots = { ["uiR2EDequipment_iczahb"] = "iczahb.sitem", ["uiR2EDequipment_iczahb_2"] = "iczahb_2.sitem", }, arms_guard = { ["uiR2EDequipment_iczahs"] = "iczahs.sitem", ["uiR2EDequipment_iczahs_2"] = "iczahs_2.sitem", }, gloves = { ["uiR2EDequipment_iczahg"] = "iczahg.sitem", ["uiR2EDequipment_iczahg_2"] = "iczahg_2.sitem", }, hands = { ["uiR2EDequipment_iczm2ss"] = "iczm2ss.sitem::slash", ["uiR2EDequipment_iczm2ss_2"] = "iczm2ss_2.sitem::slash", ["uiR2EDequipment_iczm2sa"] = "iczm2sa.sitem::slash", ["uiR2EDequipment_iczm2sa_2"] = "iczm2sa_2.sitem::slash", ["uiR2EDequipment_iczm2bm"] = "iczm2bm.sitem::blunt", ["uiR2EDequipment_iczm2bm_2"] = "iczm2bm_2.sitem::blunt", ["uiR2EDequipment_iczm2pp"] = "iczm2pp.sitem::pierce", ["uiR2EDequipment_iczm2pp_2"] = "iczm2pp_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.z_guard_95, entries.z_guard_95_equipment) - - entries.f_guard_145_equipment = { helmet = { ["uiR2EDequipment_icfahh"] = "icfahh.sitem", ["uiR2EDequipment_icfahh_2"] = "icfahh_2.sitem", }, chest_plate = { ["uiR2EDequipment_icfahv"] = "icfahv.sitem", ["uiR2EDequipment_icfahv_2"] = "icfahv_2.sitem", }, legs = { ["uiR2EDequipment_icfahp"] = "icfahp.sitem", ["uiR2EDequipment_icfahp_2"] = "icfahp_2.sitem", }, boots = { ["uiR2EDequipment_icfahb"] = "icfahb.sitem", ["uiR2EDequipment_icfahb_2"] = "icfahb_2.sitem", }, arms_guard = { ["uiR2EDequipment_icfahs"] = "icfahs.sitem", ["uiR2EDequipment_icfahs_2"] = "icfahs_2.sitem", }, gloves = { ["uiR2EDequipment_icfahg"] = "icfahg.sitem", ["uiR2EDequipment_icfahg_2"] = "icfahg_2.sitem", }, hands = { ["uiR2EDequipment_icfm2ss"] = "icfm2ss.sitem::slash", ["uiR2EDequipment_icfm2ss_2"] = "icfm2ss_2.sitem::slash", ["uiR2EDequipment_icfm2sa"] = "icfm2sa.sitem::slash", ["uiR2EDequipment_icfm2sa_2"] = "icfm2sa_2.sitem::slash", ["uiR2EDequipment_icfm2bm"] = "icfm2bm.sitem::blunt", ["uiR2EDequipment_icfm2bm_2"] = "icfm2bm_2.sitem::blunt", ["uiR2EDequipment_icfm2pp"] = "icfm2pp.sitem::pierce", ["uiR2EDequipment_icfm2pp_2"] = "icfm2pp_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.f_guard_145, entries.f_guard_145_equipment) - entries.m_guard_145_equipment = { helmet = { ["uiR2EDequipment_icmahh"] = "icmahh.sitem", ["uiR2EDequipment_icmahh_2"] = "icmahh_2.sitem", }, chest_plate = { ["uiR2EDequipment_icmahv"] = "icmahv.sitem", ["uiR2EDequipment_icmahv_2"] = "icmahv_2.sitem", }, legs = { ["uiR2EDequipment_icmahp"] = "icmahp.sitem", ["uiR2EDequipment_icmahp_2"] = "icmahp_2.sitem", }, boots = { ["uiR2EDequipment_icmahb"] = "icmahb.sitem", ["uiR2EDequipment_icmahb_2"] = "icmahb_2.sitem", }, arms_guard = { ["uiR2EDequipment_icmahs"] = "icmahs.sitem", ["uiR2EDequipment_icmahs_2"] = "icmahs_2.sitem", }, gloves = { ["uiR2EDequipment_icmahg"] = "icmahg.sitem", ["uiR2EDequipment_icmahg_2"] = "icmahg_2.sitem", }, hands = { ["uiR2EDequipment_icmm2ss"] = "icmm2ss.sitem::slash", ["uiR2EDequipment_icmm2ss_2"] = "icmm2ss_2.sitem::slash", ["uiR2EDequipment_icmm2sa"] = "icmm2sa.sitem::slash", ["uiR2EDequipment_icmm2sa_2"] = "icmm2sa_2.sitem::slash", ["uiR2EDequipment_icmm2bm"] = "icmm2bm.sitem::blunt", ["uiR2EDequipment_icmm2bm_2"] = "icmm2bm_2.sitem::blunt", ["uiR2EDequipment_icmm2pp"] = "icmm2pp.sitem::pierce", ["uiR2EDequipment_icmm2pp_2"] = "icmm2pp_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.m_guard_145, entries.m_guard_145_equipment) - entries.t_guard_145_equipment = { helmet = { ["uiR2EDequipment_ictahh"] = "ictahh.sitem", ["uiR2EDequipment_ictahh_2"] = "ictahh_2.sitem", }, chest_plate = { ["uiR2EDequipment_ictahv"] = "ictahv.sitem", ["uiR2EDequipment_ictahv_2"] = "ictahv_2.sitem", }, legs = { ["uiR2EDequipment_ictahp"] = "ictahp.sitem", ["uiR2EDequipment_ictahp_2"] = "ictahp_2.sitem", }, boots = { ["uiR2EDequipment_ictahb"] = "ictahb.sitem", ["uiR2EDequipment_ictahb_2"] = "ictahb_2.sitem", }, arms_guard = { ["uiR2EDequipment_ictahs"] = "ictahs.sitem", ["uiR2EDequipment_ictahs_2"] = "ictahs_2.sitem", }, gloves = { ["uiR2EDequipment_ictahg"] = "ictahg.sitem", ["uiR2EDequipment_ictahg_2"] = "ictahg_2.sitem", }, hands = { ["uiR2EDequipment_ictm2ss"] = "ictm2ss.sitem::slash", ["uiR2EDequipment_ictm2ss_2"] = "ictm2ss_2.sitem::slash", ["uiR2EDequipment_ictm2sa"] = "ictm2sa.sitem::slash", ["uiR2EDequipment_ictm2sa_2"] = "ictm2sa_2.sitem::slash", ["uiR2EDequipment_ictm2bm"] = "ictm2bm.sitem::blunt", ["uiR2EDequipment_ictm2bm_2"] = "ictm2bm_2.sitem::blunt", ["uiR2EDequipment_ictm2pp"] = "ictm2pp.sitem::pierce", ["uiR2EDequipment_ictm2pp_2"] = "ictm2pp_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.t_guard_145, entries.t_guard_145_equipment) - entries.z_guard_145_equipment = { helmet = { ["uiR2EDequipment_iczahh"] = "iczahh.sitem", ["uiR2EDequipment_iczahh_2"] = "iczahh_2.sitem", }, chest_plate = { ["uiR2EDequipment_iczahv"] = "iczahv.sitem", ["uiR2EDequipment_iczahv_2"] = "iczahv_2.sitem", }, legs = { ["uiR2EDequipment_iczahp"] = "iczahp.sitem", ["uiR2EDequipment_iczahp_2"] = "iczahp_2.sitem", }, boots = { ["uiR2EDequipment_iczahb"] = "iczahb.sitem", ["uiR2EDequipment_iczahb_2"] = "iczahb_2.sitem", }, arms_guard = { ["uiR2EDequipment_iczahs"] = "iczahs.sitem", ["uiR2EDequipment_iczahs_2"] = "iczahs_2.sitem", }, gloves = { ["uiR2EDequipment_iczahg"] = "iczahg.sitem", ["uiR2EDequipment_iczahg_2"] = "iczahg_2.sitem", }, hands = { ["uiR2EDequipment_iczm2ss"] = "iczm2ss.sitem::slash", ["uiR2EDequipment_iczm2ss_2"] = "iczm2ss_2.sitem::slash", ["uiR2EDequipment_iczm2sa"] = "iczm2sa.sitem::slash", ["uiR2EDequipment_iczm2sa_2"] = "iczm2sa_2.sitem::slash", ["uiR2EDequipment_iczm2bm"] = "iczm2bm.sitem::blunt", ["uiR2EDequipment_iczm2bm_2"] = "iczm2bm_2.sitem::blunt", ["uiR2EDequipment_iczm2pp"] = "iczm2pp.sitem::pierce", ["uiR2EDequipment_iczm2pp_2"] = "iczm2pp_2.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.z_guard_145, entries.z_guard_145_equipment) - - entries.f_guard_195_equipment = { helmet = { ["uiR2EDequipment_icfahh_2"] = "icfahh_2.sitem", ["uiR2EDequipment_icfahh_3"] = "icfahh_3.sitem", }, chest_plate = { ["uiR2EDequipment_icfahv_2"] = "icfahv_2.sitem", ["uiR2EDequipment_icfahv_3"] = "icfahv_3.sitem", }, legs = { ["uiR2EDequipment_icfahp_2"] = "icfahp_2.sitem", ["uiR2EDequipment_icfahp_3"] = "icfahp_3.sitem", }, boots = { ["uiR2EDequipment_icfahb_2"] = "icfahb_2.sitem", ["uiR2EDequipment_icfahb_3"] = "icfahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icfahs_2"] = "icfahs_2.sitem", ["uiR2EDequipment_icfahs_3"] = "icfahs_3.sitem", }, gloves = { ["uiR2EDequipment_icfahg_2"] = "icfahg_2.sitem", ["uiR2EDequipment_icfahg_3"] = "icfahg_3.sitem", }, hands = { ["uiR2EDequipment_icfm2ss_2"] = "icfm2ss_2.sitem::slash", ["uiR2EDequipment_icfm2ss_3"] = "icfm2ss_3.sitem::slash", ["uiR2EDequipment_icfm2sa_2"] = "icfm2sa_2.sitem::slash", ["uiR2EDequipment_icfm2sa_3"] = "icfm2sa_3.sitem::slash", ["uiR2EDequipment_icfm2bm_2"] = "icfm2bm_2.sitem::blunt", ["uiR2EDequipment_icfm2bm_3"] = "icfm2bm_3.sitem::blunt", ["uiR2EDequipment_icfm2pp_2"] = "icfm2pp_2.sitem::pierce", ["uiR2EDequipment_icfm2pp_3"] = "icfm2pp_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.f_guard_195, entries.f_guard_195_equipment) - entries.m_guard_195_equipment = { helmet = { ["uiR2EDequipment_icmahh_2"] = "icmahh_2.sitem", ["uiR2EDequipment_icmahh_3"] = "icmahh_3.sitem", }, chest_plate = { ["uiR2EDequipment_icmahv_2"] = "icmahv_2.sitem", ["uiR2EDequipment_icmahv_3"] = "icmahv_3.sitem", }, legs = { ["uiR2EDequipment_icmahp_2"] = "icmahp_2.sitem", ["uiR2EDequipment_icmahp_3"] = "icmahp_3.sitem", }, boots = { ["uiR2EDequipment_icmahb_2"] = "icmahb_2.sitem", ["uiR2EDequipment_icmahb_3"] = "icmahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icmahs_2"] = "icmahs_2.sitem", ["uiR2EDequipment_icmahs_3"] = "icmahs_3.sitem", }, gloves = { ["uiR2EDequipment_icmahg_2"] = "icmahg_2.sitem", ["uiR2EDequipment_icmahg_3"] = "icmahg_3.sitem", }, hands = { ["uiR2EDequipment_icmm2ss_2"] = "icmm2ss_2.sitem::slash", ["uiR2EDequipment_icmm2ss_3"] = "icmm2ss_3.sitem::slash", ["uiR2EDequipment_icmm2sa_2"] = "icmm2sa_2.sitem::slash", ["uiR2EDequipment_icmm2sa_3"] = "icmm2sa_3.sitem::slash", ["uiR2EDequipment_icmm2bm_2"] = "icmm2bm_2.sitem::blunt", ["uiR2EDequipment_icmm2bm_3"] = "icmm2bm_3.sitem::blunt", ["uiR2EDequipment_icmm2pp_2"] = "icmm2pp_2.sitem::pierce", ["uiR2EDequipment_icmm2pp_3"] = "icmm2pp_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.m_guard_195, entries.m_guard_195_equipment) - entries.t_guard_195_equipment = { helmet = { ["uiR2EDequipment_ictahh_2"] = "ictahh_2.sitem", ["uiR2EDequipment_ictahh_3"] = "ictahh_3.sitem", }, chest_plate = { ["uiR2EDequipment_ictahv_2"] = "ictahv_2.sitem", ["uiR2EDequipment_ictahv_3"] = "ictahv_3.sitem", }, legs = { ["uiR2EDequipment_ictahp_2"] = "ictahp_2.sitem", ["uiR2EDequipment_ictahp_3"] = "ictahp_3.sitem", }, boots = { ["uiR2EDequipment_ictahb_2"] = "ictahb_2.sitem", ["uiR2EDequipment_ictahb_3"] = "ictahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_ictahs_2"] = "ictahs_2.sitem", ["uiR2EDequipment_ictahs_3"] = "ictahs_3.sitem", }, gloves = { ["uiR2EDequipment_ictahg_2"] = "ictahg_2.sitem", ["uiR2EDequipment_ictahg_3"] = "ictahg_3.sitem", }, hands = { ["uiR2EDequipment_ictm2ss_2"] = "ictm2ss_2.sitem::slash", ["uiR2EDequipment_ictm2ss_3"] = "ictm2ss_3.sitem::slash", ["uiR2EDequipment_ictm2sa_2"] = "ictm2sa_2.sitem::slash", ["uiR2EDequipment_ictm2sa_3"] = "ictm2sa_3.sitem::slash", ["uiR2EDequipment_ictm2bm_2"] = "ictm2bm_2.sitem::blunt", ["uiR2EDequipment_ictm2bm_3"] = "ictm2bm_3.sitem::blunt", ["uiR2EDequipment_ictm2pp_2"] = "ictm2pp_2.sitem::pierce", ["uiR2EDequipment_ictm2pp_3"] = "ictm2pp_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.t_guard_195, entries.t_guard_195_equipment) - entries.z_guard_195_equipment = { helmet = { ["uiR2EDequipment_iczahh_2"] = "iczahh_2.sitem", ["uiR2EDequipment_iczahh_3"] = "iczahh_3.sitem", }, chest_plate = { ["uiR2EDequipment_iczahv_2"] = "iczahv_2.sitem", ["uiR2EDequipment_iczahv_3"] = "iczahv_3.sitem", }, legs = { ["uiR2EDequipment_iczahp_2"] = "iczahp_2.sitem", ["uiR2EDequipment_iczahp_3"] = "iczahp_3.sitem", }, boots = { ["uiR2EDequipment_iczahb_2"] = "iczahb_2.sitem", ["uiR2EDequipment_iczahb_3"] = "iczahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_iczahs_2"] = "iczahs_2.sitem", ["uiR2EDequipment_iczahs_3"] = "iczahs_3.sitem", }, gloves = { ["uiR2EDequipment_iczahg_2"] = "iczahg_2.sitem", ["uiR2EDequipment_iczahg_3"] = "iczahg_3.sitem", }, hands = { ["uiR2EDequipment_iczm2ss_2"] = "iczm2ss_2.sitem::slash", ["uiR2EDequipment_iczm2ss_3"] = "iczm2ss_3.sitem::slash", ["uiR2EDequipment_iczm2sa_2"] = "iczm2sa_2.sitem::slash", ["uiR2EDequipment_iczm2sa_3"] = "iczm2sa_3.sitem::slash", ["uiR2EDequipment_iczm2bm_2"] = "iczm2bm_2.sitem::blunt", ["uiR2EDequipment_iczm2bm_3"] = "iczm2bm_3.sitem::blunt", ["uiR2EDequipment_iczm2pp_2"] = "iczm2pp_2.sitem::pierce", ["uiR2EDequipment_iczm2pp_3"] = "iczm2pp_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.z_guard_195, entries.z_guard_195_equipment) - - entries.f_guard_245_equipment = { helmet = { ["uiR2EDequipment_icfahh_2"] = "icfahh_2.sitem", ["uiR2EDequipment_icfahh_3"] = "icfahh_3.sitem", }, chest_plate = { ["uiR2EDequipment_icfahv_2"] = "icfahv_2.sitem", ["uiR2EDequipment_icfahv_3"] = "icfahv_3.sitem", }, legs = { ["uiR2EDequipment_icfahp_2"] = "icfahp_2.sitem", ["uiR2EDequipment_icfahp_3"] = "icfahp_3.sitem", }, boots = { ["uiR2EDequipment_icfahb_2"] = "icfahb_2.sitem", ["uiR2EDequipment_icfahb_3"] = "icfahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icfahs_2"] = "icfahs_2.sitem", ["uiR2EDequipment_icfahs_3"] = "icfahs_3.sitem", }, gloves = { ["uiR2EDequipment_icfahg_2"] = "icfahg_2.sitem", ["uiR2EDequipment_icfahg_3"] = "icfahg_3.sitem", }, hands = { ["uiR2EDequipment_icfm2ss_2"] = "icfm2ss_2.sitem::slash", ["uiR2EDequipment_icfm2ss_3"] = "icfm2ss_3.sitem::slash", ["uiR2EDequipment_icfm2sa_2"] = "icfm2sa_2.sitem::slash", ["uiR2EDequipment_icfm2sa_3"] = "icfm2sa_3.sitem::slash", ["uiR2EDequipment_icfm2bm_2"] = "icfm2bm_2.sitem::blunt", ["uiR2EDequipment_icfm2bm_3"] = "icfm2bm_3.sitem::blunt", ["uiR2EDequipment_icfm2pp_2"] = "icfm2pp_2.sitem::pierce", ["uiR2EDequipment_icfm2pp_3"] = "icfm2pp_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.f_guard_245, entries.f_guard_245_equipment) - entries.m_guard_245_equipment = { helmet = { ["uiR2EDequipment_icmahh_2"] = "icmahh_2.sitem", ["uiR2EDequipment_icmahh_3"] = "icmahh_3.sitem", }, chest_plate = { ["uiR2EDequipment_icmahv_2"] = "icmahv_2.sitem", ["uiR2EDequipment_icmahv_3"] = "icmahv_3.sitem", }, legs = { ["uiR2EDequipment_icmahp_2"] = "icmahp_2.sitem", ["uiR2EDequipment_icmahp_3"] = "icmahp_3.sitem", }, boots = { ["uiR2EDequipment_icmahb_2"] = "icmahb_2.sitem", ["uiR2EDequipment_icmahb_3"] = "icmahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_icmahs_2"] = "icmahs_2.sitem", ["uiR2EDequipment_icmahs_3"] = "icmahs_3.sitem", }, gloves = { ["uiR2EDequipment_icmahg_2"] = "icmahg_2.sitem", ["uiR2EDequipment_icmahg_3"] = "icmahg_3.sitem", }, hands = { ["uiR2EDequipment_icmm2ss_2"] = "icmm2ss_2.sitem::slash", ["uiR2EDequipment_icmm2ss_3"] = "icmm2ss_3.sitem::slash", ["uiR2EDequipment_icmm2sa_2"] = "icmm2sa_2.sitem::slash", ["uiR2EDequipment_icmm2sa_3"] = "icmm2sa_3.sitem::slash", ["uiR2EDequipment_icmm2bm_2"] = "icmm2bm_2.sitem::blunt", ["uiR2EDequipment_icmm2bm_3"] = "icmm2bm_3.sitem::blunt", ["uiR2EDequipment_icmm2pp_2"] = "icmm2pp_2.sitem::pierce", ["uiR2EDequipment_icmm2pp_3"] = "icmm2pp_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.m_guard_245, entries.m_guard_245_equipment) - entries.t_guard_245_equipment = { helmet = { ["uiR2EDequipment_ictahh_2"] = "ictahh_2.sitem", ["uiR2EDequipment_ictahh_3"] = "ictahh_3.sitem", }, chest_plate = { ["uiR2EDequipment_ictahv_2"] = "ictahv_2.sitem", ["uiR2EDequipment_ictahv_3"] = "ictahv_3.sitem", }, legs = { ["uiR2EDequipment_ictahp_2"] = "ictahp_2.sitem", ["uiR2EDequipment_ictahp_3"] = "ictahp_3.sitem", }, boots = { ["uiR2EDequipment_ictahb_2"] = "ictahb_2.sitem", ["uiR2EDequipment_ictahb_3"] = "ictahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_ictahs_2"] = "ictahs_2.sitem", ["uiR2EDequipment_ictahs_3"] = "ictahs_3.sitem", }, gloves = { ["uiR2EDequipment_ictahg_2"] = "ictahg_2.sitem", ["uiR2EDequipment_ictahg_3"] = "ictahg_3.sitem", }, hands = { ["uiR2EDequipment_ictm2ss_2"] = "ictm2ss_2.sitem::slash", ["uiR2EDequipment_ictm2ss_3"] = "ictm2ss_3.sitem::slash", ["uiR2EDequipment_ictm2sa_2"] = "ictm2sa_2.sitem::slash", ["uiR2EDequipment_ictm2sa_3"] = "ictm2sa_3.sitem::slash", ["uiR2EDequipment_ictm2bm_2"] = "ictm2bm_2.sitem::blunt", ["uiR2EDequipment_ictm2bm_3"] = "ictm2bm_3.sitem::blunt", ["uiR2EDequipment_ictm2pp_2"] = "ictm2pp_2.sitem::pierce", ["uiR2EDequipment_ictm2pp_3"] = "ictm2pp_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.t_guard_245, entries.t_guard_245_equipment) - entries.z_guard_245_equipment = { helmet = { ["uiR2EDequipment_iczahh_2"] = "iczahh_2.sitem", ["uiR2EDequipment_iczahh_3"] = "iczahh_3.sitem", }, chest_plate = { ["uiR2EDequipment_iczahv_2"] = "iczahv_2.sitem", ["uiR2EDequipment_iczahv_3"] = "iczahv_3.sitem", }, legs = { ["uiR2EDequipment_iczahp_2"] = "iczahp_2.sitem", ["uiR2EDequipment_iczahp_3"] = "iczahp_3.sitem", }, boots = { ["uiR2EDequipment_iczahb_2"] = "iczahb_2.sitem", ["uiR2EDequipment_iczahb_3"] = "iczahb_3.sitem", }, arms_guard = { ["uiR2EDequipment_iczahs_2"] = "iczahs_2.sitem", ["uiR2EDequipment_iczahs_3"] = "iczahs_3.sitem", }, gloves = { ["uiR2EDequipment_iczahg_2"] = "iczahg_2.sitem", ["uiR2EDequipment_iczahg_3"] = "iczahg_3.sitem", }, hands = { ["uiR2EDequipment_iczm2ss_2"] = "iczm2ss_2.sitem::slash", ["uiR2EDequipment_iczm2ss_3"] = "iczm2ss_3.sitem::slash", ["uiR2EDequipment_iczm2sa_2"] = "iczm2sa_2.sitem::slash", ["uiR2EDequipment_iczm2sa_3"] = "iczm2sa_3.sitem::slash", ["uiR2EDequipment_iczm2bm_2"] = "iczm2bm_2.sitem::blunt", ["uiR2EDequipment_iczm2bm_3"] = "iczm2bm_3.sitem::blunt", ["uiR2EDequipment_iczm2pp_2"] = "iczm2pp_2.sitem::pierce", ["uiR2EDequipment_iczm2pp_3"] = "iczm2pp_3.sitem::pierce", }, } r2.addR2PlayerEquipment(entries.z_guard_245, entries.z_guard_245_equipment) - - - - - --- Passive Creatures (birds & carnivores) - entries.creature_cbadc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbadc1.creature", Level=60, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbadc1", entries.creature_cbadc1) - entries.creature_cbadc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbadc2.creature", Level=70, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbadc2", entries.creature_cbadc2) - entries.creature_cbadc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbadc3.creature", Level=80, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbadc3", entries.creature_cbadc3) - entries.creature_cbadc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbadc4.creature", Level=90, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbadc4", entries.creature_cbadc4) - entries.creature_cbadd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbadd1.creature", Level=110, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbadd1", entries.creature_cbadd1) - entries.creature_cbadd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbadd2.creature", Level=120, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbadd2", entries.creature_cbadd2) - entries.creature_cbadd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbadd3.creature", Level=130, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbadd3", entries.creature_cbadd3) - entries.creature_cbadd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbadd4.creature", Level=140, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbadd4", entries.creature_cbadd4) - --entries.creature_cbagb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbagb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbagb1", entries.creature_cbagb1) - --entries.creature_cbagb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbagb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbagb2", entries.creature_cbagb2) - --entries.creature_cbagb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbagb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbagb3", entries.creature_cbagb3) - --entries.creature_cbagb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbagb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbagb4", entries.creature_cbagb4) - --entries.creature_cbagc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbagc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbagc1", entries.creature_cbagc1) - --entries.creature_cbagc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbagc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbagc2", entries.creature_cbagc2) - --entries.creature_cbagc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbagc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbagc3", entries.creature_cbagc3) - --entries.creature_cbagc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbagc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbagc4", entries.creature_cbagc4) - --entries.creature_cbagd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbagd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbagd1", entries.creature_cbagd1) - --entries.creature_cbagd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbagd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbagd2", entries.creature_cbagd2) - --entries.creature_cbagd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbagd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbagd3", entries.creature_cbagd3) - --entries.creature_cbagd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbagd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbagd4", entries.creature_cbagd4) - --entries.creature_cbage1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbage1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cbage1", entries.creature_cbage1) - --entries.creature_cbage2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbage2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cbage2", entries.creature_cbage2) - --entries.creature_cbage3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbage3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cbage3", entries.creature_cbage3) - --entries.creature_cbage4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbage4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cbage4", entries.creature_cbage4) - --entries.creature_cbagf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbagf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cbagf1", entries.creature_cbagf1) - --entries.creature_cbagf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbagf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cbagf2", entries.creature_cbagf2) - --entries.creature_cbagf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbagf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cbagf3", entries.creature_cbagf3) - --entries.creature_cbagf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbagf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cbagf4", entries.creature_cbagf4) - entries.creature_cbajb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbajb4.creature", Level=40, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbajb4", entries.creature_cbajb4) - entries.creature_cbajd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbajd1.creature", Level=110, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbajd1", entries.creature_cbajd1) - entries.creature_cbajd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbajd2.creature", Level=120, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbajd2", entries.creature_cbajd2) - entries.creature_cbajd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbajd3.creature", Level=130, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbajd3", entries.creature_cbajd3) - entries.creature_cbajd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbajd4.creature", Level=140, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbajd4", entries.creature_cbajd4) - entries.creature_cbbda1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbda1.creature", Level=10, RingAccess="a1", Ecosystem="Desert", Region="a" } r2.addPaletteElement("palette.entities.creatures.cbbda1", entries.creature_cbbda1) - entries.creature_cbbda2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbda2.creature", Level=17, RingAccess="a1", Ecosystem="Desert", Region="a" } r2.addPaletteElement("palette.entities.creatures.cbbda2", entries.creature_cbbda2) - entries.creature_cbbdb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbdb1.creature", Level=10, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbbdb1", entries.creature_cbbdb1) - entries.creature_cbbdb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbdb2.creature", Level=20, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbbdb2", entries.creature_cbbdb2) - entries.creature_cbbdb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbdb3.creature", Level=30, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbbdb3", entries.creature_cbbdb3) - entries.creature_cbbdb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbdb4.creature", Level=40, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbbdb4", entries.creature_cbbdb4) - entries.creature_cbbdd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbdd4.creature", Level=140, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbbdd4", entries.creature_cbbdd4) - entries.creature_cbbja1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbja1.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="a" } r2.addPaletteElement("palette.entities.creatures.cbbja1", entries.creature_cbbja1) - entries.creature_cbbja2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbja2.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="a" } r2.addPaletteElement("palette.entities.creatures.cbbja2", entries.creature_cbbja2) - entries.creature_cbbjb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbjb1.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbbjb1", entries.creature_cbbjb1) - entries.creature_cbbjb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbjb2.creature", Level=20, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbbjb2", entries.creature_cbbjb2) - entries.creature_cbbjb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbjb3.creature", Level=30, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbbjb3", entries.creature_cbbjb3) - entries.creature_cbbjb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbjb4.creature", Level=40, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbbjb4", entries.creature_cbbjb4) - entries.creature_cbbjc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbjc1.creature", Level=60, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbbjc1", entries.creature_cbbjc1) - entries.creature_cbbjc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbjc2.creature", Level=70, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbbjc2", entries.creature_cbbjc2) - entries.creature_cbbjc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbjc3.creature", Level=80, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbbjc3", entries.creature_cbbjc3) - entries.creature_cbbjc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbjc4.creature", Level=90, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbbjc4", entries.creature_cbbjc4) - entries.creature_cbblc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbblc1.creature", Level=60, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbblc1", entries.creature_cbblc1) - entries.creature_cbblc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbblc2.creature", Level=70, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbblc2", entries.creature_cbblc2) - entries.creature_cbblc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbblc3.creature", Level=80, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbblc3", entries.creature_cbblc3) - entries.creature_cbblc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbblc4.creature", Level=90, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbblc4", entries.creature_cbblc4) - entries.creature_cbbld1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbld1.creature", Level=110, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbbld1", entries.creature_cbbld1) - entries.creature_cbbld2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbld2.creature", Level=120, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbbld2", entries.creature_cbbld2) - entries.creature_cbbld3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbld3.creature", Level=130, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbbld3", entries.creature_cbbld3) - entries.creature_cbbld4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbld4.creature", Level=140, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbbld4", entries.creature_cbbld4) - entries.creature_cbbpd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbpd1.creature", Level=110, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbbpd1", entries.creature_cbbpd1) - entries.creature_cbbpd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbpd2.creature", Level=120, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbbpd2", entries.creature_cbbpd2) - entries.creature_cbbpd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbpd3.creature", Level=130, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbbpd3", entries.creature_cbbpd3) - entries.creature_cbbpd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbpd4.creature", Level=140, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbbpd4", entries.creature_cbbpd4) - entries.creature_cbbpe4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbbpe4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.cbbpe4", entries.creature_cbbpe4) - --entries.creature_cbcgb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbcgb1", entries.creature_cbcgb1) - --entries.creature_cbcgb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbcgb2", entries.creature_cbcgb2) - --entries.creature_cbcgb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbcgb3", entries.creature_cbcgb3) - --entries.creature_cbcgb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbcgb4", entries.creature_cbcgb4) - --entries.creature_cbcgc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbcgc1", entries.creature_cbcgc1) - --entries.creature_cbcgc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbcgc2", entries.creature_cbcgc2) - --entries.creature_cbcgc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbcgc3", entries.creature_cbcgc3) - --entries.creature_cbcgc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbcgc4", entries.creature_cbcgc4) - --entries.creature_cbcgd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbcgd1", entries.creature_cbcgd1) - --entries.creature_cbcgd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbcgd2", entries.creature_cbcgd2) - --entries.creature_cbcgd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbcgd3", entries.creature_cbcgd3) - --entries.creature_cbcgd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbcgd4", entries.creature_cbcgd4) - --entries.creature_cbcge1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cbcge1", entries.creature_cbcge1) - --entries.creature_cbcge2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cbcge2", entries.creature_cbcge2) - --entries.creature_cbcge3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cbcge3", entries.creature_cbcge3) - --entries.creature_cbcge4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cbcge4", entries.creature_cbcge4) - --entries.creature_cbcgf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cbcgf1", entries.creature_cbcgf1) - --entries.creature_cbcgf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cbcgf2", entries.creature_cbcgf2) - --entries.creature_cbcgf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cbcgf3", entries.creature_cbcgf3) - --entries.creature_cbcgf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cbcgf4", entries.creature_cbcgf4) - entries.creature_cbcjc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcjc1.creature", Level=60, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbcjc1", entries.creature_cbcjc1) - entries.creature_cbcjc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcjc2.creature", Level=70, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbcjc2", entries.creature_cbcjc2) - entries.creature_cbcjc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcjc3.creature", Level=80, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbcjc3", entries.creature_cbcjc3) - entries.creature_cbcjc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcjc4.creature", Level=90, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbcjc4", entries.creature_cbcjc4) - entries.creature_cbcla1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcla1.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="a" } r2.addPaletteElement("palette.entities.creatures.cbcla1", entries.creature_cbcla1) - entries.creature_cbcla2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbcla2.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="a" } r2.addPaletteElement("palette.entities.creatures.cbcla2", entries.creature_cbcla2) - entries.creature_cbclb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbclb1.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbclb1", entries.creature_cbclb1) - entries.creature_cbclb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbclb2.creature", Level=20, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbclb2", entries.creature_cbclb2) - entries.creature_cbclb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbclb3.creature", Level=30, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbclb3", entries.creature_cbclb3) - entries.creature_cbclb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbclb4.creature", Level=40, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbclb4", entries.creature_cbclb4) - entries.creature_cbclc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbclc1.creature", Level=60, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbclc1", entries.creature_cbclc1) - entries.creature_cbclc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbclc2.creature", Level=70, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbclc2", entries.creature_cbclc2) - entries.creature_cbclc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbclc3.creature", Level=80, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbclc3", entries.creature_cbclc3) - entries.creature_cbclc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cbclc4.creature", Level=90, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbclc4", entries.creature_cbclc4) - entries.creature_chadc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chadc1.creature", Level=60, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.chadc1", entries.creature_chadc1) - entries.creature_chadc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chadc2.creature", Level=70, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.chadc2", entries.creature_chadc2) - entries.creature_chadc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chadc3.creature", Level=80, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.chadc3", entries.creature_chadc3) - entries.creature_chadc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chadc4.creature", Level=90, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.chadc4", entries.creature_chadc4) - entries.creature_chafd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chafd1.creature", Level=110, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chafd1", entries.creature_chafd1) - entries.creature_chafd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chafd2.creature", Level=120, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chafd2", entries.creature_chafd2) - entries.creature_chafd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chafd3.creature", Level=130, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chafd3", entries.creature_chafd3) - entries.creature_chafd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chafd4.creature", Level=140, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chafd4", entries.creature_chafd4) - entries.creature_chafe1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chafe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chafe1", entries.creature_chafe1) - entries.creature_chafe2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chafe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chafe2", entries.creature_chafe2) - entries.creature_chafe3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chafe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chafe3", entries.creature_chafe3) - entries.creature_chafe4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chafe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chafe4", entries.creature_chafe4) - entries.creature_chajf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chajf1.creature", Level=210, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chajf1", entries.creature_chajf1) - entries.creature_chajf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chajf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chajf2", entries.creature_chajf2) - entries.creature_chajf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chajf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chajf3", entries.creature_chajf3) - entries.creature_chajf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chajf4.creature", Level=240, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chajf4", entries.creature_chajf4) - entries.creature_chale1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chale1.creature", Level=160, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chale1", entries.creature_chale1) - entries.creature_chale2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chale2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chale2", entries.creature_chale2) - entries.creature_chale3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chale3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chale3", entries.creature_chale3) - entries.creature_chale4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chale4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chale4", entries.creature_chale4) - entries.creature_chalf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chalf1.creature", Level=210, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.chalf1", entries.creature_chalf1) - entries.creature_chalf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chalf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.chalf2", entries.creature_chalf2) - entries.creature_chalf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chalf3.creature", Level=230, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.chalf3", entries.creature_chalf3) - entries.creature_chalf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chalf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.chalf4", entries.creature_chalf4) - entries.creature_chapd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chapd1.creature", Level=110, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.chapd1", entries.creature_chapd1) - entries.creature_chapd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chapd2.creature", Level=120, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.chapd2", entries.creature_chapd2) - entries.creature_chapd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chapd3.creature", Level=130, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.chapd3", entries.creature_chapd3) - entries.creature_chapd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chapd4.creature", Level=140, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.chapd4", entries.creature_chapd4) - entries.creature_chape1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chape1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chape1", entries.creature_chape1) - entries.creature_chape2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chape2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chape2", entries.creature_chape2) - entries.creature_chape3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chape3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chape3", entries.creature_chape3) - entries.creature_chape4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chape4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chape4", entries.creature_chape4) - entries.creature_chbdc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbdc1.creature", Level=60, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.chbdc1", entries.creature_chbdc1) - entries.creature_chbdc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbdc2.creature", Level=70, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.chbdc2", entries.creature_chbdc2) - entries.creature_chbdc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbdc3.creature", Level=80, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.chbdc3", entries.creature_chbdc3) - entries.creature_chbdc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbdc4.creature", Level=90, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.chbdc4", entries.creature_chbdc4) - entries.creature_chbfa1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbfa1.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="a" } r2.addPaletteElement("palette.entities.creatures.chbfa1", entries.creature_chbfa1) - entries.creature_chbfa2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbfa2.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="a" } r2.addPaletteElement("palette.entities.creatures.chbfa2", entries.creature_chbfa2) - entries.creature_chbfb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbfb1.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.chbfb1", entries.creature_chbfb1) - entries.creature_chbfb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbfb2.creature", Level=20, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.chbfb2", entries.creature_chbfb2) - entries.creature_chbfb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbfb3.creature", Level=30, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.chbfb3", entries.creature_chbfb3) - entries.creature_chbfb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbfb4.creature", Level=40, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.chbfb4", entries.creature_chbfb4) - entries.creature_chbfc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbfc1.creature", Level=60, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chbfc1", entries.creature_chbfc1) - entries.creature_chbfc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbfc2.creature", Level=70, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chbfc2", entries.creature_chbfc2) - entries.creature_chbfc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbfc3.creature", Level=80, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chbfc3", entries.creature_chbfc3) - entries.creature_chbfc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbfc4.creature", Level=90, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chbfc4", entries.creature_chbfc4) - entries.creature_chbje1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbje1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chbje1", entries.creature_chbje1) - entries.creature_chbje2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chbje2", entries.creature_chbje2) - entries.creature_chbje3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chbje3", entries.creature_chbje3) - entries.creature_chbje4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chbje4", entries.creature_chbje4) - entries.creature_chbld1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbld1.creature", Level=110, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.chbld1", entries.creature_chbld1) - entries.creature_chbld2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbld2.creature", Level=120, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.chbld2", entries.creature_chbld2) - entries.creature_chbld3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbld3.creature", Level=130, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.chbld3", entries.creature_chbld3) - entries.creature_chbld4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbld4.creature", Level=140, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.chbld4", entries.creature_chbld4) - entries.creature_chbpd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbpd1.creature", Level=110, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.chbpd1", entries.creature_chbpd1) - entries.creature_chbpd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbpd2.creature", Level=120, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.chbpd2", entries.creature_chbpd2) - entries.creature_chbpd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbpd3.creature", Level=130, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.chbpd3", entries.creature_chbpd3) - entries.creature_chbpd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbpd4.creature", Level=140, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.chbpd4", entries.creature_chbpd4) - entries.creature_chbpe1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbpe1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chbpe1", entries.creature_chbpe1) - entries.creature_chbpe2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbpe2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chbpe2", entries.creature_chbpe2) - entries.creature_chbpe3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbpe3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chbpe3", entries.creature_chbpe3) - entries.creature_chbpe4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chbpe4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chbpe4", entries.creature_chbpe4) - entries.creature_chcda1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chcda1.creature", Level=10, RingAccess="a1", Ecosystem="Desert", Region="a" } r2.addPaletteElement("palette.entities.creatures.chcda1", entries.creature_chcda1) - entries.creature_chcda2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chcda2.creature", Level=17, RingAccess="a1", Ecosystem="Desert", Region="a" } r2.addPaletteElement("palette.entities.creatures.chcda2", entries.creature_chcda2) - entries.creature_chcdb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chcdb1.creature", Level=10, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.chcdb1", entries.creature_chcdb1) - entries.creature_chcdb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chcdb2.creature", Level=20, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.chcdb2", entries.creature_chcdb2) - entries.creature_chcdb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chcdb3.creature", Level=30, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.chcdb3", entries.creature_chcdb3) - entries.creature_chcdb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chcdb4.creature", Level=40, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.chcdb4", entries.creature_chcdb4) - entries.creature_chcfa1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chcfa1.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="a" } r2.addPaletteElement("palette.entities.creatures.chcfa1", entries.creature_chcfa1) - entries.creature_chcfa2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chcfa2.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="a" } r2.addPaletteElement("palette.entities.creatures.chcfa2", entries.creature_chcfa2) - entries.creature_chcfb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chcfb1.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.chcfb1", entries.creature_chcfb1) - entries.creature_chcfb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chcfb2.creature", Level=20, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.chcfb2", entries.creature_chcfb2) - entries.creature_chcfb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chcfb3.creature", Level=30, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.chcfb3", entries.creature_chcfb3) - entries.creature_chcfb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chcfb4.creature", Level=40, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.chcfb4", entries.creature_chcfb4) - entries.creature_chcjd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chcjd1.creature", Level=110, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.chcjd1", entries.creature_chcjd1) - entries.creature_chcjd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chcjd2.creature", Level=120, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.chcjd2", entries.creature_chcjd2) - entries.creature_chcjd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chcjd3.creature", Level=130, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.chcjd3", entries.creature_chcjd3) - entries.creature_chcjd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chcjd4.creature", Level=140, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.chcjd4", entries.creature_chcjd4) - entries.creature_chclc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chclc1.creature", Level=60, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.chclc1", entries.creature_chclc1) - entries.creature_chclc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chclc2.creature", Level=70, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.chclc2", entries.creature_chclc2) - entries.creature_chclc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chclc3.creature", Level=80, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.chclc3", entries.creature_chclc3) - entries.creature_chclc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chclc4.creature", Level=90, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.chclc4", entries.creature_chclc4) - entries.creature_chcld4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chcld4.creature", Level=140, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.chcld4", entries.creature_chcld4) - entries.creature_chdda1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdda1.creature", Level=10, RingAccess="a1", Ecosystem="Desert", Region="a" } r2.addPaletteElement("palette.entities.creatures.chdda1", entries.creature_chdda1) - entries.creature_chdda2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdda2.creature", Level=17, RingAccess="a1", Ecosystem="Desert", Region="a" } r2.addPaletteElement("palette.entities.creatures.chdda2", entries.creature_chdda2) - entries.creature_chddb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chddb1.creature", Level=10, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.chddb1", entries.creature_chddb1) - entries.creature_chddb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chddb2.creature", Level=20, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.chddb2", entries.creature_chddb2) - entries.creature_chddb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chddb3.creature", Level=30, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.chddb3", entries.creature_chddb3) - entries.creature_chddb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chddb4.creature", Level=40, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.chddb4", entries.creature_chddb4) - entries.creature_chdfa1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdfa1.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="a" } r2.addPaletteElement("palette.entities.creatures.chdfa1", entries.creature_chdfa1) - entries.creature_chdfa2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdfa2.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="a" } r2.addPaletteElement("palette.entities.creatures.chdfa2", entries.creature_chdfa2) - entries.creature_chdfb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdfb1.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.chdfb1", entries.creature_chdfb1) - entries.creature_chdfb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdfb2.creature", Level=20, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.chdfb2", entries.creature_chdfb2) - entries.creature_chdfb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdfb3.creature", Level=30, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.chdfb3", entries.creature_chdfb3) - entries.creature_chdfb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdfb4.creature", Level=40, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.chdfb4", entries.creature_chdfb4) - entries.creature_chdja1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdja1.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="a" } r2.addPaletteElement("palette.entities.creatures.chdja1", entries.creature_chdja1) - entries.creature_chdja2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdja2.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="a" } r2.addPaletteElement("palette.entities.creatures.chdja2", entries.creature_chdja2) - entries.creature_chdjb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdjb1.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.chdjb1", entries.creature_chdjb1) - entries.creature_chdjb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdjb2.creature", Level=20, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.chdjb2", entries.creature_chdjb2) - entries.creature_chdjb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdjb3.creature", Level=30, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.chdjb3", entries.creature_chdjb3) - entries.creature_chdjb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdjb4.creature", Level=40, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.chdjb4", entries.creature_chdjb4) - entries.creature_chdla1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdla1.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="a" } r2.addPaletteElement("palette.entities.creatures.chdla1", entries.creature_chdla1) - entries.creature_chdla2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdla2.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="a" } r2.addPaletteElement("palette.entities.creatures.chdla2", entries.creature_chdla2) - entries.creature_chdlb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdlb1.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.chdlb1", entries.creature_chdlb1) - entries.creature_chdlb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdlb2.creature", Level=20, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.chdlb2", entries.creature_chdlb2) - entries.creature_chdlb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdlb3.creature", Level=30, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.chdlb3", entries.creature_chdlb3) - entries.creature_chdlb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chdlb4.creature", Level=40, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.chdlb4", entries.creature_chdlb4) - --entries.creature_chegb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chegb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chegb1", entries.creature_chegb1) - --entries.creature_chegb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chegb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chegb2", entries.creature_chegb2) - --entries.creature_chegb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chegb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chegb3", entries.creature_chegb3) - --entries.creature_chegb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chegb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chegb4", entries.creature_chegb4) - --entries.creature_chegc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chegc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chegc1", entries.creature_chegc1) - --entries.creature_chegc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chegc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chegc2", entries.creature_chegc2) - --entries.creature_chegc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chegc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chegc3", entries.creature_chegc3) - --entries.creature_chegc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chegc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chegc4", entries.creature_chegc4) - --entries.creature_chegd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chegd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chegd1", entries.creature_chegd1) - --entries.creature_chegd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chegd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chegd2", entries.creature_chegd2) - --entries.creature_chegd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chegd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chegd3", entries.creature_chegd3) - --entries.creature_chegd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chegd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chegd4", entries.creature_chegd4) - --entries.creature_chege1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chege1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chege1", entries.creature_chege1) - --entries.creature_chege2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chege2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chege2", entries.creature_chege2) - --entries.creature_chege3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chege3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chege3", entries.creature_chege3) - --entries.creature_chege4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chege4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chege4", entries.creature_chege4) - --entries.creature_chegf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chegf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chegf1", entries.creature_chegf1) - --entries.creature_chegf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chegf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chegf2", entries.creature_chegf2) - --entries.creature_chegf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chegf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chegf3", entries.creature_chegf3) - --entries.creature_chegf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chegf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chegf4", entries.creature_chegf4) - entries.creature_cheld1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cheld1.creature", Level=110, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cheld1", entries.creature_cheld1) - entries.creature_cheld2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cheld2.creature", Level=120, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cheld2", entries.creature_cheld2) - entries.creature_cheld3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cheld3.creature", Level=130, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cheld3", entries.creature_cheld3) - entries.creature_cheld4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="cheld4.creature", Level=140, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cheld4", entries.creature_cheld4) - entries.creature_chele4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chele4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chele4", entries.creature_chele4) - --entries.creature_chfgb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chfgb1", entries.creature_chfgb1) - --entries.creature_chfgb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chfgb2", entries.creature_chfgb2) - --entries.creature_chfgb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chfgb3", entries.creature_chfgb3) - --entries.creature_chfgb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chfgb4", entries.creature_chfgb4) - --entries.creature_chfgc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chfgc1", entries.creature_chfgc1) - --entries.creature_chfgc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chfgc2", entries.creature_chfgc2) - --entries.creature_chfgc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chfgc3", entries.creature_chfgc3) - --entries.creature_chfgc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chfgc4", entries.creature_chfgc4) - --entries.creature_chfgd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chfgd1", entries.creature_chfgd1) - --entries.creature_chfgd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chfgd2", entries.creature_chfgd2) - --entries.creature_chfgd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chfgd3", entries.creature_chfgd3) - --entries.creature_chfgd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chfgd4", entries.creature_chfgd4) - --entries.creature_chfge1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chfge1", entries.creature_chfge1) - --entries.creature_chfge2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chfge2", entries.creature_chfge2) - --entries.creature_chfge3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chfge3", entries.creature_chfge3) - --entries.creature_chfge4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chfge4", entries.creature_chfge4) - --entries.creature_chfgf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chfgf1", entries.creature_chfgf1) - - --entries.creature_chfgf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chfgf2", entries.creature_chfgf2) - --entries.creature_chfgf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chfgf3", entries.creature_chfgf3) - --entries.creature_chfgf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chfgf4", entries.creature_chfgf4) - entries.creature_chfjc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfjc1.creature", Level=60, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.chfjc1", entries.creature_chfjc1) - entries.creature_chfjc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfjc2.creature", Level=70, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.chfjc2", entries.creature_chfjc2) - entries.creature_chfjc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfjc3.creature", Level=80, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.chfjc3", entries.creature_chfjc3) - entries.creature_chfjc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfjc4.creature", Level=90, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.chfjc4", entries.creature_chfjc4) - entries.creature_chfjd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfjd1.creature", Level=110, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.chfjd1", entries.creature_chfjd1) - entries.creature_chfjd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfjd2.creature", Level=120, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.chfjd2", entries.creature_chfjd2) - entries.creature_chfjd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfjd3.creature", Level=130, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.chfjd3", entries.creature_chfjd3) - entries.creature_chfjd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfjd4.creature", Level=140, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.chfjd4", entries.creature_chfjd4) - entries.creature_chfla1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfla1.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="a" } r2.addPaletteElement("palette.entities.creatures.chfla1", entries.creature_chfla1) - entries.creature_chfla2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chfla2.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="a" } r2.addPaletteElement("palette.entities.creatures.chfla2", entries.creature_chfla2) - entries.creature_chflb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chflb1.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.chflb1", entries.creature_chflb1) - entries.creature_chflb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chflb2.creature", Level=20, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.chflb2", entries.creature_chflb2) - entries.creature_chflb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chflb3.creature", Level=30, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.chflb3", entries.creature_chflb3) - entries.creature_chflb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chflb4.creature", Level=40, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.chflb4", entries.creature_chflb4) - entries.creature_chgdd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgdd1.creature", Level=110, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chgdd1", entries.creature_chgdd1) - entries.creature_chgdd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgdd2.creature", Level=120, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chgdd2", entries.creature_chgdd2) - entries.creature_chgdd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgdd3.creature", Level=130, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chgdd3", entries.creature_chgdd3) - entries.creature_chgdd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgdd4.creature", Level=140, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chgdd4", entries.creature_chgdd4) - entries.creature_chgde1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgde1.creature", Level=160, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chgde1", entries.creature_chgde1) - entries.creature_chgde2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgde2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chgde2", entries.creature_chgde2) - entries.creature_chgde3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgde3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chgde3", entries.creature_chgde3) - entries.creature_chgde4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgde4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chgde4", entries.creature_chgde4) - --entries.creature_chggb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chggb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chggb1", entries.creature_chggb1) - --entries.creature_chggb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chggb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chggb2", entries.creature_chggb2) - --entries.creature_chggb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chggb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chggb3", entries.creature_chggb3) - --entries.creature_chggb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chggb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chggb4", entries.creature_chggb4) - --entries.creature_chggc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chggc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chggc1", entries.creature_chggc1) - --entries.creature_chggc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chggc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chggc2", entries.creature_chggc2) - --entries.creature_chggc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chggc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chggc3", entries.creature_chggc3) - --entries.creature_chggc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chggc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chggc4", entries.creature_chggc4) - --entries.creature_chggd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chggd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chggd1", entries.creature_chggd1) - --entries.creature_chggd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chggd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chggd2", entries.creature_chggd2) - --entries.creature_chggd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chggd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chggd3", entries.creature_chggd3) - --entries.creature_chggd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chggd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chggd4", entries.creature_chggd4) - --entries.creature_chgge1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chgge1", entries.creature_chgge1) - --entries.creature_chgge2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chgge2", entries.creature_chgge2) - --entries.creature_chgge3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chgge3", entries.creature_chgge3) - --entries.creature_chgge4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chgge4", entries.creature_chgge4) - --entries.creature_chggf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chggf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chggf1", entries.creature_chggf1) - --entries.creature_chggf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chggf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chggf2", entries.creature_chggf2) - --entries.creature_chggf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chggf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chggf3", entries.creature_chggf3) - --entries.creature_chggf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chggf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chggf4", entries.creature_chggf4) - entries.creature_chgpd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgpd1.creature", Level=110, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.chgpd1", entries.creature_chgpd1) - entries.creature_chgpd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgpd2.creature", Level=120, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.chgpd2", entries.creature_chgpd2) - entries.creature_chgpd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgpd3.creature", Level=130, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.chgpd3", entries.creature_chgpd3) - entries.creature_chgpd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgpd4.creature", Level=140, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.chgpd4", entries.creature_chgpd4) - entries.creature_chgpf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgpf1.creature", Level=210, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chgpf1", entries.creature_chgpf1) - entries.creature_chgpf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgpf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chgpf2", entries.creature_chgpf2) - entries.creature_chgpf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgpf3.creature", Level=230, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chgpf3", entries.creature_chgpf3) - entries.creature_chgpf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chgpf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chgpf4", entries.creature_chgpf4) - entries.creature_chhdd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhdd1.creature", Level=110, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chhdd1", entries.creature_chhdd1) - entries.creature_chhdd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhdd2.creature", Level=120, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chhdd2", entries.creature_chhdd2) - entries.creature_chhdd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhdd3.creature", Level=130, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chhdd3", entries.creature_chhdd3) - entries.creature_chhdd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhdd4.creature", Level=140, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chhdd4", entries.creature_chhdd4) - entries.creature_chhfc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhfc1.creature", Level=60, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chhfc1", entries.creature_chhfc1) - entries.creature_chhfc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhfc2.creature", Level=70, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chhfc2", entries.creature_chhfc2) - entries.creature_chhfc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhfc3.creature", Level=80, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chhfc3", entries.creature_chhfc3) - entries.creature_chhfc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhfc4.creature", Level=90, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chhfc4", entries.creature_chhfc4) - entries.creature_chhfd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhfd1.creature", Level=110, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chhfd1", entries.creature_chhfd1) - entries.creature_chhfd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhfd2.creature", Level=120, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chhfd2", entries.creature_chhfd2) - entries.creature_chhfd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhfd3.creature", Level=130, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chhfd3", entries.creature_chhfd3) - entries.creature_chhfd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhfd4.creature", Level=140, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chhfd4", entries.creature_chhfd4) - entries.creature_chhja1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhja1.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="a" } r2.addPaletteElement("palette.entities.creatures.chhja1", entries.creature_chhja1) - entries.creature_chhja2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhja2.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="a" } r2.addPaletteElement("palette.entities.creatures.chhja2", entries.creature_chhja2) - entries.creature_chhjb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhjb1.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.chhjb1", entries.creature_chhjb1) - entries.creature_chhjb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhjb2.creature", Level=20, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.chhjb2", entries.creature_chhjb2) - entries.creature_chhjb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhjb3.creature", Level=30, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.chhjb3", entries.creature_chhjb3) - entries.creature_chhjb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhjb4.creature", Level=40, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.chhjb4", entries.creature_chhjb4) - entries.creature_chhle1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhle1.creature", Level=160, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chhle1", entries.creature_chhle1) - entries.creature_chhle2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhle2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chhle2", entries.creature_chhle2) - entries.creature_chhle3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhle3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chhle3", entries.creature_chhle3) - entries.creature_chhle4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhle4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chhle4", entries.creature_chhle4) - entries.creature_chhpf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhpf1.creature", Level=210, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chhpf1", entries.creature_chhpf1) - entries.creature_chhpf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhpf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chhpf2", entries.creature_chhpf2) - entries.creature_chhpf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhpf3.creature", Level=230, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chhpf3", entries.creature_chhpf3) - entries.creature_chhpf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chhpf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chhpf4", entries.creature_chhpf4) - entries.creature_chidb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chidb2.creature", Level=20, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.chidb2", entries.creature_chidb2) - entries.creature_chidc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chidc2.creature", Level=70, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.chidc2", entries.creature_chidc2) - entries.creature_chidd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chidd2.creature", Level=120, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chidd2", entries.creature_chidd2) - entries.creature_chide2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chide2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chide2", entries.creature_chide2) - entries.creature_chidf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chidf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chidf2", entries.creature_chidf2) - entries.creature_chifb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chifb2.creature", Level=20, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.chifb2", entries.creature_chifb2) - entries.creature_chifc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chifc2.creature", Level=70, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chifc2", entries.creature_chifc2) - entries.creature_chifd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chifd2.creature", Level=120, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chifd2", entries.creature_chifd2) - entries.creature_chife2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chife2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chife2", entries.creature_chife2) - entries.creature_chiff2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chiff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chiff2", entries.creature_chiff2) - entries.creature_chijb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chijb2.creature", Level=20, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.chijb2", entries.creature_chijb2) - entries.creature_chijc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chijc2.creature", Level=70, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.chijc2", entries.creature_chijc2) - entries.creature_chijd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chijd2.creature", Level=120, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.chijd2", entries.creature_chijd2) - entries.creature_chije2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chije2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chije2", entries.creature_chije2) - entries.creature_chijf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chijf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chijf2", entries.creature_chijf2) - entries.creature_chilb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chilb2.creature", Level=20, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.chilb2", entries.creature_chilb2) - entries.creature_chilc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chilc2.creature", Level=70, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.chilc2", entries.creature_chilc2) - entries.creature_child2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="child2.creature", Level=120, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.child2", entries.creature_child2) - entries.creature_chile2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chile2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chile2", entries.creature_chile2) - entries.creature_chilf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chilf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.chilf2", entries.creature_chilf2) - entries.creature_chipd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chipd2.creature", Level=120, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.chipd2", entries.creature_chipd2) - entries.creature_chipe2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chipe2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chipe2", entries.creature_chipe2) - entries.creature_chipf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chipf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chipf2", entries.creature_chipf2) - entries.creature_chjdb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjdb2.creature", Level=20, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.chjdb2", entries.creature_chjdb2) - entries.creature_chjdb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjdb3.creature", Level=30, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.chjdb3", entries.creature_chjdb3) - entries.creature_chjdc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjdc2.creature", Level=70, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.chjdc2", entries.creature_chjdc2) - entries.creature_chjdc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjdc3.creature", Level=80, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.chjdc3", entries.creature_chjdc3) - entries.creature_chjdd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjdd2.creature", Level=120, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chjdd2", entries.creature_chjdd2) - entries.creature_chjdd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjdd3.creature", Level=130, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chjdd3", entries.creature_chjdd3) - entries.creature_chjde2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjde2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chjde2", entries.creature_chjde2) - entries.creature_chjde3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjde3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chjde3", entries.creature_chjde3) - entries.creature_chjdf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjdf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chjdf2", entries.creature_chjdf2) - entries.creature_chjdf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjdf3.creature", Level=230, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chjdf3", entries.creature_chjdf3) - entries.creature_chjfb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjfb2.creature", Level=20, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.chjfb2", entries.creature_chjfb2) - entries.creature_chjfb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjfb3.creature", Level=30, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.chjfb3", entries.creature_chjfb3) - entries.creature_chjfc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjfc2.creature", Level=70, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chjfc2", entries.creature_chjfc2) - entries.creature_chjfc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjfc3.creature", Level=80, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chjfc3", entries.creature_chjfc3) - entries.creature_chjfd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjfd2.creature", Level=120, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chjfd2", entries.creature_chjfd2) - entries.creature_chjfd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjfd3.creature", Level=130, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chjfd3", entries.creature_chjfd3) - entries.creature_chjfe2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjfe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chjfe2", entries.creature_chjfe2) - entries.creature_chjfe3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjfe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chjfe3", entries.creature_chjfe3) - entries.creature_chjff2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chjff2", entries.creature_chjff2) - entries.creature_chjff3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chjff3", entries.creature_chjff3) - entries.creature_chjjb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjjb2.creature", Level=20, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.chjjb2", entries.creature_chjjb2) - entries.creature_chjjb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjjb3.creature", Level=30, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.chjjb3", entries.creature_chjjb3) - entries.creature_chjjc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjjc2.creature", Level=70, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.chjjc2", entries.creature_chjjc2) - entries.creature_chjjc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjjc3.creature", Level=80, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.chjjc3", entries.creature_chjjc3) - entries.creature_chjjd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjjd2.creature", Level=120, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.chjjd2", entries.creature_chjjd2) - entries.creature_chjjd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjjd3.creature", Level=130, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.chjjd3", entries.creature_chjjd3) - entries.creature_chjje2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chjje2", entries.creature_chjje2) - entries.creature_chjje3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chjje3", entries.creature_chjje3) - entries.creature_chjjf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjjf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chjjf2", entries.creature_chjjf2) - entries.creature_chjjf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjjf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chjjf3", entries.creature_chjjf3) - entries.creature_chjlb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjlb2.creature", Level=20, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.chjlb2", entries.creature_chjlb2) - entries.creature_chjlb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjlb3.creature", Level=30, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.chjlb3", entries.creature_chjlb3) - entries.creature_chjlc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjlc2.creature", Level=70, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.chjlc2", entries.creature_chjlc2) - entries.creature_chjlc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjlc3.creature", Level=80, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.chjlc3", entries.creature_chjlc3) - entries.creature_chjld2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjld2.creature", Level=120, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.chjld2", entries.creature_chjld2) - entries.creature_chjld3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjld3.creature", Level=130, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.chjld3", entries.creature_chjld3) - entries.creature_chjle2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjle2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chjle2", entries.creature_chjle2) - entries.creature_chjle3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjle3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chjle3", entries.creature_chjle3) - entries.creature_chjlf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjlf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.chjlf2", entries.creature_chjlf2) - entries.creature_chjlf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjlf3.creature", Level=230, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.chjlf3", entries.creature_chjlf3) - entries.creature_chjpd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjpd2.creature", Level=120, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.chjpd2", entries.creature_chjpd2) - entries.creature_chjpe2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjpe2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chjpe2", entries.creature_chjpe2) - entries.creature_chjpf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chjpf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chjpf2", entries.creature_chjpf2) - entries.creature_chkde1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkde1.creature", Level=160, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chkde1", entries.creature_chkde1) - entries.creature_chkde2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkde2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chkde2", entries.creature_chkde2) - entries.creature_chkde3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkde3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chkde3", entries.creature_chkde3) - entries.creature_chkde4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkde4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chkde4", entries.creature_chkde4) - entries.creature_chkdf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkdf1.creature", Level=210, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chkdf1", entries.creature_chkdf1) - entries.creature_chkdf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkdf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chkdf2", entries.creature_chkdf2) - entries.creature_chkdf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkdf3.creature", Level=230, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chkdf3", entries.creature_chkdf3) - entries.creature_chkdf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkdf4.creature", Level=240, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chkdf4", entries.creature_chkdf4) - --entries.creature_chkgb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chkgb1", entries.creature_chkgb1) - --entries.creature_chkgb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chkgb2", entries.creature_chkgb2) - --entries.creature_chkgb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chkgb3", entries.creature_chkgb3) - --entries.creature_chkgb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chkgb4", entries.creature_chkgb4) - --entries.creature_chkgc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chkgc1", entries.creature_chkgc1) - --entries.creature_chkgc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chkgc2", entries.creature_chkgc2) - --entries.creature_chkgc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chkgc3", entries.creature_chkgc3) - --entries.creature_chkgc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chkgc4", entries.creature_chkgc4) - --entries.creature_chkgd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chkgd1", entries.creature_chkgd1) - --entries.creature_chkgd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chkgd2", entries.creature_chkgd2) - --entries.creature_chkgd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chkgd3", entries.creature_chkgd3) - --entries.creature_chkgd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chkgd4", entries.creature_chkgd4) - --entries.creature_chkge1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chkge1", entries.creature_chkge1) - --entries.creature_chkge2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chkge2", entries.creature_chkge2) - --entries.creature_chkge3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chkge3", entries.creature_chkge3) - --entries.creature_chkge4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chkge4", entries.creature_chkge4) - --entries.creature_chkgf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chkgf1", entries.creature_chkgf1) - --entries.creature_chkgf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chkgf2", entries.creature_chkgf2) - --entries.creature_chkgf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chkgf3", entries.creature_chkgf3) - --entries.creature_chkgf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chkgf4", entries.creature_chkgf4) - entries.creature_chkjd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkjd1.creature", Level=110, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.chkjd1", entries.creature_chkjd1) - entries.creature_chkjd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkjd2.creature", Level=120, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.chkjd2", entries.creature_chkjd2) - entries.creature_chkjd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkjd3.creature", Level=130, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.chkjd3", entries.creature_chkjd3) - entries.creature_chkjd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkjd4.creature", Level=140, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.chkjd4", entries.creature_chkjd4) - entries.creature_chkje1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkje1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chkje1", entries.creature_chkje1) - entries.creature_chkje2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chkje2", entries.creature_chkje2) - entries.creature_chkje3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chkje3", entries.creature_chkje3) - entries.creature_chkje4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chkje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chkje4", entries.creature_chkje4) - entries.creature_chldf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chldf1.creature", Level=210, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chldf1", entries.creature_chldf1) - entries.creature_chldf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chldf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chldf2", entries.creature_chldf2) - entries.creature_chldf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chldf3.creature", Level=230, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chldf3", entries.creature_chldf3) - entries.creature_chldf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chldf4.creature", Level=240, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chldf4", entries.creature_chldf4) - entries.creature_chlfe1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlfe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlfe1", entries.creature_chlfe1) - entries.creature_chlfe2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlfe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlfe2", entries.creature_chlfe2) - entries.creature_chlfe3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlfe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlfe3", entries.creature_chlfe3) - entries.creature_chlfe4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlfe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlfe4", entries.creature_chlfe4) - entries.creature_chlff1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlff1.creature", Level=210, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chlff1", entries.creature_chlff1) - entries.creature_chlff2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chlff2", entries.creature_chlff2) - entries.creature_chlff3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chlff3", entries.creature_chlff3) - entries.creature_chlff4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chlff4", entries.creature_chlff4) - --entries.creature_chlgb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chlgb1", entries.creature_chlgb1) - --entries.creature_chlgb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chlgb2", entries.creature_chlgb2) - --entries.creature_chlgb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chlgb3", entries.creature_chlgb3) - --entries.creature_chlgb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chlgb4", entries.creature_chlgb4) - --entries.creature_chlgc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chlgc1", entries.creature_chlgc1) - --entries.creature_chlgc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chlgc2", entries.creature_chlgc2) - --entries.creature_chlgc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chlgc3", entries.creature_chlgc3) - --entries.creature_chlgc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chlgc4", entries.creature_chlgc4) - --entries.creature_chlgd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chlgd1", entries.creature_chlgd1) - --entries.creature_chlgd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chlgd2", entries.creature_chlgd2) - --entries.creature_chlgd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chlgd3", entries.creature_chlgd3) - --entries.creature_chlgd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chlgd4", entries.creature_chlgd4) - --entries.creature_chlge1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlge1", entries.creature_chlge1) - --entries.creature_chlge2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlge2", entries.creature_chlge2) - --entries.creature_chlge3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlge3", entries.creature_chlge3) - --entries.creature_chlge4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlge4", entries.creature_chlge4) - --entries.creature_chlgf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chlgf1", entries.creature_chlgf1) - --entries.creature_chlgf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chlgf2", entries.creature_chlgf2) - --entries.creature_chlgf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chlgf3", entries.creature_chlgf3) - --entries.creature_chlgf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chlgf4", entries.creature_chlgf4) - entries.creature_chlld1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlld1.creature", Level=110, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.chlld1", entries.creature_chlld1) - entries.creature_chlld2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlld2.creature", Level=120, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.chlld2", entries.creature_chlld2) - entries.creature_chlld3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlld3.creature", Level=130, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.chlld3", entries.creature_chlld3) - entries.creature_chlld4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlld4.creature", Level=140, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.chlld4", entries.creature_chlld4) - entries.creature_chlle1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlle1.creature", Level=160, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlle1", entries.creature_chlle1) - entries.creature_chlle2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlle2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlle2", entries.creature_chlle2) - entries.creature_chlle3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlle3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlle3", entries.creature_chlle3) - entries.creature_chlle4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlle4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlle4", entries.creature_chlle4) - entries.creature_chlpe1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlpe1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlpe1", entries.creature_chlpe1) - entries.creature_chlpe2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlpe2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlpe2", entries.creature_chlpe2) - entries.creature_chlpe3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlpe3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlpe3", entries.creature_chlpe3) - entries.creature_chlpe4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlpe4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlpe4", entries.creature_chlpe4) - entries.creature_chlpf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlpf1.creature", Level=210, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chlpf1", entries.creature_chlpf1) - entries.creature_chlpf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlpf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chlpf2", entries.creature_chlpf2) - entries.creature_chlpf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlpf3.creature", Level=230, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chlpf3", entries.creature_chlpf3) - entries.creature_chlpf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chlpf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chlpf4", entries.creature_chlpf4) - entries.creature_chmdd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chmdd1.creature", Level=110, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chmdd1", entries.creature_chmdd1) - entries.creature_chmdd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chmdd2.creature", Level=120, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chmdd2", entries.creature_chmdd2) - entries.creature_chmdd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chmdd3.creature", Level=130, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chmdd3", entries.creature_chmdd3) - entries.creature_chmdd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chmdd4.creature", Level=140, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chmdd4", entries.creature_chmdd4) - entries.creature_chmfc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chmfc1.creature", Level=60, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chmfc1", entries.creature_chmfc1) - entries.creature_chmfc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chmfc2.creature", Level=70, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chmfc2", entries.creature_chmfc2) - entries.creature_chmfc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chmfc3.creature", Level=80, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chmfc3", entries.creature_chmfc3) - entries.creature_chmfc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chmfc4.creature", Level=90, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chmfc4", entries.creature_chmfc4) - entries.creature_chnfd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chnfd1.creature", Level=110, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chnfd1", entries.creature_chnfd1) - entries.creature_chnfd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chnfd2.creature", Level=120, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chnfd2", entries.creature_chnfd2) - entries.creature_chnfd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chnfd3.creature", Level=130, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chnfd3", entries.creature_chnfd3) - entries.creature_chnfd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chnfd4.creature", Level=140, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chnfd4", entries.creature_chnfd4) - entries.creature_chnjc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chnjc1.creature", Level=60, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.chnjc1", entries.creature_chnjc1) - entries.creature_chnjc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chnjc2.creature", Level=70, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.chnjc2", entries.creature_chnjc2) - entries.creature_chnjc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chnjc3.creature", Level=80, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.chnjc3", entries.creature_chnjc3) - entries.creature_chnjc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chnjc4.creature", Level=90, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.chnjc4", entries.creature_chnjc4) - entries.creature_chofc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chofc1.creature", Level=60, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chofc1", entries.creature_chofc1) - entries.creature_chofc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chofc2.creature", Level=70, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chofc2", entries.creature_chofc2) - entries.creature_chofc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chofc3.creature", Level=80, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chofc3", entries.creature_chofc3) - entries.creature_chofc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chofc4.creature", Level=90, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chofc4", entries.creature_chofc4) - --entries.creature_chogb1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chogb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chogb1", entries.creature_chogb1) - --entries.creature_chogb2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chogb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chogb2", entries.creature_chogb2) - --entries.creature_chogb3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chogb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chogb3", entries.creature_chogb3) - --entries.creature_chogb4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chogb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.chogb4", entries.creature_chogb4) - --entries.creature_chogc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chogc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chogc1", entries.creature_chogc1) - --entries.creature_chogc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chogc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chogc2", entries.creature_chogc2) - --entries.creature_chogc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chogc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chogc3", entries.creature_chogc3) - --entries.creature_chogc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chogc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.chogc4", entries.creature_chogc4) - --entries.creature_chogd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chogd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chogd1", entries.creature_chogd1) - --entries.creature_chogd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chogd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chogd2", entries.creature_chogd2) - --entries.creature_chogd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chogd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chogd3", entries.creature_chogd3) - --entries.creature_chogd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chogd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.chogd4", entries.creature_chogd4) - --entries.creature_choge1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="choge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.choge1", entries.creature_choge1) - --entries.creature_choge2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="choge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.choge2", entries.creature_choge2) - --entries.creature_choge3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="choge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.choge3", entries.creature_choge3) - --entries.creature_choge4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="choge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.choge4", entries.creature_choge4) - --entries.creature_chogf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chogf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chogf1", entries.creature_chogf1) - --entries.creature_chogf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chogf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chogf2", entries.creature_chogf2) - --entries.creature_chogf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chogf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chogf3", entries.creature_chogf3) - --entries.creature_chogf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chogf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.chogf4", entries.creature_chogf4) - entries.creature_chpdc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chpdc1.creature", Level=60, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.chpdc1", entries.creature_chpdc1) - entries.creature_chpdc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chpdc2.creature", Level=70, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.chpdc2", entries.creature_chpdc2) - entries.creature_chpdc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chpdc3.creature", Level=80, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.chpdc3", entries.creature_chpdc3) - entries.creature_chpdc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chpdc4.creature", Level=90, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.chpdc4", entries.creature_chpdc4) - entries.creature_chpde4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chpde4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chpde4", entries.creature_chpde4) - entries.creature_chpfd1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chpfd1.creature", Level=110, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chpfd1", entries.creature_chpfd1) - entries.creature_chpfd2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chpfd2.creature", Level=120, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chpfd2", entries.creature_chpfd2) - entries.creature_chpfd3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chpfd3.creature", Level=130, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chpfd3", entries.creature_chpfd3) - entries.creature_chpfd4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chpfd4.creature", Level=140, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chpfd4", entries.creature_chpfd4) - entries.creature_chqfe1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chqfe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chqfe1", entries.creature_chqfe1) - entries.creature_chqfe2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chqfe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chqfe2", entries.creature_chqfe2) - entries.creature_chqfe3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chqfe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chqfe3", entries.creature_chqfe3) - entries.creature_chqfe4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chqfe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chqfe4", entries.creature_chqfe4) - entries.creature_chqlc1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chqlc1.creature", Level=60, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.chqlc1", entries.creature_chqlc1) - entries.creature_chqlc2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chqlc2.creature", Level=70, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.chqlc2", entries.creature_chqlc2) - entries.creature_chqlc3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chqlc3.creature", Level=80, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.chqlc3", entries.creature_chqlc3) - entries.creature_chqlc4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chqlc4.creature", Level=90, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.chqlc4", entries.creature_chqlc4) - entries.creature_chrfe1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chrfe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chrfe1", entries.creature_chrfe1) - entries.creature_chrfe2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chrfe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chrfe2", entries.creature_chrfe2) - entries.creature_chrfe3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chrfe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chrfe3", entries.creature_chrfe3) - entries.creature_chrfe4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chrfe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chrfe4", entries.creature_chrfe4) - entries.creature_chrlf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chrlf1.creature", Level=210, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.chrlf1", entries.creature_chrlf1) - entries.creature_chrlf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chrlf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.chrlf2", entries.creature_chrlf2) - entries.creature_chrlf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chrlf3.creature", Level=230, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.chrlf3", entries.creature_chrlf3) - entries.creature_chrlf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chrlf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.chrlf4", entries.creature_chrlf4) - entries.creature_chsdf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chsdf1.creature", Level=210, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chsdf1", entries.creature_chsdf1) - entries.creature_chsdf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chsdf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chsdf2", entries.creature_chsdf2) - entries.creature_chsdf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chsdf3.creature", Level=230, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chsdf3", entries.creature_chsdf3) - entries.creature_chsdf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chsdf4.creature", Level=240, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chsdf4", entries.creature_chsdf4) - entries.creature_chsle1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chsle1.creature", Level=160, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chsle1", entries.creature_chsle1) - entries.creature_chsle2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chsle2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chsle2", entries.creature_chsle2) - entries.creature_chsle3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chsle3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chsle3", entries.creature_chsle3) - entries.creature_chsle4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chsle4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chsle4", entries.creature_chsle4) - entries.creature_chtde1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chtde1.creature", Level=160, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chtde1", entries.creature_chtde1) - entries.creature_chtde2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chtde2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chtde2", entries.creature_chtde2) - entries.creature_chtde3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chtde3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chtde3", entries.creature_chtde3) - entries.creature_chtde4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chtde4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chtde4", entries.creature_chtde4) - entries.creature_chtjf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chtjf1.creature", Level=210, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chtjf1", entries.creature_chtjf1) - entries.creature_chtjf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chtjf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chtjf2", entries.creature_chtjf2) - entries.creature_chtjf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chtjf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chtjf3", entries.creature_chtjf3) - entries.creature_chtjf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chtjf4.creature", Level=240, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chtjf4", entries.creature_chtjf4) - entries.creature_chuje1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chuje1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chuje1", entries.creature_chuje1) - entries.creature_chuje2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chuje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chuje2", entries.creature_chuje2) - entries.creature_chuje3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chuje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chuje3", entries.creature_chuje3) - entries.creature_chuje4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chuje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chuje4", entries.creature_chuje4) - entries.creature_chulf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chulf1.creature", Level=210, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.chulf1", entries.creature_chulf1) - entries.creature_chulf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chulf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.chulf2", entries.creature_chulf2) - entries.creature_chulf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chulf3.creature", Level=230, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.chulf3", entries.creature_chulf3) - entries.creature_chulf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chulf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.chulf4", entries.creature_chulf4) - entries.creature_chvfe4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chvfe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chvfe4", entries.creature_chvfe4) - entries.creature_chvff1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chvff1.creature", Level=210, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chvff1", entries.creature_chvff1) - entries.creature_chvff2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chvff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chvff2", entries.creature_chvff2) - entries.creature_chvff3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chvff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chvff3", entries.creature_chvff3) - entries.creature_chvff4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chvff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chvff4", entries.creature_chvff4) - entries.creature_chvje1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chvje1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chvje1", entries.creature_chvje1) - entries.creature_chvje2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chvje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chvje2", entries.creature_chvje2) - entries.creature_chvje3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chvje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chvje3", entries.creature_chvje3) - entries.creature_chvje4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chvje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chvje4", entries.creature_chvje4) - entries.creature_chvpf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chvpf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chvpf4", entries.creature_chvpf4) - entries.creature_chwde1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chwde1.creature", Level=160, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chwde1", entries.creature_chwde1) - entries.creature_chwde2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chwde2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chwde2", entries.creature_chwde2) - entries.creature_chwde3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chwde3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chwde3", entries.creature_chwde3) - entries.creature_chwde4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chwde4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chwde4", entries.creature_chwde4) - entries.creature_chwff1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chwff1.creature", Level=210, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chwff1", entries.creature_chwff1) - entries.creature_chwff2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chwff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chwff2", entries.creature_chwff2) - entries.creature_chwff3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chwff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chwff3", entries.creature_chwff3) - entries.creature_chwff4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chwff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chwff4", entries.creature_chwff4) - entries.creature_chxjf1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chxjf1.creature", Level=210, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chxjf1", entries.creature_chxjf1) - entries.creature_chxjf2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chxjf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chxjf2", entries.creature_chxjf2) - entries.creature_chxjf3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chxjf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chxjf3", entries.creature_chxjf3) - entries.creature_chxjf4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chxjf4.creature", Level=240, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chxjf4", entries.creature_chxjf4) - entries.creature_chxpe1 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chxpe1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chxpe1", entries.creature_chxpe1) - entries.creature_chxpe2 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chxpe2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chxpe2", entries.creature_chxpe2) - entries.creature_chxpe3 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chxpe3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chxpe3", entries.creature_chxpe3) - entries.creature_chxpe4 = { Class="Npc", Base="palette.entities.creatures.passive", SheetClient="chxpe4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chxpe4", entries.creature_chxpe4) - - --- Predators (carnivores) - entries.creature_ccada1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccada1.creature", Level=10, RingAccess="a1", Ecosystem="Desert", Region="a" } r2.addPaletteElement("palette.entities.creatures.ccada1", entries.creature_ccada1) - entries.creature_ccada2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccada2.creature", Level=17, RingAccess="a1", Ecosystem="Desert", Region="a" } r2.addPaletteElement("palette.entities.creatures.ccada2", entries.creature_ccada2) - entries.creature_ccadb1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccadb1.creature", Level=10, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccadb1", entries.creature_ccadb1) - entries.creature_ccadb2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccadb2.creature", Level=20, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccadb2", entries.creature_ccadb2) - entries.creature_ccadb3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccadb3.creature", Level=30, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccadb3", entries.creature_ccadb3) - entries.creature_ccadb4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccadb4.creature", Level=40, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccadb4", entries.creature_ccadb4) - entries.creature_ccafa1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccafa1.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="a" } r2.addPaletteElement("palette.entities.creatures.ccafa1", entries.creature_ccafa1) - entries.creature_ccafa2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccafa2.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="a" } r2.addPaletteElement("palette.entities.creatures.ccafa2", entries.creature_ccafa2) - entries.creature_ccafb1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccafb1.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccafb1", entries.creature_ccafb1) - entries.creature_ccafb2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccafb2.creature", Level=20, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccafb2", entries.creature_ccafb2) - entries.creature_ccafb3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccafb3.creature", Level=30, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccafb3", entries.creature_ccafb3) - entries.creature_ccafb4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccafb4.creature", Level=40, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccafb4", entries.creature_ccafb4) - entries.creature_ccafc1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccafc1.creature", Level=60, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccafc1", entries.creature_ccafc1) - entries.creature_ccafc2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccafc2.creature", Level=70, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccafc2", entries.creature_ccafc2) - entries.creature_ccafc3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccafc3.creature", Level=80, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccafc3", entries.creature_ccafc3) - entries.creature_ccafc4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccafc4.creature", Level=90, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccafc4", entries.creature_ccafc4) - entries.creature_ccafe4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccafe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccafe4", entries.creature_ccafe4) - --entries.creature_ccagb1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccagb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccagb1", entries.creature_ccagb1) - --entries.creature_ccagb2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccagb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccagb2", entries.creature_ccagb2) - --entries.creature_ccagb3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccagb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccagb3", entries.creature_ccagb3) - --entries.creature_ccagb4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccagb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccagb4", entries.creature_ccagb4) - --entries.creature_ccagc1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccagc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccagc1", entries.creature_ccagc1) - --entries.creature_ccagc2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccagc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccagc2", entries.creature_ccagc2) - --entries.creature_ccagc3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccagc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccagc3", entries.creature_ccagc3) - --entries.creature_ccagc4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccagc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccagc4", entries.creature_ccagc4) - --entries.creature_ccagd1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccagd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccagd1", entries.creature_ccagd1) - --entries.creature_ccagd2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccagd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccagd2", entries.creature_ccagd2) - --entries.creature_ccagd3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccagd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccagd3", entries.creature_ccagd3) - --entries.creature_ccagd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccagd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccagd4", entries.creature_ccagd4) - --entries.creature_ccage1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccage1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccage1", entries.creature_ccage1) - --entries.creature_ccage2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccage2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccage2", entries.creature_ccage2) - --entries.creature_ccage3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccage3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccage3", entries.creature_ccage3) - --entries.creature_ccage4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccage4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccage4", entries.creature_ccage4) - --entries.creature_ccagf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccagf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccagf1", entries.creature_ccagf1) - --entries.creature_ccagf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccagf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccagf2", entries.creature_ccagf2) - --entries.creature_ccagf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccagf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccagf3", entries.creature_ccagf3) - --entries.creature_ccagf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccagf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccagf4", entries.creature_ccagf4) - entries.creature_ccajd1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccajd1.creature", Level=110, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccajd1", entries.creature_ccajd1) - entries.creature_ccajd2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccajd2.creature", Level=120, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccajd2", entries.creature_ccajd2) - entries.creature_ccajd3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccajd3.creature", Level=130, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccajd3", entries.creature_ccajd3) - entries.creature_ccajd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccajd4.creature", Level=140, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccajd4", entries.creature_ccajd4) - entries.creature_ccaje1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccaje1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccaje1", entries.creature_ccaje1) - entries.creature_ccaje2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccaje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccaje2", entries.creature_ccaje2) - entries.creature_ccaje3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccaje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccaje3", entries.creature_ccaje3) - entries.creature_ccaje4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccaje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccaje4", entries.creature_ccaje4) - entries.creature_ccbdc1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbdc1.creature", Level=60, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccbdc1", entries.creature_ccbdc1) - entries.creature_ccbdc2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbdc2.creature", Level=70, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccbdc2", entries.creature_ccbdc2) - entries.creature_ccbdc3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbdc3.creature", Level=80, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccbdc3", entries.creature_ccbdc3) - entries.creature_ccbdc4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbdc4.creature", Level=90, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccbdc4", entries.creature_ccbdc4) - --entries.creature_ccbgb1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccbgb1", entries.creature_ccbgb1) - --entries.creature_ccbgb2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccbgb2", entries.creature_ccbgb2) - --entries.creature_ccbgb3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccbgb3", entries.creature_ccbgb3) - --entries.creature_ccbgb4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccbgb4", entries.creature_ccbgb4) - --entries.creature_ccbgc1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccbgc1", entries.creature_ccbgc1) - --entries.creature_ccbgc2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccbgc2", entries.creature_ccbgc2) - --entries.creature_ccbgc3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccbgc3", entries.creature_ccbgc3) - --entries.creature_ccbgc4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccbgc4", entries.creature_ccbgc4) - --entries.creature_ccbgd1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccbgd1", entries.creature_ccbgd1) - --entries.creature_ccbgd2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccbgd2", entries.creature_ccbgd2) - --entries.creature_ccbgd3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccbgd3", entries.creature_ccbgd3) - - --entries.creature_ccbgd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccbgd4", entries.creature_ccbgd4) - - --entries.creature_ccbge1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccbge1", entries.creature_ccbge1) - --entries.creature_ccbge2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccbge2", entries.creature_ccbge2) - --entries.creature_ccbge3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccbge3", entries.creature_ccbge3) - --entries.creature_ccbge4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccbge4", entries.creature_ccbge4) - --entries.creature_ccbgf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccbgf1", entries.creature_ccbgf1) - --entries.creature_ccbgf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccbgf2", entries.creature_ccbgf2) - --entries.creature_ccbgf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccbgf3", entries.creature_ccbgf3) - --entries.creature_ccbgf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccbgf4", entries.creature_ccbgf4) - entries.creature_ccbla1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbla1.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="a" } r2.addPaletteElement("palette.entities.creatures.ccbla1", entries.creature_ccbla1) - entries.creature_ccbla2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccbla2.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="a" } r2.addPaletteElement("palette.entities.creatures.ccbla2", entries.creature_ccbla2) - entries.creature_ccblb1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccblb1.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccblb1", entries.creature_ccblb1) - entries.creature_ccblb2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccblb2.creature", Level=20, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccblb2", entries.creature_ccblb2) - entries.creature_ccblb3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccblb3.creature", Level=30, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccblb3", entries.creature_ccblb3) - entries.creature_ccblb4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccblb4.creature", Level=40, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccblb4", entries.creature_ccblb4) - entries.creature_ccblc1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccblc1.creature", Level=60, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccblc1", entries.creature_ccblc1) - entries.creature_ccblc2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccblc2.creature", Level=70, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccblc2", entries.creature_ccblc2) - entries.creature_ccblc3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccblc3.creature", Level=80, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccblc3", entries.creature_ccblc3) - entries.creature_ccblc4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccblc4.creature", Level=90, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccblc4", entries.creature_ccblc4) - entries.creature_cccda1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccda1.creature", Level=10, RingAccess="a1", Ecosystem="Desert", Region="a" } r2.addPaletteElement("palette.entities.creatures.cccda1", entries.creature_cccda1) - entries.creature_cccda2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccda2.creature", Level=17, RingAccess="a1", Ecosystem="Desert", Region="a" } r2.addPaletteElement("palette.entities.creatures.cccda2", entries.creature_cccda2) - entries.creature_cccdb1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccdb1.creature", Level=10, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.cccdb1", entries.creature_cccdb1) - entries.creature_cccdb2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccdb2.creature", Level=20, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.cccdb2", entries.creature_cccdb2) - entries.creature_cccdb3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccdb3.creature", Level=30, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.cccdb3", entries.creature_cccdb3) - entries.creature_cccdb4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccdb4.creature", Level=40, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.cccdb4", entries.creature_cccdb4) - entries.creature_cccdc1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccdc1.creature", Level=60, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.cccdc1", entries.creature_cccdc1) - entries.creature_cccdc2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccdc2.creature", Level=70, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.cccdc2", entries.creature_cccdc2) - entries.creature_cccdc3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccdc3.creature", Level=80, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.cccdc3", entries.creature_cccdc3) - entries.creature_cccdc4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccdc4.creature", Level=90, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.cccdc4", entries.creature_cccdc4) - entries.creature_cccdd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccdd4.creature", Level=140, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cccdd4", entries.creature_cccdd4) - --entries.creature_cccgb1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cccgb1", entries.creature_cccgb1) - --entries.creature_cccgb2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cccgb2", entries.creature_cccgb2) - --entries.creature_cccgb3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cccgb3", entries.creature_cccgb3) - --entries.creature_cccgb4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cccgb4", entries.creature_cccgb4) - --entries.creature_cccgc1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cccgc1", entries.creature_cccgc1) - --entries.creature_cccgc2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cccgc2", entries.creature_cccgc2) - --entries.creature_cccgc3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cccgc3", entries.creature_cccgc3) - --entries.creature_cccgc4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cccgc4", entries.creature_cccgc4) - --entries.creature_cccgd1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cccgd1", entries.creature_cccgd1) - --entries.creature_cccgd2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cccgd2", entries.creature_cccgd2) - --entries.creature_cccgd3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cccgd3", entries.creature_cccgd3) - --entries.creature_cccgd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cccgd4", entries.creature_cccgd4) - --entries.creature_cccge1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cccge1", entries.creature_cccge1) - --entries.creature_cccge2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cccge2", entries.creature_cccge2) - --entries.creature_cccge3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cccge3", entries.creature_cccge3) - --entries.creature_cccge4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cccge4", entries.creature_cccge4) - --entries.creature_cccgf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cccgf1", entries.creature_cccgf1) - --entries.creature_cccgf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cccgf2", entries.creature_cccgf2) - --entries.creature_cccgf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cccgf3", entries.creature_cccgf3) - --entries.creature_cccgf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cccgf4", entries.creature_cccgf4) - entries.creature_cccla1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccla1.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="a" } r2.addPaletteElement("palette.entities.creatures.cccla1", entries.creature_cccla1) - entries.creature_cccla2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cccla2.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="a" } r2.addPaletteElement("palette.entities.creatures.cccla2", entries.creature_cccla2) - entries.creature_ccclb1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccclb1.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccclb1", entries.creature_ccclb1) - entries.creature_ccclb2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccclb2.creature", Level=20, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccclb2", entries.creature_ccclb2) - entries.creature_ccclb3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccclb3.creature", Level=30, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccclb3", entries.creature_ccclb3) - entries.creature_ccclb4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccclb4.creature", Level=40, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccclb4", entries.creature_ccclb4) - entries.creature_ccclf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccclf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccclf4", entries.creature_ccclf4) - entries.creature_ccdfd1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdfd1.creature", Level=110, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccdfd1", entries.creature_ccdfd1) - entries.creature_ccdfd2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdfd2.creature", Level=120, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccdfd2", entries.creature_ccdfd2) - entries.creature_ccdfd3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdfd3.creature", Level=130, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccdfd3", entries.creature_ccdfd3) - entries.creature_ccdfd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdfd4.creature", Level=140, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccdfd4", entries.creature_ccdfd4) - entries.creature_ccdfe1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdfe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccdfe1", entries.creature_ccdfe1) - entries.creature_ccdfe2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdfe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccdfe2", entries.creature_ccdfe2) - entries.creature_ccdfe3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdfe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccdfe3", entries.creature_ccdfe3) - entries.creature_ccdfe4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdfe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccdfe4", entries.creature_ccdfe4) - --entries.creature_ccdgb1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccdgb1", entries.creature_ccdgb1) - --entries.creature_ccdgb2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccdgb2", entries.creature_ccdgb2) - --entries.creature_ccdgb3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccdgb3", entries.creature_ccdgb3) - --entries.creature_ccdgb4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccdgb4", entries.creature_ccdgb4) - --entries.creature_ccdgc1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccdgc1", entries.creature_ccdgc1) - --entries.creature_ccdgc2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccdgc2", entries.creature_ccdgc2) - --entries.creature_ccdgc3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccdgc3", entries.creature_ccdgc3) - --entries.creature_ccdgc4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccdgc4", entries.creature_ccdgc4) - --entries.creature_ccdgd1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccdgd1", entries.creature_ccdgd1) - --entries.creature_ccdgd2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccdgd2", entries.creature_ccdgd2) - --entries.creature_ccdgd3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccdgd3", entries.creature_ccdgd3) - --entries.creature_ccdgd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccdgd4", entries.creature_ccdgd4) - --entries.creature_ccdge1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccdge1", entries.creature_ccdge1) - --entries.creature_ccdge2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccdge2", entries.creature_ccdge2) - --entries.creature_ccdge3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccdge3", entries.creature_ccdge3) - --entries.creature_ccdge4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccdge4", entries.creature_ccdge4) - --entries.creature_ccdgf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccdgf1", entries.creature_ccdgf1) - --entries.creature_ccdgf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccdgf2", entries.creature_ccdgf2) - --entries.creature_ccdgf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccdgf3", entries.creature_ccdgf3) - --entries.creature_ccdgf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccdgf4", entries.creature_ccdgf4) - entries.creature_ccdjc1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdjc1.creature", Level=60, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccdjc1", entries.creature_ccdjc1) - entries.creature_ccdjc2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdjc2.creature", Level=70, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccdjc2", entries.creature_ccdjc2) - entries.creature_ccdjc3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdjc3.creature", Level=80, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccdjc3", entries.creature_ccdjc3) - entries.creature_ccdjc4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdjc4.creature", Level=90, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccdjc4", entries.creature_ccdjc4) - entries.creature_ccdjd1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdjd1.creature", Level=110, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccdjd1", entries.creature_ccdjd1) - entries.creature_ccdjd2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdjd2.creature", Level=120, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccdjd2", entries.creature_ccdjd2) - entries.creature_ccdjd3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdjd3.creature", Level=130, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccdjd3", entries.creature_ccdjd3) - entries.creature_ccdjd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdjd4.creature", Level=140, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccdjd4", entries.creature_ccdjd4) - entries.creature_ccdle1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdle1.creature", Level=160, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccdle1", entries.creature_ccdle1) - entries.creature_ccdle2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdle2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccdle2", entries.creature_ccdle2) - entries.creature_ccdle3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdle3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccdle3", entries.creature_ccdle3) - entries.creature_ccdle4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdle4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccdle4", entries.creature_ccdle4) - entries.creature_ccdlf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdlf1.creature", Level=210, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccdlf1", entries.creature_ccdlf1) - entries.creature_ccdlf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdlf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccdlf2", entries.creature_ccdlf2) - entries.creature_ccdlf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdlf3.creature", Level=230, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccdlf3", entries.creature_ccdlf3) - entries.creature_ccdlf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccdlf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccdlf4", entries.creature_ccdlf4) - entries.creature_ccefa1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccefa1.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="a" } r2.addPaletteElement("palette.entities.creatures.ccefa1", entries.creature_ccefa1) - entries.creature_ccefa2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccefa2.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="a" } r2.addPaletteElement("palette.entities.creatures.ccefa2", entries.creature_ccefa2) - entries.creature_ccefb1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccefb1.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccefb1", entries.creature_ccefb1) - entries.creature_ccefb2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccefb2.creature", Level=20, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccefb2", entries.creature_ccefb2) - entries.creature_ccefb3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccefb3.creature", Level=30, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccefb3", entries.creature_ccefb3) - entries.creature_ccefb4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccefb4.creature", Level=40, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccefb4", entries.creature_ccefb4) - entries.creature_cceff4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cceff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.cceff4", entries.creature_cceff4) - --entries.creature_ccegb1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccegb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccegb1", entries.creature_ccegb1) - --entries.creature_ccegb2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccegb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccegb2", entries.creature_ccegb2) - --entries.creature_ccegb3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccegb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccegb3", entries.creature_ccegb3) - --entries.creature_ccegb4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccegb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccegb4", entries.creature_ccegb4) - --entries.creature_ccegc1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccegc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccegc1", entries.creature_ccegc1) - --entries.creature_ccegc2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccegc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccegc2", entries.creature_ccegc2) - --entries.creature_ccegc3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccegc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccegc3", entries.creature_ccegc3) - --entries.creature_ccegc4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccegc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccegc4", entries.creature_ccegc4) - --entries.creature_ccegd1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccegd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccegd1", entries.creature_ccegd1) - --entries.creature_ccegd2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccegd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccegd2", entries.creature_ccegd2) - --entries.creature_ccegd3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccegd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccegd3", entries.creature_ccegd3) - --entries.creature_ccegd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccegd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccegd4", entries.creature_ccegd4) - --entries.creature_ccege1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccege1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccege1", entries.creature_ccege1) - --entries.creature_ccege2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccege2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccege2", entries.creature_ccege2) - --entries.creature_ccege3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccege3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccege3", entries.creature_ccege3) - --entries.creature_ccege4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccege4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccege4", entries.creature_ccege4) - --entries.creature_ccegf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccegf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccegf1", entries.creature_ccegf1) - --entries.creature_ccegf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccegf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccegf2", entries.creature_ccegf2) - --entries.creature_ccegf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccegf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccegf3", entries.creature_ccegf3) - --entries.creature_ccegf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccegf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccegf4", entries.creature_ccegf4) - entries.creature_cceja1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cceja1.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="a" } r2.addPaletteElement("palette.entities.creatures.cceja1", entries.creature_cceja1) - entries.creature_cceja2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cceja2.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="a" } r2.addPaletteElement("palette.entities.creatures.cceja2", entries.creature_cceja2) - entries.creature_ccejb1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccejb1.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccejb1", entries.creature_ccejb1) - entries.creature_ccejb2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccejb2.creature", Level=20, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccejb2", entries.creature_ccejb2) - entries.creature_ccejb3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccejb3.creature", Level=30, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccejb3", entries.creature_ccejb3) - entries.creature_ccejb4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccejb4.creature", Level=40, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccejb4", entries.creature_ccejb4) - entries.creature_ccejc1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccejc1.creature", Level=60, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccejc1", entries.creature_ccejc1) - entries.creature_ccejc2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccejc2.creature", Level=70, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccejc2", entries.creature_ccejc2) - entries.creature_ccejc3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccejc3.creature", Level=80, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccejc3", entries.creature_ccejc3) - entries.creature_ccejc4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccejc4.creature", Level=90, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccejc4", entries.creature_ccejc4) - entries.creature_ccelc1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccelc1.creature", Level=60, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccelc1", entries.creature_ccelc1) - entries.creature_ccelc2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccelc2.creature", Level=70, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccelc2", entries.creature_ccelc2) - entries.creature_ccelc3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccelc3.creature", Level=80, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccelc3", entries.creature_ccelc3) - entries.creature_ccelc4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccelc4.creature", Level=90, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccelc4", entries.creature_ccelc4) - entries.creature_cceld1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cceld1.creature", Level=110, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cceld1", entries.creature_cceld1) - entries.creature_cceld2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cceld2.creature", Level=120, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cceld2", entries.creature_cceld2) - entries.creature_cceld3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cceld3.creature", Level=130, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cceld3", entries.creature_cceld3) - entries.creature_cceld4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cceld4.creature", Level=140, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cceld4", entries.creature_cceld4) - entries.creature_ccepf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccepf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccepf4", entries.creature_ccepf4) - --entries.creature_ccfgb1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccfgb1", entries.creature_ccfgb1) - --entries.creature_ccfgb2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccfgb2", entries.creature_ccfgb2) - --entries.creature_ccfgb3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccfgb3", entries.creature_ccfgb3) - --entries.creature_ccfgb4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccfgb4", entries.creature_ccfgb4) - --entries.creature_ccfgc1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccfgc1", entries.creature_ccfgc1) - --entries.creature_ccfgc2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccfgc2", entries.creature_ccfgc2) - --entries.creature_ccfgc3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccfgc3", entries.creature_ccfgc3) - --entries.creature_ccfgc4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccfgc4", entries.creature_ccfgc4) - --entries.creature_ccfgd1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccfgd1", entries.creature_ccfgd1) - --entries.creature_ccfgd2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccfgd2", entries.creature_ccfgd2) - --entries.creature_ccfgd3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccfgd3", entries.creature_ccfgd3) - --entries.creature_ccfgd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccfgd4", entries.creature_ccfgd4) - --entries.creature_ccfge1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccfge1", entries.creature_ccfge1) - --entries.creature_ccfge2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccfge2", entries.creature_ccfge2) - --entries.creature_ccfge3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccfge3", entries.creature_ccfge3) - --entries.creature_ccfge4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccfge4", entries.creature_ccfge4) - --entries.creature_ccfgf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccfgf1", entries.creature_ccfgf1) - --entries.creature_ccfgf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccfgf2", entries.creature_ccfgf2) - --entries.creature_ccfgf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccfgf3", entries.creature_ccfgf3) - --entries.creature_ccfgf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccfgf4", entries.creature_ccfgf4) - entries.creature_ccfjd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfjd4.creature", Level=140, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccfjd4", entries.creature_ccfjd4) - entries.creature_ccfje1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfje1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccfje1", entries.creature_ccfje1) - entries.creature_ccfje2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccfje2", entries.creature_ccfje2) - entries.creature_ccfje3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccfje3", entries.creature_ccfje3) - entries.creature_ccfje4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccfje4", entries.creature_ccfje4) - entries.creature_ccfjf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfjf1.creature", Level=210, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccfjf1", entries.creature_ccfjf1) - entries.creature_ccfjf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfjf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccfjf2", entries.creature_ccfjf2) - entries.creature_ccfjf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfjf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccfjf3", entries.creature_ccfjf3) - entries.creature_ccfjf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfjf4.creature", Level=240, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccfjf4", entries.creature_ccfjf4) - entries.creature_ccflf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccflf1.creature", Level=210, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccflf1", entries.creature_ccflf1) - entries.creature_ccflf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccflf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccflf2", entries.creature_ccflf2) - entries.creature_ccflf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccflf3.creature", Level=230, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccflf3", entries.creature_ccflf3) - entries.creature_ccflf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccflf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccflf4", entries.creature_ccflf4) - entries.creature_ccfpe4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccfpe4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccfpe4", entries.creature_ccfpe4) - --entries.creature_ccggf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccggf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccggf1", entries.creature_ccggf1) - --entries.creature_ccggf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccggf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccggf2", entries.creature_ccggf2) - --entries.creature_ccggf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccggf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccggf3", entries.creature_ccggf3) - --entries.creature_ccggf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccggf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccggf4", entries.creature_ccggf4) - entries.creature_ccgpf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccgpf1.creature", Level=210, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccgpf1", entries.creature_ccgpf1) - entries.creature_ccgpf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccgpf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccgpf2", entries.creature_ccgpf2) - entries.creature_ccgpf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccgpf3.creature", Level=230, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccgpf3", entries.creature_ccgpf3) - entries.creature_ccgpf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccgpf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccgpf4", entries.creature_ccgpf4) - entries.creature_cchdd1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchdd1.creature", Level=110, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cchdd1", entries.creature_cchdd1) - entries.creature_cchdd2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchdd2.creature", Level=120, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cchdd2", entries.creature_cchdd2) - entries.creature_cchdd3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchdd3.creature", Level=130, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cchdd3", entries.creature_cchdd3) - entries.creature_cchdd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchdd4.creature", Level=140, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cchdd4", entries.creature_cchdd4) - entries.creature_cchde1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchde1.creature", Level=160, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cchde1", entries.creature_cchde1) - entries.creature_cchde2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchde2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cchde2", entries.creature_cchde2) - entries.creature_cchde3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchde3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cchde3", entries.creature_cchde3) - entries.creature_cchde4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchde4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cchde4", entries.creature_cchde4) - --entries.creature_cchgb1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cchgb1", entries.creature_cchgb1) - - --entries.creature_cchgb2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cchgb2", entries.creature_cchgb2) - --entries.creature_cchgb3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cchgb3", entries.creature_cchgb3) - --entries.creature_cchgb4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cchgb4", entries.creature_cchgb4) - --entries.creature_cchgc1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cchgc1", entries.creature_cchgc1) - --entries.creature_cchgc2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cchgc2", entries.creature_cchgc2) - --entries.creature_cchgc3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cchgc3", entries.creature_cchgc3) - --entries.creature_cchgc4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cchgc4", entries.creature_cchgc4) - --entries.creature_cchgd1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cchgd1", entries.creature_cchgd1) - --entries.creature_cchgd2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cchgd2", entries.creature_cchgd2) - --entries.creature_cchgd3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cchgd3", entries.creature_cchgd3) - --entries.creature_cchgd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cchgd4", entries.creature_cchgd4) - --entries.creature_cchge1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cchge1", entries.creature_cchge1) - --entries.creature_cchge2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cchge2", entries.creature_cchge2) - --entries.creature_cchge3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cchge3", entries.creature_cchge3) - --entries.creature_cchge4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cchge4", entries.creature_cchge4) - --entries.creature_cchgf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cchgf1", entries.creature_cchgf1) - --entries.creature_cchgf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cchgf2", entries.creature_cchgf2) - --entries.creature_cchgf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cchgf3", entries.creature_cchgf3) - --entries.creature_cchgf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cchgf4", entries.creature_cchgf4) - entries.creature_cchpe1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchpe1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.cchpe1", entries.creature_cchpe1) - entries.creature_cchpe2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchpe2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.cchpe2", entries.creature_cchpe2) - entries.creature_cchpe3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchpe3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.cchpe3", entries.creature_cchpe3) - entries.creature_cchpe4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cchpe4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.cchpe4", entries.creature_cchpe4) - entries.creature_ccidd1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccidd1.creature", Level=110, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccidd1", entries.creature_ccidd1) - entries.creature_ccidd2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccidd2.creature", Level=120, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccidd2", entries.creature_ccidd2) - entries.creature_ccidd3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccidd3.creature", Level=130, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccidd3", entries.creature_ccidd3) - entries.creature_ccidd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccidd4.creature", Level=140, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccidd4", entries.creature_ccidd4) - entries.creature_ccidf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccidf1.creature", Level=210, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccidf1", entries.creature_ccidf1) - entries.creature_ccidf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccidf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccidf2", entries.creature_ccidf2) - entries.creature_ccidf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccidf3.creature", Level=230, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccidf3", entries.creature_ccidf3) - entries.creature_ccidf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccidf4.creature", Level=240, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccidf4", entries.creature_ccidf4) - entries.creature_ccijf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccijf1.creature", Level=210, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccijf1", entries.creature_ccijf1) - entries.creature_ccijf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccijf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccijf2", entries.creature_ccijf2) - entries.creature_ccijf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccijf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccijf3", entries.creature_ccijf3) - entries.creature_ccijf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccijf4.creature", Level=240, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccijf4", entries.creature_ccijf4) - entries.creature_ccild1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccild1.creature", Level=110, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccild1", entries.creature_ccild1) - entries.creature_ccild2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccild2.creature", Level=120, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccild2", entries.creature_ccild2) - entries.creature_ccild3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccild3.creature", Level=130, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccild3", entries.creature_ccild3) - entries.creature_ccild4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccild4.creature", Level=140, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccild4", entries.creature_ccild4) - entries.creature_ccile1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccile1.creature", Level=160, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccile1", entries.creature_ccile1) - entries.creature_ccile2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccile2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccile2", entries.creature_ccile2) - entries.creature_ccile3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccile3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccile3", entries.creature_ccile3) - entries.creature_ccile4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccile4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccile4", entries.creature_ccile4) - entries.creature_ccipd1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccipd1.creature", Level=110, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccipd1", entries.creature_ccipd1) - entries.creature_ccipd2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccipd2.creature", Level=120, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccipd2", entries.creature_ccipd2) - entries.creature_ccipd3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccipd3.creature", Level=130, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccipd3", entries.creature_ccipd3) - entries.creature_ccipd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccipd4.creature", Level=140, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccipd4", entries.creature_ccipd4) - entries.creature_ccjfc1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccjfc1.creature", Level=60, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccjfc1", entries.creature_ccjfc1) - entries.creature_ccjfc2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccjfc2.creature", Level=70, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccjfc2", entries.creature_ccjfc2) - entries.creature_ccjfc3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccjfc3.creature", Level=80, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccjfc3", entries.creature_ccjfc3) - entries.creature_ccjfc4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccjfc4.creature", Level=90, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccjfc4", entries.creature_ccjfc4) - entries.creature_ccjfd1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccjfd1.creature", Level=110, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccjfd1", entries.creature_ccjfd1) - entries.creature_ccjfd2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccjfd2.creature", Level=120, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccjfd2", entries.creature_ccjfd2) - entries.creature_ccjfd3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccjfd3.creature", Level=130, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccjfd3", entries.creature_ccjfd3) - entries.creature_ccjfd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccjfd4.creature", Level=140, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccjfd4", entries.creature_ccjfd4) - entries.creature_ccjja1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccjja1.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="a" } r2.addPaletteElement("palette.entities.creatures.ccjja1", entries.creature_ccjja1) - entries.creature_ccjja2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccjja2.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="a" } r2.addPaletteElement("palette.entities.creatures.ccjja2", entries.creature_ccjja2) - entries.creature_ccjjb1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccjjb1.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccjjb1", entries.creature_ccjjb1) - entries.creature_ccjjb2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccjjb2.creature", Level=20, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccjjb2", entries.creature_ccjjb2) - entries.creature_ccjjb3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccjjb3.creature", Level=30, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccjjb3", entries.creature_ccjjb3) - entries.creature_ccjjb4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccjjb4.creature", Level=40, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccjjb4", entries.creature_ccjjb4) - entries.creature_cckdf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cckdf1.creature", Level=210, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.cckdf1", entries.creature_cckdf1) - entries.creature_cckdf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cckdf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.cckdf2", entries.creature_cckdf2) - entries.creature_cckdf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cckdf3.creature", Level=230, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.cckdf3", entries.creature_cckdf3) - entries.creature_cckdf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cckdf4.creature", Level=240, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.cckdf4", entries.creature_cckdf4) - entries.creature_cckfe1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cckfe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cckfe1", entries.creature_cckfe1) - entries.creature_cckfe2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cckfe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cckfe2", entries.creature_cckfe2) - entries.creature_cckfe3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cckfe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cckfe3", entries.creature_cckfe3) - entries.creature_cckfe4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cckfe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cckfe4", entries.creature_cckfe4) - entries.creature_cckff1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cckff1.creature", Level=210, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.cckff1", entries.creature_cckff1) - entries.creature_cckff2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cckff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.cckff2", entries.creature_cckff2) - entries.creature_cckff3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cckff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.cckff3", entries.creature_cckff3) - entries.creature_cckff4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cckff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.cckff4", entries.creature_cckff4) - entries.creature_cclde1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cclde1.creature", Level=160, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cclde1", entries.creature_cclde1) - entries.creature_cclde2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cclde2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cclde2", entries.creature_cclde2) - entries.creature_cclde3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cclde3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cclde3", entries.creature_cclde3) - entries.creature_cclde4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cclde4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cclde4", entries.creature_cclde4) - entries.creature_cclff1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cclff1.creature", Level=210, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.cclff1", entries.creature_cclff1) - entries.creature_cclff2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cclff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.cclff2", entries.creature_cclff2) - entries.creature_cclff3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cclff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.cclff3", entries.creature_cclff3) - entries.creature_cclff4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="cclff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.cclff4", entries.creature_cclff4) - entries.creature_ccmff1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmff1.creature", Level=210, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccmff1", entries.creature_ccmff1) - entries.creature_ccmff2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccmff2", entries.creature_ccmff2) - entries.creature_ccmff3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccmff3", entries.creature_ccmff3) - entries.creature_ccmff4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccmff4", entries.creature_ccmff4) - --entries.creature_ccmgb1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccmgb1", entries.creature_ccmgb1) - --entries.creature_ccmgb2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccmgb2", entries.creature_ccmgb2) - --entries.creature_ccmgb3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccmgb3", entries.creature_ccmgb3) - --entries.creature_ccmgb4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccmgb4", entries.creature_ccmgb4) - --entries.creature_ccmgc1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccmgc1", entries.creature_ccmgc1) - --entries.creature_ccmgc2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccmgc2", entries.creature_ccmgc2) - --entries.creature_ccmgc3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccmgc3", entries.creature_ccmgc3) - --entries.creature_ccmgc4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccmgc4", entries.creature_ccmgc4) - --entries.creature_ccmgd1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccmgd1", entries.creature_ccmgd1) - --entries.creature_ccmgd2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccmgd2", entries.creature_ccmgd2) - --entries.creature_ccmgd3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccmgd3", entries.creature_ccmgd3) - --entries.creature_ccmgd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccmgd4", entries.creature_ccmgd4) - --entries.creature_ccmge1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccmge1", entries.creature_ccmge1) - --entries.creature_ccmge2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccmge2", entries.creature_ccmge2) - --entries.creature_ccmge3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccmge3", entries.creature_ccmge3) - --entries.creature_ccmge4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccmge4", entries.creature_ccmge4) - --entries.creature_ccmgf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccmgf1", entries.creature_ccmgf1) - --entries.creature_ccmgf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccmgf2", entries.creature_ccmgf2) - --entries.creature_ccmgf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccmgf3", entries.creature_ccmgf3) - --entries.creature_ccmgf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccmgf4", entries.creature_ccmgf4) - entries.creature_ccmpf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmpf1.creature", Level=210, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccmpf1", entries.creature_ccmpf1) - entries.creature_ccmpf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmpf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccmpf2", entries.creature_ccmpf2) - entries.creature_ccmpf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmpf3.creature", Level=230, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccmpf3", entries.creature_ccmpf3) - entries.creature_ccmpf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccmpf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccmpf4", entries.creature_ccmpf4) - entries.creature_ccnlf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccnlf1.creature", Level=210, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccnlf1", entries.creature_ccnlf1) - entries.creature_ccnlf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccnlf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccnlf2", entries.creature_ccnlf2) - entries.creature_ccnlf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccnlf3.creature", Level=230, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccnlf3", entries.creature_ccnlf3) - entries.creature_ccnlf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccnlf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccnlf4", entries.creature_ccnlf4) - entries.creature_ccnpd1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccnpd1.creature", Level=110, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccnpd1", entries.creature_ccnpd1) - entries.creature_ccnpd2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccnpd2.creature", Level=120, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccnpd2", entries.creature_ccnpd2) - entries.creature_ccnpd3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccnpd3.creature", Level=130, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccnpd3", entries.creature_ccnpd3) - entries.creature_ccnpd4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccnpd4.creature", Level=140, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccnpd4", entries.creature_ccnpd4) - entries.creature_ccodf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccodf1.creature", Level=210, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccodf1", entries.creature_ccodf1) - entries.creature_ccodf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccodf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccodf2", entries.creature_ccodf2) - entries.creature_ccodf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccodf3.creature", Level=230, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccodf3", entries.creature_ccodf3) - entries.creature_ccodf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccodf4.creature", Level=240, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccodf4", entries.creature_ccodf4) - entries.creature_ccope1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccope1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccope1", entries.creature_ccope1) - entries.creature_ccope2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccope2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccope2", entries.creature_ccope2) - entries.creature_ccope3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccope3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccope3", entries.creature_ccope3) - entries.creature_ccope4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccope4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccope4", entries.creature_ccope4) - entries.creature_ccopf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccopf1.creature", Level=210, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccopf1", entries.creature_ccopf1) - entries.creature_ccopf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccopf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccopf2", entries.creature_ccopf2) - entries.creature_ccopf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccopf3.creature", Level=230, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccopf3", entries.creature_ccopf3) - entries.creature_ccopf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccopf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccopf4", entries.creature_ccopf4) - entries.creature_ccpjf1 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccpjf1.creature", Level=210, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccpjf1", entries.creature_ccpjf1) - entries.creature_ccpjf2 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccpjf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccpjf2", entries.creature_ccpjf2) - entries.creature_ccpjf3 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccpjf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccpjf3", entries.creature_ccpjf3) - entries.creature_ccpjf4 = { Class="Npc", Base="palette.entities.creatures.predator", SheetClient="ccpjf4.creature", Level=240, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccpjf4", entries.creature_ccpjf4) - - --- Plants - --entries.creature_cpagb1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpagb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpagb1", entries.creature_cpagb1) - --entries.creature_cpagb2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpagb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpagb2", entries.creature_cpagb2) - --entries.creature_cpagb3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpagb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpagb3", entries.creature_cpagb3) - --entries.creature_cpagb4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpagb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpagb4", entries.creature_cpagb4) - --entries.creature_cpagc1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpagc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpagc1", entries.creature_cpagc1) - --entries.creature_cpagc2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpagc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpagc2", entries.creature_cpagc2) - --entries.creature_cpagc3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpagc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpagc3", entries.creature_cpagc3) - --entries.creature_cpagc4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpagc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpagc4", entries.creature_cpagc4) - --entries.creature_cpagd1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpagd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpagd1", entries.creature_cpagd1) - --entries.creature_cpagd2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpagd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpagd2", entries.creature_cpagd2) - --entries.creature_cpagd3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpagd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpagd3", entries.creature_cpagd3) - --entries.creature_cpagd4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpagd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpagd4", entries.creature_cpagd4) - --entries.creature_cpage1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpage1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpage1", entries.creature_cpage1) - --entries.creature_cpage2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpage2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpage2", entries.creature_cpage2) - --entries.creature_cpage3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpage3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpage3", entries.creature_cpage3) - --entries.creature_cpage4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpage4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpage4", entries.creature_cpage4) - --entries.creature_cpagf1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpagf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpagf1", entries.creature_cpagf1) - --entries.creature_cpagf2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpagf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpagf2", entries.creature_cpagf2) - --entries.creature_cpagf3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpagf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpagf3", entries.creature_cpagf3) - --entries.creature_cpagf4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpagf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpagf4", entries.creature_cpagf4) - entries.creature_cpapd1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpapd1.creature", Level=110, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpapd1", entries.creature_cpapd1) - entries.creature_cpapd2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpapd2.creature", Level=120, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpapd2", entries.creature_cpapd2) - entries.creature_cpapd3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpapd3.creature", Level=130, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpapd3", entries.creature_cpapd3) - entries.creature_cpapd4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpapd4.creature", Level=140, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpapd4", entries.creature_cpapd4) - entries.creature_cpape1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpape1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpape1", entries.creature_cpape1) - entries.creature_cpape2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpape2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpape2", entries.creature_cpape2) - entries.creature_cpape3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpape3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpape3", entries.creature_cpape3) - entries.creature_cpape4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpape4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpape4", entries.creature_cpape4) - entries.creature_cpapf1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpapf1.creature", Level=210, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpapf1", entries.creature_cpapf1) - entries.creature_cpapf2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpapf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpapf2", entries.creature_cpapf2) - entries.creature_cpapf3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpapf3.creature", Level=230, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpapf3", entries.creature_cpapf3) - entries.creature_cpapf4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpapf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpapf4", entries.creature_cpapf4) - --entries.creature_cpbgb1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpbgb1", entries.creature_cpbgb1) - --entries.creature_cpbgb2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpbgb2", entries.creature_cpbgb2) - --entries.creature_cpbgb3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpbgb3", entries.creature_cpbgb3) - --entries.creature_cpbgb4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpbgb4", entries.creature_cpbgb4) - --entries.creature_cpbgc1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpbgc1", entries.creature_cpbgc1) - --entries.creature_cpbgc2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpbgc2", entries.creature_cpbgc2) - --entries.creature_cpbgc3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpbgc3", entries.creature_cpbgc3) - --entries.creature_cpbgc4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpbgc4", entries.creature_cpbgc4) - --entries.creature_cpbgd1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpbgd1", entries.creature_cpbgd1) - --entries.creature_cpbgd2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpbgd2", entries.creature_cpbgd2) - --entries.creature_cpbgd3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpbgd3", entries.creature_cpbgd3) - --entries.creature_cpbgd4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpbgd4", entries.creature_cpbgd4) - --entries.creature_cpbge1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpbge1", entries.creature_cpbge1) - --entries.creature_cpbge2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpbge2", entries.creature_cpbge2) - --entries.creature_cpbge3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpbge3", entries.creature_cpbge3) - --entries.creature_cpbge4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpbge4", entries.creature_cpbge4) - --entries.creature_cpbgf1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpbgf1", entries.creature_cpbgf1) - --entries.creature_cpbgf2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpbgf2", entries.creature_cpbgf2) - --entries.creature_cpbgf3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpbgf3", entries.creature_cpbgf3) - --entries.creature_cpbgf4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpbgf4", entries.creature_cpbgf4) - entries.creature_cpblb1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpblb1.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpblb1", entries.creature_cpblb1) - entries.creature_cpblb2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpblb2.creature", Level=20, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpblb2", entries.creature_cpblb2) - entries.creature_cpblb3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpblb3.creature", Level=30, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpblb3", entries.creature_cpblb3) - entries.creature_cpblb4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpblb4.creature", Level=40, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpblb4", entries.creature_cpblb4) - entries.creature_cpblc1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpblc1.creature", Level=60, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpblc1", entries.creature_cpblc1) - entries.creature_cpblc2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpblc2.creature", Level=70, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpblc2", entries.creature_cpblc2) - entries.creature_cpblc3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpblc3.creature", Level=80, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpblc3", entries.creature_cpblc3) - entries.creature_cpblc4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpblc4.creature", Level=90, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpblc4", entries.creature_cpblc4) - entries.creature_cpbld1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbld1.creature", Level=110, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpbld1", entries.creature_cpbld1) - entries.creature_cpbld2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbld2.creature", Level=120, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpbld2", entries.creature_cpbld2) - entries.creature_cpbld3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbld3.creature", Level=130, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpbld3", entries.creature_cpbld3) - entries.creature_cpbld4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpbld4.creature", Level=140, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpbld4", entries.creature_cpbld4) - entries.creature_cpblf4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpblf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpblf4", entries.creature_cpblf4) - entries.creature_cpcfb1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcfb1.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpcfb1", entries.creature_cpcfb1) - entries.creature_cpcfb2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcfb2.creature", Level=20, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpcfb2", entries.creature_cpcfb2) - entries.creature_cpcfb3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcfb3.creature", Level=30, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpcfb3", entries.creature_cpcfb3) - entries.creature_cpcfb4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcfb4.creature", Level=40, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpcfb4", entries.creature_cpcfb4) - entries.creature_cpcfc1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcfc1.creature", Level=60, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpcfc1", entries.creature_cpcfc1) - entries.creature_cpcfc2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcfc2.creature", Level=70, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpcfc2", entries.creature_cpcfc2) - entries.creature_cpcfc3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcfc3.creature", Level=80, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpcfc3", entries.creature_cpcfc3) - entries.creature_cpcfc4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcfc4.creature", Level=90, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpcfc4", entries.creature_cpcfc4) - --entries.creature_cpcgb1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpcgb1", entries.creature_cpcgb1) - --entries.creature_cpcgb2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpcgb2", entries.creature_cpcgb2) - --entries.creature_cpcgb3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpcgb3", entries.creature_cpcgb3) - --entries.creature_cpcgb4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpcgb4", entries.creature_cpcgb4) - --entries.creature_cpcgc1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpcgc1", entries.creature_cpcgc1) - --entries.creature_cpcgc2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpcgc2", entries.creature_cpcgc2) - --entries.creature_cpcgc3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpcgc3", entries.creature_cpcgc3) - --entries.creature_cpcgc4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpcgc4", entries.creature_cpcgc4) - --entries.creature_cpcgd1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpcgd1", entries.creature_cpcgd1) - --entries.creature_cpcgd2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpcgd2", entries.creature_cpcgd2) - --entries.creature_cpcgd3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpcgd3", entries.creature_cpcgd3) - --entries.creature_cpcgd4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpcgd4", entries.creature_cpcgd4) - --entries.creature_cpcge1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpcge1", entries.creature_cpcge1) - --entries.creature_cpcge2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpcge2", entries.creature_cpcge2) - --entries.creature_cpcge3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpcge3", entries.creature_cpcge3) - --entries.creature_cpcge4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpcge4", entries.creature_cpcge4) - --entries.creature_cpcgf1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpcgf1", entries.creature_cpcgf1) - --entries.creature_cpcgf2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpcgf2", entries.creature_cpcgf2) - - --entries.creature_cpcgf3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpcgf3", entries.creature_cpcgf3) - --entries.creature_cpcgf4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpcgf4", entries.creature_cpcgf4) - entries.creature_cpcjd1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcjd1.creature", Level=110, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpcjd1", entries.creature_cpcjd1) - entries.creature_cpcjd2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcjd2.creature", Level=120, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpcjd2", entries.creature_cpcjd2) - entries.creature_cpcjd3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcjd3.creature", Level=130, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpcjd3", entries.creature_cpcjd3) - entries.creature_cpcjd4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcjd4.creature", Level=140, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpcjd4", entries.creature_cpcjd4) - entries.creature_cpcje1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcje1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpcje1", entries.creature_cpcje1) - entries.creature_cpcje2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpcje2", entries.creature_cpcje2) - entries.creature_cpcje3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpcje3", entries.creature_cpcje3) - entries.creature_cpcje4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpcje4", entries.creature_cpcje4) - entries.creature_cpcpf4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcpf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpcpf4", entries.creature_cpcpf4) - entries.creature_cpdfe1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdfe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpdfe1", entries.creature_cpdfe1) - entries.creature_cpdfe2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdfe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpdfe2", entries.creature_cpdfe2) - entries.creature_cpdfe3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdfe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpdfe3", entries.creature_cpdfe3) - entries.creature_cpdfe4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdfe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpdfe4", entries.creature_cpdfe4) - entries.creature_cpdff1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdff1.creature", Level=210, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpdff1", entries.creature_cpdff1) - entries.creature_cpdff2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpdff2", entries.creature_cpdff2) - entries.creature_cpdff3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpdff3", entries.creature_cpdff3) - entries.creature_cpdff4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpdff4", entries.creature_cpdff4) - --entries.creature_cpdgb1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpdgb1", entries.creature_cpdgb1) - --entries.creature_cpdgb2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpdgb2", entries.creature_cpdgb2) - --entries.creature_cpdgb3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpdgb3", entries.creature_cpdgb3) - --entries.creature_cpdgb4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpdgb4", entries.creature_cpdgb4) - --entries.creature_cpdgc1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpdgc1", entries.creature_cpdgc1) - --entries.creature_cpdgc2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpdgc2", entries.creature_cpdgc2) - --entries.creature_cpdgc3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpdgc3", entries.creature_cpdgc3) - --entries.creature_cpdgc4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpdgc4", entries.creature_cpdgc4) - --entries.creature_cpdgd1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpdgd1", entries.creature_cpdgd1) - --entries.creature_cpdgd2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpdgd2", entries.creature_cpdgd2) - --entries.creature_cpdgd3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpdgd3", entries.creature_cpdgd3) - --entries.creature_cpdgd4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpdgd4", entries.creature_cpdgd4) - --entries.creature_cpdge1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpdge1", entries.creature_cpdge1) - --entries.creature_cpdge2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpdge2", entries.creature_cpdge2) - --entries.creature_cpdge3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpdge3", entries.creature_cpdge3) - --entries.creature_cpdge4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpdge4", entries.creature_cpdge4) - --entries.creature_cpdgf1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpdgf1", entries.creature_cpdgf1) - --entries.creature_cpdgf2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpdgf2", entries.creature_cpdgf2) - --entries.creature_cpdgf3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpdgf3", entries.creature_cpdgf3) - --entries.creature_cpdgf4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpdgf4", entries.creature_cpdgf4) - entries.creature_cpdjb1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdjb1.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpdjb1", entries.creature_cpdjb1) - entries.creature_cpdjb2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdjb2.creature", Level=20, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpdjb2", entries.creature_cpdjb2) - entries.creature_cpdjb3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdjb3.creature", Level=30, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpdjb3", entries.creature_cpdjb3) - entries.creature_cpdjb4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdjb4.creature", Level=40, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpdjb4", entries.creature_cpdjb4) - entries.creature_cpdjc1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdjc1.creature", Level=60, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpdjc1", entries.creature_cpdjc1) - entries.creature_cpdjc2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdjc2.creature", Level=70, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpdjc2", entries.creature_cpdjc2) - entries.creature_cpdjc3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdjc3.creature", Level=80, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpdjc3", entries.creature_cpdjc3) - entries.creature_cpdjc4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdjc4.creature", Level=90, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpdjc4", entries.creature_cpdjc4) - entries.creature_cpdje4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpdje4", entries.creature_cpdje4) - entries.creature_cpefd1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpefd1.creature", Level=110, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpefd1", entries.creature_cpefd1) - entries.creature_cpefd2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpefd2.creature", Level=120, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpefd2", entries.creature_cpefd2) - entries.creature_cpefd3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpefd3.creature", Level=130, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpefd3", entries.creature_cpefd3) - entries.creature_cpefd4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpefd4.creature", Level=140, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpefd4", entries.creature_cpefd4) - entries.creature_cpefe1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpefe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpefe1", entries.creature_cpefe1) - entries.creature_cpefe2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpefe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpefe2", entries.creature_cpefe2) - - entries.creature_cpefe3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpefe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpefe3", entries.creature_cpefe3) - entries.creature_cpefe4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpefe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpefe4", entries.creature_cpefe4) - --entries.creature_cpegb1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpegb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpegb1", entries.creature_cpegb1) - --entries.creature_cpegb2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpegb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpegb2", entries.creature_cpegb2) - --entries.creature_cpegb3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpegb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpegb3", entries.creature_cpegb3) - --entries.creature_cpegb4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpegb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpegb4", entries.creature_cpegb4) - --entries.creature_cpegc1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpegc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpegc1", entries.creature_cpegc1) - --entries.creature_cpegc2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpegc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpegc2", entries.creature_cpegc2) - --entries.creature_cpegc3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpegc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpegc3", entries.creature_cpegc3) - --entries.creature_cpegc4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpegc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpegc4", entries.creature_cpegc4) - --entries.creature_cpegd1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpegd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpegd1", entries.creature_cpegd1) - --entries.creature_cpegd2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpegd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpegd2", entries.creature_cpegd2) - --entries.creature_cpegd3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpegd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpegd3", entries.creature_cpegd3) - --entries.creature_cpegd4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpegd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpegd4", entries.creature_cpegd4) - --entries.creature_cpege1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpege1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpege1", entries.creature_cpege1) - --entries.creature_cpege2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpege2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpege2", entries.creature_cpege2) - --entries.creature_cpege3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpege3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpege3", entries.creature_cpege3) - --entries.creature_cpege4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpege4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpege4", entries.creature_cpege4) - --entries.creature_cpegf1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpegf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpegf1", entries.creature_cpegf1) - --entries.creature_cpegf2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpegf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpegf2", entries.creature_cpegf2) - --entries.creature_cpegf3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpegf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpegf3", entries.creature_cpegf3) - --entries.creature_cpegf4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpegf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpegf4", entries.creature_cpegf4) - entries.creature_cpejf1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpejf1.creature", Level=210, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpejf1", entries.creature_cpejf1) - entries.creature_cpejf2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpejf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpejf2", entries.creature_cpejf2) - entries.creature_cpejf3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpejf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpejf3", entries.creature_cpejf3) - entries.creature_cpejf4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpejf4.creature", Level=240, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpejf4", entries.creature_cpejf4) - entries.creature_cpfdb1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfdb1.creature", Level=10, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpfdb1", entries.creature_cpfdb1) - entries.creature_cpfdb2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfdb2.creature", Level=20, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpfdb2", entries.creature_cpfdb2) - entries.creature_cpfdb3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfdb3.creature", Level=30, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpfdb3", entries.creature_cpfdb3) - entries.creature_cpfdb4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfdb4.creature", Level=40, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpfdb4", entries.creature_cpfdb4) - entries.creature_cpfdc1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfdc1.creature", Level=60, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpfdc1", entries.creature_cpfdc1) - entries.creature_cpfdc2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfdc2.creature", Level=70, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpfdc2", entries.creature_cpfdc2) - entries.creature_cpfdc3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfdc3.creature", Level=80, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpfdc3", entries.creature_cpfdc3) - entries.creature_cpfdc4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfdc4.creature", Level=90, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpfdc4", entries.creature_cpfdc4) - entries.creature_cpfdd1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfdd1.creature", Level=110, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpfdd1", entries.creature_cpfdd1) - entries.creature_cpfdd2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfdd2.creature", Level=120, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpfdd2", entries.creature_cpfdd2) - entries.creature_cpfdd3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfdd3.creature", Level=130, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpfdd3", entries.creature_cpfdd3) - entries.creature_cpfdd4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfdd4.creature", Level=140, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpfdd4", entries.creature_cpfdd4) - entries.creature_cpfdf4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfdf4.creature", Level=240, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpfdf4", entries.creature_cpfdf4) - --entries.creature_cpfgb1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpfgb1", entries.creature_cpfgb1) - --entries.creature_cpfgb2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpfgb2", entries.creature_cpfgb2) - --entries.creature_cpfgb3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpfgb3", entries.creature_cpfgb3) - --entries.creature_cpfgb4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpfgb4", entries.creature_cpfgb4) - --entries.creature_cpfgc1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpfgc1", entries.creature_cpfgc1) - --entries.creature_cpfgc2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpfgc2", entries.creature_cpfgc2) - --entries.creature_cpfgc3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpfgc3", entries.creature_cpfgc3) - --entries.creature_cpfgc4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpfgc4", entries.creature_cpfgc4) - --entries.creature_cpfgd1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpfgd1", entries.creature_cpfgd1) - --entries.creature_cpfgd2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpfgd2", entries.creature_cpfgd2) - --entries.creature_cpfgd3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpfgd3", entries.creature_cpfgd3) - --entries.creature_cpfgd4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpfgd4", entries.creature_cpfgd4) - --entries.creature_cpfge1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpfge1", entries.creature_cpfge1) - --entries.creature_cpfge2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpfge2", entries.creature_cpfge2) - --entries.creature_cpfge3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpfge3", entries.creature_cpfge3) - --entries.creature_cpfge4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpfge4", entries.creature_cpfge4) - --entries.creature_cpfgf1 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpfgf1", entries.creature_cpfgf1) - --entries.creature_cpfgf2 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpfgf2", entries.creature_cpfgf2) - --entries.creature_cpfgf3 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpfgf3", entries.creature_cpfgf3) - --entries.creature_cpfgf4 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpfgf4", entries.creature_cpfgf4) - - --- Degens (primitive tribes) - --entries.creature_cdagb1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdagb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cdagb1", entries.creature_cdagb1) - --entries.creature_cdagb2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdagb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cdagb2", entries.creature_cdagb2) - --entries.creature_cdagb3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdagb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cdagb3", entries.creature_cdagb3) - --entries.creature_cdagb4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdagb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cdagb4", entries.creature_cdagb4) - --entries.creature_cdagc1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdagc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cdagc1", entries.creature_cdagc1) - --entries.creature_cdagc2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdagc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cdagc2", entries.creature_cdagc2) - --entries.creature_cdagc3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdagc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cdagc3", entries.creature_cdagc3) - --entries.creature_cdagc4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdagc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cdagc4", entries.creature_cdagc4) - --entries.creature_cdagd1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdagd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdagd1", entries.creature_cdagd1) - --entries.creature_cdagd2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdagd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdagd2", entries.creature_cdagd2) - --entries.creature_cdagd3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdagd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdagd3", entries.creature_cdagd3) - --entries.creature_cdagd4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdagd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdagd4", entries.creature_cdagd4) - --entries.creature_cdage1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdage1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdage1", entries.creature_cdage1) - --entries.creature_cdage2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdage2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdage2", entries.creature_cdage2) - --entries.creature_cdage3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdage3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdage3", entries.creature_cdage3) - --entries.creature_cdage4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdage4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdage4", entries.creature_cdage4) - --entries.creature_cdagf1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdagf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cdagf1", entries.creature_cdagf1) - --entries.creature_cdagf2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdagf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cdagf2", entries.creature_cdagf2) - --entries.creature_cdagf3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdagf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cdagf3", entries.creature_cdagf3) - --entries.creature_cdagf4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdagf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cdagf4", entries.creature_cdagf4) - entries.creature_cdald1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdald1.creature", Level=110, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdald1", entries.creature_cdald1) - entries.creature_cdald2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdald2.creature", Level=120, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdald2", entries.creature_cdald2) - entries.creature_cdald3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdald3.creature", Level=130, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdald3", entries.creature_cdald3) - entries.creature_cdald4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdald4.creature", Level=140, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdald4", entries.creature_cdald4) - entries.creature_cdale1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdale1.creature", Level=160, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdale1", entries.creature_cdale1) - entries.creature_cdale2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdale2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdale2", entries.creature_cdale2) - entries.creature_cdale3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdale3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdale3", entries.creature_cdale3) - entries.creature_cdale4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdale4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdale4", entries.creature_cdale4) - entries.creature_cdapd1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdapd1.creature", Level=110, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdapd1", entries.creature_cdapd1) - entries.creature_cdapd2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdapd2.creature", Level=120, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdapd2", entries.creature_cdapd2) - entries.creature_cdapd3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdapd3.creature", Level=130, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdapd3", entries.creature_cdapd3) - entries.creature_cdapd4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdapd4.creature", Level=140, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdapd4", entries.creature_cdapd4) - entries.creature_cdape1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdape1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdape1", entries.creature_cdape1) - entries.creature_cdape2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdape2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdape2", entries.creature_cdape2) - entries.creature_cdape3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdape3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdape3", entries.creature_cdape3) - entries.creature_cdape4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdape4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdape4", entries.creature_cdape4) - entries.creature_cdbfd1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbfd1.creature", Level=110, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdbfd1", entries.creature_cdbfd1) - entries.creature_cdbfd2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbfd2.creature", Level=120, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdbfd2", entries.creature_cdbfd2) - entries.creature_cdbfd3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbfd3.creature", Level=130, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdbfd3", entries.creature_cdbfd3) - entries.creature_cdbfd4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbfd4.creature", Level=140, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdbfd4", entries.creature_cdbfd4) - entries.creature_cdbfe1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbfe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdbfe1", entries.creature_cdbfe1) - entries.creature_cdbfe2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbfe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdbfe2", entries.creature_cdbfe2) - entries.creature_cdbfe3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbfe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdbfe3", entries.creature_cdbfe3) - entries.creature_cdbfe4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbfe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdbfe4", entries.creature_cdbfe4) - --entries.creature_cdbgb1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cdbgb1", entries.creature_cdbgb1) - --entries.creature_cdbgb2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cdbgb2", entries.creature_cdbgb2) - --entries.creature_cdbgb3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cdbgb3", entries.creature_cdbgb3) - --entries.creature_cdbgb4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cdbgb4", entries.creature_cdbgb4) - --entries.creature_cdbgc1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cdbgc1", entries.creature_cdbgc1) - --entries.creature_cdbgc2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cdbgc2", entries.creature_cdbgc2) - --entries.creature_cdbgc3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cdbgc3", entries.creature_cdbgc3) - --entries.creature_cdbgc4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cdbgc4", entries.creature_cdbgc4) - --entries.creature_cdbgd1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdbgd1", entries.creature_cdbgd1) - --entries.creature_cdbgd2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdbgd2", entries.creature_cdbgd2) - --entries.creature_cdbgd3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdbgd3", entries.creature_cdbgd3) - --entries.creature_cdbgd4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdbgd4", entries.creature_cdbgd4) - --entries.creature_cdbge1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdbge1", entries.creature_cdbge1) - --entries.creature_cdbge2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdbge2", entries.creature_cdbge2) - --entries.creature_cdbge3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdbge3", entries.creature_cdbge3) - --entries.creature_cdbge4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdbge4", entries.creature_cdbge4) - --entries.creature_cdbgf1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cdbgf1", entries.creature_cdbgf1) - --entries.creature_cdbgf2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cdbgf2", entries.creature_cdbgf2) - --entries.creature_cdbgf3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cdbgf3", entries.creature_cdbgf3) - --entries.creature_cdbgf4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cdbgf4", entries.creature_cdbgf4) - entries.creature_cdbjd1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbjd1.creature", Level=110, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdbjd1", entries.creature_cdbjd1) - entries.creature_cdbjd2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbjd2.creature", Level=120, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdbjd2", entries.creature_cdbjd2) - entries.creature_cdbjd3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbjd3.creature", Level=130, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdbjd3", entries.creature_cdbjd3) - entries.creature_cdbjd4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbjd4.creature", Level=140, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdbjd4", entries.creature_cdbjd4) - entries.creature_cdbje1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbje1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdbje1", entries.creature_cdbje1) - entries.creature_cdbje2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdbje2", entries.creature_cdbje2) - entries.creature_cdbje3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdbje3", entries.creature_cdbje3) - entries.creature_cdbje4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdbje4", entries.creature_cdbje4) - entries.creature_cdcdd1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcdd1.creature", Level=110, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdcdd1", entries.creature_cdcdd1) - entries.creature_cdcdd2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcdd2.creature", Level=120, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdcdd2", entries.creature_cdcdd2) - entries.creature_cdcdd3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcdd3.creature", Level=130, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdcdd3", entries.creature_cdcdd3) - entries.creature_cdcdd4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcdd4.creature", Level=140, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdcdd4", entries.creature_cdcdd4) - entries.creature_cdcde1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcde1.creature", Level=160, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdcde1", entries.creature_cdcde1) - entries.creature_cdcde2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcde2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdcde2", entries.creature_cdcde2) - entries.creature_cdcde3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcde3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdcde3", entries.creature_cdcde3) - entries.creature_cdcde4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcde4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdcde4", entries.creature_cdcde4) - --entries.creature_cdcgb1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cdcgb1", entries.creature_cdcgb1) - --entries.creature_cdcgb2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cdcgb2", entries.creature_cdcgb2) - --entries.creature_cdcgb3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cdcgb3", entries.creature_cdcgb3) - --entries.creature_cdcgb4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cdcgb4", entries.creature_cdcgb4) - --entries.creature_cdcgc1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cdcgc1", entries.creature_cdcgc1) - --entries.creature_cdcgc2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cdcgc2", entries.creature_cdcgc2) - --entries.creature_cdcgc3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cdcgc3", entries.creature_cdcgc3) - --entries.creature_cdcgc4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.cdcgc4", entries.creature_cdcgc4) - --entries.creature_cdcgd1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdcgd1", entries.creature_cdcgd1) - --entries.creature_cdcgd2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdcgd2", entries.creature_cdcgd2) - --entries.creature_cdcgd3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdcgd3", entries.creature_cdcgd3) - --entries.creature_cdcgd4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdcgd4", entries.creature_cdcgd4) - --entries.creature_cdcge1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdcge1", entries.creature_cdcge1) - --entries.creature_cdcge2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdcge2", entries.creature_cdcge2) - --entries.creature_cdcge3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdcge3", entries.creature_cdcge3) - --entries.creature_cdcge4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdcge4", entries.creature_cdcge4) - --entries.creature_cdcgf1 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cdcgf1", entries.creature_cdcgf1) - --entries.creature_cdcgf2 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cdcgf2", entries.creature_cdcgf2) - --entries.creature_cdcgf3 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cdcgf3", entries.creature_cdcgf3) - --entries.creature_cdcgf4 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cdcgf4", entries.creature_cdcgf4) - - --- Kitins - entries.creature_ckade1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckade1.creature", Level=160, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckade1", entries.creature_ckade1) - entries.creature_ckade2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckade2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckade2", entries.creature_ckade2) - entries.creature_ckade3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckade3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckade3", entries.creature_ckade3) - entries.creature_ckade4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckade4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckade4", entries.creature_ckade4) - entries.creature_ckadf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckadf1.creature", Level=210, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckadf1", entries.creature_ckadf1) - entries.creature_ckadf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckadf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckadf2", entries.creature_ckadf2) - entries.creature_ckadf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckadf3.creature", Level=230, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckadf3", entries.creature_ckadf3) - entries.creature_ckadf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckadf4.creature", Level=240, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckadf4", entries.creature_ckadf4) - entries.creature_ckafe1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckafe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckafe1", entries.creature_ckafe1) - entries.creature_ckafe2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckafe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckafe2", entries.creature_ckafe2) - entries.creature_ckafe3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckafe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckafe3", entries.creature_ckafe3) - entries.creature_ckafe4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckafe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckafe4", entries.creature_ckafe4) - entries.creature_ckaff1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaff1.creature", Level=210, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckaff1", entries.creature_ckaff1) - entries.creature_ckaff2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckaff2", entries.creature_ckaff2) - entries.creature_ckaff3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckaff3", entries.creature_ckaff3) - entries.creature_ckaff4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckaff4", entries.creature_ckaff4) - --entries.creature_ckagb1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckagb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckagb1", entries.creature_ckagb1) - --entries.creature_ckagb2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckagb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckagb2", entries.creature_ckagb2) - --entries.creature_ckagb3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckagb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckagb3", entries.creature_ckagb3) - --entries.creature_ckagb4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckagb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckagb4", entries.creature_ckagb4) - --entries.creature_ckagc1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckagc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckagc1", entries.creature_ckagc1) - --entries.creature_ckagc2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckagc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckagc2", entries.creature_ckagc2) - --entries.creature_ckagc3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckagc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckagc3", entries.creature_ckagc3) - --entries.creature_ckagc4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckagc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckagc4", entries.creature_ckagc4) - --entries.creature_ckagd1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckagd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckagd1", entries.creature_ckagd1) - --entries.creature_ckagd2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckagd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckagd2", entries.creature_ckagd2) - --entries.creature_ckagd3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckagd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckagd3", entries.creature_ckagd3) - --entries.creature_ckagd4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckagd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckagd4", entries.creature_ckagd4) - --entries.creature_ckage1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckage1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckage1", entries.creature_ckage1) - --entries.creature_ckage2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckage2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckage2", entries.creature_ckage2) - --entries.creature_ckage3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckage3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckage3", entries.creature_ckage3) - --entries.creature_ckage4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckage4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckage4", entries.creature_ckage4) - --entries.creature_ckagf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckagf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckagf1", entries.creature_ckagf1) - --entries.creature_ckagf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckagf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckagf2", entries.creature_ckagf2) - --entries.creature_ckagf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckagf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckagf3", entries.creature_ckagf3) - --entries.creature_ckagf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckagf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckagf4", entries.creature_ckagf4) - entries.creature_ckaje1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaje1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckaje1", entries.creature_ckaje1) - entries.creature_ckaje2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckaje2", entries.creature_ckaje2) - entries.creature_ckaje3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckaje3", entries.creature_ckaje3) - entries.creature_ckaje4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckaje4", entries.creature_ckaje4) - entries.creature_ckajf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckajf1.creature", Level=210, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckajf1", entries.creature_ckajf1) - entries.creature_ckajf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckajf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckajf2", entries.creature_ckajf2) - entries.creature_ckajf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckajf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckajf3", entries.creature_ckajf3) - entries.creature_ckajf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckajf4.creature", Level=240, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckajf4", entries.creature_ckajf4) - entries.creature_ckale1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckale1.creature", Level=160, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckale1", entries.creature_ckale1) - entries.creature_ckale2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckale2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckale2", entries.creature_ckale2) - entries.creature_ckale3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckale3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckale3", entries.creature_ckale3) - entries.creature_ckale4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckale4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckale4", entries.creature_ckale4) - entries.creature_ckalf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckalf1.creature", Level=210, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckalf1", entries.creature_ckalf1) - entries.creature_ckalf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckalf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckalf2", entries.creature_ckalf2) - entries.creature_ckalf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckalf3.creature", Level=230, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckalf3", entries.creature_ckalf3) - entries.creature_ckalf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckalf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckalf4", entries.creature_ckalf4) - entries.creature_ckape1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckape1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckape1", entries.creature_ckape1) - entries.creature_ckape2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckape2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckape2", entries.creature_ckape2) - entries.creature_ckape3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckape3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckape3", entries.creature_ckape3) - entries.creature_ckape4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckape4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckape4", entries.creature_ckape4) - entries.creature_ckapf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckapf1.creature", Level=210, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckapf1", entries.creature_ckapf1) - entries.creature_ckapf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckapf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckapf2", entries.creature_ckapf2) - entries.creature_ckapf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckapf3.creature", Level=230, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckapf3", entries.creature_ckapf3) - entries.creature_ckapf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckapf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckapf4", entries.creature_ckapf4) - entries.creature_ckbde1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbde1.creature", Level=160, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbde1", entries.creature_ckbde1) - entries.creature_ckbde2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbde2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbde2", entries.creature_ckbde2) - entries.creature_ckbde3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbde3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbde3", entries.creature_ckbde3) - entries.creature_ckbde4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbde4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbde4", entries.creature_ckbde4) - entries.creature_ckbdf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbdf1.creature", Level=210, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbdf1", entries.creature_ckbdf1) - entries.creature_ckbdf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbdf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbdf2", entries.creature_ckbdf2) - entries.creature_ckbdf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbdf3.creature", Level=230, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbdf3", entries.creature_ckbdf3) - entries.creature_ckbdf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbdf4.creature", Level=240, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbdf4", entries.creature_ckbdf4) - entries.creature_ckbfe1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbfe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbfe1", entries.creature_ckbfe1) - entries.creature_ckbfe2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbfe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbfe2", entries.creature_ckbfe2) - entries.creature_ckbfe3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbfe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbfe3", entries.creature_ckbfe3) - entries.creature_ckbfe4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbfe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbfe4", entries.creature_ckbfe4) - entries.creature_ckbff1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbff1.creature", Level=210, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbff1", entries.creature_ckbff1) - entries.creature_ckbff2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbff2", entries.creature_ckbff2) - entries.creature_ckbff3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbff3", entries.creature_ckbff3) - entries.creature_ckbff4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbff4", entries.creature_ckbff4) - --entries.creature_ckbgb1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckbgb1", entries.creature_ckbgb1) - --entries.creature_ckbgb2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckbgb2", entries.creature_ckbgb2) - --entries.creature_ckbgb3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckbgb3", entries.creature_ckbgb3) - --entries.creature_ckbgb4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckbgb4", entries.creature_ckbgb4) - --entries.creature_ckbgc1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckbgc1", entries.creature_ckbgc1) - --entries.creature_ckbgc2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckbgc2", entries.creature_ckbgc2) - --entries.creature_ckbgc3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckbgc3", entries.creature_ckbgc3) - --entries.creature_ckbgc4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckbgc4", entries.creature_ckbgc4) - --entries.creature_ckbgd1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckbgd1", entries.creature_ckbgd1) - --entries.creature_ckbgd2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckbgd2", entries.creature_ckbgd2) - --entries.creature_ckbgd3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckbgd3", entries.creature_ckbgd3) - --entries.creature_ckbgd4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckbgd4", entries.creature_ckbgd4) - --entries.creature_ckbge1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbge1", entries.creature_ckbge1) - --entries.creature_ckbge2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbge2", entries.creature_ckbge2) - --entries.creature_ckbge3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbge3", entries.creature_ckbge3) - --entries.creature_ckbge4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbge4", entries.creature_ckbge4) - --entries.creature_ckbgf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbgf1", entries.creature_ckbgf1) - --entries.creature_ckbgf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbgf2", entries.creature_ckbgf2) - --entries.creature_ckbgf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbgf3", entries.creature_ckbgf3) - --entries.creature_ckbgf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbgf4", entries.creature_ckbgf4) - entries.creature_ckbje1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbje1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbje1", entries.creature_ckbje1) - entries.creature_ckbje2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbje2", entries.creature_ckbje2) - entries.creature_ckbje3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbje3", entries.creature_ckbje3) - entries.creature_ckbje4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbje4", entries.creature_ckbje4) - entries.creature_ckbjf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbjf1.creature", Level=210, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbjf1", entries.creature_ckbjf1) - entries.creature_ckbjf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbjf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbjf2", entries.creature_ckbjf2) - entries.creature_ckbjf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbjf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbjf3", entries.creature_ckbjf3) - entries.creature_ckbjf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbjf4.creature", Level=240, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbjf4", entries.creature_ckbjf4) - entries.creature_ckble1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckble1.creature", Level=160, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckble1", entries.creature_ckble1) - entries.creature_ckble2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckble2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckble2", entries.creature_ckble2) - entries.creature_ckble3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckble3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckble3", entries.creature_ckble3) - entries.creature_ckble4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckble4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckble4", entries.creature_ckble4) - entries.creature_ckblf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckblf1.creature", Level=210, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckblf1", entries.creature_ckblf1) - entries.creature_ckblf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckblf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckblf2", entries.creature_ckblf2) - entries.creature_ckblf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckblf3.creature", Level=230, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckblf3", entries.creature_ckblf3) - entries.creature_ckblf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckblf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckblf4", entries.creature_ckblf4) - entries.creature_ckbpe1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbpe1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbpe1", entries.creature_ckbpe1) - entries.creature_ckbpe2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbpe2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbpe2", entries.creature_ckbpe2) - entries.creature_ckbpe3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbpe3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbpe3", entries.creature_ckbpe3) - entries.creature_ckbpe4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbpe4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbpe4", entries.creature_ckbpe4) - entries.creature_ckbpf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbpf1.creature", Level=210, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbpf1", entries.creature_ckbpf1) - entries.creature_ckbpf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbpf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbpf2", entries.creature_ckbpf2) - entries.creature_ckbpf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbpf3.creature", Level=230, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbpf3", entries.creature_ckbpf3) - entries.creature_ckbpf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbpf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbpf4", entries.creature_ckbpf4) - entries.creature_ckcde1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcde1.creature", Level=160, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcde1", entries.creature_ckcde1) - entries.creature_ckcde2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcde2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcde2", entries.creature_ckcde2) - entries.creature_ckcde3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcde3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcde3", entries.creature_ckcde3) - entries.creature_ckcde4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcde4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcde4", entries.creature_ckcde4) - entries.creature_ckcdf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcdf1.creature", Level=210, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcdf1", entries.creature_ckcdf1) - entries.creature_ckcdf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcdf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcdf2", entries.creature_ckcdf2) - entries.creature_ckcdf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcdf3.creature", Level=230, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcdf3", entries.creature_ckcdf3) - entries.creature_ckcdf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcdf4.creature", Level=240, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcdf4", entries.creature_ckcdf4) - entries.creature_ckcfe1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcfe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcfe1", entries.creature_ckcfe1) - entries.creature_ckcfe2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcfe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcfe2", entries.creature_ckcfe2) - entries.creature_ckcfe3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcfe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcfe3", entries.creature_ckcfe3) - entries.creature_ckcfe4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcfe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcfe4", entries.creature_ckcfe4) - entries.creature_ckcff1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcff1.creature", Level=210, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcff1", entries.creature_ckcff1) - entries.creature_ckcff2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcff2", entries.creature_ckcff2) - entries.creature_ckcff3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcff3", entries.creature_ckcff3) - entries.creature_ckcff4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcff4", entries.creature_ckcff4) - --entries.creature_ckcgb1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckcgb1", entries.creature_ckcgb1) - --entries.creature_ckcgb2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckcgb2", entries.creature_ckcgb2) - --entries.creature_ckcgb3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckcgb3", entries.creature_ckcgb3) - --entries.creature_ckcgb4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckcgb4", entries.creature_ckcgb4) - --entries.creature_ckcgc1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckcgc1", entries.creature_ckcgc1) - --entries.creature_ckcgc2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckcgc2", entries.creature_ckcgc2) - --entries.creature_ckcgc3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckcgc3", entries.creature_ckcgc3) - --entries.creature_ckcgc4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckcgc4", entries.creature_ckcgc4) - --entries.creature_ckcgd1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckcgd1", entries.creature_ckcgd1) - --entries.creature_ckcgd2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckcgd2", entries.creature_ckcgd2) - --entries.creature_ckcgd3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckcgd3", entries.creature_ckcgd3) - --entries.creature_ckcgd4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckcgd4", entries.creature_ckcgd4) - --entries.creature_ckcge1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcge1", entries.creature_ckcge1) - --entries.creature_ckcge2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcge2", entries.creature_ckcge2) - --entries.creature_ckcge3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcge3", entries.creature_ckcge3) - --entries.creature_ckcge4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcge4", entries.creature_ckcge4) - --entries.creature_ckcgf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcgf1", entries.creature_ckcgf1) - --entries.creature_ckcgf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcgf2", entries.creature_ckcgf2) - --entries.creature_ckcgf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcgf3", entries.creature_ckcgf3) - --entries.creature_ckcgf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcgf4", entries.creature_ckcgf4) - entries.creature_ckcje1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcje1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcje1", entries.creature_ckcje1) - entries.creature_ckcje2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcje2", entries.creature_ckcje2) - entries.creature_ckcje3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcje3", entries.creature_ckcje3) - entries.creature_ckcje4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcje4", entries.creature_ckcje4) - entries.creature_ckcjf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcjf1.creature", Level=210, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcjf1", entries.creature_ckcjf1) - entries.creature_ckcjf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcjf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcjf2", entries.creature_ckcjf2) - entries.creature_ckcjf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcjf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcjf3", entries.creature_ckcjf3) - entries.creature_ckcjf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcjf4.creature", Level=240, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcjf4", entries.creature_ckcjf4) - entries.creature_ckcle1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcle1.creature", Level=160, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcle1", entries.creature_ckcle1) - entries.creature_ckcle2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcle2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcle2", entries.creature_ckcle2) - entries.creature_ckcle3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcle3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcle3", entries.creature_ckcle3) - entries.creature_ckcle4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcle4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcle4", entries.creature_ckcle4) - entries.creature_ckclf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckclf1.creature", Level=210, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckclf1", entries.creature_ckclf1) - entries.creature_ckclf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckclf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckclf2", entries.creature_ckclf2) - entries.creature_ckclf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckclf3.creature", Level=230, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckclf3", entries.creature_ckclf3) - entries.creature_ckclf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckclf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckclf4", entries.creature_ckclf4) - entries.creature_ckcpe1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcpe1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcpe1", entries.creature_ckcpe1) - entries.creature_ckcpe2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcpe2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcpe2", entries.creature_ckcpe2) - entries.creature_ckcpe3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcpe3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcpe3", entries.creature_ckcpe3) - entries.creature_ckcpe4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcpe4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcpe4", entries.creature_ckcpe4) - entries.creature_ckcpf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcpf1.creature", Level=210, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcpf1", entries.creature_ckcpf1) - entries.creature_ckcpf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcpf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcpf2", entries.creature_ckcpf2) - entries.creature_ckcpf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcpf3.creature", Level=230, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcpf3", entries.creature_ckcpf3) - entries.creature_ckcpf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcpf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcpf4", entries.creature_ckcpf4) - entries.creature_ckddd1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckddd1.creature", Level=110, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckddd1", entries.creature_ckddd1) - entries.creature_ckddd2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckddd2.creature", Level=120, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckddd2", entries.creature_ckddd2) - entries.creature_ckddd3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckddd3.creature", Level=130, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckddd3", entries.creature_ckddd3) - entries.creature_ckddd4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckddd4.creature", Level=140, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckddd4", entries.creature_ckddd4) - entries.creature_ckdde1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdde1.creature", Level=160, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdde1", entries.creature_ckdde1) - entries.creature_ckdde2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdde2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdde2", entries.creature_ckdde2) - entries.creature_ckdde3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdde3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdde3", entries.creature_ckdde3) - entries.creature_ckdde4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdde4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdde4", entries.creature_ckdde4) - entries.creature_ckddf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckddf1.creature", Level=210, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckddf1", entries.creature_ckddf1) - entries.creature_ckddf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckddf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckddf2", entries.creature_ckddf2) - entries.creature_ckddf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckddf3.creature", Level=230, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckddf3", entries.creature_ckddf3) - entries.creature_ckddf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckddf4.creature", Level=240, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckddf4", entries.creature_ckddf4) - entries.creature_ckdfd1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdfd1.creature", Level=110, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdfd1", entries.creature_ckdfd1) - entries.creature_ckdfd2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdfd2.creature", Level=120, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdfd2", entries.creature_ckdfd2) - entries.creature_ckdfd3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdfd3.creature", Level=130, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdfd3", entries.creature_ckdfd3) - entries.creature_ckdfd4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdfd4.creature", Level=140, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdfd4", entries.creature_ckdfd4) - entries.creature_ckdfe1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdfe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdfe1", entries.creature_ckdfe1) - entries.creature_ckdfe2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdfe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdfe2", entries.creature_ckdfe2) - entries.creature_ckdfe3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdfe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdfe3", entries.creature_ckdfe3) - entries.creature_ckdfe4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdfe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdfe4", entries.creature_ckdfe4) - entries.creature_ckdff1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdff1.creature", Level=210, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdff1", entries.creature_ckdff1) - entries.creature_ckdff2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdff2", entries.creature_ckdff2) - entries.creature_ckdff3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdff3", entries.creature_ckdff3) - entries.creature_ckdff4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdff4", entries.creature_ckdff4) - --entries.creature_ckdgb1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckdgb1", entries.creature_ckdgb1) - --entries.creature_ckdgb2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckdgb2", entries.creature_ckdgb2) - --entries.creature_ckdgb3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckdgb3", entries.creature_ckdgb3) - --entries.creature_ckdgb4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckdgb4", entries.creature_ckdgb4) - --entries.creature_ckdgc1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckdgc1", entries.creature_ckdgc1) - --entries.creature_ckdgc2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckdgc2", entries.creature_ckdgc2) - --entries.creature_ckdgc3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckdgc3", entries.creature_ckdgc3) - --entries.creature_ckdgc4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckdgc4", entries.creature_ckdgc4) - --entries.creature_ckdgd1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdgd1", entries.creature_ckdgd1) - --entries.creature_ckdgd2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdgd2", entries.creature_ckdgd2) - --entries.creature_ckdgd3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdgd3", entries.creature_ckdgd3) - --entries.creature_ckdgd4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdgd4", entries.creature_ckdgd4) - --entries.creature_ckdge1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdge1", entries.creature_ckdge1) - --entries.creature_ckdge2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdge2", entries.creature_ckdge2) - --entries.creature_ckdge3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdge3", entries.creature_ckdge3) - --entries.creature_ckdge4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdge4", entries.creature_ckdge4) - --entries.creature_ckdgf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdgf1", entries.creature_ckdgf1) - --entries.creature_ckdgf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdgf2", entries.creature_ckdgf2) - --entries.creature_ckdgf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdgf3", entries.creature_ckdgf3) - --entries.creature_ckdgf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdgf4", entries.creature_ckdgf4) - entries.creature_ckdjd1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdjd1.creature", Level=110, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdjd1", entries.creature_ckdjd1) - entries.creature_ckdjd2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdjd2.creature", Level=120, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdjd2", entries.creature_ckdjd2) - entries.creature_ckdjd3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdjd3.creature", Level=130, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdjd3", entries.creature_ckdjd3) - entries.creature_ckdjd4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdjd4.creature", Level=140, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdjd4", entries.creature_ckdjd4) - entries.creature_ckdje1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdje1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdje1", entries.creature_ckdje1) - entries.creature_ckdje2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdje2", entries.creature_ckdje2) - entries.creature_ckdje3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdje3", entries.creature_ckdje3) - entries.creature_ckdje4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdje4", entries.creature_ckdje4) - entries.creature_ckdjf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdjf1.creature", Level=210, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdjf1", entries.creature_ckdjf1) - entries.creature_ckdjf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdjf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdjf2", entries.creature_ckdjf2) - entries.creature_ckdjf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdjf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdjf3", entries.creature_ckdjf3) - entries.creature_ckdjf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdjf4.creature", Level=240, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdjf4", entries.creature_ckdjf4) - entries.creature_ckdld1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdld1.creature", Level=110, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdld1", entries.creature_ckdld1) - entries.creature_ckdld2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdld2.creature", Level=120, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdld2", entries.creature_ckdld2) - entries.creature_ckdld3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdld3.creature", Level=130, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdld3", entries.creature_ckdld3) - entries.creature_ckdld4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdld4.creature", Level=140, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdld4", entries.creature_ckdld4) - entries.creature_ckdle1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdle1.creature", Level=160, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdle1", entries.creature_ckdle1) - entries.creature_ckdle2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdle2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdle2", entries.creature_ckdle2) - entries.creature_ckdle3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdle3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdle3", entries.creature_ckdle3) - entries.creature_ckdle4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdle4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdle4", entries.creature_ckdle4) - entries.creature_ckdlf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdlf1.creature", Level=210, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdlf1", entries.creature_ckdlf1) - entries.creature_ckdlf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdlf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdlf2", entries.creature_ckdlf2) - entries.creature_ckdlf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdlf3.creature", Level=230, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdlf3", entries.creature_ckdlf3) - entries.creature_ckdlf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdlf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdlf4", entries.creature_ckdlf4) - entries.creature_ckdpd1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdpd1.creature", Level=110, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdpd1", entries.creature_ckdpd1) - entries.creature_ckdpd2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdpd2.creature", Level=120, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdpd2", entries.creature_ckdpd2) - entries.creature_ckdpd3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdpd3.creature", Level=130, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdpd3", entries.creature_ckdpd3) - entries.creature_ckdpd4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdpd4.creature", Level=140, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdpd4", entries.creature_ckdpd4) - entries.creature_ckdpe1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdpe1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdpe1", entries.creature_ckdpe1) - entries.creature_ckdpe2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdpe2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdpe2", entries.creature_ckdpe2) - entries.creature_ckdpe3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdpe3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdpe3", entries.creature_ckdpe3) - entries.creature_ckdpe4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdpe4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdpe4", entries.creature_ckdpe4) - entries.creature_ckdpf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdpf1.creature", Level=210, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdpf1", entries.creature_ckdpf1) - entries.creature_ckdpf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdpf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdpf2", entries.creature_ckdpf2) - entries.creature_ckdpf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdpf3.creature", Level=230, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdpf3", entries.creature_ckdpf3) - entries.creature_ckdpf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdpf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdpf4", entries.creature_ckdpf4) - entries.creature_ckede1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckede1.creature", Level=160, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckede1", entries.creature_ckede1) - entries.creature_ckede2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckede2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckede2", entries.creature_ckede2) - entries.creature_ckede3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckede3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckede3", entries.creature_ckede3) - entries.creature_ckede4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckede4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckede4", entries.creature_ckede4) - entries.creature_ckedf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckedf1.creature", Level=210, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckedf1", entries.creature_ckedf1) - entries.creature_ckedf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckedf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckedf2", entries.creature_ckedf2) - entries.creature_ckedf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckedf3.creature", Level=230, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckedf3", entries.creature_ckedf3) - entries.creature_ckedf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckedf4.creature", Level=240, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckedf4", entries.creature_ckedf4) - entries.creature_ckefe1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckefe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckefe1", entries.creature_ckefe1) - entries.creature_ckefe2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckefe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckefe2", entries.creature_ckefe2) - entries.creature_ckefe3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckefe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckefe3", entries.creature_ckefe3) - entries.creature_ckefe4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckefe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckefe4", entries.creature_ckefe4) - entries.creature_ckeff1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeff1.creature", Level=210, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckeff1", entries.creature_ckeff1) - entries.creature_ckeff2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckeff2", entries.creature_ckeff2) - entries.creature_ckeff3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckeff3", entries.creature_ckeff3) - entries.creature_ckeff4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckeff4", entries.creature_ckeff4) - --entries.creature_ckegb1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckegb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckegb1", entries.creature_ckegb1) - --entries.creature_ckegb2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckegb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckegb2", entries.creature_ckegb2) - --entries.creature_ckegb3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckegb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckegb3", entries.creature_ckegb3) - --entries.creature_ckegb4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckegb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckegb4", entries.creature_ckegb4) - --entries.creature_ckegc1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckegc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckegc1", entries.creature_ckegc1) - --entries.creature_ckegc2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckegc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckegc2", entries.creature_ckegc2) - --entries.creature_ckegc3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckegc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckegc3", entries.creature_ckegc3) - --entries.creature_ckegc4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckegc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckegc4", entries.creature_ckegc4) - --entries.creature_ckegd1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckegd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckegd1", entries.creature_ckegd1) - --entries.creature_ckegd2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckegd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckegd2", entries.creature_ckegd2) - --entries.creature_ckegd3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckegd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckegd3", entries.creature_ckegd3) - --entries.creature_ckegd4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckegd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckegd4", entries.creature_ckegd4) - --entries.creature_ckege1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckege1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckege1", entries.creature_ckege1) - --entries.creature_ckege2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckege2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckege2", entries.creature_ckege2) - --entries.creature_ckege3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckege3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckege3", entries.creature_ckege3) - --entries.creature_ckege4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckege4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckege4", entries.creature_ckege4) - --entries.creature_ckegf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckegf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckegf1", entries.creature_ckegf1) - --entries.creature_ckegf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckegf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckegf2", entries.creature_ckegf2) - --entries.creature_ckegf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckegf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckegf3", entries.creature_ckegf3) - --entries.creature_ckegf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckegf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckegf4", entries.creature_ckegf4) - entries.creature_ckeje1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeje1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckeje1", entries.creature_ckeje1) - entries.creature_ckeje2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckeje2", entries.creature_ckeje2) - entries.creature_ckeje3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckeje3", entries.creature_ckeje3) - entries.creature_ckeje4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckeje4", entries.creature_ckeje4) - entries.creature_ckejf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckejf1.creature", Level=210, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckejf1", entries.creature_ckejf1) - entries.creature_ckejf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckejf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckejf2", entries.creature_ckejf2) - entries.creature_ckejf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckejf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckejf3", entries.creature_ckejf3) - entries.creature_ckejf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckejf4.creature", Level=240, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckejf4", entries.creature_ckejf4) - entries.creature_ckele1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckele1.creature", Level=160, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckele1", entries.creature_ckele1) - entries.creature_ckele2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckele2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckele2", entries.creature_ckele2) - entries.creature_ckele3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckele3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckele3", entries.creature_ckele3) - entries.creature_ckele4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckele4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckele4", entries.creature_ckele4) - entries.creature_ckelf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckelf1.creature", Level=210, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckelf1", entries.creature_ckelf1) - entries.creature_ckelf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckelf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckelf2", entries.creature_ckelf2) - entries.creature_ckelf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckelf3.creature", Level=230, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckelf3", entries.creature_ckelf3) - entries.creature_ckelf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckelf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckelf4", entries.creature_ckelf4) - entries.creature_ckepe1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckepe1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckepe1", entries.creature_ckepe1) - entries.creature_ckepe2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckepe2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckepe2", entries.creature_ckepe2) - entries.creature_ckepe3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckepe3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckepe3", entries.creature_ckepe3) - entries.creature_ckepe4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckepe4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckepe4", entries.creature_ckepe4) - entries.creature_ckepf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckepf1.creature", Level=210, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckepf1", entries.creature_ckepf1) - entries.creature_ckepf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckepf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckepf2", entries.creature_ckepf2) - entries.creature_ckepf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckepf3.creature", Level=230, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckepf3", entries.creature_ckepf3) - entries.creature_ckepf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckepf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckepf4", entries.creature_ckepf4) - entries.creature_ckfde1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfde1.creature", Level=160, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfde1", entries.creature_ckfde1) - entries.creature_ckfde2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfde2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfde2", entries.creature_ckfde2) - entries.creature_ckfde3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfde3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfde3", entries.creature_ckfde3) - entries.creature_ckfde4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfde4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfde4", entries.creature_ckfde4) - entries.creature_ckfdf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfdf1.creature", Level=210, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfdf1", entries.creature_ckfdf1) - entries.creature_ckfdf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfdf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfdf2", entries.creature_ckfdf2) - entries.creature_ckfdf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfdf3.creature", Level=230, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfdf3", entries.creature_ckfdf3) - entries.creature_ckfdf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfdf4.creature", Level=240, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfdf4", entries.creature_ckfdf4) - entries.creature_ckffe1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckffe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckffe1", entries.creature_ckffe1) - entries.creature_ckffe2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckffe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckffe2", entries.creature_ckffe2) - entries.creature_ckffe3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckffe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckffe3", entries.creature_ckffe3) - entries.creature_ckffe4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckffe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckffe4", entries.creature_ckffe4) - entries.creature_ckfff1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfff1.creature", Level=210, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfff1", entries.creature_ckfff1) - entries.creature_ckfff2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfff2", entries.creature_ckfff2) - entries.creature_ckfff3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfff3", entries.creature_ckfff3) - entries.creature_ckfff4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfff4", entries.creature_ckfff4) - entries.creature_ckfje1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfje1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfje1", entries.creature_ckfje1) - entries.creature_ckfje2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfje2", entries.creature_ckfje2) - entries.creature_ckfje3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfje3", entries.creature_ckfje3) - entries.creature_ckfje4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfje4", entries.creature_ckfje4) - entries.creature_ckfjf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfjf1.creature", Level=210, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfjf1", entries.creature_ckfjf1) - entries.creature_ckfjf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfjf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfjf2", entries.creature_ckfjf2) - entries.creature_ckfjf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfjf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfjf3", entries.creature_ckfjf3) - entries.creature_ckfjf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfjf4.creature", Level=240, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfjf4", entries.creature_ckfjf4) - entries.creature_ckfle1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfle1.creature", Level=160, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfle1", entries.creature_ckfle1) - entries.creature_ckfle2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfle2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfle2", entries.creature_ckfle2) - entries.creature_ckfle3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfle3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfle3", entries.creature_ckfle3) - entries.creature_ckfle4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfle4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfle4", entries.creature_ckfle4) - entries.creature_ckflf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckflf1.creature", Level=210, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckflf1", entries.creature_ckflf1) - entries.creature_ckflf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckflf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckflf2", entries.creature_ckflf2) - entries.creature_ckflf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckflf3.creature", Level=230, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckflf3", entries.creature_ckflf3) - entries.creature_ckflf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckflf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckflf4", entries.creature_ckflf4) - entries.creature_ckfpe1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfpe1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfpe1", entries.creature_ckfpe1) - entries.creature_ckfpe2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfpe2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfpe2", entries.creature_ckfpe2) - entries.creature_ckfpe3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfpe3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfpe3", entries.creature_ckfpe3) - entries.creature_ckfpe4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfpe4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfpe4", entries.creature_ckfpe4) - entries.creature_ckfpf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfpf1.creature", Level=210, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfpf1", entries.creature_ckfpf1) - entries.creature_ckfpf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfpf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfpf2", entries.creature_ckfpf2) - entries.creature_ckfpf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfpf3.creature", Level=230, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfpf3", entries.creature_ckfpf3) - entries.creature_ckfpf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfpf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfpf4", entries.creature_ckfpf4) - - --- Kiban (WORKER) - entries.creature_ckgde1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgde1.creature", Level=160, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgde1", entries.creature_ckgde1) - entries.creature_ckgde2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgde2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgde2", entries.creature_ckgde2) - entries.creature_ckgde3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgde3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgde3", entries.creature_ckgde3) - entries.creature_ckgde4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgde4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgde4", entries.creature_ckgde4) - entries.creature_ckgdf1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgdf1.creature", Level=210, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgdf1", entries.creature_ckgdf1) - entries.creature_ckgdf2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgdf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgdf2", entries.creature_ckgdf2) - entries.creature_ckgdf3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgdf3.creature", Level=230, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgdf3", entries.creature_ckgdf3) - entries.creature_ckgdf4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgdf4.creature", Level=240, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgdf4", entries.creature_ckgdf4) - entries.creature_ckgfe1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgfe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgfe1", entries.creature_ckgfe1) - entries.creature_ckgfe2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgfe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgfe2", entries.creature_ckgfe2) - entries.creature_ckgfe3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgfe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgfe3", entries.creature_ckgfe3) - entries.creature_ckgfe4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgfe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgfe4", entries.creature_ckgfe4) - entries.creature_ckgff1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgff1.creature", Level=210, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgff1", entries.creature_ckgff1) - entries.creature_ckgff2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgff2", entries.creature_ckgff2) - entries.creature_ckgff3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgff3", entries.creature_ckgff3) - entries.creature_ckgff4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgff4", entries.creature_ckgff4) - --entries.creature_ckggb1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckggb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckggb1", entries.creature_ckggb1) - --entries.creature_ckggb2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckggb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckggb2", entries.creature_ckggb2) - --entries.creature_ckggb3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckggb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckggb3", entries.creature_ckggb3) - --entries.creature_ckggb4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckggb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckggb4", entries.creature_ckggb4) - --entries.creature_ckggc1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckggc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckggc1", entries.creature_ckggc1) - --entries.creature_ckggc2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckggc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckggc2", entries.creature_ckggc2) - --entries.creature_ckggc3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckggc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckggc3", entries.creature_ckggc3) - --entries.creature_ckggc4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckggc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckggc4", entries.creature_ckggc4) - --entries.creature_ckggd1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckggd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckggd1", entries.creature_ckggd1) - --entries.creature_ckggd2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckggd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckggd2", entries.creature_ckggd2) - --entries.creature_ckggd3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckggd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckggd3", entries.creature_ckggd3) - --entries.creature_ckggd4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckggd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckggd4", entries.creature_ckggd4) - --entries.creature_ckgge1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgge1", entries.creature_ckgge1) - --entries.creature_ckgge2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgge2", entries.creature_ckgge2) - --entries.creature_ckgge3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgge3", entries.creature_ckgge3) - --entries.creature_ckgge4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgge4", entries.creature_ckgge4) - --entries.creature_ckggf1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckggf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckggf1", entries.creature_ckggf1) - --entries.creature_ckggf2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckggf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckggf2", entries.creature_ckggf2) - --entries.creature_ckggf3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckggf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckggf3", entries.creature_ckggf3) - --entries.creature_ckggf4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckggf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckggf4", entries.creature_ckggf4) - entries.creature_ckgje1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgje1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgje1", entries.creature_ckgje1) - entries.creature_ckgje2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgje2", entries.creature_ckgje2) - entries.creature_ckgje3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgje3", entries.creature_ckgje3) - entries.creature_ckgje4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgje4", entries.creature_ckgje4) - entries.creature_ckgjf1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgjf1.creature", Level=210, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgjf1", entries.creature_ckgjf1) - entries.creature_ckgjf2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgjf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgjf2", entries.creature_ckgjf2) - entries.creature_ckgjf3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgjf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgjf3", entries.creature_ckgjf3) - entries.creature_ckgjf4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgjf4.creature", Level=240, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgjf4", entries.creature_ckgjf4) - entries.creature_ckgle1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgle1.creature", Level=160, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgle1", entries.creature_ckgle1) - entries.creature_ckgle2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgle2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgle2", entries.creature_ckgle2) - entries.creature_ckgle3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgle3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgle3", entries.creature_ckgle3) - entries.creature_ckgle4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgle4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgle4", entries.creature_ckgle4) - entries.creature_ckglf1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckglf1.creature", Level=210, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckglf1", entries.creature_ckglf1) - entries.creature_ckglf2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckglf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckglf2", entries.creature_ckglf2) - entries.creature_ckglf3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckglf3.creature", Level=230, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckglf3", entries.creature_ckglf3) - entries.creature_ckglf4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckglf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckglf4", entries.creature_ckglf4) - entries.creature_ckgpe1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgpe1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgpe1", entries.creature_ckgpe1) - entries.creature_ckgpe2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgpe2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgpe2", entries.creature_ckgpe2) - entries.creature_ckgpe3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgpe3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgpe3", entries.creature_ckgpe3) - entries.creature_ckgpe4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgpe4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgpe4", entries.creature_ckgpe4) - entries.creature_ckgpf1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgpf1.creature", Level=210, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgpf1", entries.creature_ckgpf1) - entries.creature_ckgpf2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgpf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgpf2", entries.creature_ckgpf2) - entries.creature_ckgpf3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgpf3.creature", Level=230, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgpf3", entries.creature_ckgpf3) - entries.creature_ckgpf4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckgpf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgpf4", entries.creature_ckgpf4) - - - -- Kipee (WORKER) - entries.creature_ckhda1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhda1.creature", Level=10, RingAccess="a1", Ecosystem="Desert", Region="a" } r2.addPaletteElement("palette.entities.creatures.ckhda1", entries.creature_ckhda1) - entries.creature_ckhdb1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhdb1.creature", Level=10, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhdb1", entries.creature_ckhdb1) - entries.creature_ckhdb2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhdb2.creature", Level=20, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhdb2", entries.creature_ckhdb2) - entries.creature_ckhdb3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhdb3.creature", Level=30, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhdb3", entries.creature_ckhdb3) - entries.creature_ckhdb4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhdb4.creature", Level=40, RingAccess="a1", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhdb4", entries.creature_ckhdb4) - entries.creature_ckhdc1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhdc1.creature", Level=60, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhdc1", entries.creature_ckhdc1) - entries.creature_ckhdc2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhdc2.creature", Level=70, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhdc2", entries.creature_ckhdc2) - entries.creature_ckhdc3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhdc3.creature", Level=80, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhdc3", entries.creature_ckhdc3) - entries.creature_ckhdc4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhdc4.creature", Level=90, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhdc4", entries.creature_ckhdc4) - entries.creature_ckhdd1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhdd1.creature", Level=110, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhdd1", entries.creature_ckhdd1) - entries.creature_ckhdd2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhdd2.creature", Level=120, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhdd2", entries.creature_ckhdd2) - entries.creature_ckhdd3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhdd3.creature", Level=130, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhdd3", entries.creature_ckhdd3) - entries.creature_ckhdd4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhdd4.creature", Level=140, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhdd4", entries.creature_ckhdd4) - entries.creature_ckhde1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhde1.creature", Level=160, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhde1", entries.creature_ckhde1) - entries.creature_ckhde2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhde2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhde2", entries.creature_ckhde2) - entries.creature_ckhde3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhde3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhde3", entries.creature_ckhde3) - entries.creature_ckhde4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhde4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhde4", entries.creature_ckhde4) - entries.creature_ckhdf1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhdf1.creature", Level=210, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhdf1", entries.creature_ckhdf1) - entries.creature_ckhdf2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhdf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhdf2", entries.creature_ckhdf2) - entries.creature_ckhdf3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhdf3.creature", Level=230, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhdf3", entries.creature_ckhdf3) - entries.creature_ckhdf4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhdf4.creature", Level=240, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhdf4", entries.creature_ckhdf4) - entries.creature_ckhfa1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhfa1.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="a" } r2.addPaletteElement("palette.entities.creatures.ckhfa1", entries.creature_ckhfa1) - entries.creature_ckhfb1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhfb1.creature", Level=10, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhfb1", entries.creature_ckhfb1) - entries.creature_ckhfb2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhfb2.creature", Level=20, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhfb2", entries.creature_ckhfb2) - entries.creature_ckhfb3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhfb3.creature", Level=30, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhfb3", entries.creature_ckhfb3) - entries.creature_ckhfb4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhfb4.creature", Level=40, RingAccess="a1", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhfb4", entries.creature_ckhfb4) - entries.creature_ckhfc1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhfc1.creature", Level=60, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhfc1", entries.creature_ckhfc1) - entries.creature_ckhfc2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhfc2.creature", Level=70, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhfc2", entries.creature_ckhfc2) - entries.creature_ckhfc3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhfc3.creature", Level=80, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhfc3", entries.creature_ckhfc3) - entries.creature_ckhfc4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhfc4.creature", Level=90, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhfc4", entries.creature_ckhfc4) - entries.creature_ckhfd1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhfd1.creature", Level=110, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhfd1", entries.creature_ckhfd1) - entries.creature_ckhfd2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhfd2.creature", Level=120, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhfd2", entries.creature_ckhfd2) - entries.creature_ckhfd3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhfd3.creature", Level=130, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhfd3", entries.creature_ckhfd3) - entries.creature_ckhfd4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhfd4.creature", Level=140, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhfd4", entries.creature_ckhfd4) - entries.creature_ckhfe1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhfe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhfe1", entries.creature_ckhfe1) - entries.creature_ckhfe2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhfe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhfe2", entries.creature_ckhfe2) - entries.creature_ckhfe3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhfe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhfe3", entries.creature_ckhfe3) - entries.creature_ckhfe4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhfe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhfe4", entries.creature_ckhfe4) - entries.creature_ckhff1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhff1.creature", Level=210, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhff1", entries.creature_ckhff1) - entries.creature_ckhff2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhff2", entries.creature_ckhff2) - entries.creature_ckhff3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhff3", entries.creature_ckhff3) - entries.creature_ckhff4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhff4", entries.creature_ckhff4) - entries.creature_ckhja1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhja1.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="a" } r2.addPaletteElement("palette.entities.creatures.ckhja1", entries.creature_ckhja1) - entries.creature_ckhjb1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhjb1.creature", Level=10, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhjb1", entries.creature_ckhjb1) - entries.creature_ckhjb2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhjb2.creature", Level=20, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhjb2", entries.creature_ckhjb2) - entries.creature_ckhjb3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhjb3.creature", Level=30, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhjb3", entries.creature_ckhjb3) - entries.creature_ckhjb4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhjb4.creature", Level=40, RingAccess="a1", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhjb4", entries.creature_ckhjb4) - entries.creature_ckhjc1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhjc1.creature", Level=60, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhjc1", entries.creature_ckhjc1) - entries.creature_ckhjc2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhjc2.creature", Level=70, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhjc2", entries.creature_ckhjc2) - entries.creature_ckhjc3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhjc3.creature", Level=80, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhjc3", entries.creature_ckhjc3) - entries.creature_ckhjc4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhjc4.creature", Level=90, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhjc4", entries.creature_ckhjc4) - entries.creature_ckhjd1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhjd1.creature", Level=110, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhjd1", entries.creature_ckhjd1) - entries.creature_ckhjd2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhjd2.creature", Level=120, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhjd2", entries.creature_ckhjd2) - entries.creature_ckhjd3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhjd3.creature", Level=130, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhjd3", entries.creature_ckhjd3) - entries.creature_ckhjd4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhjd4.creature", Level=140, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhjd4", entries.creature_ckhjd4) - entries.creature_ckhje1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhje1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhje1", entries.creature_ckhje1) - entries.creature_ckhje2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhje2", entries.creature_ckhje2) - entries.creature_ckhje3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhje3", entries.creature_ckhje3) - entries.creature_ckhje4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhje4", entries.creature_ckhje4) - entries.creature_ckhjf1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhjf1.creature", Level=210, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhjf1", entries.creature_ckhjf1) - entries.creature_ckhjf2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhjf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhjf2", entries.creature_ckhjf2) - entries.creature_ckhjf3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhjf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhjf3", entries.creature_ckhjf3) - entries.creature_ckhjf4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhjf4.creature", Level=240, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhjf4", entries.creature_ckhjf4) - entries.creature_ckhla1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhla1.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="a" } r2.addPaletteElement("palette.entities.creatures.ckhla1", entries.creature_ckhla1) - entries.creature_ckhlb1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhlb1.creature", Level=10, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhlb1", entries.creature_ckhlb1) - entries.creature_ckhlb2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhlb2.creature", Level=20, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhlb2", entries.creature_ckhlb2) - entries.creature_ckhlb3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhlb3.creature", Level=30, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhlb3", entries.creature_ckhlb3) - entries.creature_ckhlb4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhlb4.creature", Level=40, RingAccess="a1", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhlb4", entries.creature_ckhlb4) - entries.creature_ckhlc1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhlc1.creature", Level=60, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhlc1", entries.creature_ckhlc1) - entries.creature_ckhlc2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhlc2.creature", Level=70, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhlc2", entries.creature_ckhlc2) - entries.creature_ckhlc3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhlc3.creature", Level=80, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhlc3", entries.creature_ckhlc3) - entries.creature_ckhlc4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhlc4.creature", Level=90, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhlc4", entries.creature_ckhlc4) - entries.creature_ckhld1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhld1.creature", Level=110, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhld1", entries.creature_ckhld1) - entries.creature_ckhld2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhld2.creature", Level=120, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhld2", entries.creature_ckhld2) - entries.creature_ckhld3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhld3.creature", Level=130, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhld3", entries.creature_ckhld3) - entries.creature_ckhld4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhld4.creature", Level=140, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhld4", entries.creature_ckhld4) - entries.creature_ckhle1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhle1.creature", Level=160, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhle1", entries.creature_ckhle1) - entries.creature_ckhle2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhle2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhle2", entries.creature_ckhle2) - entries.creature_ckhle3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhle3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhle3", entries.creature_ckhle3) - entries.creature_ckhle4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhle4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhle4", entries.creature_ckhle4) - entries.creature_ckhlf1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhlf1.creature", Level=210, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhlf1", entries.creature_ckhlf1) - entries.creature_ckhlf2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhlf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhlf2", entries.creature_ckhlf2) - entries.creature_ckhlf3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhlf3.creature", Level=230, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhlf3", entries.creature_ckhlf3) - entries.creature_ckhlf4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhlf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhlf4", entries.creature_ckhlf4) - entries.creature_ckhpd1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhpd1.creature", Level=110, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhpd1", entries.creature_ckhpd1) - entries.creature_ckhpd2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhpd2.creature", Level=120, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhpd2", entries.creature_ckhpd2) - entries.creature_ckhpd3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhpd3.creature", Level=130, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhpd3", entries.creature_ckhpd3) - entries.creature_ckhpd4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhpd4.creature", Level=140, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhpd4", entries.creature_ckhpd4) - entries.creature_ckhpe1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhpe1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhpe1", entries.creature_ckhpe1) - entries.creature_ckhpe2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhpe2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhpe2", entries.creature_ckhpe2) - entries.creature_ckhpe3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhpe3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhpe3", entries.creature_ckhpe3) - entries.creature_ckhpe4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhpe4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhpe4", entries.creature_ckhpe4) - entries.creature_ckhpf1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhpf1.creature", Level=210, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhpf1", entries.creature_ckhpf1) - entries.creature_ckhpf2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhpf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhpf2", entries.creature_ckhpf2) - entries.creature_ckhpf3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhpf3.creature", Level=230, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhpf3", entries.creature_ckhpf3) - entries.creature_ckhpf4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckhpf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhpf4", entries.creature_ckhpf4) - - -- Kizoar (Worker) - entries.creature_ckidc1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckidc1.creature", Level=60, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckidc1", entries.creature_ckidc1) - entries.creature_ckidc2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckidc2.creature", Level=70, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckidc2", entries.creature_ckidc2) - entries.creature_ckidc3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckidc3.creature", Level=80, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckidc3", entries.creature_ckidc3) - entries.creature_ckidc4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckidc4.creature", Level=90, RingAccess="d2", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckidc4", entries.creature_ckidc4) - entries.creature_ckidd1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckidd1.creature", Level=110, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckidd1", entries.creature_ckidd1) - entries.creature_ckidd2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckidd2.creature", Level=120, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckidd2", entries.creature_ckidd2) - entries.creature_ckidd3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckidd3.creature", Level=130, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckidd3", entries.creature_ckidd3) - entries.creature_ckidd4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckidd4.creature", Level=140, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckidd4", entries.creature_ckidd4) - entries.creature_ckide1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckide1.creature", Level=160, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckide1", entries.creature_ckide1) - entries.creature_ckide2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckide2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckide2", entries.creature_ckide2) - entries.creature_ckide3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckide3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckide3", entries.creature_ckide3) - entries.creature_ckide4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckide4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckide4", entries.creature_ckide4) - entries.creature_ckidf1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckidf1.creature", Level=210, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckidf1", entries.creature_ckidf1) - entries.creature_ckidf2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckidf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckidf2", entries.creature_ckidf2) - entries.creature_ckidf3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckidf3.creature", Level=230, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckidf3", entries.creature_ckidf3) - entries.creature_ckidf4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckidf4.creature", Level=240, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckidf4", entries.creature_ckidf4) - entries.creature_ckifc1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckifc1.creature", Level=60, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckifc1", entries.creature_ckifc1) - entries.creature_ckifc2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckifc2.creature", Level=70, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckifc2", entries.creature_ckifc2) - entries.creature_ckifc3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckifc3.creature", Level=80, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckifc3", entries.creature_ckifc3) - entries.creature_ckifc4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckifc4.creature", Level=90, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckifc4", entries.creature_ckifc4) - entries.creature_ckifd1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckifd1.creature", Level=110, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckifd1", entries.creature_ckifd1) - entries.creature_ckifd2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckifd2.creature", Level=120, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckifd2", entries.creature_ckifd2) - entries.creature_ckifd3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckifd3.creature", Level=130, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckifd3", entries.creature_ckifd3) - entries.creature_ckifd4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckifd4.creature", Level=140, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckifd4", entries.creature_ckifd4) - entries.creature_ckife1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckife1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckife1", entries.creature_ckife1) - entries.creature_ckife2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckife2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckife2", entries.creature_ckife2) - entries.creature_ckife3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckife3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckife3", entries.creature_ckife3) - entries.creature_ckife4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckife4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckife4", entries.creature_ckife4) - entries.creature_ckiff1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckiff1.creature", Level=210, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckiff1", entries.creature_ckiff1) - entries.creature_ckiff2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckiff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckiff2", entries.creature_ckiff2) - entries.creature_ckiff3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckiff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckiff3", entries.creature_ckiff3) - entries.creature_ckiff4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckiff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckiff4", entries.creature_ckiff4) - --entries.creature_ckigb1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckigb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckigb1", entries.creature_ckigb1) - --entries.creature_ckigb2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckigb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckigb2", entries.creature_ckigb2) - --entries.creature_ckigb3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckigb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckigb3", entries.creature_ckigb3) - --entries.creature_ckigb4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckigb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckigb4", entries.creature_ckigb4) - --entries.creature_ckigc1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckigc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckigc1", entries.creature_ckigc1) - --entries.creature_ckigc2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckigc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckigc2", entries.creature_ckigc2) - --entries.creature_ckigc3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckigc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckigc3", entries.creature_ckigc3) - --entries.creature_ckigc4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckigc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckigc4", entries.creature_ckigc4) - --entries.creature_ckigd1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckigd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckigd1", entries.creature_ckigd1) - --entries.creature_ckigd2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckigd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckigd2", entries.creature_ckigd2) - --entries.creature_ckigd3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckigd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckigd3", entries.creature_ckigd3) - --entries.creature_ckigd4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckigd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckigd4", entries.creature_ckigd4) - --entries.creature_ckige1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckige1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckige1", entries.creature_ckige1) - --entries.creature_ckige2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckige2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckige2", entries.creature_ckige2) - --entries.creature_ckige3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckige3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckige3", entries.creature_ckige3) - --entries.creature_ckige4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckige4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckige4", entries.creature_ckige4) - --entries.creature_ckigf1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckigf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckigf1", entries.creature_ckigf1) - --entries.creature_ckigf2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckigf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckigf2", entries.creature_ckigf2) - --entries.creature_ckigf3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckigf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckigf3", entries.creature_ckigf3) - --entries.creature_ckigf4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckigf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckigf4", entries.creature_ckigf4) - entries.creature_ckijc1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckijc1.creature", Level=60, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckijc1", entries.creature_ckijc1) - entries.creature_ckijc2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckijc2.creature", Level=70, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckijc2", entries.creature_ckijc2) - entries.creature_ckijc3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckijc3.creature", Level=80, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckijc3", entries.creature_ckijc3) - entries.creature_ckijc4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckijc4.creature", Level=90, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckijc4", entries.creature_ckijc4) - entries.creature_ckijd1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckijd1.creature", Level=110, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckijd1", entries.creature_ckijd1) - entries.creature_ckijd2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckijd2.creature", Level=120, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckijd2", entries.creature_ckijd2) - entries.creature_ckijd3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckijd3.creature", Level=130, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckijd3", entries.creature_ckijd3) - entries.creature_ckijd4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckijd4.creature", Level=140, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckijd4", entries.creature_ckijd4) - entries.creature_ckije1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckije1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckije1", entries.creature_ckije1) - entries.creature_ckije2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckije2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckije2", entries.creature_ckije2) - entries.creature_ckije3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckije3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckije3", entries.creature_ckije3) - entries.creature_ckije4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckije4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckije4", entries.creature_ckije4) - entries.creature_ckijf1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckijf1.creature", Level=210, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckijf1", entries.creature_ckijf1) - entries.creature_ckijf2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckijf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckijf2", entries.creature_ckijf2) - entries.creature_ckijf3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckijf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckijf3", entries.creature_ckijf3) - entries.creature_ckijf4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckijf4.creature", Level=240, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckijf4", entries.creature_ckijf4) - entries.creature_ckilc1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckilc1.creature", Level=60, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckilc1", entries.creature_ckilc1) - entries.creature_ckilc2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckilc2.creature", Level=70, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckilc2", entries.creature_ckilc2) - entries.creature_ckilc3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckilc3.creature", Level=80, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckilc3", entries.creature_ckilc3) - entries.creature_ckilc4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckilc4.creature", Level=90, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckilc4", entries.creature_ckilc4) - entries.creature_ckild1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckild1.creature", Level=110, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckild1", entries.creature_ckild1) - entries.creature_ckild2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckild2.creature", Level=120, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckild2", entries.creature_ckild2) - entries.creature_ckild3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckild3.creature", Level=130, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckild3", entries.creature_ckild3) - entries.creature_ckild4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckild4.creature", Level=140, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckild4", entries.creature_ckild4) - entries.creature_ckile1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckile1.creature", Level=160, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckile1", entries.creature_ckile1) - entries.creature_ckile2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckile2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckile2", entries.creature_ckile2) - entries.creature_ckile3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckile3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckile3", entries.creature_ckile3) - entries.creature_ckile4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckile4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckile4", entries.creature_ckile4) - entries.creature_ckilf1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckilf1.creature", Level=210, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckilf1", entries.creature_ckilf1) - entries.creature_ckilf2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckilf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckilf2", entries.creature_ckilf2) - entries.creature_ckilf3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckilf3.creature", Level=230, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckilf3", entries.creature_ckilf3) - entries.creature_ckilf4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckilf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckilf4", entries.creature_ckilf4) - entries.creature_ckipd1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckipd1.creature", Level=110, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckipd1", entries.creature_ckipd1) - entries.creature_ckipd2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckipd2.creature", Level=120, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckipd2", entries.creature_ckipd2) - entries.creature_ckipd3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckipd3.creature", Level=130, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckipd3", entries.creature_ckipd3) - entries.creature_ckipd4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckipd4.creature", Level=140, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckipd4", entries.creature_ckipd4) - entries.creature_ckipe1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckipe1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckipe1", entries.creature_ckipe1) - entries.creature_ckipe2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckipe2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckipe2", entries.creature_ckipe2) - entries.creature_ckipe3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckipe3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckipe3", entries.creature_ckipe3) - entries.creature_ckipe4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckipe4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckipe4", entries.creature_ckipe4) - entries.creature_ckipf1 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckipf1.creature", Level=210, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckipf1", entries.creature_ckipf1) - entries.creature_ckipf2 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckipf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckipf2", entries.creature_ckipf2) - entries.creature_ckipf3 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckipf3.creature", Level=230, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckipf3", entries.creature_ckipf3) - entries.creature_ckipf4 = { Class="Npc", Base="palette.entities.creatures.kitin_worker", SheetClient="ckipf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckipf4", entries.creature_ckipf4) - - - entries.creature_ckjdd1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjdd1.creature", Level=110, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjdd1", entries.creature_ckjdd1) - entries.creature_ckjdd2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjdd2.creature", Level=120, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjdd2", entries.creature_ckjdd2) - entries.creature_ckjdd3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjdd3.creature", Level=130, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjdd3", entries.creature_ckjdd3) - entries.creature_ckjdd4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjdd4.creature", Level=140, RingAccess="d4", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjdd4", entries.creature_ckjdd4) - entries.creature_ckjde1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjde1.creature", Level=160, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjde1", entries.creature_ckjde1) - entries.creature_ckjde2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjde2.creature", Level=170, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjde2", entries.creature_ckjde2) - entries.creature_ckjde3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjde3.creature", Level=180, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjde3", entries.creature_ckjde3) - entries.creature_ckjde4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjde4.creature", Level=190, RingAccess="d6", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjde4", entries.creature_ckjde4) - entries.creature_ckjdf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjdf1.creature", Level=210, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjdf1", entries.creature_ckjdf1) - entries.creature_ckjdf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjdf2.creature", Level=220, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjdf2", entries.creature_ckjdf2) - entries.creature_ckjdf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjdf3.creature", Level=230, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjdf3", entries.creature_ckjdf3) - entries.creature_ckjdf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjdf4.creature", Level=240, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjdf4", entries.creature_ckjdf4) - entries.creature_ckjfd1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjfd1.creature", Level=110, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjfd1", entries.creature_ckjfd1) - entries.creature_ckjfd2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjfd2.creature", Level=120, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjfd2", entries.creature_ckjfd2) - entries.creature_ckjfd3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjfd3.creature", Level=130, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjfd3", entries.creature_ckjfd3) - entries.creature_ckjfd4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjfd4.creature", Level=140, RingAccess="f5", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjfd4", entries.creature_ckjfd4) - entries.creature_ckjfe1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjfe1.creature", Level=160, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjfe1", entries.creature_ckjfe1) - entries.creature_ckjfe2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjfe2.creature", Level=170, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjfe2", entries.creature_ckjfe2) - entries.creature_ckjfe3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjfe3.creature", Level=180, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjfe3", entries.creature_ckjfe3) - entries.creature_ckjfe4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjfe4.creature", Level=190, RingAccess="f6", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjfe4", entries.creature_ckjfe4) - entries.creature_ckjff1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjff1.creature", Level=210, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjff1", entries.creature_ckjff1) - entries.creature_ckjff2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjff2.creature", Level=220, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjff2", entries.creature_ckjff2) - entries.creature_ckjff3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjff3.creature", Level=230, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjff3", entries.creature_ckjff3) - entries.creature_ckjff4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjff4.creature", Level=240, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjff4", entries.creature_ckjff4) - --entries.creature_ckjgb1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjgb1.creature", Level=10, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckjgb1", entries.creature_ckjgb1) - --entries.creature_ckjgb2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjgb2.creature", Level=20, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckjgb2", entries.creature_ckjgb2) - --entries.creature_ckjgb3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjgb3.creature", Level=30, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckjgb3", entries.creature_ckjgb3) - --entries.creature_ckjgb4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjgb4.creature", Level=40, RingAccess="g1", Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckjgb4", entries.creature_ckjgb4) - --entries.creature_ckjgc1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjgc1.creature", Level=60, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckjgc1", entries.creature_ckjgc1) - --entries.creature_ckjgc2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjgc2.creature", Level=70, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckjgc2", entries.creature_ckjgc2) - --entries.creature_ckjgc3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjgc3.creature", Level=80, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckjgc3", entries.creature_ckjgc3) - --entries.creature_ckjgc4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjgc4.creature", Level=90, RingAccess="g1", Ecosystem="Goo", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckjgc4", entries.creature_ckjgc4) - --entries.creature_ckjgd1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjgd1.creature", Level=110, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjgd1", entries.creature_ckjgd1) - --entries.creature_ckjgd2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjgd2.creature", Level=120, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjgd2", entries.creature_ckjgd2) - --entries.creature_ckjgd3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjgd3.creature", Level=130, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjgd3", entries.creature_ckjgd3) - --entries.creature_ckjgd4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjgd4.creature", Level=140, RingAccess="g1", Ecosystem="Goo", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjgd4", entries.creature_ckjgd4) - --entries.creature_ckjge1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjge1.creature", Level=160, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjge1", entries.creature_ckjge1) - --entries.creature_ckjge2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjge2.creature", Level=170, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjge2", entries.creature_ckjge2) - --entries.creature_ckjge3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjge3.creature", Level=180, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjge3", entries.creature_ckjge3) - --entries.creature_ckjge4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjge4.creature", Level=190, RingAccess="g1", Ecosystem="Goo", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjge4", entries.creature_ckjge4) - --entries.creature_ckjgf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjgf1.creature", Level=210, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjgf1", entries.creature_ckjgf1) - --entries.creature_ckjgf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjgf2.creature", Level=220, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjgf2", entries.creature_ckjgf2) - --entries.creature_ckjgf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjgf3.creature", Level=230, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjgf3", entries.creature_ckjgf3) - --entries.creature_ckjgf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjgf4.creature", Level=240, RingAccess="g1", Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjgf4", entries.creature_ckjgf4) - entries.creature_ckjjd1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjjd1.creature", Level=110, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjjd1", entries.creature_ckjjd1) - entries.creature_ckjjd2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjjd2.creature", Level=120, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjjd2", entries.creature_ckjjd2) - entries.creature_ckjjd3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjjd3.creature", Level=130, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjjd3", entries.creature_ckjjd3) - entries.creature_ckjjd4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjjd4.creature", Level=140, RingAccess="j5", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjjd4", entries.creature_ckjjd4) - entries.creature_ckjje1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjje1.creature", Level=160, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjje1", entries.creature_ckjje1) - entries.creature_ckjje2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjje2.creature", Level=170, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjje2", entries.creature_ckjje2) - entries.creature_ckjje3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjje3.creature", Level=180, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjje3", entries.creature_ckjje3) - entries.creature_ckjje4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjje4.creature", Level=190, RingAccess="j6", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjje4", entries.creature_ckjje4) - entries.creature_ckjjf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjjf1.creature", Level=210, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjjf1", entries.creature_ckjjf1) - entries.creature_ckjjf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjjf2.creature", Level=220, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjjf2", entries.creature_ckjjf2) - entries.creature_ckjjf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjjf3.creature", Level=230, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjjf3", entries.creature_ckjjf3) - entries.creature_ckjjf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjjf4.creature", Level=240, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjjf4", entries.creature_ckjjf4) - entries.creature_ckjld1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjld1.creature", Level=110, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjld1", entries.creature_ckjld1) - entries.creature_ckjld2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjld2.creature", Level=120, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjld2", entries.creature_ckjld2) - entries.creature_ckjld3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjld3.creature", Level=130, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjld3", entries.creature_ckjld3) - entries.creature_ckjld4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjld4.creature", Level=140, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjld4", entries.creature_ckjld4) - entries.creature_ckjle1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjle1.creature", Level=160, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjle1", entries.creature_ckjle1) - entries.creature_ckjle2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjle2.creature", Level=170, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjle2", entries.creature_ckjle2) - entries.creature_ckjle3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjle3.creature", Level=180, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjle3", entries.creature_ckjle3) - entries.creature_ckjle4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjle4.creature", Level=190, RingAccess="l5", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjle4", entries.creature_ckjle4) - entries.creature_ckjlf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjlf1.creature", Level=210, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjlf1", entries.creature_ckjlf1) - entries.creature_ckjlf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjlf2.creature", Level=220, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjlf2", entries.creature_ckjlf2) - entries.creature_ckjlf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjlf3.creature", Level=230, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjlf3", entries.creature_ckjlf3) - entries.creature_ckjlf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjlf4.creature", Level=240, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjlf4", entries.creature_ckjlf4) - entries.creature_ckjpd1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjpd1.creature", Level=110, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjpd1", entries.creature_ckjpd1) - entries.creature_ckjpd2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjpd2.creature", Level=120, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjpd2", entries.creature_ckjpd2) - entries.creature_ckjpd3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjpd3.creature", Level=130, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjpd3", entries.creature_ckjpd3) - entries.creature_ckjpd4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjpd4.creature", Level=140, RingAccess="p1", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjpd4", entries.creature_ckjpd4) - entries.creature_ckjpe1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjpe1.creature", Level=160, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjpe1", entries.creature_ckjpe1) - entries.creature_ckjpe2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjpe2.creature", Level=170, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjpe2", entries.creature_ckjpe2) - entries.creature_ckjpe3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjpe3.creature", Level=180, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjpe3", entries.creature_ckjpe3) - entries.creature_ckjpe4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjpe4.creature", Level=190, RingAccess="p4", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjpe4", entries.creature_ckjpe4) - entries.creature_ckjpf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjpf1.creature", Level=210, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjpf1", entries.creature_ckjpf1) - entries.creature_ckjpf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjpf2.creature", Level=220, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjpf2", entries.creature_ckjpf2) - entries.creature_ckjpf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjpf3.creature", Level=230, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjpf3", entries.creature_ckjpf3) - entries.creature_ckjpf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjpf4.creature", Level=240, RingAccess="p10", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjpf4", entries.creature_ckjpf4) - - --- Named Passives - entries.creature_cbajf5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="cbajf5.creature", Level=248, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.cbajf5", entries.creature_cbajf5) - entries.creature_cbbpe7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="cbbpe7.creature", Level=199, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.cbbpe7", entries.creature_cbbpe7) - entries.creature_cbbde5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="cbbde5.creature", Level=198, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cbbde5", entries.creature_cbbde5) - entries.creature_cbbdd7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="cbbdd7.creature", Level=149, RingAccess="d5", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbbdd7", entries.creature_cbbdd7) - entries.creature_cbcld5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="cbcld5.creature", Level=148, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cbcld5", entries.creature_cbcld5) - entries.creature_cbclc7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="cbclc7.creature", Level=99, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbclc7", entries.creature_cbclc7) - entries.creature_cbajb7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="cbajb7.creature", Level=49, RingAccess="j4", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.cbajb7", entries.creature_cbajb7) - entries.creature_chldf7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chldf7.creature", Level=249, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chldf7", entries.creature_chldf7) - entries.creature_chsdf7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chsdf7.creature", Level=249, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chsdf7", entries.creature_chsdf7) - entries.creature_chwff7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chwff7.creature", Level=249, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chwff7", entries.creature_chwff7) - entries.creature_chxjf7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chxjf7.creature", Level=249, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chxjf7", entries.creature_chxjf7) - entries.creature_chtjf7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chtjf7.creature", Level=249, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chtjf7", entries.creature_chtjf7) - entries.creature_chulf7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chulf7.creature", Level=249, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.chulf7", entries.creature_chulf7) - entries.creature_chgpf7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chgpf7.creature", Level=249, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chgpf7", entries.creature_chgpf7) - entries.creature_chlpf7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chlpf7.creature", Level=249, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chlpf7", entries.creature_chlpf7) - entries.creature_chhpf7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chhpf7.creature", Level=249, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chhpf7", entries.creature_chhpf7) - entries.creature_chvpf7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chvpf7.creature", Level=249, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chvpf7", entries.creature_chvpf7) - entries.creature_chldf5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chldf5.creature", Level=248, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chldf5", entries.creature_chldf5) - entries.creature_chsdf5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chsdf5.creature", Level=248, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.chsdf5", entries.creature_chsdf5) - entries.creature_chlff5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chlff5.creature", Level=248, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chlff5", entries.creature_chlff5) - entries.creature_chvff5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chvff5.creature", Level=248, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.chvff5", entries.creature_chvff5) - entries.creature_chajf5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chajf5.creature", Level=248, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chajf5", entries.creature_chajf5) - entries.creature_chtjf5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chtjf5.creature", Level=248, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.chtjf5", entries.creature_chtjf5) - entries.creature_chrlf5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chrlf5.creature", Level=248, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.chrlf5", entries.creature_chrlf5) - entries.creature_chhpf5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chhpf5.creature", Level=248, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chhpf5", entries.creature_chhpf5) - entries.creature_chlpf5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chlpf5.creature", Level=248, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chlpf5", entries.creature_chlpf5) - entries.creature_chgpf5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chgpf5.creature", Level=248, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.chgpf5", entries.creature_chgpf5) - entries.creature_chtde7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chtde7.creature", Level=199, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chtde7", entries.creature_chtde7) - entries.creature_chwde7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chwde7.creature", Level=199, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chwde7", entries.creature_chwde7) - entries.creature_chpde7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chpde7.creature", Level=199, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chpde7", entries.creature_chpde7) - entries.creature_chlfe7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chlfe7.creature", Level=199, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlfe7", entries.creature_chlfe7) - entries.creature_chqfe7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chqfe7.creature", Level=199, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chqfe7", entries.creature_chqfe7) - entries.creature_chrfe7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chrfe7.creature", Level=199, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chrfe7", entries.creature_chrfe7) - entries.creature_chvfe7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chvfe7.creature", Level=199, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chvfe7", entries.creature_chvfe7) - entries.creature_chvje7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chvje7.creature", Level=199, RingAccess="j7", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chvje7", entries.creature_chvje7) - entries.creature_chuje7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chuje7.creature", Level=199, RingAccess="j7", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chuje7", entries.creature_chuje7) - entries.creature_chsle7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chsle7.creature", Level=199, RingAccess="l6", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chsle7", entries.creature_chsle7) - entries.creature_chale7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chale7.creature", Level=199, RingAccess="l6", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chale7", entries.creature_chale7) - entries.creature_chele7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chele7.creature", Level=199, RingAccess="l6", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chele7", entries.creature_chele7) - entries.creature_chlpe7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chlpe7.creature", Level=199, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlpe7", entries.creature_chlpe7) - entries.creature_chxpe7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chxpe7.creature", Level=199, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chxpe7", entries.creature_chxpe7) - entries.creature_chape7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chape7.creature", Level=199, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chape7", entries.creature_chape7) - entries.creature_chgde5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chgde5.creature", Level=198, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chgde5", entries.creature_chgde5) - entries.creature_chkde5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chkde5.creature", Level=198, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chkde5", entries.creature_chkde5) - entries.creature_chwde5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chwde5.creature", Level=198, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.chwde5", entries.creature_chwde5) - entries.creature_chafe5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chafe5.creature", Level=198, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chafe5", entries.creature_chafe5) - entries.creature_chlfe5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chlfe5.creature", Level=198, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlfe5", entries.creature_chlfe5) - entries.creature_chqfe5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chqfe5.creature", Level=198, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chqfe5", entries.creature_chqfe5) - entries.creature_chrfe5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chrfe5.creature", Level=198, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.chrfe5", entries.creature_chrfe5) - entries.creature_cheje5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="cheje5.creature", Level=198, RingAccess="j7", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.cheje5", entries.creature_cheje5) - entries.creature_chuje5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chuje5.creature", Level=198, RingAccess="j7", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.chuje5", entries.creature_chuje5) - entries.creature_chale5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chale5.creature", Level=198, RingAccess="l6", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chale5", entries.creature_chale5) - entries.creature_chsle5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chsle5.creature", Level=198, RingAccess="l6", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chsle5", entries.creature_chsle5) - entries.creature_chhle5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chhle5.creature", Level=198, RingAccess="l6", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.chhle5", entries.creature_chhle5) - entries.creature_chlpe5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chlpe5.creature", Level=198, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chlpe5", entries.creature_chlpe5) - entries.creature_chxpe5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chxpe5.creature", Level=198, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chxpe5", entries.creature_chxpe5) - entries.creature_chape5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chape5.creature", Level=198, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chape5", entries.creature_chape5) - entries.creature_chbpe5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chbpe5.creature", Level=198, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.chbpe5", entries.creature_chbpe5) - entries.creature_chmdd7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chmdd7.creature", Level=149, RingAccess="d5", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chmdd7", entries.creature_chmdd7) - entries.creature_chpfd7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chpfd7.creature", Level=149, RingAccess="f6", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chpfd7", entries.creature_chpfd7) - entries.creature_chkjd7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chkjd7.creature", Level=149, RingAccess="j6", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.chkjd7", entries.creature_chkjd7) - entries.creature_chcld7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chcld7.creature", Level=149, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.chcld7", entries.creature_chcld7) - entries.creature_chgpd7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chgpd7.creature", Level=149, RingAccess="p2", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.chgpd7", entries.creature_chgpd7) - entries.creature_chhdd5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chhdd5.creature", Level=148, RingAccess="d5", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chhdd5", entries.creature_chhdd5) - entries.creature_chmdd5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chmdd5.creature", Level=148, RingAccess="d5", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.chmdd5", entries.creature_chmdd5) - entries.creature_chnfd5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chnfd5.creature", Level=148, RingAccess="f6", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chnfd5", entries.creature_chnfd5) - entries.creature_chcjd5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chcjd5.creature", Level=148, RingAccess="j6", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.chcjd5", entries.creature_chcjd5) - entries.creature_cheld5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="cheld5.creature", Level=148, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.cheld5", entries.creature_cheld5) - entries.creature_chgpd5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chgpd5.creature", Level=148, RingAccess="p2", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.chgpd5", entries.creature_chgpd5) - entries.creature_chbpd5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chbpd5.creature", Level=148, RingAccess="p2", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.chbpd5", entries.creature_chbpd5) - entries.creature_chnjc7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chnjc7.creature", Level=99, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.chnjc7", entries.creature_chnjc7) - entries.creature_chhdc5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chhdc5.creature", Level=98, RingAccess="d3", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.chhdc5", entries.creature_chhdc5) - entries.creature_chpdc5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chpdc5.creature", Level=98, RingAccess="d3", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.chpdc5", entries.creature_chpdc5) - entries.creature_chafc5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chafc5.creature", Level=98, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.chafc5", entries.creature_chafc5) - entries.creature_chclc5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chclc5.creature", Level=98, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.chclc5", entries.creature_chclc5) - entries.creature_chblc5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chblc5.creature", Level=98, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.chblc5", entries.creature_chblc5) - entries.creature_chcdb7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chcdb7.creature", Level=49, RingAccess="d2", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.chcdb7", entries.creature_chcdb7) - entries.creature_chbfb7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chbfb7.creature", Level=49, RingAccess="f4", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.chbfb7", entries.creature_chbfb7) - entries.creature_chflb7 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chflb7.creature", Level=49, RingAccess="l4", Ecosystem="Lacustre", Region="b" } r2.addPaletteElement("palette.entities.creatures.chflb7", entries.creature_chflb7) - entries.creature_chgdb5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chgdb5.creature", Level=48, RingAccess="d2", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.chgdb5", entries.creature_chgdb5) - entries.creature_chdfb5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chdfb5.creature", Level=48, RingAccess="f4", Ecosystem="Forest", Region="b" } r2.addPaletteElement("palette.entities.creatures.chdfb5", entries.creature_chdfb5) - entries.creature_chfjb5 = { Class="Npc", Base="palette.entities.creatures.named_passive", SheetClient="chfjb5.creature", Level=48, RingAccess="j4", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.chfjb5", entries.creature_chfjb5) - - --- Named Predators - entries.creature_cckdf7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="cckdf7.creature", Level=249, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.cckdf7", entries.creature_cckdf7) - entries.creature_ccmff7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccmff7.creature", Level=249, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccmff7", entries.creature_ccmff7) - entries.creature_cceff7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="cceff7.creature", Level=249, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.cceff7", entries.creature_cceff7) - entries.creature_ccijf7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccijf7.creature", Level=249, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccijf7", entries.creature_ccijf7) - entries.creature_ccpjf7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccpjf7.creature", Level=249, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccpjf7", entries.creature_ccpjf7) - entries.creature_ccnlf7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccnlf7.creature", Level=249, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccnlf7", entries.creature_ccnlf7) - entries.creature_ccclf7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccclf7.creature", Level=249, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccclf7", entries.creature_ccclf7) - entries.creature_ccgpf7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccgpf7.creature", Level=249, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccgpf7", entries.creature_ccgpf7) - entries.creature_ccmpf7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccmpf7.creature", Level=249, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccmpf7", entries.creature_ccmpf7) - entries.creature_ccopf7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccopf7.creature", Level=249, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccopf7", entries.creature_ccopf7) - entries.creature_ccepf7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccepf7.creature", Level=249, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccepf7", entries.creature_ccepf7) - entries.creature_ccidf5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccidf5.creature", Level=248, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccidf5", entries.creature_ccidf5) - entries.creature_ccdff5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccdff5.creature", Level=248, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccdff5", entries.creature_ccdff5) - entries.creature_cckff5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="cckff5.creature", Level=248, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.cckff5", entries.creature_cckff5) - entries.creature_ccfjf5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccfjf5.creature", Level=248, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccfjf5", entries.creature_ccfjf5) - entries.creature_ccdlf5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccdlf5.creature", Level=248, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccdlf5", entries.creature_ccdlf5) - entries.creature_ccflf5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccflf5.creature", Level=248, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccflf5", entries.creature_ccflf5) - entries.creature_ccmpf5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccmpf5.creature", Level=248, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccmpf5", entries.creature_ccmpf5) - entries.creature_ccopf5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccopf5.creature", Level=248, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccopf5", entries.creature_ccopf5) - entries.creature_ccgpf5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccgpf5.creature", Level=248, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ccgpf5", entries.creature_ccgpf5) - entries.creature_cchde7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="cchde7.creature", Level=199, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cchde7", entries.creature_cchde7) - entries.creature_cclde7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="cclde7.creature", Level=199, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cclde7", entries.creature_cclde7) - entries.creature_ccdfe7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccdfe7.creature", Level=199, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccdfe7", entries.creature_ccdfe7) - entries.creature_cckfe7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="cckfe7.creature", Level=199, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cckfe7", entries.creature_cckfe7) - entries.creature_ccafe7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccafe7.creature", Level=199, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccafe7", entries.creature_ccafe7) - entries.creature_ccdle7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccdle7.creature", Level=199, RingAccess="l6", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccdle7", entries.creature_ccdle7) - entries.creature_ccope7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccope7.creature", Level=199, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccope7", entries.creature_ccope7) - entries.creature_ccfpe7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccfpe7.creature", Level=199, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccfpe7", entries.creature_ccfpe7) - entries.creature_cchpe7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="cchpe7.creature", Level=199, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.cchpe7", entries.creature_cchpe7) - entries.creature_ccbde5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccbde5.creature", Level=198, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccbde5", entries.creature_ccbde5) - entries.creature_cchde5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="cchde5.creature", Level=198, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cchde5", entries.creature_cchde5) - entries.creature_cclde5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="cclde5.creature", Level=198, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cclde5", entries.creature_cclde5) - entries.creature_ccdfe5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccdfe5.creature", Level=198, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccdfe5", entries.creature_ccdfe5) - entries.creature_cckfe5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="cckfe5.creature", Level=198, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cckfe5", entries.creature_cckfe5) - entries.creature_ccaje5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccaje5.creature", Level=198, RingAccess="j7", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccaje5", entries.creature_ccaje5) - entries.creature_ccdje5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccdje5.creature", Level=198, RingAccess="j7", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccdje5", entries.creature_ccdje5) - entries.creature_ccele5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccele5.creature", Level=198, RingAccess="l6", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccele5", entries.creature_ccele5) - entries.creature_ccdle5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccdle5.creature", Level=198, RingAccess="l6", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccdle5", entries.creature_ccdle5) - entries.creature_ccope5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccope5.creature", Level=198, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ccope5", entries.creature_ccope5) - entries.creature_cchpe5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="cchpe5.creature", Level=198, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.cchpe5", entries.creature_cchpe5) - entries.creature_ccidd7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccidd7.creature", Level=149, RingAccess="d5", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccidd7", entries.creature_ccidd7) - entries.creature_cccdd7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="cccdd7.creature", Level=149, RingAccess="d5", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cccdd7", entries.creature_cccdd7) - entries.creature_ccjfd7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccjfd7.creature", Level=149, RingAccess="f6", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccjfd7", entries.creature_ccjfd7) - entries.creature_ccfjd7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccfjd7.creature", Level=149, RingAccess="j6", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccfjd7", entries.creature_ccfjd7) - entries.creature_ccnpd7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccnpd7.creature", Level=149, RingAccess="p2", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccnpd7", entries.creature_ccnpd7) - entries.creature_ccipd7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccipd7.creature", Level=149, RingAccess="p2", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccipd7", entries.creature_ccipd7) - entries.creature_cchdd5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="cchdd5.creature", Level=148, RingAccess="d5", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cchdd5", entries.creature_cchdd5) - entries.creature_ccidd5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccidd5.creature", Level=148, RingAccess="d5", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccidd5", entries.creature_ccidd5) - entries.creature_ccafd5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccafd5.creature", Level=148, RingAccess="f6", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccafd5", entries.creature_ccafd5) - entries.creature_ccjfd5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccjfd5.creature", Level=148, RingAccess="f6", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccjfd5", entries.creature_ccjfd5) - entries.creature_ccijd5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccijd5.creature", Level=148, RingAccess="j6", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccijd5", entries.creature_ccijd5) - entries.creature_ccajd5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccajd5.creature", Level=148, RingAccess="j6", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccajd5", entries.creature_ccajd5) - entries.creature_ccfld5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccfld5.creature", Level=148, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccfld5", entries.creature_ccfld5) - entries.creature_ccipd5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccipd5.creature", Level=148, RingAccess="p2", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ccipd5", entries.creature_ccipd5) - entries.creature_ccbdc7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccbdc7.creature", Level=99, RingAccess="d3", Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccbdc7", entries.creature_ccbdc7) - entries.creature_ccelc7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccelc7.creature", Level=99, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccelc7", entries.creature_ccelc7) - entries.creature_ccafc5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccafc5.creature", Level=98, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccafc5", entries.creature_ccafc5) - entries.creature_ccdjc5 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccdjc5.creature", Level=98, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ccdjc5", entries.creature_ccdjc5) - entries.creature_cccdb7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="cccdb7.creature", Level=49, RingAccess="d2", Ecosystem="Desert", Region="b" } r2.addPaletteElement("palette.entities.creatures.cccdb7", entries.creature_cccdb7) - entries.creature_ccejb7 = { Class="Npc", Base="palette.entities.creatures.named_predator", SheetClient="ccejb7.creature", Level=49, RingAccess="j4", Ecosystem="Jungle", Region="b" } r2.addPaletteElement("palette.entities.creatures.ccejb7", entries.creature_ccejb7) - - --- Named Plants - entries.creature_cpfdf7 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpfdf7.creature", Level=249, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpfdf7", entries.creature_cpfdf7) - entries.creature_cpblf7 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpblf7.creature", Level=249, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpblf7", entries.creature_cpblf7) - entries.creature_cpapf7 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpapf7.creature", Level=249, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpapf7", entries.creature_cpapf7) - entries.creature_cpcpf7 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcpf7.creature", Level=249, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.cpcpf7", entries.creature_cpcpf7) - entries.creature_cpefe7 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpefe7.creature", Level=199, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpefe7", entries.creature_cpefe7) - entries.creature_cpdje7 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpdje7.creature", Level=199, RingAccess="j7", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.cpdje7", entries.creature_cpdje7) - entries.creature_cpapd7 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpapd7.creature", Level=149, RingAccess="p2", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.cpapd7", entries.creature_cpapd7) - entries.creature_cpcfc7 = { Class="Npc", Base="palette.entities.creatures.plant", SheetClient="cpcfc7.creature", Level=99, RingAccess="f5", Ecosystem="Forest", Region="c" } r2.addPaletteElement("palette.entities.creatures.cpcfc7", entries.creature_cpcfc7) - - --- Named Degens - entries.creature_cdbfe7 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbfe7.creature", Level=199, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdbfe7", entries.creature_cdbfe7) - entries.creature_cdbje7 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbje7.creature", Level=199, RingAccess="j7", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdbje7", entries.creature_cdbje7) - entries.creature_cdale7 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdale7.creature", Level=199, RingAccess="l6", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdale7", entries.creature_cdale7) - entries.creature_cdcde5 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcde5.creature", Level=198, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdcde5", entries.creature_cdcde5) - entries.creature_cdbfe5 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbfe5.creature", Level=198, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdbfe5", entries.creature_cdbfe5) - entries.creature_cdbje5 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdbje5.creature", Level=198, RingAccess="j7", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.cdbje5", entries.creature_cdbje5) - entries.creature_cdcdd7 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcdd7.creature", Level=149, RingAccess="d5", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdcdd7", entries.creature_cdcdd7) - entries.creature_cdapd7 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdapd7.creature", Level=149, RingAccess="p2", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdapd7", entries.creature_cdapd7) - entries.creature_cdcdd5 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdcdd5.creature", Level=148, RingAccess="d5", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdcdd5", entries.creature_cdcdd5) - entries.creature_cdapd5 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdapd5.creature", Level=148, RingAccess="p2", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.cdapd5", entries.creature_cdapd5) - entries.creature_cdalc5 = { Class="Npc", Base="palette.entities.creatures.degen", SheetClient="cdalc5.creature", Level=98, RingAccess="l5", Ecosystem="Lacustre", Region="c" } r2.addPaletteElement("palette.entities.creatures.cdalc5", entries.creature_cdalc5) - - --- Named Kitins - entries.creature_ckddf7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckddf7.creature", Level=249, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckddf7", entries.creature_ckddf7) - entries.creature_ckhdf7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhdf7.creature", Level=249, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhdf7", entries.creature_ckhdf7) - entries.creature_ckiff7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiff7.creature", Level=249, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckiff7", entries.creature_ckiff7) - entries.creature_ckfjf7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfjf7.creature", Level=249, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfjf7", entries.creature_ckfjf7) - entries.creature_ckglf7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckglf7.creature", Level=249, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckglf7", entries.creature_ckglf7) - entries.creature_ckdpf7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdpf7.creature", Level=249, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdpf7", entries.creature_ckdpf7) - entries.creature_ckfpf7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfpf7.creature", Level=249, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfpf7", entries.creature_ckfpf7) - entries.creature_ckipf7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckipf7.creature", Level=249, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckipf7", entries.creature_ckipf7) - entries.creature_ckepf7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckepf7.creature", Level=249, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckepf7", entries.creature_ckepf7) - entries.creature_ckgpf7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgpf7.creature", Level=249, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgpf7", entries.creature_ckgpf7) - entries.creature_ckbpf7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbpf7.creature", Level=249, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbpf7", entries.creature_ckbpf7) - entries.creature_ckjpf7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjpf7.creature", Level=249, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjpf7", entries.creature_ckjpf7) - entries.creature_ckfdf5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfdf5.creature", Level=248, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfdf5", entries.creature_ckfdf5) - entries.creature_ckedf5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckedf5.creature", Level=248, RingAccess="d7", Ecosystem="Desert", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckedf5", entries.creature_ckedf5) - entries.creature_ckgff5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgff5.creature", Level=248, RingAccess="f7", Ecosystem="Forest", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgff5", entries.creature_ckgff5) - entries.creature_ckdjf5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdjf5.creature", Level=248, RingAccess="j7", Ecosystem="Jungle", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdjf5", entries.creature_ckdjf5) - entries.creature_ckdlf5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdlf5.creature", Level=248, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdlf5", entries.creature_ckdlf5) - entries.creature_ckglf5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckglf5.creature", Level=248, RingAccess="l6", Ecosystem="Lacustre", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckglf5", entries.creature_ckglf5) - entries.creature_ckhpf5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhpf5.creature", Level=248, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhpf5", entries.creature_ckhpf5) - entries.creature_ckgpf5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgpf5.creature", Level=248, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgpf5", entries.creature_ckgpf5) - entries.creature_ckepf5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckepf5.creature", Level=248, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckepf5", entries.creature_ckepf5) - entries.creature_ckjpf5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjpf5.creature", Level=248, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjpf5", entries.creature_ckjpf5) - entries.creature_ckipf5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckipf5.creature", Level=248, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckipf5", entries.creature_ckipf5) - entries.creature_ckfpf5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfpf5.creature", Level=248, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfpf5", entries.creature_ckfpf5) - entries.creature_ckdpf5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdpf5.creature", Level=248, RingAccess="p13", Ecosystem="PrimeRoots", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdpf5", entries.creature_ckdpf5) - entries.creature_ckede7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckede7.creature", Level=199, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckede7", entries.creature_ckede7) - entries.creature_ckjde7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjde7.creature", Level=199, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjde7", entries.creature_ckjde7) - entries.creature_ckdfe7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdfe7.creature", Level=199, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdfe7", entries.creature_ckdfe7) - entries.creature_ckdje7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdje7.creature", Level=199, RingAccess="j7", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdje7", entries.creature_ckdje7) - entries.creature_ckeje7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeje7.creature", Level=199, RingAccess="j7", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckeje7", entries.creature_ckeje7) - entries.creature_ckfje7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfje7.creature", Level=199, RingAccess="j7", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfje7", entries.creature_ckfje7) - entries.creature_ckele7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckele7.creature", Level=199, RingAccess="l6", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckele7", entries.creature_ckele7) - entries.creature_ckhpe7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhpe7.creature", Level=199, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhpe7", entries.creature_ckhpe7) - entries.creature_ckfpe7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfpe7.creature", Level=199, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfpe7", entries.creature_ckfpe7) - entries.creature_ckape7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckape7.creature", Level=199, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckape7", entries.creature_ckape7) - entries.creature_ckhde5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhde5.creature", Level=198, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhde5", entries.creature_ckhde5) - entries.creature_ckdde5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdde5.creature", Level=198, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdde5", entries.creature_ckdde5) - entries.creature_ckede5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckede5.creature", Level=198, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckede5", entries.creature_ckede5) - entries.creature_ckide5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckide5.creature", Level=198, RingAccess="d7", Ecosystem="Desert", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckide5", entries.creature_ckide5) - entries.creature_ckefe5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckefe5.creature", Level=198, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckefe5", entries.creature_ckefe5) - entries.creature_ckffe5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckffe5.creature", Level=198, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckffe5", entries.creature_ckffe5) - entries.creature_ckdfe5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdfe5.creature", Level=198, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdfe5", entries.creature_ckdfe5) - entries.creature_ckgfe5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgfe5.creature", Level=198, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgfe5", entries.creature_ckgfe5) - entries.creature_ckhfe5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhfe5.creature", Level=198, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhfe5", entries.creature_ckhfe5) - entries.creature_ckife5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckife5.creature", Level=198, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckife5", entries.creature_ckife5) - entries.creature_ckjfe5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjfe5.creature", Level=198, RingAccess="f7", Ecosystem="Forest", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjfe5", entries.creature_ckjfe5) - entries.creature_ckeje5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeje5.creature", Level=198, RingAccess="j7", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckeje5", entries.creature_ckeje5) - entries.creature_ckfje5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfje5.creature", Level=198, RingAccess="j7", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfje5", entries.creature_ckfje5) - entries.creature_ckije5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckije5.creature", Level=198, RingAccess="j7", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckije5", entries.creature_ckije5) --- entries.creature_ckdje5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdje5.creature", Level=198, RingAccess="j7", Ecosystem="Jungle", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdje5", entries.creature_ckdje5) - entries.creature_ckgle5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgle5.creature", Level=198, RingAccess="l6", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgle5", entries.creature_ckgle5) - entries.creature_ckhle5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhle5.creature", Level=198, RingAccess="l6", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhle5", entries.creature_ckhle5) - entries.creature_ckdle5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdle5.creature", Level=198, RingAccess="l6", Ecosystem="Lacustre", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdle5", entries.creature_ckdle5) - entries.creature_ckepe5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckepe5.creature", Level=198, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckepe5", entries.creature_ckepe5) - entries.creature_ckdpe5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdpe5.creature", Level=198, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdpe5", entries.creature_ckdpe5) - entries.creature_ckipe5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckipe5.creature", Level=198, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckipe5", entries.creature_ckipe5) - entries.creature_ckfpe5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfpe5.creature", Level=198, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfpe5", entries.creature_ckfpe5) - entries.creature_ckgpe5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgpe5.creature", Level=198, RingAccess="p9", Ecosystem="PrimeRoots", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgpe5", entries.creature_ckgpe5) - entries.creature_ckhdd7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhdd7.creature", Level=149, RingAccess="d5", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhdd7", entries.creature_ckhdd7) - entries.creature_ckhfd7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhfd7.creature", Level=149, RingAccess="f6", Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhfd7", entries.creature_ckhfd7) - entries.creature_ckdjd7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdjd7.creature", Level=149, RingAccess="j6", Ecosystem="Jungle", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdjd7", entries.creature_ckdjd7) - entries.creature_ckdld7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdld7.creature", Level=149, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdld7", entries.creature_ckdld7) - entries.creature_ckjld7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjld7.creature", Level=149, RingAccess="l5", Ecosystem="Lacustre", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjld7", entries.creature_ckjld7) - - entries.creature_ckdpd7 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdpd7.creature", Level=149, RingAccess="p2", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdpd7", entries.creature_ckdpd7) - entries.creature_ckhdd5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhdd5.creature", Level=148, RingAccess="d5", Ecosystem="Desert", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhdd5", entries.creature_ckhdd5) - entries.creature_ckjpd5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjpd5.creature", Level=148, RingAccess="p2", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjpd5", entries.creature_ckjpd5) - entries.creature_ckhpd5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhpd5.creature", Level=148, RingAccess="p2", Ecosystem="PrimeRoots", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhpd5", entries.creature_ckhpd5) - entries.creature_ckijc5 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckijc5.creature", Level=98, RingAccess="j5", Ecosystem="Jungle", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckijc5", entries.creature_ckijc5) - - --- Invasion Kitins - entries.creature_ckgif4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgif4.creature", Level=240, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgif4", entries.creature_ckgif4) - entries.creature_ckaif4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaif4.creature", Level=240, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckaif4", entries.creature_ckaif4) - entries.creature_ckdif4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdif4.creature", Level=240, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdif4", entries.creature_ckdif4) - entries.creature_ckbif4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbif4.creature", Level=240, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbif4", entries.creature_ckbif4) - entries.creature_ckhif4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhif4.creature", Level=240, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhif4", entries.creature_ckhif4) - entries.creature_ckjif4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjif4.creature", Level=240, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjif4", entries.creature_ckjif4) - entries.creature_ckeif4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeif4.creature", Level=240, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckeif4", entries.creature_ckeif4) - entries.creature_ckfif4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfif4.creature", Level=240, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfif4", entries.creature_ckfif4) - entries.creature_ckcif4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcif4.creature", Level=240, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcif4", entries.creature_ckcif4) - entries.creature_ckiif4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiif4.creature", Level=240, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckiif4", entries.creature_ckiif4) - entries.creature_ckfrf4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfrf4.creature", Level=240, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfrf4", entries.creature_ckfrf4) - entries.creature_ckgif3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgif3.creature", Level=230, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgif3", entries.creature_ckgif3) - entries.creature_ckaif3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaif3.creature", Level=230, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckaif3", entries.creature_ckaif3) - entries.creature_ckdif3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdif3.creature", Level=230, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdif3", entries.creature_ckdif3) - entries.creature_ckbif3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbif3.creature", Level=230, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbif3", entries.creature_ckbif3) - entries.creature_ckhif3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhif3.creature", Level=230, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhif3", entries.creature_ckhif3) - entries.creature_ckjif3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjif3.creature", Level=230, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjif3", entries.creature_ckjif3) - entries.creature_ckeif3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeif3.creature", Level=230, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckeif3", entries.creature_ckeif3) - entries.creature_ckfif3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfif3.creature", Level=230, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfif3", entries.creature_ckfif3) - entries.creature_ckcif3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcif3.creature", Level=230, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcif3", entries.creature_ckcif3) - entries.creature_ckiif3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiif3.creature", Level=230, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckiif3", entries.creature_ckiif3) - entries.creature_ckfrf3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfrf3.creature", Level=230, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfrf3", entries.creature_ckfrf3) - entries.creature_ckgif2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgif2.creature", Level=220, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgif2", entries.creature_ckgif2) - entries.creature_ckaif2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaif2.creature", Level=220, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckaif2", entries.creature_ckaif2) - entries.creature_ckdif2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdif2.creature", Level=220, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdif2", entries.creature_ckdif2) - entries.creature_ckbif2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbif2.creature", Level=220, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbif2", entries.creature_ckbif2) - entries.creature_ckhif2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhif2.creature", Level=220, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhif2", entries.creature_ckhif2) - entries.creature_ckjif2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjif2.creature", Level=220, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjif2", entries.creature_ckjif2) - entries.creature_ckeif2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeif2.creature", Level=220, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckeif2", entries.creature_ckeif2) - entries.creature_ckfif2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfif2.creature", Level=220, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfif2", entries.creature_ckfif2) - entries.creature_ckcif2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcif2.creature", Level=220, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcif2", entries.creature_ckcif2) - - entries.creature_ckiif2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiif2.creature", Level=220, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckiif2", entries.creature_ckiif2) - entries.creature_ckfrf2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfrf2.creature", Level=220, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfrf2", entries.creature_ckfrf2) - entries.creature_ckgif1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgif1.creature", Level=210, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckgif1", entries.creature_ckgif1) - entries.creature_ckaif1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaif1.creature", Level=210, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckaif1", entries.creature_ckaif1) - entries.creature_ckdif1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdif1.creature", Level=210, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckdif1", entries.creature_ckdif1) - entries.creature_ckbif1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbif1.creature", Level=210, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckbif1", entries.creature_ckbif1) - entries.creature_ckhif1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhif1.creature", Level=210, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckhif1", entries.creature_ckhif1) - entries.creature_ckjif1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjif1.creature", Level=210, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckjif1", entries.creature_ckjif1) - entries.creature_ckeif1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeif1.creature", Level=210, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckeif1", entries.creature_ckeif1) - entries.creature_ckfif1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfif1.creature", Level=210, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfif1", entries.creature_ckfif1) - entries.creature_ckcif1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcif1.creature", Level=210, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckcif1", entries.creature_ckcif1) - entries.creature_ckiif1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiif1.creature", Level=210, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckiif1", entries.creature_ckiif1) - entries.creature_ckfrf1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfrf1.creature", Level=210, RingAccess="p10", Ecosystem="", Region="f" } r2.addPaletteElement("palette.entities.creatures.ckfrf1", entries.creature_ckfrf1) - entries.creature_ckgie4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgie4.creature", Level=190, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgie4", entries.creature_ckgie4) - entries.creature_ckaie4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaie4.creature", Level=190, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckaie4", entries.creature_ckaie4) - entries.creature_ckdie4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdie4.creature", Level=190, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdie4", entries.creature_ckdie4) - entries.creature_ckbie4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbie4.creature", Level=190, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbie4", entries.creature_ckbie4) - entries.creature_ckhie4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhie4.creature", Level=190, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhie4", entries.creature_ckhie4) - entries.creature_ckjie4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjie4.creature", Level=190, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjie4", entries.creature_ckjie4) - entries.creature_ckeie4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeie4.creature", Level=190, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckeie4", entries.creature_ckeie4) - entries.creature_ckfie4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfie4.creature", Level=190, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfie4", entries.creature_ckfie4) - entries.creature_ckcie4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcie4.creature", Level=190, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcie4", entries.creature_ckcie4) - entries.creature_ckiie4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiie4.creature", Level=190, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckiie4", entries.creature_ckiie4) - entries.creature_ckfre4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfre4.creature", Level=190, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfre4", entries.creature_ckfre4) - entries.creature_ckgie3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgie3.creature", Level=180, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgie3", entries.creature_ckgie3) - entries.creature_ckaie3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaie3.creature", Level=180, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckaie3", entries.creature_ckaie3) - entries.creature_ckdie3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdie3.creature", Level=180, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdie3", entries.creature_ckdie3) - entries.creature_ckbie3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbie3.creature", Level=180, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbie3", entries.creature_ckbie3) - entries.creature_ckhie3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhie3.creature", Level=180, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhie3", entries.creature_ckhie3) - entries.creature_ckjie3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjie3.creature", Level=180, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjie3", entries.creature_ckjie3) - entries.creature_ckeie3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeie3.creature", Level=180, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckeie3", entries.creature_ckeie3) - entries.creature_ckfie3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfie3.creature", Level=180, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfie3", entries.creature_ckfie3) - entries.creature_ckcie3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcie3.creature", Level=180, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcie3", entries.creature_ckcie3) - entries.creature_ckiie3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiie3.creature", Level=180, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckiie3", entries.creature_ckiie3) - entries.creature_ckfre3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfre3.creature", Level=180, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfre3", entries.creature_ckfre3) - entries.creature_ckgie2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgie2.creature", Level=170, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgie2", entries.creature_ckgie2) - entries.creature_ckaie2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaie2.creature", Level=170, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckaie2", entries.creature_ckaie2) - entries.creature_ckdie2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdie2.creature", Level=170, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdie2", entries.creature_ckdie2) - entries.creature_ckbie2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbie2.creature", Level=170, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbie2", entries.creature_ckbie2) - entries.creature_ckhie2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhie2.creature", Level=170, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhie2", entries.creature_ckhie2) - entries.creature_ckjie2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjie2.creature", Level=170, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjie2", entries.creature_ckjie2) - entries.creature_ckeie2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeie2.creature", Level=170, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckeie2", entries.creature_ckeie2) - entries.creature_ckfie2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfie2.creature", Level=170, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfie2", entries.creature_ckfie2) - entries.creature_ckcie2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcie2.creature", Level=170, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcie2", entries.creature_ckcie2) - entries.creature_ckiie2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiie2.creature", Level=170, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckiie2", entries.creature_ckiie2) - entries.creature_ckfre2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfre2.creature", Level=170, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfre2", entries.creature_ckfre2) - entries.creature_ckgie1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgie1.creature", Level=160, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckgie1", entries.creature_ckgie1) - entries.creature_ckaie1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaie1.creature", Level=160, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckaie1", entries.creature_ckaie1) - entries.creature_ckdie1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdie1.creature", Level=160, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckdie1", entries.creature_ckdie1) - entries.creature_ckbie1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbie1.creature", Level=160, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckbie1", entries.creature_ckbie1) - entries.creature_ckhie1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhie1.creature", Level=160, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckhie1", entries.creature_ckhie1) - entries.creature_ckjie1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjie1.creature", Level=160, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckjie1", entries.creature_ckjie1) - entries.creature_ckeie1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeie1.creature", Level=160, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckeie1", entries.creature_ckeie1) - entries.creature_ckfie1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfie1.creature", Level=160, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfie1", entries.creature_ckfie1) - entries.creature_ckcie1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcie1.creature", Level=160, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckcie1", entries.creature_ckcie1) - entries.creature_ckiie1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiie1.creature", Level=160, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckiie1", entries.creature_ckiie1) - entries.creature_ckfre1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfre1.creature", Level=160, RingAccess="p4", Ecosystem="", Region="e" } r2.addPaletteElement("palette.entities.creatures.ckfre1", entries.creature_ckfre1) - entries.creature_ckgid4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgid4.creature", Level=140, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckgid4", entries.creature_ckgid4) - entries.creature_ckaid4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaid4.creature", Level=140, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckaid4", entries.creature_ckaid4) - entries.creature_ckdid4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdid4.creature", Level=140, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdid4", entries.creature_ckdid4) - entries.creature_ckbid4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbid4.creature", Level=140, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckbid4", entries.creature_ckbid4) - entries.creature_ckhid4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhid4.creature", Level=140, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhid4", entries.creature_ckhid4) - entries.creature_ckjid4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjid4.creature", Level=140, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjid4", entries.creature_ckjid4) - entries.creature_ckeid4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeid4.creature", Level=140, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckeid4", entries.creature_ckeid4) - entries.creature_ckfid4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfid4.creature", Level=140, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckfid4", entries.creature_ckfid4) - entries.creature_ckcid4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcid4.creature", Level=140, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckcid4", entries.creature_ckcid4) - entries.creature_ckiid4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiid4.creature", Level=140, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckiid4", entries.creature_ckiid4) - entries.creature_ckfrd4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfrd4.creature", Level=140, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckfrd4", entries.creature_ckfrd4) - entries.creature_ckgid3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgid3.creature", Level=130, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckgid3", entries.creature_ckgid3) - entries.creature_ckaid3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaid3.creature", Level=130, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckaid3", entries.creature_ckaid3) - entries.creature_ckdid3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdid3.creature", Level=130, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdid3", entries.creature_ckdid3) - entries.creature_ckbid3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbid3.creature", Level=130, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckbid3", entries.creature_ckbid3) - entries.creature_ckhid3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhid3.creature", Level=130, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhid3", entries.creature_ckhid3) - entries.creature_ckjid3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjid3.creature", Level=130, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjid3", entries.creature_ckjid3) - entries.creature_ckeid3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeid3.creature", Level=130, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckeid3", entries.creature_ckeid3) - entries.creature_ckfid3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfid3.creature", Level=130, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckfid3", entries.creature_ckfid3) - entries.creature_ckcid3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcid3.creature", Level=130, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckcid3", entries.creature_ckcid3) - entries.creature_ckiid3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiid3.creature", Level=130, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckiid3", entries.creature_ckiid3) - entries.creature_ckfrd3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfrd3.creature", Level=130, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckfrd3", entries.creature_ckfrd3) - entries.creature_ckgid2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgid2.creature", Level=120, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckgid2", entries.creature_ckgid2) - entries.creature_ckaid2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaid2.creature", Level=120, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckaid2", entries.creature_ckaid2) - entries.creature_ckdid2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdid2.creature", Level=120, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdid2", entries.creature_ckdid2) - entries.creature_ckbid2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbid2.creature", Level=120, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckbid2", entries.creature_ckbid2) - entries.creature_ckhid2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhid2.creature", Level=120, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhid2", entries.creature_ckhid2) - entries.creature_ckjid2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjid2.creature", Level=120, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjid2", entries.creature_ckjid2) - entries.creature_ckeid2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeid2.creature", Level=120, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckeid2", entries.creature_ckeid2) - entries.creature_ckfid2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfid2.creature", Level=120, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckfid2", entries.creature_ckfid2) - entries.creature_ckcid2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcid2.creature", Level=120, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckcid2", entries.creature_ckcid2) - entries.creature_ckiid2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiid2.creature", Level=120, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckiid2", entries.creature_ckiid2) - entries.creature_ckfrd2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfrd2.creature", Level=120, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckfrd2", entries.creature_ckfrd2) - entries.creature_ckgid1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgid1.creature", Level=110, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckgid1", entries.creature_ckgid1) - entries.creature_ckaid1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaid1.creature", Level=110, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckaid1", entries.creature_ckaid1) - entries.creature_ckdid1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdid1.creature", Level=110, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckdid1", entries.creature_ckdid1) - entries.creature_ckbid1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbid1.creature", Level=110, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckbid1", entries.creature_ckbid1) - entries.creature_ckhid1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhid1.creature", Level=110, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckhid1", entries.creature_ckhid1) - entries.creature_ckjid1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjid1.creature", Level=110, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckjid1", entries.creature_ckjid1) - entries.creature_ckeid1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeid1.creature", Level=110, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckeid1", entries.creature_ckeid1) - entries.creature_ckfid1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfid1.creature", Level=110, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckfid1", entries.creature_ckfid1) - entries.creature_ckcid1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcid1.creature", Level=110, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckcid1", entries.creature_ckcid1) - entries.creature_ckiid1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiid1.creature", Level=110, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckiid1", entries.creature_ckiid1) - entries.creature_ckfrd1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfrd1.creature", Level=110, RingAccess="p1", Ecosystem="", Region="d" } r2.addPaletteElement("palette.entities.creatures.ckfrd1", entries.creature_ckfrd1) - entries.creature_ckgic4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgic4.creature", Level=90, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckgic4", entries.creature_ckgic4) - entries.creature_ckaic4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaic4.creature", Level=90, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckaic4", entries.creature_ckaic4) - entries.creature_ckdic4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdic4.creature", Level=90, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckdic4", entries.creature_ckdic4) - entries.creature_ckbic4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbic4.creature", Level=90, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckbic4", entries.creature_ckbic4) - entries.creature_ckhic4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhic4.creature", Level=90, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhic4", entries.creature_ckhic4) - entries.creature_ckjic4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjic4.creature", Level=90, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckjic4", entries.creature_ckjic4) - entries.creature_ckeic4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeic4.creature", Level=90, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckeic4", entries.creature_ckeic4) - entries.creature_ckfic4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfic4.creature", Level=90, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckfic4", entries.creature_ckfic4) - entries.creature_ckcic4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcic4.creature", Level=90, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckcic4", entries.creature_ckcic4) - entries.creature_ckiic4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiic4.creature", Level=90, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckiic4", entries.creature_ckiic4) - entries.creature_ckfrc4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfrc4.creature", Level=90, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckfrc4", entries.creature_ckfrc4) - entries.creature_ckgic3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgic3.creature", Level=80, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckgic3", entries.creature_ckgic3) - entries.creature_ckaic3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaic3.creature", Level=80, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckaic3", entries.creature_ckaic3) - entries.creature_ckdic3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdic3.creature", Level=80, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckdic3", entries.creature_ckdic3) - entries.creature_ckbic3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbic3.creature", Level=80, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckbic3", entries.creature_ckbic3) - entries.creature_ckhic3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhic3.creature", Level=80, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhic3", entries.creature_ckhic3) - entries.creature_ckjic3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjic3.creature", Level=80, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckjic3", entries.creature_ckjic3) - entries.creature_ckeic3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeic3.creature", Level=80, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckeic3", entries.creature_ckeic3) - entries.creature_ckfic3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfic3.creature", Level=80, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckfic3", entries.creature_ckfic3) - entries.creature_ckcic3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcic3.creature", Level=80, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckcic3", entries.creature_ckcic3) - entries.creature_ckiic3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiic3.creature", Level=80, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckiic3", entries.creature_ckiic3) - entries.creature_ckfrc3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfrc3.creature", Level=80, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckfrc3", entries.creature_ckfrc3) - entries.creature_ckgic2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgic2.creature", Level=70, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckgic2", entries.creature_ckgic2) - entries.creature_ckaic2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaic2.creature", Level=70, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckaic2", entries.creature_ckaic2) - entries.creature_ckdic2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdic2.creature", Level=70, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckdic2", entries.creature_ckdic2) - entries.creature_ckbic2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbic2.creature", Level=70, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckbic2", entries.creature_ckbic2) - entries.creature_ckhic2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhic2.creature", Level=70, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhic2", entries.creature_ckhic2) - entries.creature_ckjic2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjic2.creature", Level=70, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckjic2", entries.creature_ckjic2) - entries.creature_ckeic2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeic2.creature", Level=70, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckeic2", entries.creature_ckeic2) - entries.creature_ckfic2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfic2.creature", Level=70, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckfic2", entries.creature_ckfic2) - entries.creature_ckcic2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcic2.creature", Level=70, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckcic2", entries.creature_ckcic2) - entries.creature_ckiic2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiic2.creature", Level=70, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckiic2", entries.creature_ckiic2) - entries.creature_ckfrc2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfrc2.creature", Level=70, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckfrc2", entries.creature_ckfrc2) - entries.creature_ckgic1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgic1.creature", Level=60, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckgic1", entries.creature_ckgic1) - entries.creature_ckaic1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaic1.creature", Level=60, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckaic1", entries.creature_ckaic1) - entries.creature_ckdic1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdic1.creature", Level=60, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckdic1", entries.creature_ckdic1) - entries.creature_ckbic1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbic1.creature", Level=60, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckbic1", entries.creature_ckbic1) - entries.creature_ckhic1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhic1.creature", Level=60, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckhic1", entries.creature_ckhic1) - entries.creature_ckjic1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjic1.creature", Level=60, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckjic1", entries.creature_ckjic1) - entries.creature_ckeic1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeic1.creature", Level=60, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckeic1", entries.creature_ckeic1) - entries.creature_ckfic1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfic1.creature", Level=60, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckfic1", entries.creature_ckfic1) - entries.creature_ckcic1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcic1.creature", Level=60, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckcic1", entries.creature_ckcic1) - entries.creature_ckiic1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiic1.creature", Level=60, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckiic1", entries.creature_ckiic1) - entries.creature_ckfrc1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfrc1.creature", Level=60, RingAccess="p1", Ecosystem="", Region="c" } r2.addPaletteElement("palette.entities.creatures.ckfrc1", entries.creature_ckfrc1) - entries.creature_ckgib4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgib4.creature", Level=40, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckgib4", entries.creature_ckgib4) - entries.creature_ckaib4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaib4.creature", Level=40, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckaib4", entries.creature_ckaib4) - entries.creature_ckdib4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdib4.creature", Level=40, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckdib4", entries.creature_ckdib4) - entries.creature_ckbib4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbib4.creature", Level=40, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckbib4", entries.creature_ckbib4) - entries.creature_ckhib4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhib4.creature", Level=40, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhib4", entries.creature_ckhib4) - entries.creature_ckjib4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjib4.creature", Level=40, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckjib4", entries.creature_ckjib4) - entries.creature_ckeib4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeib4.creature", Level=40, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckeib4", entries.creature_ckeib4) - entries.creature_ckfib4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfib4.creature", Level=40, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckfib4", entries.creature_ckfib4) - entries.creature_ckcib4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcib4.creature", Level=40, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckcib4", entries.creature_ckcib4) - entries.creature_ckiib4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiib4.creature", Level=40, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckiib4", entries.creature_ckiib4) - entries.creature_ckfrb4 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfrb4.creature", Level=40, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckfrb4", entries.creature_ckfrb4) - entries.creature_ckgib3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgib3.creature", Level=30, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckgib3", entries.creature_ckgib3) - entries.creature_ckaib3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaib3.creature", Level=30, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckaib3", entries.creature_ckaib3) - entries.creature_ckdib3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdib3.creature", Level=30, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckdib3", entries.creature_ckdib3) - entries.creature_ckbib3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbib3.creature", Level=30, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckbib3", entries.creature_ckbib3) - entries.creature_ckhib3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhib3.creature", Level=30, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhib3", entries.creature_ckhib3) - entries.creature_ckjib3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjib3.creature", Level=30, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckjib3", entries.creature_ckjib3) - entries.creature_ckeib3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeib3.creature", Level=30, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckeib3", entries.creature_ckeib3) - entries.creature_ckfib3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfib3.creature", Level=30, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckfib3", entries.creature_ckfib3) - entries.creature_ckcib3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcib3.creature", Level=30, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckcib3", entries.creature_ckcib3) - entries.creature_ckiib3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiib3.creature", Level=30, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckiib3", entries.creature_ckiib3) - entries.creature_ckfrb3 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfrb3.creature", Level=30, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckfrb3", entries.creature_ckfrb3) - entries.creature_ckgib2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgib2.creature", Level=20, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckgib2", entries.creature_ckgib2) - entries.creature_ckaib2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaib2.creature", Level=20, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckaib2", entries.creature_ckaib2) - entries.creature_ckdib2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdib2.creature", Level=20, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckdib2", entries.creature_ckdib2) - entries.creature_ckbib2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbib2.creature", Level=20, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckbib2", entries.creature_ckbib2) - entries.creature_ckhib2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhib2.creature", Level=20, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhib2", entries.creature_ckhib2) - entries.creature_ckjib2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjib2.creature", Level=20, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckjib2", entries.creature_ckjib2) - entries.creature_ckeib2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeib2.creature", Level=20, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckeib2", entries.creature_ckeib2) - entries.creature_ckfib2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfib2.creature", Level=20, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckfib2", entries.creature_ckfib2) - entries.creature_ckcib2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcib2.creature", Level=20, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckcib2", entries.creature_ckcib2) - entries.creature_ckiib2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiib2.creature", Level=20, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckiib2", entries.creature_ckiib2) - entries.creature_ckfrb2 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfrb2.creature", Level=20, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckfrb2", entries.creature_ckfrb2) - entries.creature_ckgib1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckgib1.creature", Level=10, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckgib1", entries.creature_ckgib1) - entries.creature_ckaib1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckaib1.creature", Level=10, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckaib1", entries.creature_ckaib1) - entries.creature_ckdib1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckdib1.creature", Level=10, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckdib1", entries.creature_ckdib1) - entries.creature_ckbib1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckbib1.creature", Level=10, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckbib1", entries.creature_ckbib1) - entries.creature_ckhib1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckhib1.creature", Level=10, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckhib1", entries.creature_ckhib1) - entries.creature_ckjib1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckjib1.creature", Level=10, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckjib1", entries.creature_ckjib1) - entries.creature_ckeib1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckeib1.creature", Level=10, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckeib1", entries.creature_ckeib1) - entries.creature_ckfib1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfib1.creature", Level=10, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckfib1", entries.creature_ckfib1) - entries.creature_ckcib1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckcib1.creature", Level=10, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckcib1", entries.creature_ckcib1) - entries.creature_ckiib1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckiib1.creature", Level=10, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckiib1", entries.creature_ckiib1) - entries.creature_ckfrb1 = { Class="Npc", Base="palette.entities.creatures.kitin", SheetClient="ckfrb1.creature", Level=10, RingAccess="p1", Ecosystem="", Region="b" } r2.addPaletteElement("palette.entities.creatures.ckfrb1", entries.creature_ckfrb1) - -end - ---debugInfo(colorTag(0, 255, 0) .. "Building palette table") --- palette hierarchy for the UI -r2.Palette = -{ - UIPath="ui:interface:r2ed_palette:content:sbtree_entities:entity_enclosing:tree_list", - BotObjectsUIPath="ui:interface:r2ed_palette:content:sbtree_objects:bot_enclosing:tree_list_objects", - StrId ="uiR2EDentities", - Entries = - { - creature = - { - -- Passive Creatures (birds & carnivores) - creatures_passive = - { - instances = - { - {Id="palette.entities.creatures.chdda1", Translation="uiR2EDcreature_chdda1"}, - {Id="palette.entities.creatures.chdda2", Translation="uiR2EDcreature_chdda2"}, - {Id="palette.entities.creatures.chcda1", Translation="uiR2EDcreature_chcda1"}, - {Id="palette.entities.creatures.chcda2", Translation="uiR2EDcreature_chcda2"}, - {Id="palette.entities.creatures.cbbda1", Translation="uiR2EDcreature_cbbda1"}, - {Id="palette.entities.creatures.cbbda2", Translation="uiR2EDcreature_cbbda2"}, - {Id="palette.entities.creatures.cbadc1", Translation="uiR2EDcreature_cbadc1"}, - {Id="palette.entities.creatures.cbadc2", Translation="uiR2EDcreature_cbadc2"}, - {Id="palette.entities.creatures.cbadc3", Translation="uiR2EDcreature_cbadc3"}, - {Id="palette.entities.creatures.cbadc4", Translation="uiR2EDcreature_cbadc4"}, - {Id="palette.entities.creatures.cbadd1", Translation="uiR2EDcreature_cbadd1"}, - {Id="palette.entities.creatures.cbadd2", Translation="uiR2EDcreature_cbadd2"}, - {Id="palette.entities.creatures.cbadd3", Translation="uiR2EDcreature_cbadd3"}, - {Id="palette.entities.creatures.cbadd4", Translation="uiR2EDcreature_cbadd4"}, - -- {id="palette.entities.creatures.cbagb1", translation="uir2edcreature_cbagb1"}, - -- {id="palette.entities.creatures.cbagb2", Translation="uiR2EDcreature_cbagb2"}, - -- {Id="palette.entities.creatures.cbagb3", Translation="uiR2EDcreature_cbagb3"}, - -- {Id="palette.entities.creatures.cbagb4", Translation="uiR2EDcreature_cbagb4"}, - -- {Id="palette.entities.creatures.cbagc1", Translation="uiR2EDcreature_cbagc1"}, - -- {Id="palette.entities.creatures.cbagc2", Translation="uiR2EDcreature_cbagc2"}, - -- {Id="palette.entities.creatures.cbagc3", Translation="uiR2EDcreature_cbagc3"}, - -- {Id="palette.entities.creatures.cbagc4", Translation="uiR2EDcreature_cbagc4"}, - -- {Id="palette.entities.creatures.cbagd1", Translation="uiR2EDcreature_cbagd1"}, - -- {Id="palette.entities.creatures.cbagd2", Translation="uiR2EDcreature_cbagd2"}, - -- {Id="palette.entities.creatures.cbagd3", Translation="uiR2EDcreature_cbagd3"}, - -- {Id="palette.entities.creatures.cbagd4", Translation="uiR2EDcreature_cbagd4"}, - -- {Id="palette.entities.creatures.cbage1", Translation="uiR2EDcreature_cbage1"}, - -- {Id="palette.entities.creatures.cbage2", Translation="uiR2EDcreature_cbage2"}, - -- {Id="palette.entities.creatures.cbage3", Translation="uiR2EDcreature_cbage3"}, - -- {Id="palette.entities.creatures.cbage4", Translation="uiR2EDcreature_cbage4"}, - -- {Id="palette.entities.creatures.cbagf1", Translation="uiR2EDcreature_cbagf1"}, - -- {Id="palette.entities.creatures.cbagf2", Translation="uiR2EDcreature_cbagf2"}, - -- {Id="palette.entities.creatures.cbagf3", Translation="uiR2EDcreature_cbagf3"}, - -- {Id="palette.entities.creatures.cbagf4", Translation="uiR2EDcreature_cbagf4"}, - {Id="palette.entities.creatures.cbajb4", Translation="uiR2EDcreature_cbajb4"}, - {Id="palette.entities.creatures.cbajd1", Translation="uiR2EDcreature_cbajd1"}, - {Id="palette.entities.creatures.cbajd2", Translation="uiR2EDcreature_cbajd2"}, - {Id="palette.entities.creatures.cbajd3", Translation="uiR2EDcreature_cbajd3"}, - {Id="palette.entities.creatures.cbajd4", Translation="uiR2EDcreature_cbajd4"}, - {Id="palette.entities.creatures.cbbdb1", Translation="uiR2EDcreature_cbbdb1"}, - {Id="palette.entities.creatures.cbbdb2", Translation="uiR2EDcreature_cbbdb2"}, - {Id="palette.entities.creatures.cbbdb3", Translation="uiR2EDcreature_cbbdb3"}, - {Id="palette.entities.creatures.cbbdb4", Translation="uiR2EDcreature_cbbdb4"}, - {Id="palette.entities.creatures.cbbdd4", Translation="uiR2EDcreature_cbbdd4"}, - {Id="palette.entities.creatures.cbbja1", Translation="uiR2EDcreature_cbbja1"}, - {Id="palette.entities.creatures.cbbja2", Translation="uiR2EDcreature_cbbja2"}, - {Id="palette.entities.creatures.cbbjb1", Translation="uiR2EDcreature_cbbjb1"}, - {Id="palette.entities.creatures.cbbjb2", Translation="uiR2EDcreature_cbbjb2"}, - {Id="palette.entities.creatures.cbbjb3", Translation="uiR2EDcreature_cbbjb3"}, - {Id="palette.entities.creatures.cbbjb4", Translation="uiR2EDcreature_cbbjb4"}, - {Id="palette.entities.creatures.cbbjc1", Translation="uiR2EDcreature_cbbjc1"}, - {Id="palette.entities.creatures.cbbjc2", Translation="uiR2EDcreature_cbbjc2"}, - {Id="palette.entities.creatures.cbbjc3", Translation="uiR2EDcreature_cbbjc3"}, - {Id="palette.entities.creatures.cbbjc4", Translation="uiR2EDcreature_cbbjc4"}, - {Id="palette.entities.creatures.cbblc1", Translation="uiR2EDcreature_cbblc1"}, - {Id="palette.entities.creatures.cbblc2", Translation="uiR2EDcreature_cbblc2"}, - {Id="palette.entities.creatures.cbblc3", Translation="uiR2EDcreature_cbblc3"}, - {Id="palette.entities.creatures.cbblc4", Translation="uiR2EDcreature_cbblc4"}, - {Id="palette.entities.creatures.cbbld1", Translation="uiR2EDcreature_cbbld1"}, - {Id="palette.entities.creatures.cbbld2", Translation="uiR2EDcreature_cbbld2"}, - {Id="palette.entities.creatures.cbbld3", Translation="uiR2EDcreature_cbbld3"}, - {Id="palette.entities.creatures.cbbld4", Translation="uiR2EDcreature_cbbld4"}, - {Id="palette.entities.creatures.cbbpd1", Translation="uiR2EDcreature_cbbpd1"}, - {Id="palette.entities.creatures.cbbpd2", Translation="uiR2EDcreature_cbbpd2"}, - {Id="palette.entities.creatures.cbbpd3", Translation="uiR2EDcreature_cbbpd3"}, - {Id="palette.entities.creatures.cbbpd4", Translation="uiR2EDcreature_cbbpd4"}, - {Id="palette.entities.creatures.cbbpe4", Translation="uiR2EDcreature_cbbpe4"}, - -- {Id="palette.entities.creatures.cbcgb1", Translation="uiR2EDcreature_cbcgb1"}, - -- {Id="palette.entities.creatures.cbcgb2", Translation="uiR2EDcreature_cbcgb2"}, - -- {Id="palette.entities.creatures.cbcgb3", Translation="uiR2EDcreature_cbcgb3"}, - -- {Id="palette.entities.creatures.cbcgb4", Translation="uiR2EDcreature_cbcgb4"}, - -- {Id="palette.entities.creatures.cbcgc1", Translation="uiR2EDcreature_cbcgc1"}, - -- {Id="palette.entities.creatures.cbcgc2", Translation="uiR2EDcreature_cbcgc2"}, - -- {Id="palette.entities.creatures.cbcgc3", Translation="uiR2EDcreature_cbcgc3"}, - -- {Id="palette.entities.creatures.cbcgc4", Translation="uiR2EDcreature_cbcgc4"}, - -- {Id="palette.entities.creatures.cbcgd1", Translation="uiR2EDcreature_cbcgd1"}, - -- {Id="palette.entities.creatures.cbcgd2", Translation="uiR2EDcreature_cbcgd2"}, - -- {Id="palette.entities.creatures.cbcgd3", Translation="uiR2EDcreature_cbcgd3"}, - -- {Id="palette.entities.creatures.cbcgd4", Translation="uiR2EDcreature_cbcgd4"}, - -- {Id="palette.entities.creatures.cbcge1", Translation="uiR2EDcreature_cbcge1"}, - -- {Id="palette.entities.creatures.cbcge2", Translation="uiR2EDcreature_cbcge2"}, - -- {Id="palette.entities.creatures.cbcge3", Translation="uiR2EDcreature_cbcge3"}, - -- {Id="palette.entities.creatures.cbcge4", Translation="uiR2EDcreature_cbcge4"}, - -- {Id="palette.entities.creatures.cbcgf1", Translation="uiR2EDcreature_cbcgf1"}, - -- {Id="palette.entities.creatures.cbcgf2", Translation="uiR2EDcreature_cbcgf2"}, - -- {Id="palette.entities.creatures.cbcgf3", Translation="uiR2EDcreature_cbcgf3"}, - -- {Id="palette.entities.creatures.cbcgf4", Translation="uiR2EDcreature_cbcgf4"}, - {Id="palette.entities.creatures.cbcjc1", Translation="uiR2EDcreature_cbcjc1"}, - {Id="palette.entities.creatures.cbcjc2", Translation="uiR2EDcreature_cbcjc2"}, - {Id="palette.entities.creatures.cbcjc3", Translation="uiR2EDcreature_cbcjc3"}, - {Id="palette.entities.creatures.cbcjc4", Translation="uiR2EDcreature_cbcjc4"}, - {Id="palette.entities.creatures.cbcla1", Translation="uiR2EDcreature_cbcla1"}, - {Id="palette.entities.creatures.cbcla2", Translation="uiR2EDcreature_cbcla2"}, - {Id="palette.entities.creatures.cbclb1", Translation="uiR2EDcreature_cbclb1"}, - {Id="palette.entities.creatures.cbclb2", Translation="uiR2EDcreature_cbclb2"}, - {Id="palette.entities.creatures.cbclb3", Translation="uiR2EDcreature_cbclb3"}, - {Id="palette.entities.creatures.cbclb4", Translation="uiR2EDcreature_cbclb4"}, - {Id="palette.entities.creatures.cbclc1", Translation="uiR2EDcreature_cbclc1"}, - {Id="palette.entities.creatures.cbclc2", Translation="uiR2EDcreature_cbclc2"}, - {Id="palette.entities.creatures.cbclc3", Translation="uiR2EDcreature_cbclc3"}, - {Id="palette.entities.creatures.cbclc4", Translation="uiR2EDcreature_cbclc4"}, - {Id="palette.entities.creatures.chadc1", Translation="uiR2EDcreature_chadc1"}, - {Id="palette.entities.creatures.chadc2", Translation="uiR2EDcreature_chadc2"}, - {Id="palette.entities.creatures.chadc3", Translation="uiR2EDcreature_chadc3"}, - {Id="palette.entities.creatures.chadc4", Translation="uiR2EDcreature_chadc4"}, - {Id="palette.entities.creatures.chafd1", Translation="uiR2EDcreature_chafd1"}, - {Id="palette.entities.creatures.chafd2", Translation="uiR2EDcreature_chafd2"}, - {Id="palette.entities.creatures.chafd3", Translation="uiR2EDcreature_chafd3"}, - {Id="palette.entities.creatures.chafd4", Translation="uiR2EDcreature_chafd4"}, - {Id="palette.entities.creatures.chafe1", Translation="uiR2EDcreature_chafe1"}, - {Id="palette.entities.creatures.chafe2", Translation="uiR2EDcreature_chafe2"}, - {Id="palette.entities.creatures.chafe3", Translation="uiR2EDcreature_chafe3"}, - {Id="palette.entities.creatures.chafe4", Translation="uiR2EDcreature_chafe4"}, - {Id="palette.entities.creatures.chajf1", Translation="uiR2EDcreature_chajf1"}, - {Id="palette.entities.creatures.chajf2", Translation="uiR2EDcreature_chajf2"}, - {Id="palette.entities.creatures.chajf3", Translation="uiR2EDcreature_chajf3"}, - {Id="palette.entities.creatures.chajf4", Translation="uiR2EDcreature_chajf4"}, - {Id="palette.entities.creatures.chale1", Translation="uiR2EDcreature_chale1"}, - {Id="palette.entities.creatures.chale2", Translation="uiR2EDcreature_chale2"}, - {Id="palette.entities.creatures.chale3", Translation="uiR2EDcreature_chale3"}, - {Id="palette.entities.creatures.chale4", Translation="uiR2EDcreature_chale4"}, - {Id="palette.entities.creatures.chalf1", Translation="uiR2EDcreature_chalf1"}, - {Id="palette.entities.creatures.chalf2", Translation="uiR2EDcreature_chalf2"}, - {Id="palette.entities.creatures.chalf3", Translation="uiR2EDcreature_chalf3"}, - {Id="palette.entities.creatures.chalf4", Translation="uiR2EDcreature_chalf4"}, - {Id="palette.entities.creatures.chapd1", Translation="uiR2EDcreature_chapd1"}, - {Id="palette.entities.creatures.chapd2", Translation="uiR2EDcreature_chapd2"}, - {Id="palette.entities.creatures.chapd3", Translation="uiR2EDcreature_chapd3"}, - {Id="palette.entities.creatures.chapd4", Translation="uiR2EDcreature_chapd4"}, - {Id="palette.entities.creatures.chape1", Translation="uiR2EDcreature_chape1"}, - {Id="palette.entities.creatures.chape2", Translation="uiR2EDcreature_chape2"}, - {Id="palette.entities.creatures.chape3", Translation="uiR2EDcreature_chape3"}, - {Id="palette.entities.creatures.chape4", Translation="uiR2EDcreature_chape4"}, - {Id="palette.entities.creatures.chbdc1", Translation="uiR2EDcreature_chbdc1"}, - {Id="palette.entities.creatures.chbdc2", Translation="uiR2EDcreature_chbdc2"}, - {Id="palette.entities.creatures.chbdc3", Translation="uiR2EDcreature_chbdc3"}, - {Id="palette.entities.creatures.chbdc4", Translation="uiR2EDcreature_chbdc4"}, - {Id="palette.entities.creatures.chbfa1", Translation="uiR2EDcreature_chbfa1"}, - {Id="palette.entities.creatures.chbfa2", Translation="uiR2EDcreature_chbfa2"}, - {Id="palette.entities.creatures.chbfb1", Translation="uiR2EDcreature_chbfb1"}, - {Id="palette.entities.creatures.chbfb2", Translation="uiR2EDcreature_chbfb2"}, - {Id="palette.entities.creatures.chbfb3", Translation="uiR2EDcreature_chbfb3"}, - {Id="palette.entities.creatures.chbfb4", Translation="uiR2EDcreature_chbfb4"}, - {Id="palette.entities.creatures.chbfc1", Translation="uiR2EDcreature_chbfc1"}, - {Id="palette.entities.creatures.chbfc2", Translation="uiR2EDcreature_chbfc2"}, - {Id="palette.entities.creatures.chbfc3", Translation="uiR2EDcreature_chbfc3"}, - {Id="palette.entities.creatures.chbfc4", Translation="uiR2EDcreature_chbfc4"}, - {Id="palette.entities.creatures.chbje1", Translation="uiR2EDcreature_chbje1"}, - {Id="palette.entities.creatures.chbje2", Translation="uiR2EDcreature_chbje2"}, - {Id="palette.entities.creatures.chbje3", Translation="uiR2EDcreature_chbje3"}, - {Id="palette.entities.creatures.chbje4", Translation="uiR2EDcreature_chbje4"}, - {Id="palette.entities.creatures.chbld1", Translation="uiR2EDcreature_chbld1"}, - {Id="palette.entities.creatures.chbld2", Translation="uiR2EDcreature_chbld2"}, - {Id="palette.entities.creatures.chbld3", Translation="uiR2EDcreature_chbld3"}, - {Id="palette.entities.creatures.chbld4", Translation="uiR2EDcreature_chbld4"}, - {Id="palette.entities.creatures.chbpd1", Translation="uiR2EDcreature_chbpd1"}, - {Id="palette.entities.creatures.chbpd2", Translation="uiR2EDcreature_chbpd2"}, - {Id="palette.entities.creatures.chbpd3", Translation="uiR2EDcreature_chbpd3"}, - {Id="palette.entities.creatures.chbpd4", Translation="uiR2EDcreature_chbpd4"}, - {Id="palette.entities.creatures.chbpe1", Translation="uiR2EDcreature_chbpe1"}, - {Id="palette.entities.creatures.chbpe2", Translation="uiR2EDcreature_chbpe2"}, - {Id="palette.entities.creatures.chbpe3", Translation="uiR2EDcreature_chbpe3"}, - {Id="palette.entities.creatures.chbpe4", Translation="uiR2EDcreature_chbpe4"}, - {Id="palette.entities.creatures.chcdb1", Translation="uiR2EDcreature_chcdb1"}, - {Id="palette.entities.creatures.chcdb2", Translation="uiR2EDcreature_chcdb2"}, - {Id="palette.entities.creatures.chcdb3", Translation="uiR2EDcreature_chcdb3"}, - {Id="palette.entities.creatures.chcdb4", Translation="uiR2EDcreature_chcdb4"}, - {Id="palette.entities.creatures.chcfa1", Translation="uiR2EDcreature_chcfa1"}, - {Id="palette.entities.creatures.chcfa2", Translation="uiR2EDcreature_chcfa2"}, - {Id="palette.entities.creatures.chcfb1", Translation="uiR2EDcreature_chcfb1"}, - {Id="palette.entities.creatures.chcfb2", Translation="uiR2EDcreature_chcfb2"}, - {Id="palette.entities.creatures.chcfb3", Translation="uiR2EDcreature_chcfb3"}, - {Id="palette.entities.creatures.chcfb4", Translation="uiR2EDcreature_chcfb4"}, - {Id="palette.entities.creatures.chcjd1", Translation="uiR2EDcreature_chcjd1"}, - {Id="palette.entities.creatures.chcjd2", Translation="uiR2EDcreature_chcjd2"}, - {Id="palette.entities.creatures.chcjd3", Translation="uiR2EDcreature_chcjd3"}, - {Id="palette.entities.creatures.chcjd4", Translation="uiR2EDcreature_chcjd4"}, - {Id="palette.entities.creatures.chclc1", Translation="uiR2EDcreature_chclc1"}, - {Id="palette.entities.creatures.chclc2", Translation="uiR2EDcreature_chclc2"}, - {Id="palette.entities.creatures.chclc3", Translation="uiR2EDcreature_chclc3"}, - {Id="palette.entities.creatures.chclc4", Translation="uiR2EDcreature_chclc4"}, - {Id="palette.entities.creatures.chcld4", Translation="uiR2EDcreature_chcld4"}, - {Id="palette.entities.creatures.chddb1", Translation="uiR2EDcreature_chddb1"}, - {Id="palette.entities.creatures.chddb2", Translation="uiR2EDcreature_chddb2"}, - {Id="palette.entities.creatures.chddb3", Translation="uiR2EDcreature_chddb3"}, - {Id="palette.entities.creatures.chddb4", Translation="uiR2EDcreature_chddb4"}, - {Id="palette.entities.creatures.chdfa1", Translation="uiR2EDcreature_chdfa1"}, - {Id="palette.entities.creatures.chdfa2", Translation="uiR2EDcreature_chdfa2"}, - {Id="palette.entities.creatures.chdfb1", Translation="uiR2EDcreature_chdfb1"}, - {Id="palette.entities.creatures.chdfb2", Translation="uiR2EDcreature_chdfb2"}, - {Id="palette.entities.creatures.chdfb3", Translation="uiR2EDcreature_chdfb3"}, - {Id="palette.entities.creatures.chdfb4", Translation="uiR2EDcreature_chdfb4"}, - {Id="palette.entities.creatures.chdja1", Translation="uiR2EDcreature_chdja1"}, - {Id="palette.entities.creatures.chdja2", Translation="uiR2EDcreature_chdja2"}, - {Id="palette.entities.creatures.chdjb1", Translation="uiR2EDcreature_chdjb1"}, - {Id="palette.entities.creatures.chdjb2", Translation="uiR2EDcreature_chdjb2"}, - {Id="palette.entities.creatures.chdjb3", Translation="uiR2EDcreature_chdjb3"}, - {Id="palette.entities.creatures.chdjb4", Translation="uiR2EDcreature_chdjb4"}, - {Id="palette.entities.creatures.chdla1", Translation="uiR2EDcreature_chdla1"}, - {Id="palette.entities.creatures.chdla2", Translation="uiR2EDcreature_chdla2"}, - {Id="palette.entities.creatures.chdlb1", Translation="uiR2EDcreature_chdlb1"}, - {Id="palette.entities.creatures.chdlb2", Translation="uiR2EDcreature_chdlb2"}, - {Id="palette.entities.creatures.chdlb3", Translation="uiR2EDcreature_chdlb3"}, - {Id="palette.entities.creatures.chdlb4", Translation="uiR2EDcreature_chdlb4"}, - -- {Id="palette.entities.creatures.chegb1", Translation="uiR2EDcreature_chegb1"}, - -- {Id="palette.entities.creatures.chegb2", Translation="uiR2EDcreature_chegb2"}, - -- {Id="palette.entities.creatures.chegb3", Translation="uiR2EDcreature_chegb3"}, - -- {Id="palette.entities.creatures.chegb4", Translation="uiR2EDcreature_chegb4"}, - -- {Id="palette.entities.creatures.chegc1", Translation="uiR2EDcreature_chegc1"}, - -- {Id="palette.entities.creatures.chegc2", Translation="uiR2EDcreature_chegc2"}, - -- {Id="palette.entities.creatures.chegc3", Translation="uiR2EDcreature_chegc3"}, - -- {Id="palette.entities.creatures.chegc4", Translation="uiR2EDcreature_chegc4"}, - -- {Id="palette.entities.creatures.chegd1", Translation="uiR2EDcreature_chegd1"}, - -- {Id="palette.entities.creatures.chegd2", Translation="uiR2EDcreature_chegd2"}, - -- {Id="palette.entities.creatures.chegd3", Translation="uiR2EDcreature_chegd3"}, - -- {Id="palette.entities.creatures.chegd4", Translation="uiR2EDcreature_chegd4"}, - -- {Id="palette.entities.creatures.chege1", Translation="uiR2EDcreature_chege1"}, - -- {Id="palette.entities.creatures.chege2", Translation="uiR2EDcreature_chege2"}, - -- {Id="palette.entities.creatures.chege3", Translation="uiR2EDcreature_chege3"}, - -- {Id="palette.entities.creatures.chege4", Translation="uiR2EDcreature_chege4"}, - -- {Id="palette.entities.creatures.chegf1", Translation="uiR2EDcreature_chegf1"}, - -- {Id="palette.entities.creatures.chegf2", Translation="uiR2EDcreature_chegf2"}, - -- {Id="palette.entities.creatures.chegf3", Translation="uiR2EDcreature_chegf3"}, - -- {Id="palette.entities.creatures.chegf4", Translation="uiR2EDcreature_chegf4"}, - {Id="palette.entities.creatures.cheld1", Translation="uiR2EDcreature_cheld1"}, - {Id="palette.entities.creatures.cheld2", Translation="uiR2EDcreature_cheld2"}, - {Id="palette.entities.creatures.cheld3", Translation="uiR2EDcreature_cheld3"}, - {Id="palette.entities.creatures.cheld4", Translation="uiR2EDcreature_cheld4"}, - {Id="palette.entities.creatures.chele4", Translation="uiR2EDcreature_chele4"}, - -- {Id="palette.entities.creatures.chfgb1", Translation="uiR2EDcreature_chfgb1"}, - -- {Id="palette.entities.creatures.chfgb2", Translation="uiR2EDcreature_chfgb2"}, - -- {Id="palette.entities.creatures.chfgb3", Translation="uiR2EDcreature_chfgb3"}, - -- {Id="palette.entities.creatures.chfgb4", Translation="uiR2EDcreature_chfgb4"}, - -- {Id="palette.entities.creatures.chfgc1", Translation="uiR2EDcreature_chfgc1"}, - -- {Id="palette.entities.creatures.chfgc2", Translation="uiR2EDcreature_chfgc2"}, - -- {Id="palette.entities.creatures.chfgc3", Translation="uiR2EDcreature_chfgc3"}, - -- {Id="palette.entities.creatures.chfgc4", Translation="uiR2EDcreature_chfgc4"}, - -- {Id="palette.entities.creatures.chfgd1", Translation="uiR2EDcreature_chfgd1"}, - -- {Id="palette.entities.creatures.chfgd2", Translation="uiR2EDcreature_chfgd2"}, - -- {Id="palette.entities.creatures.chfgd3", Translation="uiR2EDcreature_chfgd3"}, - -- {Id="palette.entities.creatures.chfgd4", Translation="uiR2EDcreature_chfgd4"}, - -- {Id="palette.entities.creatures.chfge1", Translation="uiR2EDcreature_chfge1"}, - -- {Id="palette.entities.creatures.chfge2", Translation="uiR2EDcreature_chfge2"}, - -- {Id="palette.entities.creatures.chfge3", Translation="uiR2EDcreature_chfge3"}, - -- {Id="palette.entities.creatures.chfge4", Translation="uiR2EDcreature_chfge4"}, - -- {Id="palette.entities.creatures.chfgf1", Translation="uiR2EDcreature_chfgf1"}, - -- {Id="palette.entities.creatures.chfgf2", Translation="uiR2EDcreature_chfgf2"}, - -- {Id="palette.entities.creatures.chfgf3", Translation="uiR2EDcreature_chfgf3"}, - -- {Id="palette.entities.creatures.chfgf4", Translation="uiR2EDcreature_chfgf4"}, - {Id="palette.entities.creatures.chfjc1", Translation="uiR2EDcreature_chfjc1"}, - {Id="palette.entities.creatures.chfjc2", Translation="uiR2EDcreature_chfjc2"}, - {Id="palette.entities.creatures.chfjc3", Translation="uiR2EDcreature_chfjc3"}, - {Id="palette.entities.creatures.chfjc4", Translation="uiR2EDcreature_chfjc4"}, - {Id="palette.entities.creatures.chfjd1", Translation="uiR2EDcreature_chfjd1"}, - {Id="palette.entities.creatures.chfjd2", Translation="uiR2EDcreature_chfjd2"}, - {Id="palette.entities.creatures.chfjd3", Translation="uiR2EDcreature_chfjd3"}, - {Id="palette.entities.creatures.chfjd4", Translation="uiR2EDcreature_chfjd4"}, - {Id="palette.entities.creatures.chfla1", Translation="uiR2EDcreature_chfla1"}, - {Id="palette.entities.creatures.chfla2", Translation="uiR2EDcreature_chfla2"}, - {Id="palette.entities.creatures.chflb1", Translation="uiR2EDcreature_chflb1"}, - {Id="palette.entities.creatures.chflb2", Translation="uiR2EDcreature_chflb2"}, - {Id="palette.entities.creatures.chflb3", Translation="uiR2EDcreature_chflb3"}, - {Id="palette.entities.creatures.chflb4", Translation="uiR2EDcreature_chflb4"}, - {Id="palette.entities.creatures.chgdd1", Translation="uiR2EDcreature_chgdd1"}, - {Id="palette.entities.creatures.chgdd2", Translation="uiR2EDcreature_chgdd2"}, - {Id="palette.entities.creatures.chgdd3", Translation="uiR2EDcreature_chgdd3"}, - {Id="palette.entities.creatures.chgdd4", Translation="uiR2EDcreature_chgdd4"}, - {Id="palette.entities.creatures.chgde1", Translation="uiR2EDcreature_chgde1"}, - {Id="palette.entities.creatures.chgde2", Translation="uiR2EDcreature_chgde2"}, - {Id="palette.entities.creatures.chgde3", Translation="uiR2EDcreature_chgde3"}, - {Id="palette.entities.creatures.chgde4", Translation="uiR2EDcreature_chgde4"}, - -- {Id="palette.entities.creatures.chggb1", Translation="uiR2EDcreature_chggb1"}, - -- {Id="palette.entities.creatures.chggb2", Translation="uiR2EDcreature_chggb2"}, - -- {Id="palette.entities.creatures.chggb3", Translation="uiR2EDcreature_chggb3"}, - -- {Id="palette.entities.creatures.chggb4", Translation="uiR2EDcreature_chggb4"}, - -- {Id="palette.entities.creatures.chggc1", Translation="uiR2EDcreature_chggc1"}, - -- {Id="palette.entities.creatures.chggc2", Translation="uiR2EDcreature_chggc2"}, - -- {Id="palette.entities.creatures.chggc3", Translation="uiR2EDcreature_chggc3"}, - -- {Id="palette.entities.creatures.chggc4", Translation="uiR2EDcreature_chggc4"}, - -- {Id="palette.entities.creatures.chggd1", Translation="uiR2EDcreature_chggd1"}, - -- {Id="palette.entities.creatures.chggd2", Translation="uiR2EDcreature_chggd2"}, - -- {Id="palette.entities.creatures.chggd3", Translation="uiR2EDcreature_chggd3"}, - -- {Id="palette.entities.creatures.chggd4", Translation="uiR2EDcreature_chggd4"}, - -- {Id="palette.entities.creatures.chgge1", Translation="uiR2EDcreature_chgge1"}, - -- {Id="palette.entities.creatures.chgge2", Translation="uiR2EDcreature_chgge2"}, - -- {Id="palette.entities.creatures.chgge3", Translation="uiR2EDcreature_chgge3"}, - -- {Id="palette.entities.creatures.chgge4", Translation="uiR2EDcreature_chgge4"}, - -- {Id="palette.entities.creatures.chggf1", Translation="uiR2EDcreature_chggf1"}, - -- {Id="palette.entities.creatures.chggf2", Translation="uiR2EDcreature_chggf2"}, - -- {Id="palette.entities.creatures.chggf3", Translation="uiR2EDcreature_chggf3"}, - -- {Id="palette.entities.creatures.chggf4", Translation="uiR2EDcreature_chggf4"}, - {Id="palette.entities.creatures.chgpd1", Translation="uiR2EDcreature_chgpd1"}, - {Id="palette.entities.creatures.chgpd2", Translation="uiR2EDcreature_chgpd2"}, - {Id="palette.entities.creatures.chgpd3", Translation="uiR2EDcreature_chgpd3"}, - {Id="palette.entities.creatures.chgpd4", Translation="uiR2EDcreature_chgpd4"}, - {Id="palette.entities.creatures.chgpf1", Translation="uiR2EDcreature_chgpf1"}, - {Id="palette.entities.creatures.chgpf2", Translation="uiR2EDcreature_chgpf2"}, - {Id="palette.entities.creatures.chgpf3", Translation="uiR2EDcreature_chgpf3"}, - {Id="palette.entities.creatures.chgpf4", Translation="uiR2EDcreature_chgpf4"}, - {Id="palette.entities.creatures.chhdd1", Translation="uiR2EDcreature_chhdd1"}, - {Id="palette.entities.creatures.chhdd2", Translation="uiR2EDcreature_chhdd2"}, - {Id="palette.entities.creatures.chhdd3", Translation="uiR2EDcreature_chhdd3"}, - {Id="palette.entities.creatures.chhdd4", Translation="uiR2EDcreature_chhdd4"}, - {Id="palette.entities.creatures.chhfc1", Translation="uiR2EDcreature_chhfc1"}, - {Id="palette.entities.creatures.chhfc2", Translation="uiR2EDcreature_chhfc2"}, - {Id="palette.entities.creatures.chhfc3", Translation="uiR2EDcreature_chhfc3"}, - {Id="palette.entities.creatures.chhfc4", Translation="uiR2EDcreature_chhfc4"}, - {Id="palette.entities.creatures.chhfd1", Translation="uiR2EDcreature_chhfd1"}, - {Id="palette.entities.creatures.chhfd2", Translation="uiR2EDcreature_chhfd2"}, - {Id="palette.entities.creatures.chhfd3", Translation="uiR2EDcreature_chhfd3"}, - {Id="palette.entities.creatures.chhfd4", Translation="uiR2EDcreature_chhfd4"}, - {Id="palette.entities.creatures.chhja1", Translation="uiR2EDcreature_chhja1"}, - {Id="palette.entities.creatures.chhja2", Translation="uiR2EDcreature_chhja2"}, - {Id="palette.entities.creatures.chhjb1", Translation="uiR2EDcreature_chhjb1"}, - {Id="palette.entities.creatures.chhjb2", Translation="uiR2EDcreature_chhjb2"}, - {Id="palette.entities.creatures.chhjb3", Translation="uiR2EDcreature_chhjb3"}, - {Id="palette.entities.creatures.chhjb4", Translation="uiR2EDcreature_chhjb4"}, - {Id="palette.entities.creatures.chhle1", Translation="uiR2EDcreature_chhle1"}, - {Id="palette.entities.creatures.chhle2", Translation="uiR2EDcreature_chhle2"}, - {Id="palette.entities.creatures.chhle3", Translation="uiR2EDcreature_chhle3"}, - {Id="palette.entities.creatures.chhle4", Translation="uiR2EDcreature_chhle4"}, - {Id="palette.entities.creatures.chhpf1", Translation="uiR2EDcreature_chhpf1"}, - {Id="palette.entities.creatures.chhpf2", Translation="uiR2EDcreature_chhpf2"}, - {Id="palette.entities.creatures.chhpf3", Translation="uiR2EDcreature_chhpf3"}, - {Id="palette.entities.creatures.chhpf4", Translation="uiR2EDcreature_chhpf4"}, - --- sadge says don't list mek mounts and packers in fauna --- sadge {Id="palette.entities.creatures.chidb2", Translation="uiR2EDcreature_chidb2"}, --- sadge {Id="palette.entities.creatures.chidc2", Translation="uiR2EDcreature_chidc2"}, --- sadge {Id="palette.entities.creatures.chidd2", Translation="uiR2EDcreature_chidd2"}, --- sadge {Id="palette.entities.creatures.chide2", Translation="uiR2EDcreature_chide2"}, --- sadge {Id="palette.entities.creatures.chidf2", Translation="uiR2EDcreature_chidf2"}, --- sadge {Id="palette.entities.creatures.chifb2", Translation="uiR2EDcreature_chifb2"}, --- sadge {Id="palette.entities.creatures.chifc2", Translation="uiR2EDcreature_chifc2"}, --- sadge {Id="palette.entities.creatures.chifd2", Translation="uiR2EDcreature_chifd2"}, --- sadge {Id="palette.entities.creatures.chife2", Translation="uiR2EDcreature_chife2"}, --- sadge {Id="palette.entities.creatures.chiff2", Translation="uiR2EDcreature_chiff2"}, --- sadge {Id="palette.entities.creatures.chijb2", Translation="uiR2EDcreature_chijb2"}, --- sadge {Id="palette.entities.creatures.chijc2", Translation="uiR2EDcreature_chijc2"}, --- sadge {Id="palette.entities.creatures.chijd2", Translation="uiR2EDcreature_chijd2"}, --- sadge {Id="palette.entities.creatures.chije2", Translation="uiR2EDcreature_chije2"}, --- sadge {Id="palette.entities.creatures.chijf2", Translation="uiR2EDcreature_chijf2"}, --- sadge {Id="palette.entities.creatures.chilb2", Translation="uiR2EDcreature_chilb2"}, --- sadge {Id="palette.entities.creatures.chilc2", Translation="uiR2EDcreature_chilc2"}, --- sadge {Id="palette.entities.creatures.child2", Translation="uiR2EDcreature_child2"}, --- sadge {Id="palette.entities.creatures.chile2", Translation="uiR2EDcreature_chile2"}, --- sadge {Id="palette.entities.creatures.chilf2", Translation="uiR2EDcreature_chilf2"}, --- sadge {Id="palette.entities.creatures.chipd2", Translation="uiR2EDcreature_chipd2"}, --- sadge {Id="palette.entities.creatures.chipe2", Translation="uiR2EDcreature_chipe2"}, --- sadge {Id="palette.entities.creatures.chipf2", Translation="uiR2EDcreature_chipf2"}, --- sadge {Id="palette.entities.creatures.chjdb2", Translation="uiR2EDcreature_chjdb2"}, --- sadge {Id="palette.entities.creatures.chjdb3", Translation="uiR2EDcreature_chjdb3"}, --- sadge {Id="palette.entities.creatures.chjdc2", Translation="uiR2EDcreature_chjdc2"}, --- sadge {Id="palette.entities.creatures.chjdc3", Translation="uiR2EDcreature_chjdc3"}, --- sadge {Id="palette.entities.creatures.chjdd2", Translation="uiR2EDcreature_chjdd2"}, --- sadge {Id="palette.entities.creatures.chjdd3", Translation="uiR2EDcreature_chjdd3"}, --- sadge {Id="palette.entities.creatures.chjde2", Translation="uiR2EDcreature_chjde2"}, --- sadge {Id="palette.entities.creatures.chjde3", Translation="uiR2EDcreature_chjde3"}, --- sadge {Id="palette.entities.creatures.chjdf2", Translation="uiR2EDcreature_chjdf2"}, --- sadge {Id="palette.entities.creatures.chjdf3", Translation="uiR2EDcreature_chjdf3"}, --- sadge {Id="palette.entities.creatures.chjfb2", Translation="uiR2EDcreature_chjfb2"}, --- sadge {Id="palette.entities.creatures.chjfb3", Translation="uiR2EDcreature_chjfb3"}, --- sadge {Id="palette.entities.creatures.chjfc2", Translation="uiR2EDcreature_chjfc2"}, --- sadge {Id="palette.entities.creatures.chjfc3", Translation="uiR2EDcreature_chjfc3"}, --- sadge {Id="palette.entities.creatures.chjfd2", Translation="uiR2EDcreature_chjfd2"}, --- sadge {Id="palette.entities.creatures.chjfd3", Translation="uiR2EDcreature_chjfd3"}, --- sadge {Id="palette.entities.creatures.chjfe2", Translation="uiR2EDcreature_chjfe2"}, --- sadge {Id="palette.entities.creatures.chjfe3", Translation="uiR2EDcreature_chjfe3"}, --- sadge {Id="palette.entities.creatures.chjff2", Translation="uiR2EDcreature_chjff2"}, --- sadge {Id="palette.entities.creatures.chjff3", Translation="uiR2EDcreature_chjff3"}, --- sadge {Id="palette.entities.creatures.chjjb2", Translation="uiR2EDcreature_chjjb2"}, --- sadge {Id="palette.entities.creatures.chjjb3", Translation="uiR2EDcreature_chjjb3"}, --- sadge {Id="palette.entities.creatures.chjjc2", Translation="uiR2EDcreature_chjjc2"}, --- sadge {Id="palette.entities.creatures.chjjc3", Translation="uiR2EDcreature_chjjc3"}, --- sadge {Id="palette.entities.creatures.chjjd2", Translation="uiR2EDcreature_chjjd2"}, --- sadge {Id="palette.entities.creatures.chjjd3", Translation="uiR2EDcreature_chjjd3"}, --- sadge {Id="palette.entities.creatures.chjje2", Translation="uiR2EDcreature_chjje2"}, --- sadge {Id="palette.entities.creatures.chjje3", Translation="uiR2EDcreature_chjje3"}, --- sadge {Id="palette.entities.creatures.chjjf2", Translation="uiR2EDcreature_chjjf2"}, --- sadge {Id="palette.entities.creatures.chjjf3", Translation="uiR2EDcreature_chjjf3"}, --- sadge {Id="palette.entities.creatures.chjlb2", Translation="uiR2EDcreature_chjlb2"}, --- sadge {Id="palette.entities.creatures.chjlb3", Translation="uiR2EDcreature_chjlb3"}, --- sadge {Id="palette.entities.creatures.chjlc2", Translation="uiR2EDcreature_chjlc2"}, --- sadge {Id="palette.entities.creatures.chjlc3", Translation="uiR2EDcreature_chjlc3"}, --- sadge {Id="palette.entities.creatures.chjld2", Translation="uiR2EDcreature_chjld2"}, --- sadge {Id="palette.entities.creatures.chjld3", Translation="uiR2EDcreature_chjld3"}, --- sadge {Id="palette.entities.creatures.chjle2", Translation="uiR2EDcreature_chjle2"}, --- sadge {Id="palette.entities.creatures.chjle3", Translation="uiR2EDcreature_chjle3"}, --- sadge {Id="palette.entities.creatures.chjlf2", Translation="uiR2EDcreature_chjlf2"}, --- sadge {Id="palette.entities.creatures.chjlf3", Translation="uiR2EDcreature_chjlf3"}, --- sadge {Id="palette.entities.creatures.chjpd2", Translation="uiR2EDcreature_chjpd2"}, --- sadge {Id="palette.entities.creatures.chjpe2", Translation="uiR2EDcreature_chjpe2"}, --- sadge {Id="palette.entities.creatures.chjpf2", Translation="uiR2EDcreature_chjpf2"}, - - {Id="palette.entities.creatures.chkde1", Translation="uiR2EDcreature_chkde1"}, - {Id="palette.entities.creatures.chkde2", Translation="uiR2EDcreature_chkde2"}, - {Id="palette.entities.creatures.chkde3", Translation="uiR2EDcreature_chkde3"}, - {Id="palette.entities.creatures.chkde4", Translation="uiR2EDcreature_chkde4"}, - {Id="palette.entities.creatures.chkdf1", Translation="uiR2EDcreature_chkdf1"}, - {Id="palette.entities.creatures.chkdf2", Translation="uiR2EDcreature_chkdf2"}, - {Id="palette.entities.creatures.chkdf3", Translation="uiR2EDcreature_chkdf3"}, - {Id="palette.entities.creatures.chkdf4", Translation="uiR2EDcreature_chkdf4"}, - -- {Id="palette.entities.creatures.chkgb1", Translation="uiR2EDcreature_chkgb1"}, - -- {Id="palette.entities.creatures.chkgb2", Translation="uiR2EDcreature_chkgb2"}, - -- {Id="palette.entities.creatures.chkgb3", Translation="uiR2EDcreature_chkgb3"}, - -- {Id="palette.entities.creatures.chkgb4", Translation="uiR2EDcreature_chkgb4"}, - -- {Id="palette.entities.creatures.chkgc1", Translation="uiR2EDcreature_chkgc1"}, - -- {Id="palette.entities.creatures.chkgc2", Translation="uiR2EDcreature_chkgc2"}, - -- {Id="palette.entities.creatures.chkgc3", Translation="uiR2EDcreature_chkgc3"}, - -- {Id="palette.entities.creatures.chkgc4", Translation="uiR2EDcreature_chkgc4"}, - -- {Id="palette.entities.creatures.chkgd1", Translation="uiR2EDcreature_chkgd1"}, - -- {Id="palette.entities.creatures.chkgd2", Translation="uiR2EDcreature_chkgd2"}, - -- {Id="palette.entities.creatures.chkgd3", Translation="uiR2EDcreature_chkgd3"}, - -- {Id="palette.entities.creatures.chkgd4", Translation="uiR2EDcreature_chkgd4"}, - -- {Id="palette.entities.creatures.chkge1", Translation="uiR2EDcreature_chkge1"}, - -- {Id="palette.entities.creatures.chkge2", Translation="uiR2EDcreature_chkge2"}, - -- {Id="palette.entities.creatures.chkge3", Translation="uiR2EDcreature_chkge3"}, - -- {Id="palette.entities.creatures.chkge4", Translation="uiR2EDcreature_chkge4"}, - -- {Id="palette.entities.creatures.chkgf1", Translation="uiR2EDcreature_chkgf1"}, - -- {Id="palette.entities.creatures.chkgf2", Translation="uiR2EDcreature_chkgf2"}, - -- {Id="palette.entities.creatures.chkgf3", Translation="uiR2EDcreature_chkgf3"}, - -- {Id="palette.entities.creatures.chkgf4", Translation="uiR2EDcreature_chkgf4"}, - {Id="palette.entities.creatures.chkjd1", Translation="uiR2EDcreature_chkjd1"}, - {Id="palette.entities.creatures.chkjd2", Translation="uiR2EDcreature_chkjd2"}, - {Id="palette.entities.creatures.chkjd3", Translation="uiR2EDcreature_chkjd3"}, - {Id="palette.entities.creatures.chkjd4", Translation="uiR2EDcreature_chkjd4"}, - {Id="palette.entities.creatures.chkje1", Translation="uiR2EDcreature_chkje1"}, - {Id="palette.entities.creatures.chkje2", Translation="uiR2EDcreature_chkje2"}, - {Id="palette.entities.creatures.chkje3", Translation="uiR2EDcreature_chkje3"}, - {Id="palette.entities.creatures.chkje4", Translation="uiR2EDcreature_chkje4"}, - {Id="palette.entities.creatures.chldf1", Translation="uiR2EDcreature_chldf1"}, - {Id="palette.entities.creatures.chldf2", Translation="uiR2EDcreature_chldf2"}, - {Id="palette.entities.creatures.chldf3", Translation="uiR2EDcreature_chldf3"}, - {Id="palette.entities.creatures.chldf4", Translation="uiR2EDcreature_chldf4"}, - {Id="palette.entities.creatures.chlfe1", Translation="uiR2EDcreature_chlfe1"}, - {Id="palette.entities.creatures.chlfe2", Translation="uiR2EDcreature_chlfe2"}, - {Id="palette.entities.creatures.chlfe3", Translation="uiR2EDcreature_chlfe3"}, - {Id="palette.entities.creatures.chlfe4", Translation="uiR2EDcreature_chlfe4"}, - {Id="palette.entities.creatures.chlff1", Translation="uiR2EDcreature_chlff1"}, - {Id="palette.entities.creatures.chlff2", Translation="uiR2EDcreature_chlff2"}, - {Id="palette.entities.creatures.chlff3", Translation="uiR2EDcreature_chlff3"}, - {Id="palette.entities.creatures.chlff4", Translation="uiR2EDcreature_chlff4"}, - -- {Id="palette.entities.creatures.chlgb1", Translation="uiR2EDcreature_chlgb1"}, - -- {Id="palette.entities.creatures.chlgb2", Translation="uiR2EDcreature_chlgb2"}, - -- {Id="palette.entities.creatures.chlgb3", Translation="uiR2EDcreature_chlgb3"}, - -- {Id="palette.entities.creatures.chlgb4", Translation="uiR2EDcreature_chlgb4"}, - -- {Id="palette.entities.creatures.chlgc1", Translation="uiR2EDcreature_chlgc1"}, - -- {Id="palette.entities.creatures.chlgc2", Translation="uiR2EDcreature_chlgc2"}, - -- {Id="palette.entities.creatures.chlgc3", Translation="uiR2EDcreature_chlgc3"}, - -- {Id="palette.entities.creatures.chlgc4", Translation="uiR2EDcreature_chlgc4"}, - -- {Id="palette.entities.creatures.chlgd1", Translation="uiR2EDcreature_chlgd1"}, - -- {Id="palette.entities.creatures.chlgd2", Translation="uiR2EDcreature_chlgd2"}, - -- {Id="palette.entities.creatures.chlgd3", Translation="uiR2EDcreature_chlgd3"}, - -- {Id="palette.entities.creatures.chlgd4", Translation="uiR2EDcreature_chlgd4"}, - -- {Id="palette.entities.creatures.chlge1", Translation="uiR2EDcreature_chlge1"}, - -- {Id="palette.entities.creatures.chlge2", Translation="uiR2EDcreature_chlge2"}, - -- {Id="palette.entities.creatures.chlge3", Translation="uiR2EDcreature_chlge3"}, - -- {Id="palette.entities.creatures.chlge4", Translation="uiR2EDcreature_chlge4"}, - -- {Id="palette.entities.creatures.chlgf1", Translation="uiR2EDcreature_chlgf1"}, - -- {Id="palette.entities.creatures.chlgf2", Translation="uiR2EDcreature_chlgf2"}, - -- {Id="palette.entities.creatures.chlgf3", Translation="uiR2EDcreature_chlgf3"}, - -- {Id="palette.entities.creatures.chlgf4", Translation="uiR2EDcreature_chlgf4"}, - {Id="palette.entities.creatures.chlld1", Translation="uiR2EDcreature_chlld1"}, - {Id="palette.entities.creatures.chlld2", Translation="uiR2EDcreature_chlld2"}, - {Id="palette.entities.creatures.chlld3", Translation="uiR2EDcreature_chlld3"}, - {Id="palette.entities.creatures.chlld4", Translation="uiR2EDcreature_chlld4"}, - {Id="palette.entities.creatures.chlle1", Translation="uiR2EDcreature_chlle1"}, - {Id="palette.entities.creatures.chlle2", Translation="uiR2EDcreature_chlle2"}, - {Id="palette.entities.creatures.chlle3", Translation="uiR2EDcreature_chlle3"}, - {Id="palette.entities.creatures.chlle4", Translation="uiR2EDcreature_chlle4"}, - {Id="palette.entities.creatures.chlpe1", Translation="uiR2EDcreature_chlpe1"}, - {Id="palette.entities.creatures.chlpe2", Translation="uiR2EDcreature_chlpe2"}, - {Id="palette.entities.creatures.chlpe3", Translation="uiR2EDcreature_chlpe3"}, - {Id="palette.entities.creatures.chlpe4", Translation="uiR2EDcreature_chlpe4"}, - {Id="palette.entities.creatures.chlpf1", Translation="uiR2EDcreature_chlpf1"}, - {Id="palette.entities.creatures.chlpf2", Translation="uiR2EDcreature_chlpf2"}, - {Id="palette.entities.creatures.chlpf3", Translation="uiR2EDcreature_chlpf3"}, - {Id="palette.entities.creatures.chlpf4", Translation="uiR2EDcreature_chlpf4"}, - {Id="palette.entities.creatures.chmdd1", Translation="uiR2EDcreature_chmdd1"}, - {Id="palette.entities.creatures.chmdd2", Translation="uiR2EDcreature_chmdd2"}, - {Id="palette.entities.creatures.chmdd3", Translation="uiR2EDcreature_chmdd3"}, - {Id="palette.entities.creatures.chmdd4", Translation="uiR2EDcreature_chmdd4"}, - {Id="palette.entities.creatures.chmfc1", Translation="uiR2EDcreature_chmfc1"}, - {Id="palette.entities.creatures.chmfc2", Translation="uiR2EDcreature_chmfc2"}, - {Id="palette.entities.creatures.chmfc3", Translation="uiR2EDcreature_chmfc3"}, - {Id="palette.entities.creatures.chmfc4", Translation="uiR2EDcreature_chmfc4"}, - {Id="palette.entities.creatures.chnfd1", Translation="uiR2EDcreature_chnfd1"}, - {Id="palette.entities.creatures.chnfd2", Translation="uiR2EDcreature_chnfd2"}, - {Id="palette.entities.creatures.chnfd3", Translation="uiR2EDcreature_chnfd3"}, - {Id="palette.entities.creatures.chnfd4", Translation="uiR2EDcreature_chnfd4"}, - {Id="palette.entities.creatures.chnjc1", Translation="uiR2EDcreature_chnjc1"}, - {Id="palette.entities.creatures.chnjc2", Translation="uiR2EDcreature_chnjc2"}, - {Id="palette.entities.creatures.chnjc3", Translation="uiR2EDcreature_chnjc3"}, - {Id="palette.entities.creatures.chnjc4", Translation="uiR2EDcreature_chnjc4"}, - {Id="palette.entities.creatures.chofc1", Translation="uiR2EDcreature_chofc1"}, - {Id="palette.entities.creatures.chofc2", Translation="uiR2EDcreature_chofc2"}, - {Id="palette.entities.creatures.chofc3", Translation="uiR2EDcreature_chofc3"}, - {Id="palette.entities.creatures.chofc4", Translation="uiR2EDcreature_chofc4"}, - -- {Id="palette.entities.creatures.chogb1", Translation="uiR2EDcreature_chogb1"}, - -- {Id="palette.entities.creatures.chogb2", Translation="uiR2EDcreature_chogb2"}, - -- {Id="palette.entities.creatures.chogb3", Translation="uiR2EDcreature_chogb3"}, - -- {Id="palette.entities.creatures.chogb4", Translation="uiR2EDcreature_chogb4"}, - -- {Id="palette.entities.creatures.chogc1", Translation="uiR2EDcreature_chogc1"}, - -- {Id="palette.entities.creatures.chogc2", Translation="uiR2EDcreature_chogc2"}, - -- {Id="palette.entities.creatures.chogc3", Translation="uiR2EDcreature_chogc3"}, - -- {Id="palette.entities.creatures.chogc4", Translation="uiR2EDcreature_chogc4"}, - -- {Id="palette.entities.creatures.chogd1", Translation="uiR2EDcreature_chogd1"}, - -- {Id="palette.entities.creatures.chogd2", Translation="uiR2EDcreature_chogd2"}, - -- {Id="palette.entities.creatures.chogd3", Translation="uiR2EDcreature_chogd3"}, - -- {Id="palette.entities.creatures.chogd4", Translation="uiR2EDcreature_chogd4"}, - -- {Id="palette.entities.creatures.choge1", Translation="uiR2EDcreature_choge1"}, - -- {Id="palette.entities.creatures.choge2", Translation="uiR2EDcreature_choge2"}, - -- {Id="palette.entities.creatures.choge3", Translation="uiR2EDcreature_choge3"}, - -- {Id="palette.entities.creatures.choge4", Translation="uiR2EDcreature_choge4"}, - -- {Id="palette.entities.creatures.chogf1", Translation="uiR2EDcreature_chogf1"}, - -- {Id="palette.entities.creatures.chogf2", Translation="uiR2EDcreature_chogf2"}, - -- {Id="palette.entities.creatures.chogf3", Translation="uiR2EDcreature_chogf3"}, - -- {Id="palette.entities.creatures.chogf4", Translation="uiR2EDcreature_chogf4"}, - {Id="palette.entities.creatures.chpdc1", Translation="uiR2EDcreature_chpdc1"}, - {Id="palette.entities.creatures.chpdc2", Translation="uiR2EDcreature_chpdc2"}, - {Id="palette.entities.creatures.chpdc3", Translation="uiR2EDcreature_chpdc3"}, - {Id="palette.entities.creatures.chpdc4", Translation="uiR2EDcreature_chpdc4"}, - {Id="palette.entities.creatures.chpde4", Translation="uiR2EDcreature_chpde4"}, - {Id="palette.entities.creatures.chpfd1", Translation="uiR2EDcreature_chpfd1"}, - {Id="palette.entities.creatures.chpfd2", Translation="uiR2EDcreature_chpfd2"}, - {Id="palette.entities.creatures.chpfd3", Translation="uiR2EDcreature_chpfd3"}, - {Id="palette.entities.creatures.chpfd4", Translation="uiR2EDcreature_chpfd4"}, - {Id="palette.entities.creatures.chqfe1", Translation="uiR2EDcreature_chqfe1"}, - {Id="palette.entities.creatures.chqfe2", Translation="uiR2EDcreature_chqfe2"}, - {Id="palette.entities.creatures.chqfe3", Translation="uiR2EDcreature_chqfe3"}, - {Id="palette.entities.creatures.chqfe4", Translation="uiR2EDcreature_chqfe4"}, - {Id="palette.entities.creatures.chqlc1", Translation="uiR2EDcreature_chqlc1"}, - {Id="palette.entities.creatures.chqlc2", Translation="uiR2EDcreature_chqlc2"}, - {Id="palette.entities.creatures.chqlc3", Translation="uiR2EDcreature_chqlc3"}, - {Id="palette.entities.creatures.chqlc4", Translation="uiR2EDcreature_chqlc4"}, - {Id="palette.entities.creatures.chrfe1", Translation="uiR2EDcreature_chrfe1"}, - {Id="palette.entities.creatures.chrfe2", Translation="uiR2EDcreature_chrfe2"}, - {Id="palette.entities.creatures.chrfe3", Translation="uiR2EDcreature_chrfe3"}, - {Id="palette.entities.creatures.chrfe4", Translation="uiR2EDcreature_chrfe4"}, - {Id="palette.entities.creatures.chrlf1", Translation="uiR2EDcreature_chrlf1"}, - {Id="palette.entities.creatures.chrlf2", Translation="uiR2EDcreature_chrlf2"}, - {Id="palette.entities.creatures.chrlf3", Translation="uiR2EDcreature_chrlf3"}, - {Id="palette.entities.creatures.chrlf4", Translation="uiR2EDcreature_chrlf4"}, - {Id="palette.entities.creatures.chsdf1", Translation="uiR2EDcreature_chsdf1"}, - {Id="palette.entities.creatures.chsdf2", Translation="uiR2EDcreature_chsdf2"}, - {Id="palette.entities.creatures.chsdf3", Translation="uiR2EDcreature_chsdf3"}, - {Id="palette.entities.creatures.chsdf4", Translation="uiR2EDcreature_chsdf4"}, - {Id="palette.entities.creatures.chsle1", Translation="uiR2EDcreature_chsle1"}, - {Id="palette.entities.creatures.chsle2", Translation="uiR2EDcreature_chsle2"}, - {Id="palette.entities.creatures.chsle3", Translation="uiR2EDcreature_chsle3"}, - {Id="palette.entities.creatures.chsle4", Translation="uiR2EDcreature_chsle4"}, - {Id="palette.entities.creatures.chtde1", Translation="uiR2EDcreature_chtde1"}, - {Id="palette.entities.creatures.chtde2", Translation="uiR2EDcreature_chtde2"}, - {Id="palette.entities.creatures.chtde3", Translation="uiR2EDcreature_chtde3"}, - {Id="palette.entities.creatures.chtde4", Translation="uiR2EDcreature_chtde4"}, - {Id="palette.entities.creatures.chtjf1", Translation="uiR2EDcreature_chtjf1"}, - {Id="palette.entities.creatures.chtjf2", Translation="uiR2EDcreature_chtjf2"}, - {Id="palette.entities.creatures.chtjf3", Translation="uiR2EDcreature_chtjf3"}, - {Id="palette.entities.creatures.chtjf4", Translation="uiR2EDcreature_chtjf4"}, - {Id="palette.entities.creatures.chuje1", Translation="uiR2EDcreature_chuje1"}, - {Id="palette.entities.creatures.chuje2", Translation="uiR2EDcreature_chuje2"}, - {Id="palette.entities.creatures.chuje3", Translation="uiR2EDcreature_chuje3"}, - {Id="palette.entities.creatures.chuje4", Translation="uiR2EDcreature_chuje4"}, - {Id="palette.entities.creatures.chulf1", Translation="uiR2EDcreature_chulf1"}, - {Id="palette.entities.creatures.chulf2", Translation="uiR2EDcreature_chulf2"}, - {Id="palette.entities.creatures.chulf3", Translation="uiR2EDcreature_chulf3"}, - {Id="palette.entities.creatures.chulf4", Translation="uiR2EDcreature_chulf4"}, - {Id="palette.entities.creatures.chvfe4", Translation="uiR2EDcreature_chvfe4"}, - {Id="palette.entities.creatures.chvff1", Translation="uiR2EDcreature_chvff1"}, - {Id="palette.entities.creatures.chvff2", Translation="uiR2EDcreature_chvff2"}, - {Id="palette.entities.creatures.chvff3", Translation="uiR2EDcreature_chvff3"}, - {Id="palette.entities.creatures.chvff4", Translation="uiR2EDcreature_chvff4"}, - {Id="palette.entities.creatures.chvje1", Translation="uiR2EDcreature_chvje1"}, - {Id="palette.entities.creatures.chvje2", Translation="uiR2EDcreature_chvje2"}, - {Id="palette.entities.creatures.chvje3", Translation="uiR2EDcreature_chvje3"}, - - {Id="palette.entities.creatures.chvje4", Translation="uiR2EDcreature_chvje4"}, - {Id="palette.entities.creatures.chvpf4", Translation="uiR2EDcreature_chvpf4"}, - {Id="palette.entities.creatures.chwde1", Translation="uiR2EDcreature_chwde1"}, - {Id="palette.entities.creatures.chwde2", Translation="uiR2EDcreature_chwde2"}, - {Id="palette.entities.creatures.chwde3", Translation="uiR2EDcreature_chwde3"}, - {Id="palette.entities.creatures.chwde4", Translation="uiR2EDcreature_chwde4"}, - {Id="palette.entities.creatures.chwff1", Translation="uiR2EDcreature_chwff1"}, - {Id="palette.entities.creatures.chwff2", Translation="uiR2EDcreature_chwff2"}, - {Id="palette.entities.creatures.chwff3", Translation="uiR2EDcreature_chwff3"}, - {Id="palette.entities.creatures.chwff4", Translation="uiR2EDcreature_chwff4"}, - {Id="palette.entities.creatures.chxjf1", Translation="uiR2EDcreature_chxjf1"}, - {Id="palette.entities.creatures.chxjf2", Translation="uiR2EDcreature_chxjf2"}, - {Id="palette.entities.creatures.chxjf3", Translation="uiR2EDcreature_chxjf3"}, - {Id="palette.entities.creatures.chxjf4", Translation="uiR2EDcreature_chxjf4"}, - {Id="palette.entities.creatures.chxpe1", Translation="uiR2EDcreature_chxpe1"}, - {Id="palette.entities.creatures.chxpe2", Translation="uiR2EDcreature_chxpe2"}, - {Id="palette.entities.creatures.chxpe3", Translation="uiR2EDcreature_chxpe3"}, - {Id="palette.entities.creatures.chxpe4", Translation="uiR2EDcreature_chxpe4"} - } - }, - - - -- Predators (carnivores) - creatures_predators = - { - instances = - { - {Id="palette.entities.creatures.ccada1", Translation="uiR2EDcreature_ccada1"}, - {Id="palette.entities.creatures.ccada2", Translation="uiR2EDcreature_ccada2"}, - {Id="palette.entities.creatures.ccadb1", Translation="uiR2EDcreature_ccadb1"}, - {Id="palette.entities.creatures.ccadb2", Translation="uiR2EDcreature_ccadb2"}, - {Id="palette.entities.creatures.ccadb3", Translation="uiR2EDcreature_ccadb3"}, - {Id="palette.entities.creatures.ccadb4", Translation="uiR2EDcreature_ccadb4"}, - {Id="palette.entities.creatures.ccafa1", Translation="uiR2EDcreature_ccafa1"}, - {Id="palette.entities.creatures.ccafa2", Translation="uiR2EDcreature_ccafa2"}, - {Id="palette.entities.creatures.ccafb1", Translation="uiR2EDcreature_ccafb1"}, - {Id="palette.entities.creatures.ccafb2", Translation="uiR2EDcreature_ccafb2"}, - {Id="palette.entities.creatures.ccafb3", Translation="uiR2EDcreature_ccafb3"}, - {Id="palette.entities.creatures.ccafb4", Translation="uiR2EDcreature_ccafb4"}, - {Id="palette.entities.creatures.ccafc1", Translation="uiR2EDcreature_ccafc1"}, - {Id="palette.entities.creatures.ccafc2", Translation="uiR2EDcreature_ccafc2"}, - {Id="palette.entities.creatures.ccafc3", Translation="uiR2EDcreature_ccafc3"}, - {Id="palette.entities.creatures.ccafc4", Translation="uiR2EDcreature_ccafc4"}, - {Id="palette.entities.creatures.ccafe4", Translation="uiR2EDcreature_ccafe4"}, - -- {Id="palette.entities.creatures.ccagb1", Translation="uiR2EDcreature_ccagb1"}, - -- {Id="palette.entities.creatures.ccagb2", Translation="uiR2EDcreature_ccagb2"}, - -- {Id="palette.entities.creatures.ccagb3", Translation="uiR2EDcreature_ccagb3"}, - -- {Id="palette.entities.creatures.ccagb4", Translation="uiR2EDcreature_ccagb4"}, - -- {Id="palette.entities.creatures.ccagc1", Translation="uiR2EDcreature_ccagc1"}, - -- {Id="palette.entities.creatures.ccagc2", Translation="uiR2EDcreature_ccagc2"}, - -- {Id="palette.entities.creatures.ccagc3", Translation="uiR2EDcreature_ccagc3"}, - - -- {Id="palette.entities.creatures.ccagc4", Translation="uiR2EDcreature_ccagc4"}, - -- {Id="palette.entities.creatures.ccagd1", Translation="uiR2EDcreature_ccagd1"}, - -- {Id="palette.entities.creatures.ccagd2", Translation="uiR2EDcreature_ccagd2"}, - -- {Id="palette.entities.creatures.ccagd3", Translation="uiR2EDcreature_ccagd3"}, - -- {Id="palette.entities.creatures.ccagd4", Translation="uiR2EDcreature_ccagd4"}, - -- {Id="palette.entities.creatures.ccage1", Translation="uiR2EDcreature_ccage1"}, - -- {Id="palette.entities.creatures.ccage2", Translation="uiR2EDcreature_ccage2"}, - -- {Id="palette.entities.creatures.ccage3", Translation="uiR2EDcreature_ccage3"}, - -- {Id="palette.entities.creatures.ccage4", Translation="uiR2EDcreature_ccage4"}, - -- {Id="palette.entities.creatures.ccagf1", Translation="uiR2EDcreature_ccagf1"}, - -- {Id="palette.entities.creatures.ccagf2", Translation="uiR2EDcreature_ccagf2"}, - -- {Id="palette.entities.creatures.ccagf3", Translation="uiR2EDcreature_ccagf3"}, - -- {Id="palette.entities.creatures.ccagf4", Translation="uiR2EDcreature_ccagf4"}, - {Id="palette.entities.creatures.ccajd1", Translation="uiR2EDcreature_ccajd1"}, - {Id="palette.entities.creatures.ccajd2", Translation="uiR2EDcreature_ccajd2"}, - {Id="palette.entities.creatures.ccajd3", Translation="uiR2EDcreature_ccajd3"}, - {Id="palette.entities.creatures.ccajd4", Translation="uiR2EDcreature_ccajd4"}, - {Id="palette.entities.creatures.ccaje1", Translation="uiR2EDcreature_ccaje1"}, - {Id="palette.entities.creatures.ccaje2", Translation="uiR2EDcreature_ccaje2"}, - {Id="palette.entities.creatures.ccaje3", Translation="uiR2EDcreature_ccaje3"}, - {Id="palette.entities.creatures.ccaje4", Translation="uiR2EDcreature_ccaje4"}, - {Id="palette.entities.creatures.ccbdc1", Translation="uiR2EDcreature_ccbdc1"}, - {Id="palette.entities.creatures.ccbdc2", Translation="uiR2EDcreature_ccbdc2"}, - {Id="palette.entities.creatures.ccbdc3", Translation="uiR2EDcreature_ccbdc3"}, - {Id="palette.entities.creatures.ccbdc4", Translation="uiR2EDcreature_ccbdc4"}, - -- {Id="palette.entities.creatures.ccbgb1", Translation="uiR2EDcreature_ccbgb1"}, - -- {Id="palette.entities.creatures.ccbgb2", Translation="uiR2EDcreature_ccbgb2"}, - -- {Id="palette.entities.creatures.ccbgb3", Translation="uiR2EDcreature_ccbgb3"}, - -- {Id="palette.entities.creatures.ccbgb4", Translation="uiR2EDcreature_ccbgb4"}, - -- {Id="palette.entities.creatures.ccbgc1", Translation="uiR2EDcreature_ccbgc1"}, - -- {Id="palette.entities.creatures.ccbgc2", Translation="uiR2EDcreature_ccbgc2"}, - -- {Id="palette.entities.creatures.ccbgc3", Translation="uiR2EDcreature_ccbgc3"}, - -- {Id="palette.entities.creatures.ccbgc4", Translation="uiR2EDcreature_ccbgc4"}, - -- {Id="palette.entities.creatures.ccbgd1", Translation="uiR2EDcreature_ccbgd1"}, - -- {Id="palette.entities.creatures.ccbgd2", Translation="uiR2EDcreature_ccbgd2"}, - -- {Id="palette.entities.creatures.ccbgd3", Translation="uiR2EDcreature_ccbgd3"}, - -- {Id="palette.entities.creatures.ccbgd4", Translation="uiR2EDcreature_ccbgd4"}, - -- {Id="palette.entities.creatures.ccbge1", Translation="uiR2EDcreature_ccbge1"}, - -- {Id="palette.entities.creatures.ccbge2", Translation="uiR2EDcreature_ccbge2"}, - -- {Id="palette.entities.creatures.ccbge3", Translation="uiR2EDcreature_ccbge3"}, - -- {Id="palette.entities.creatures.ccbge4", Translation="uiR2EDcreature_ccbge4"}, - -- {Id="palette.entities.creatures.ccbgf1", Translation="uiR2EDcreature_ccbgf1"}, - -- {Id="palette.entities.creatures.ccbgf2", Translation="uiR2EDcreature_ccbgf2"}, - -- {Id="palette.entities.creatures.ccbgf3", Translation="uiR2EDcreature_ccbgf3"}, - -- {Id="palette.entities.creatures.ccbgf4", Translation="uiR2EDcreature_ccbgf4"}, - {Id="palette.entities.creatures.ccbla1", Translation="uiR2EDcreature_ccbla1"}, - {Id="palette.entities.creatures.ccbla2", Translation="uiR2EDcreature_ccbla2"}, - {Id="palette.entities.creatures.ccblb1", Translation="uiR2EDcreature_ccblb1"}, - {Id="palette.entities.creatures.ccblb2", Translation="uiR2EDcreature_ccblb2"}, - {Id="palette.entities.creatures.ccblb3", Translation="uiR2EDcreature_ccblb3"}, - {Id="palette.entities.creatures.ccblb4", Translation="uiR2EDcreature_ccblb4"}, - {Id="palette.entities.creatures.ccblc1", Translation="uiR2EDcreature_ccblc1"}, - {Id="palette.entities.creatures.ccblc2", Translation="uiR2EDcreature_ccblc2"}, - {Id="palette.entities.creatures.ccblc3", Translation="uiR2EDcreature_ccblc3"}, - {Id="palette.entities.creatures.ccblc4", Translation="uiR2EDcreature_ccblc4"}, - {Id="palette.entities.creatures.cccda1", Translation="uiR2EDcreature_cccda1"}, - {Id="palette.entities.creatures.cccda2", Translation="uiR2EDcreature_cccda2"}, - {Id="palette.entities.creatures.cccdb1", Translation="uiR2EDcreature_cccdb1"}, - {Id="palette.entities.creatures.cccdb2", Translation="uiR2EDcreature_cccdb2"}, - {Id="palette.entities.creatures.cccdb3", Translation="uiR2EDcreature_cccdb3"}, - {Id="palette.entities.creatures.cccdb4", Translation="uiR2EDcreature_cccdb4"}, - {Id="palette.entities.creatures.cccdc1", Translation="uiR2EDcreature_cccdc1"}, - {Id="palette.entities.creatures.cccdc2", Translation="uiR2EDcreature_cccdc2"}, - {Id="palette.entities.creatures.cccdc3", Translation="uiR2EDcreature_cccdc3"}, - {Id="palette.entities.creatures.cccdc4", Translation="uiR2EDcreature_cccdc4"}, - {Id="palette.entities.creatures.cccdd4", Translation="uiR2EDcreature_cccdd4"}, - -- {Id="palette.entities.creatures.cccgb1", Translation="uiR2EDcreature_cccgb1"}, - -- {Id="palette.entities.creatures.cccgb2", Translation="uiR2EDcreature_cccgb2"}, - -- {Id="palette.entities.creatures.cccgb3", Translation="uiR2EDcreature_cccgb3"}, - -- {Id="palette.entities.creatures.cccgb4", Translation="uiR2EDcreature_cccgb4"}, - -- {Id="palette.entities.creatures.cccgc1", Translation="uiR2EDcreature_cccgc1"}, - -- {Id="palette.entities.creatures.cccgc2", Translation="uiR2EDcreature_cccgc2"}, - -- {Id="palette.entities.creatures.cccgc3", Translation="uiR2EDcreature_cccgc3"}, - -- {Id="palette.entities.creatures.cccgc4", Translation="uiR2EDcreature_cccgc4"}, - -- {Id="palette.entities.creatures.cccgd1", Translation="uiR2EDcreature_cccgd1"}, - -- {Id="palette.entities.creatures.cccgd2", Translation="uiR2EDcreature_cccgd2"}, - -- {Id="palette.entities.creatures.cccgd3", Translation="uiR2EDcreature_cccgd3"}, - -- {Id="palette.entities.creatures.cccgd4", Translation="uiR2EDcreature_cccgd4"}, - -- {Id="palette.entities.creatures.cccge1", Translation="uiR2EDcreature_cccge1"}, - -- {Id="palette.entities.creatures.cccge2", Translation="uiR2EDcreature_cccge2"}, - -- {Id="palette.entities.creatures.cccge3", Translation="uiR2EDcreature_cccge3"}, - -- {Id="palette.entities.creatures.cccge4", Translation="uiR2EDcreature_cccge4"}, - -- {Id="palette.entities.creatures.cccgf1", Translation="uiR2EDcreature_cccgf1"}, - -- {Id="palette.entities.creatures.cccgf2", Translation="uiR2EDcreature_cccgf2"}, - -- {Id="palette.entities.creatures.cccgf3", Translation="uiR2EDcreature_cccgf3"}, - -- {Id="palette.entities.creatures.cccgf4", Translation="uiR2EDcreature_cccgf4"}, - {Id="palette.entities.creatures.cccla1", Translation="uiR2EDcreature_cccla1"}, - {Id="palette.entities.creatures.cccla2", Translation="uiR2EDcreature_cccla2"}, - {Id="palette.entities.creatures.ccclb1", Translation="uiR2EDcreature_ccclb1"}, - {Id="palette.entities.creatures.ccclb2", Translation="uiR2EDcreature_ccclb2"}, - {Id="palette.entities.creatures.ccclb3", Translation="uiR2EDcreature_ccclb3"}, - {Id="palette.entities.creatures.ccclb4", Translation="uiR2EDcreature_ccclb4"}, - {Id="palette.entities.creatures.ccclf4", Translation="uiR2EDcreature_ccclf4"}, - {Id="palette.entities.creatures.ccdfd1", Translation="uiR2EDcreature_ccdfd1"}, - {Id="palette.entities.creatures.ccdfd2", Translation="uiR2EDcreature_ccdfd2"}, - {Id="palette.entities.creatures.ccdfd3", Translation="uiR2EDcreature_ccdfd3"}, - {Id="palette.entities.creatures.ccdfd4", Translation="uiR2EDcreature_ccdfd4"}, - {Id="palette.entities.creatures.ccdfe1", Translation="uiR2EDcreature_ccdfe1"}, - {Id="palette.entities.creatures.ccdfe2", Translation="uiR2EDcreature_ccdfe2"}, - {Id="palette.entities.creatures.ccdfe3", Translation="uiR2EDcreature_ccdfe3"}, - {Id="palette.entities.creatures.ccdfe4", Translation="uiR2EDcreature_ccdfe4"}, - -- {Id="palette.entities.creatures.ccdgb1", Translation="uiR2EDcreature_ccdgb1"}, - -- {Id="palette.entities.creatures.ccdgb2", Translation="uiR2EDcreature_ccdgb2"}, - -- {Id="palette.entities.creatures.ccdgb3", Translation="uiR2EDcreature_ccdgb3"}, - -- {Id="palette.entities.creatures.ccdgb4", Translation="uiR2EDcreature_ccdgb4"}, - -- {Id="palette.entities.creatures.ccdgc1", Translation="uiR2EDcreature_ccdgc1"}, - -- {Id="palette.entities.creatures.ccdgc2", Translation="uiR2EDcreature_ccdgc2"}, - -- {Id="palette.entities.creatures.ccdgc3", Translation="uiR2EDcreature_ccdgc3"}, - -- {Id="palette.entities.creatures.ccdgc4", Translation="uiR2EDcreature_ccdgc4"}, - -- {Id="palette.entities.creatures.ccdgd1", Translation="uiR2EDcreature_ccdgd1"}, - -- {Id="palette.entities.creatures.ccdgd2", Translation="uiR2EDcreature_ccdgd2"}, - -- {Id="palette.entities.creatures.ccdgd3", Translation="uiR2EDcreature_ccdgd3"}, - -- {Id="palette.entities.creatures.ccdgd4", Translation="uiR2EDcreature_ccdgd4"}, - -- {Id="palette.entities.creatures.ccdge1", Translation="uiR2EDcreature_ccdge1"}, - -- {Id="palette.entities.creatures.ccdge2", Translation="uiR2EDcreature_ccdge2"}, - -- {Id="palette.entities.creatures.ccdge3", Translation="uiR2EDcreature_ccdge3"}, - -- {Id="palette.entities.creatures.ccdge4", Translation="uiR2EDcreature_ccdge4"}, - -- {Id="palette.entities.creatures.ccdgf1", Translation="uiR2EDcreature_ccdgf1"}, - -- {Id="palette.entities.creatures.ccdgf2", Translation="uiR2EDcreature_ccdgf2"}, - -- {Id="palette.entities.creatures.ccdgf3", Translation="uiR2EDcreature_ccdgf3"}, - -- {Id="palette.entities.creatures.ccdgf4", Translation="uiR2EDcreature_ccdgf4"}, - {Id="palette.entities.creatures.ccdjc1", Translation="uiR2EDcreature_ccdjc1"}, - {Id="palette.entities.creatures.ccdjc2", Translation="uiR2EDcreature_ccdjc2"}, - {Id="palette.entities.creatures.ccdjc3", Translation="uiR2EDcreature_ccdjc3"}, - {Id="palette.entities.creatures.ccdjc4", Translation="uiR2EDcreature_ccdjc4"}, - {Id="palette.entities.creatures.ccdjd1", Translation="uiR2EDcreature_ccdjd1"}, - {Id="palette.entities.creatures.ccdjd2", Translation="uiR2EDcreature_ccdjd2"}, - {Id="palette.entities.creatures.ccdjd3", Translation="uiR2EDcreature_ccdjd3"}, - {Id="palette.entities.creatures.ccdjd4", Translation="uiR2EDcreature_ccdjd4"}, - {Id="palette.entities.creatures.ccdle1", Translation="uiR2EDcreature_ccdle1"}, - {Id="palette.entities.creatures.ccdle2", Translation="uiR2EDcreature_ccdle2"}, - {Id="palette.entities.creatures.ccdle3", Translation="uiR2EDcreature_ccdle3"}, - {Id="palette.entities.creatures.ccdle4", Translation="uiR2EDcreature_ccdle4"}, - {Id="palette.entities.creatures.ccdlf1", Translation="uiR2EDcreature_ccdlf1"}, - {Id="palette.entities.creatures.ccdlf2", Translation="uiR2EDcreature_ccdlf2"}, - {Id="palette.entities.creatures.ccdlf3", Translation="uiR2EDcreature_ccdlf3"}, - {Id="palette.entities.creatures.ccdlf4", Translation="uiR2EDcreature_ccdlf4"}, - {Id="palette.entities.creatures.ccefa1", Translation="uiR2EDcreature_ccefa1"}, - {Id="palette.entities.creatures.ccefa2", Translation="uiR2EDcreature_ccefa2"}, - {Id="palette.entities.creatures.ccefb1", Translation="uiR2EDcreature_ccefb1"}, - {Id="palette.entities.creatures.ccefb2", Translation="uiR2EDcreature_ccefb2"}, - {Id="palette.entities.creatures.ccefb3", Translation="uiR2EDcreature_ccefb3"}, - {Id="palette.entities.creatures.ccefb4", Translation="uiR2EDcreature_ccefb4"}, - {Id="palette.entities.creatures.cceff4", Translation="uiR2EDcreature_cceff4"}, - -- {Id="palette.entities.creatures.ccegb1", Translation="uiR2EDcreature_ccegb1"}, - -- {Id="palette.entities.creatures.ccegb2", Translation="uiR2EDcreature_ccegb2"}, - -- {Id="palette.entities.creatures.ccegb3", Translation="uiR2EDcreature_ccegb3"}, - -- {Id="palette.entities.creatures.ccegb4", Translation="uiR2EDcreature_ccegb4"}, - -- {Id="palette.entities.creatures.ccegc1", Translation="uiR2EDcreature_ccegc1"}, - -- {Id="palette.entities.creatures.ccegc2", Translation="uiR2EDcreature_ccegc2"}, - -- {Id="palette.entities.creatures.ccegc3", Translation="uiR2EDcreature_ccegc3"}, - -- {Id="palette.entities.creatures.ccegc4", Translation="uiR2EDcreature_ccegc4"}, - -- {Id="palette.entities.creatures.ccegd1", Translation="uiR2EDcreature_ccegd1"}, - -- {Id="palette.entities.creatures.ccegd2", Translation="uiR2EDcreature_ccegd2"}, - -- {Id="palette.entities.creatures.ccegd3", Translation="uiR2EDcreature_ccegd3"}, - -- {Id="palette.entities.creatures.ccegd4", Translation="uiR2EDcreature_ccegd4"}, - -- {Id="palette.entities.creatures.ccege1", Translation="uiR2EDcreature_ccege1"}, - -- {Id="palette.entities.creatures.ccege2", Translation="uiR2EDcreature_ccege2"}, - -- {Id="palette.entities.creatures.ccege3", Translation="uiR2EDcreature_ccege3"}, - -- {Id="palette.entities.creatures.ccege4", Translation="uiR2EDcreature_ccege4"}, - -- {Id="palette.entities.creatures.ccegf1", Translation="uiR2EDcreature_ccegf1"}, - -- {Id="palette.entities.creatures.ccegf2", Translation="uiR2EDcreature_ccegf2"}, - -- {Id="palette.entities.creatures.ccegf3", Translation="uiR2EDcreature_ccegf3"}, - -- {Id="palette.entities.creatures.ccegf4", Translation="uiR2EDcreature_ccegf4"}, - {Id="palette.entities.creatures.cceja1", Translation="uiR2EDcreature_cceja1"}, - {Id="palette.entities.creatures.cceja2", Translation="uiR2EDcreature_cceja2"}, - {Id="palette.entities.creatures.ccejb1", Translation="uiR2EDcreature_ccejb1"}, - {Id="palette.entities.creatures.ccejb2", Translation="uiR2EDcreature_ccejb2"}, - {Id="palette.entities.creatures.ccejb3", Translation="uiR2EDcreature_ccejb3"}, - {Id="palette.entities.creatures.ccejb4", Translation="uiR2EDcreature_ccejb4"}, - {Id="palette.entities.creatures.ccejc1", Translation="uiR2EDcreature_ccejc1"}, - {Id="palette.entities.creatures.ccejc2", Translation="uiR2EDcreature_ccejc2"}, - {Id="palette.entities.creatures.ccejc3", Translation="uiR2EDcreature_ccejc3"}, - {Id="palette.entities.creatures.ccejc4", Translation="uiR2EDcreature_ccejc4"}, - {Id="palette.entities.creatures.ccelc1", Translation="uiR2EDcreature_ccelc1"}, - {Id="palette.entities.creatures.ccelc2", Translation="uiR2EDcreature_ccelc2"}, - {Id="palette.entities.creatures.ccelc3", Translation="uiR2EDcreature_ccelc3"}, - {Id="palette.entities.creatures.ccelc4", Translation="uiR2EDcreature_ccelc4"}, - {Id="palette.entities.creatures.cceld1", Translation="uiR2EDcreature_cceld1"}, - {Id="palette.entities.creatures.cceld2", Translation="uiR2EDcreature_cceld2"}, - {Id="palette.entities.creatures.cceld3", Translation="uiR2EDcreature_cceld3"}, - {Id="palette.entities.creatures.cceld4", Translation="uiR2EDcreature_cceld4"}, - {Id="palette.entities.creatures.ccepf4", Translation="uiR2EDcreature_ccepf4"}, - -- {Id="palette.entities.creatures.ccfgb1", Translation="uiR2EDcreature_ccfgb1"}, - -- {Id="palette.entities.creatures.ccfgb2", Translation="uiR2EDcreature_ccfgb2"}, - -- {Id="palette.entities.creatures.ccfgb3", Translation="uiR2EDcreature_ccfgb3"}, - -- {Id="palette.entities.creatures.ccfgb4", Translation="uiR2EDcreature_ccfgb4"}, - -- {Id="palette.entities.creatures.ccfgc1", Translation="uiR2EDcreature_ccfgc1"}, - -- {Id="palette.entities.creatures.ccfgc2", Translation="uiR2EDcreature_ccfgc2"}, - -- {Id="palette.entities.creatures.ccfgc3", Translation="uiR2EDcreature_ccfgc3"}, - -- {Id="palette.entities.creatures.ccfgc4", Translation="uiR2EDcreature_ccfgc4"}, - -- {Id="palette.entities.creatures.ccfgd1", Translation="uiR2EDcreature_ccfgd1"}, - -- {Id="palette.entities.creatures.ccfgd2", Translation="uiR2EDcreature_ccfgd2"}, - -- {Id="palette.entities.creatures.ccfgd3", Translation="uiR2EDcreature_ccfgd3"}, - -- {Id="palette.entities.creatures.ccfgd4", Translation="uiR2EDcreature_ccfgd4"}, - -- {Id="palette.entities.creatures.ccfge1", Translation="uiR2EDcreature_ccfge1"}, - -- {Id="palette.entities.creatures.ccfge2", Translation="uiR2EDcreature_ccfge2"}, - -- {Id="palette.entities.creatures.ccfge3", Translation="uiR2EDcreature_ccfge3"}, - -- {Id="palette.entities.creatures.ccfge4", Translation="uiR2EDcreature_ccfge4"}, - -- {Id="palette.entities.creatures.ccfgf1", Translation="uiR2EDcreature_ccfgf1"}, - -- {Id="palette.entities.creatures.ccfgf2", Translation="uiR2EDcreature_ccfgf2"}, - -- {Id="palette.entities.creatures.ccfgf3", Translation="uiR2EDcreature_ccfgf3"}, - -- {Id="palette.entities.creatures.ccfgf4", Translation="uiR2EDcreature_ccfgf4"}, - {Id="palette.entities.creatures.ccfjd4", Translation="uiR2EDcreature_ccfjd4"}, - {Id="palette.entities.creatures.ccfje1", Translation="uiR2EDcreature_ccfje1"}, - {Id="palette.entities.creatures.ccfje2", Translation="uiR2EDcreature_ccfje2"}, - {Id="palette.entities.creatures.ccfje3", Translation="uiR2EDcreature_ccfje3"}, - {Id="palette.entities.creatures.ccfje4", Translation="uiR2EDcreature_ccfje4"}, - {Id="palette.entities.creatures.ccfjf1", Translation="uiR2EDcreature_ccfjf1"}, - {Id="palette.entities.creatures.ccfjf2", Translation="uiR2EDcreature_ccfjf2"}, - {Id="palette.entities.creatures.ccfjf3", Translation="uiR2EDcreature_ccfjf3"}, - {Id="palette.entities.creatures.ccfjf4", Translation="uiR2EDcreature_ccfjf4"}, - {Id="palette.entities.creatures.ccflf1", Translation="uiR2EDcreature_ccflf1"}, - {Id="palette.entities.creatures.ccflf2", Translation="uiR2EDcreature_ccflf2"}, - {Id="palette.entities.creatures.ccflf3", Translation="uiR2EDcreature_ccflf3"}, - {Id="palette.entities.creatures.ccflf4", Translation="uiR2EDcreature_ccflf4"}, - {Id="palette.entities.creatures.ccfpe4", Translation="uiR2EDcreature_ccfpe4"}, - -- {Id="palette.entities.creatures.ccggf1", Translation="uiR2EDcreature_ccggf1"}, - -- {Id="palette.entities.creatures.ccggf2", Translation="uiR2EDcreature_ccggf2"}, - -- {Id="palette.entities.creatures.ccggf3", Translation="uiR2EDcreature_ccggf3"}, - -- {Id="palette.entities.creatures.ccggf4", Translation="uiR2EDcreature_ccggf4"}, - {Id="palette.entities.creatures.ccgpf1", Translation="uiR2EDcreature_ccgpf1"}, - {Id="palette.entities.creatures.ccgpf2", Translation="uiR2EDcreature_ccgpf2"}, - {Id="palette.entities.creatures.ccgpf3", Translation="uiR2EDcreature_ccgpf3"}, - {Id="palette.entities.creatures.ccgpf4", Translation="uiR2EDcreature_ccgpf4"}, - {Id="palette.entities.creatures.cchdd1", Translation="uiR2EDcreature_cchdd1"}, - {Id="palette.entities.creatures.cchdd2", Translation="uiR2EDcreature_cchdd2"}, - {Id="palette.entities.creatures.cchdd3", Translation="uiR2EDcreature_cchdd3"}, - {Id="palette.entities.creatures.cchdd4", Translation="uiR2EDcreature_cchdd4"}, - {Id="palette.entities.creatures.cchde1", Translation="uiR2EDcreature_cchde1"}, - {Id="palette.entities.creatures.cchde2", Translation="uiR2EDcreature_cchde2"}, - {Id="palette.entities.creatures.cchde3", Translation="uiR2EDcreature_cchde3"}, - {Id="palette.entities.creatures.cchde4", Translation="uiR2EDcreature_cchde4"}, - -- {Id="palette.entities.creatures.cchgb1", Translation="uiR2EDcreature_cchgb1"}, - -- {Id="palette.entities.creatures.cchgb2", Translation="uiR2EDcreature_cchgb2"}, - -- {Id="palette.entities.creatures.cchgb3", Translation="uiR2EDcreature_cchgb3"}, - -- {Id="palette.entities.creatures.cchgb4", Translation="uiR2EDcreature_cchgb4"}, - -- {Id="palette.entities.creatures.cchgc1", Translation="uiR2EDcreature_cchgc1"}, - -- {Id="palette.entities.creatures.cchgc2", Translation="uiR2EDcreature_cchgc2"}, - -- {Id="palette.entities.creatures.cchgc3", Translation="uiR2EDcreature_cchgc3"}, - -- {Id="palette.entities.creatures.cchgc4", Translation="uiR2EDcreature_cchgc4"}, - -- {Id="palette.entities.creatures.cchgd1", Translation="uiR2EDcreature_cchgd1"}, - -- {Id="palette.entities.creatures.cchgd2", Translation="uiR2EDcreature_cchgd2"}, - -- {Id="palette.entities.creatures.cchgd3", Translation="uiR2EDcreature_cchgd3"}, - -- {Id="palette.entities.creatures.cchgd4", Translation="uiR2EDcreature_cchgd4"}, - -- {Id="palette.entities.creatures.cchge1", Translation="uiR2EDcreature_cchge1"}, - -- {Id="palette.entities.creatures.cchge2", Translation="uiR2EDcreature_cchge2"}, - -- {Id="palette.entities.creatures.cchge3", Translation="uiR2EDcreature_cchge3"}, - -- {Id="palette.entities.creatures.cchge4", Translation="uiR2EDcreature_cchge4"}, - -- {Id="palette.entities.creatures.cchgf1", Translation="uiR2EDcreature_cchgf1"}, - -- {Id="palette.entities.creatures.cchgf2", Translation="uiR2EDcreature_cchgf2"}, - -- {Id="palette.entities.creatures.cchgf3", Translation="uiR2EDcreature_cchgf3"}, - -- {Id="palette.entities.creatures.cchgf4", Translation="uiR2EDcreature_cchgf4"}, - {Id="palette.entities.creatures.cchpe1", Translation="uiR2EDcreature_cchpe1"}, - {Id="palette.entities.creatures.cchpe2", Translation="uiR2EDcreature_cchpe2"}, - {Id="palette.entities.creatures.cchpe3", Translation="uiR2EDcreature_cchpe3"}, - {Id="palette.entities.creatures.cchpe4", Translation="uiR2EDcreature_cchpe4"}, - {Id="palette.entities.creatures.ccidd1", Translation="uiR2EDcreature_ccidd1"}, - {Id="palette.entities.creatures.ccidd2", Translation="uiR2EDcreature_ccidd2"}, - {Id="palette.entities.creatures.ccidd3", Translation="uiR2EDcreature_ccidd3"}, - {Id="palette.entities.creatures.ccidd4", Translation="uiR2EDcreature_ccidd4"}, - {Id="palette.entities.creatures.ccidf1", Translation="uiR2EDcreature_ccidf1"}, - {Id="palette.entities.creatures.ccidf2", Translation="uiR2EDcreature_ccidf2"}, - {Id="palette.entities.creatures.ccidf3", Translation="uiR2EDcreature_ccidf3"}, - {Id="palette.entities.creatures.ccidf4", Translation="uiR2EDcreature_ccidf4"}, - {Id="palette.entities.creatures.ccijf1", Translation="uiR2EDcreature_ccijf1"}, - {Id="palette.entities.creatures.ccijf2", Translation="uiR2EDcreature_ccijf2"}, - {Id="palette.entities.creatures.ccijf3", Translation="uiR2EDcreature_ccijf3"}, - {Id="palette.entities.creatures.ccijf4", Translation="uiR2EDcreature_ccijf4"}, - {Id="palette.entities.creatures.ccild1", Translation="uiR2EDcreature_ccild1"}, - {Id="palette.entities.creatures.ccild2", Translation="uiR2EDcreature_ccild2"}, - {Id="palette.entities.creatures.ccild3", Translation="uiR2EDcreature_ccild3"}, - {Id="palette.entities.creatures.ccild4", Translation="uiR2EDcreature_ccild4"}, - {Id="palette.entities.creatures.ccile1", Translation="uiR2EDcreature_ccile1"}, - {Id="palette.entities.creatures.ccile2", Translation="uiR2EDcreature_ccile2"}, - {Id="palette.entities.creatures.ccile3", Translation="uiR2EDcreature_ccile3"}, - {Id="palette.entities.creatures.ccile4", Translation="uiR2EDcreature_ccile4"}, - {Id="palette.entities.creatures.ccipd1", Translation="uiR2EDcreature_ccipd1"}, - {Id="palette.entities.creatures.ccipd2", Translation="uiR2EDcreature_ccipd2"}, - {Id="palette.entities.creatures.ccipd3", Translation="uiR2EDcreature_ccipd3"}, - {Id="palette.entities.creatures.ccipd4", Translation="uiR2EDcreature_ccipd4"}, - {Id="palette.entities.creatures.ccjfc1", Translation="uiR2EDcreature_ccjfc1"}, - {Id="palette.entities.creatures.ccjfc2", Translation="uiR2EDcreature_ccjfc2"}, - {Id="palette.entities.creatures.ccjfc3", Translation="uiR2EDcreature_ccjfc3"}, - {Id="palette.entities.creatures.ccjfc4", Translation="uiR2EDcreature_ccjfc4"}, - {Id="palette.entities.creatures.ccjfd1", Translation="uiR2EDcreature_ccjfd1"}, - {Id="palette.entities.creatures.ccjfd2", Translation="uiR2EDcreature_ccjfd2"}, - {Id="palette.entities.creatures.ccjfd3", Translation="uiR2EDcreature_ccjfd3"}, - {Id="palette.entities.creatures.ccjfd4", Translation="uiR2EDcreature_ccjfd4"}, - {Id="palette.entities.creatures.ccjja1", Translation="uiR2EDcreature_ccjja1"}, - {Id="palette.entities.creatures.ccjja2", Translation="uiR2EDcreature_ccjja2"}, - {Id="palette.entities.creatures.ccjjb1", Translation="uiR2EDcreature_ccjjb1"}, - {Id="palette.entities.creatures.ccjjb2", Translation="uiR2EDcreature_ccjjb2"}, - {Id="palette.entities.creatures.ccjjb3", Translation="uiR2EDcreature_ccjjb3"}, - {Id="palette.entities.creatures.ccjjb4", Translation="uiR2EDcreature_ccjjb4"}, - {Id="palette.entities.creatures.cckdf1", Translation="uiR2EDcreature_cckdf1"}, - {Id="palette.entities.creatures.cckdf2", Translation="uiR2EDcreature_cckdf2"}, - {Id="palette.entities.creatures.cckdf3", Translation="uiR2EDcreature_cckdf3"}, - {Id="palette.entities.creatures.cckdf4", Translation="uiR2EDcreature_cckdf4"}, - {Id="palette.entities.creatures.cckfe1", Translation="uiR2EDcreature_cckfe1"}, - {Id="palette.entities.creatures.cckfe2", Translation="uiR2EDcreature_cckfe2"}, - {Id="palette.entities.creatures.cckfe3", Translation="uiR2EDcreature_cckfe3"}, - {Id="palette.entities.creatures.cckfe4", Translation="uiR2EDcreature_cckfe4"}, - {Id="palette.entities.creatures.cckff1", Translation="uiR2EDcreature_cckff1"}, - {Id="palette.entities.creatures.cckff2", Translation="uiR2EDcreature_cckff2"}, - {Id="palette.entities.creatures.cckff3", Translation="uiR2EDcreature_cckff3"}, - {Id="palette.entities.creatures.cckff4", Translation="uiR2EDcreature_cckff4"}, - {Id="palette.entities.creatures.cclde1", Translation="uiR2EDcreature_cclde1"}, - {Id="palette.entities.creatures.cclde2", Translation="uiR2EDcreature_cclde2"}, - {Id="palette.entities.creatures.cclde3", Translation="uiR2EDcreature_cclde3"}, - {Id="palette.entities.creatures.cclde4", Translation="uiR2EDcreature_cclde4"}, - {Id="palette.entities.creatures.cclff1", Translation="uiR2EDcreature_cclff1"}, - {Id="palette.entities.creatures.cclff2", Translation="uiR2EDcreature_cclff2"}, - {Id="palette.entities.creatures.cclff3", Translation="uiR2EDcreature_cclff3"}, - {Id="palette.entities.creatures.cclff4", Translation="uiR2EDcreature_cclff4"}, - {Id="palette.entities.creatures.ccmff1", Translation="uiR2EDcreature_ccmff1"}, - {Id="palette.entities.creatures.ccmff2", Translation="uiR2EDcreature_ccmff2"}, - {Id="palette.entities.creatures.ccmff3", Translation="uiR2EDcreature_ccmff3"}, - {Id="palette.entities.creatures.ccmff4", Translation="uiR2EDcreature_ccmff4"}, - -- {Id="palette.entities.creatures.ccmgb1", Translation="uiR2EDcreature_ccmgb1"}, - -- {Id="palette.entities.creatures.ccmgb2", Translation="uiR2EDcreature_ccmgb2"}, - -- {Id="palette.entities.creatures.ccmgb3", Translation="uiR2EDcreature_ccmgb3"}, - -- {Id="palette.entities.creatures.ccmgb4", Translation="uiR2EDcreature_ccmgb4"}, - -- {Id="palette.entities.creatures.ccmgc1", Translation="uiR2EDcreature_ccmgc1"}, - -- {Id="palette.entities.creatures.ccmgc2", Translation="uiR2EDcreature_ccmgc2"}, - -- {Id="palette.entities.creatures.ccmgc3", Translation="uiR2EDcreature_ccmgc3"}, - -- {Id="palette.entities.creatures.ccmgc4", Translation="uiR2EDcreature_ccmgc4"}, - -- {Id="palette.entities.creatures.ccmgd1", Translation="uiR2EDcreature_ccmgd1"}, - -- {Id="palette.entities.creatures.ccmgd2", Translation="uiR2EDcreature_ccmgd2"}, - -- {Id="palette.entities.creatures.ccmgd3", Translation="uiR2EDcreature_ccmgd3"}, - -- {Id="palette.entities.creatures.ccmgd4", Translation="uiR2EDcreature_ccmgd4"}, - -- {Id="palette.entities.creatures.ccmge1", Translation="uiR2EDcreature_ccmge1"}, - -- {Id="palette.entities.creatures.ccmge2", Translation="uiR2EDcreature_ccmge2"}, - -- {Id="palette.entities.creatures.ccmge3", Translation="uiR2EDcreature_ccmge3"}, - -- {Id="palette.entities.creatures.ccmge4", Translation="uiR2EDcreature_ccmge4"}, - -- {Id="palette.entities.creatures.ccmgf1", Translation="uiR2EDcreature_ccmgf1"}, - -- {Id="palette.entities.creatures.ccmgf2", Translation="uiR2EDcreature_ccmgf2"}, - -- {Id="palette.entities.creatures.ccmgf3", Translation="uiR2EDcreature_ccmgf3"}, - -- {Id="palette.entities.creatures.ccmgf4", Translation="uiR2EDcreature_ccmgf4"}, - {Id="palette.entities.creatures.ccmpf1", Translation="uiR2EDcreature_ccmpf1"}, - {Id="palette.entities.creatures.ccmpf2", Translation="uiR2EDcreature_ccmpf2"}, - {Id="palette.entities.creatures.ccmpf3", Translation="uiR2EDcreature_ccmpf3"}, - {Id="palette.entities.creatures.ccmpf4", Translation="uiR2EDcreature_ccmpf4"}, - {Id="palette.entities.creatures.ccnlf1", Translation="uiR2EDcreature_ccnlf1"}, - {Id="palette.entities.creatures.ccnlf2", Translation="uiR2EDcreature_ccnlf2"}, - {Id="palette.entities.creatures.ccnlf3", Translation="uiR2EDcreature_ccnlf3"}, - {Id="palette.entities.creatures.ccnlf4", Translation="uiR2EDcreature_ccnlf4"}, - {Id="palette.entities.creatures.ccnpd1", Translation="uiR2EDcreature_ccnpd1"}, - {Id="palette.entities.creatures.ccnpd2", Translation="uiR2EDcreature_ccnpd2"}, - {Id="palette.entities.creatures.ccnpd3", Translation="uiR2EDcreature_ccnpd3"}, - {Id="palette.entities.creatures.ccnpd4", Translation="uiR2EDcreature_ccnpd4"}, - {Id="palette.entities.creatures.ccodf1", Translation="uiR2EDcreature_ccodf1"}, - {Id="palette.entities.creatures.ccodf2", Translation="uiR2EDcreature_ccodf2"}, - {Id="palette.entities.creatures.ccodf3", Translation="uiR2EDcreature_ccodf3"}, - {Id="palette.entities.creatures.ccodf4", Translation="uiR2EDcreature_ccodf4"}, - {Id="palette.entities.creatures.ccope1", Translation="uiR2EDcreature_ccope1"}, - {Id="palette.entities.creatures.ccope2", Translation="uiR2EDcreature_ccope2"}, - {Id="palette.entities.creatures.ccope3", Translation="uiR2EDcreature_ccope3"}, - {Id="palette.entities.creatures.ccope4", Translation="uiR2EDcreature_ccope4"}, - {Id="palette.entities.creatures.ccopf1", Translation="uiR2EDcreature_ccopf1"}, - {Id="palette.entities.creatures.ccopf2", Translation="uiR2EDcreature_ccopf2"}, - {Id="palette.entities.creatures.ccopf3", Translation="uiR2EDcreature_ccopf3"}, - {Id="palette.entities.creatures.ccopf4", Translation="uiR2EDcreature_ccopf4"}, - {Id="palette.entities.creatures.ccpjf1", Translation="uiR2EDcreature_ccpjf1"}, - {Id="palette.entities.creatures.ccpjf2", Translation="uiR2EDcreature_ccpjf2"}, - {Id="palette.entities.creatures.ccpjf3", Translation="uiR2EDcreature_ccpjf3"}, - {Id="palette.entities.creatures.ccpjf4", Translation="uiR2EDcreature_ccpjf4"} - } - }, - - - -- Plants - creatures_plants= - { - instances = - { - -- {Id="palette.entities.creatures.cpagb1", Translation="uiR2EDcreature_cpagb1"}, - -- {Id="palette.entities.creatures.cpagb2", Translation="uiR2EDcreature_cpagb2"}, - -- {Id="palette.entities.creatures.cpagb3", Translation="uiR2EDcreature_cpagb3"}, - -- {Id="palette.entities.creatures.cpagb4", Translation="uiR2EDcreature_cpagb4"}, - -- {Id="palette.entities.creatures.cpagc1", Translation="uiR2EDcreature_cpagc1"}, - -- {Id="palette.entities.creatures.cpagc2", Translation="uiR2EDcreature_cpagc2"}, - -- {Id="palette.entities.creatures.cpagc3", Translation="uiR2EDcreature_cpagc3"}, - -- {Id="palette.entities.creatures.cpagc4", Translation="uiR2EDcreature_cpagc4"}, - -- {Id="palette.entities.creatures.cpagd1", Translation="uiR2EDcreature_cpagd1"}, - -- {Id="palette.entities.creatures.cpagd2", Translation="uiR2EDcreature_cpagd2"}, - -- {Id="palette.entities.creatures.cpagd3", Translation="uiR2EDcreature_cpagd3"}, - -- {Id="palette.entities.creatures.cpagd4", Translation="uiR2EDcreature_cpagd4"}, - -- {Id="palette.entities.creatures.cpage1", Translation="uiR2EDcreature_cpage1"}, - -- {Id="palette.entities.creatures.cpage2", Translation="uiR2EDcreature_cpage2"}, - -- {Id="palette.entities.creatures.cpage3", Translation="uiR2EDcreature_cpage3"}, - -- {Id="palette.entities.creatures.cpage4", Translation="uiR2EDcreature_cpage4"}, - -- {Id="palette.entities.creatures.cpagf1", Translation="uiR2EDcreature_cpagf1"}, - -- {Id="palette.entities.creatures.cpagf2", Translation="uiR2EDcreature_cpagf2"}, - -- {Id="palette.entities.creatures.cpagf3", Translation="uiR2EDcreature_cpagf3"}, - -- {Id="palette.entities.creatures.cpagf4", Translation="uiR2EDcreature_cpagf4"}, - {Id="palette.entities.creatures.cpapd1", Translation="uiR2EDcreature_cpapd1"}, - {Id="palette.entities.creatures.cpapd2", Translation="uiR2EDcreature_cpapd2"}, - {Id="palette.entities.creatures.cpapd3", Translation="uiR2EDcreature_cpapd3"}, - {Id="palette.entities.creatures.cpapd4", Translation="uiR2EDcreature_cpapd4"}, - {Id="palette.entities.creatures.cpape1", Translation="uiR2EDcreature_cpape1"}, - {Id="palette.entities.creatures.cpape2", Translation="uiR2EDcreature_cpape2"}, - {Id="palette.entities.creatures.cpape3", Translation="uiR2EDcreature_cpape3"}, - {Id="palette.entities.creatures.cpape4", Translation="uiR2EDcreature_cpape4"}, - {Id="palette.entities.creatures.cpapf1", Translation="uiR2EDcreature_cpapf1"}, - {Id="palette.entities.creatures.cpapf2", Translation="uiR2EDcreature_cpapf2"}, - {Id="palette.entities.creatures.cpapf3", Translation="uiR2EDcreature_cpapf3"}, - {Id="palette.entities.creatures.cpapf4", Translation="uiR2EDcreature_cpapf4"}, - -- {Id="palette.entities.creatures.cpbgb1", Translation="uiR2EDcreature_cpbgb1"}, - -- {Id="palette.entities.creatures.cpbgb2", Translation="uiR2EDcreature_cpbgb2"}, - -- {Id="palette.entities.creatures.cpbgb3", Translation="uiR2EDcreature_cpbgb3"}, - -- {Id="palette.entities.creatures.cpbgb4", Translation="uiR2EDcreature_cpbgb4"}, - -- {Id="palette.entities.creatures.cpbgc1", Translation="uiR2EDcreature_cpbgc1"}, - -- {Id="palette.entities.creatures.cpbgc2", Translation="uiR2EDcreature_cpbgc2"}, - -- {Id="palette.entities.creatures.cpbgc3", Translation="uiR2EDcreature_cpbgc3"}, - -- {Id="palette.entities.creatures.cpbgc4", Translation="uiR2EDcreature_cpbgc4"}, - -- {Id="palette.entities.creatures.cpbgd1", Translation="uiR2EDcreature_cpbgd1"}, - -- {Id="palette.entities.creatures.cpbgd2", Translation="uiR2EDcreature_cpbgd2"}, - -- {Id="palette.entities.creatures.cpbgd3", Translation="uiR2EDcreature_cpbgd3"}, - -- {Id="palette.entities.creatures.cpbgd4", Translation="uiR2EDcreature_cpbgd4"}, - -- {Id="palette.entities.creatures.cpbge1", Translation="uiR2EDcreature_cpbge1"}, - -- {Id="palette.entities.creatures.cpbge2", Translation="uiR2EDcreature_cpbge2"}, - -- {Id="palette.entities.creatures.cpbge3", Translation="uiR2EDcreature_cpbge3"}, - -- {Id="palette.entities.creatures.cpbge4", Translation="uiR2EDcreature_cpbge4"}, - -- {Id="palette.entities.creatures.cpbgf1", Translation="uiR2EDcreature_cpbgf1"}, - -- {Id="palette.entities.creatures.cpbgf2", Translation="uiR2EDcreature_cpbgf2"}, - -- {Id="palette.entities.creatures.cpbgf3", Translation="uiR2EDcreature_cpbgf3"}, - -- {Id="palette.entities.creatures.cpbgf4", Translation="uiR2EDcreature_cpbgf4"}, - {Id="palette.entities.creatures.cpblb1", Translation="uiR2EDcreature_cpblb1"}, - {Id="palette.entities.creatures.cpblb2", Translation="uiR2EDcreature_cpblb2"}, - {Id="palette.entities.creatures.cpblb3", Translation="uiR2EDcreature_cpblb3"}, - {Id="palette.entities.creatures.cpblb4", Translation="uiR2EDcreature_cpblb4"}, - {Id="palette.entities.creatures.cpblc1", Translation="uiR2EDcreature_cpblc1"}, - {Id="palette.entities.creatures.cpblc2", Translation="uiR2EDcreature_cpblc2"}, - {Id="palette.entities.creatures.cpblc3", Translation="uiR2EDcreature_cpblc3"}, - {Id="palette.entities.creatures.cpblc4", Translation="uiR2EDcreature_cpblc4"}, - {Id="palette.entities.creatures.cpbld1", Translation="uiR2EDcreature_cpbld1"}, - {Id="palette.entities.creatures.cpbld2", Translation="uiR2EDcreature_cpbld2"}, - {Id="palette.entities.creatures.cpbld3", Translation="uiR2EDcreature_cpbld3"}, - {Id="palette.entities.creatures.cpbld4", Translation="uiR2EDcreature_cpbld4"}, - {Id="palette.entities.creatures.cpblf4", Translation="uiR2EDcreature_cpblf4"}, - {Id="palette.entities.creatures.cpcfb1", Translation="uiR2EDcreature_cpcfb1"}, - {Id="palette.entities.creatures.cpcfb2", Translation="uiR2EDcreature_cpcfb2"}, - {Id="palette.entities.creatures.cpcfb3", Translation="uiR2EDcreature_cpcfb3"}, - {Id="palette.entities.creatures.cpcfb4", Translation="uiR2EDcreature_cpcfb4"}, - {Id="palette.entities.creatures.cpcfc1", Translation="uiR2EDcreature_cpcfc1"}, - {Id="palette.entities.creatures.cpcfc2", Translation="uiR2EDcreature_cpcfc2"}, - {Id="palette.entities.creatures.cpcfc3", Translation="uiR2EDcreature_cpcfc3"}, - {Id="palette.entities.creatures.cpcfc4", Translation="uiR2EDcreature_cpcfc4"}, - -- {Id="palette.entities.creatures.cpcgb1", Translation="uiR2EDcreature_cpcgb1"}, - -- {Id="palette.entities.creatures.cpcgb2", Translation="uiR2EDcreature_cpcgb2"}, - -- {Id="palette.entities.creatures.cpcgb3", Translation="uiR2EDcreature_cpcgb3"}, - -- {Id="palette.entities.creatures.cpcgb4", Translation="uiR2EDcreature_cpcgb4"}, - -- {Id="palette.entities.creatures.cpcgc1", Translation="uiR2EDcreature_cpcgc1"}, - -- {Id="palette.entities.creatures.cpcgc2", Translation="uiR2EDcreature_cpcgc2"}, - -- {Id="palette.entities.creatures.cpcgc3", Translation="uiR2EDcreature_cpcgc3"}, - -- {Id="palette.entities.creatures.cpcgc4", Translation="uiR2EDcreature_cpcgc4"}, - -- {Id="palette.entities.creatures.cpcgd1", Translation="uiR2EDcreature_cpcgd1"}, - -- {Id="palette.entities.creatures.cpcgd2", Translation="uiR2EDcreature_cpcgd2"}, - -- {Id="palette.entities.creatures.cpcgd3", Translation="uiR2EDcreature_cpcgd3"}, - -- {Id="palette.entities.creatures.cpcgd4", Translation="uiR2EDcreature_cpcgd4"}, - -- {Id="palette.entities.creatures.cpcge1", Translation="uiR2EDcreature_cpcge1"}, - -- {Id="palette.entities.creatures.cpcge2", Translation="uiR2EDcreature_cpcge2"}, - -- {Id="palette.entities.creatures.cpcge3", Translation="uiR2EDcreature_cpcge3"}, - -- {Id="palette.entities.creatures.cpcge4", Translation="uiR2EDcreature_cpcge4"}, - -- {Id="palette.entities.creatures.cpcgf1", Translation="uiR2EDcreature_cpcgf1"}, - -- {Id="palette.entities.creatures.cpcgf2", Translation="uiR2EDcreature_cpcgf2"}, - -- {Id="palette.entities.creatures.cpcgf3", Translation="uiR2EDcreature_cpcgf3"}, - -- {Id="palette.entities.creatures.cpcgf4", Translation="uiR2EDcreature_cpcgf4"}, - {Id="palette.entities.creatures.cpcjd1", Translation="uiR2EDcreature_cpcjd1"}, - {Id="palette.entities.creatures.cpcjd2", Translation="uiR2EDcreature_cpcjd2"}, - {Id="palette.entities.creatures.cpcjd3", Translation="uiR2EDcreature_cpcjd3"}, - {Id="palette.entities.creatures.cpcjd4", Translation="uiR2EDcreature_cpcjd4"}, - {Id="palette.entities.creatures.cpcje1", Translation="uiR2EDcreature_cpcje1"}, - {Id="palette.entities.creatures.cpcje2", Translation="uiR2EDcreature_cpcje2"}, - {Id="palette.entities.creatures.cpcje3", Translation="uiR2EDcreature_cpcje3"}, - {Id="palette.entities.creatures.cpcje4", Translation="uiR2EDcreature_cpcje4"}, - {Id="palette.entities.creatures.cpcpf4", Translation="uiR2EDcreature_cpcpf4"}, - {Id="palette.entities.creatures.cpdfe1", Translation="uiR2EDcreature_cpdfe1"}, - {Id="palette.entities.creatures.cpdfe2", Translation="uiR2EDcreature_cpdfe2"}, - {Id="palette.entities.creatures.cpdfe3", Translation="uiR2EDcreature_cpdfe3"}, - {Id="palette.entities.creatures.cpdfe4", Translation="uiR2EDcreature_cpdfe4"}, - {Id="palette.entities.creatures.cpdff1", Translation="uiR2EDcreature_cpdff1"}, - {Id="palette.entities.creatures.cpdff2", Translation="uiR2EDcreature_cpdff2"}, - {Id="palette.entities.creatures.cpdff3", Translation="uiR2EDcreature_cpdff3"}, - {Id="palette.entities.creatures.cpdff4", Translation="uiR2EDcreature_cpdff4"}, - -- {Id="palette.entities.creatures.cpdgb1", Translation="uiR2EDcreature_cpdgb1"}, - -- {Id="palette.entities.creatures.cpdgb2", Translation="uiR2EDcreature_cpdgb2"}, - -- {Id="palette.entities.creatures.cpdgb3", Translation="uiR2EDcreature_cpdgb3"}, - -- {Id="palette.entities.creatures.cpdgb4", Translation="uiR2EDcreature_cpdgb4"}, - -- {Id="palette.entities.creatures.cpdgc1", Translation="uiR2EDcreature_cpdgc1"}, - -- {Id="palette.entities.creatures.cpdgc2", Translation="uiR2EDcreature_cpdgc2"}, - -- {Id="palette.entities.creatures.cpdgc3", Translation="uiR2EDcreature_cpdgc3"}, - -- {Id="palette.entities.creatures.cpdgc4", Translation="uiR2EDcreature_cpdgc4"}, - -- {Id="palette.entities.creatures.cpdgd1", Translation="uiR2EDcreature_cpdgd1"}, - -- {Id="palette.entities.creatures.cpdgd2", Translation="uiR2EDcreature_cpdgd2"}, - -- {Id="palette.entities.creatures.cpdgd3", Translation="uiR2EDcreature_cpdgd3"}, - -- {Id="palette.entities.creatures.cpdgd4", Translation="uiR2EDcreature_cpdgd4"}, - -- {Id="palette.entities.creatures.cpdge1", Translation="uiR2EDcreature_cpdge1"}, - -- {Id="palette.entities.creatures.cpdge2", Translation="uiR2EDcreature_cpdge2"}, - -- {Id="palette.entities.creatures.cpdge3", Translation="uiR2EDcreature_cpdge3"}, - -- {Id="palette.entities.creatures.cpdge4", Translation="uiR2EDcreature_cpdge4"}, - -- {Id="palette.entities.creatures.cpdgf1", Translation="uiR2EDcreature_cpdgf1"}, - -- {Id="palette.entities.creatures.cpdgf2", Translation="uiR2EDcreature_cpdgf2"}, - -- {Id="palette.entities.creatures.cpdgf3", Translation="uiR2EDcreature_cpdgf3"}, - -- {Id="palette.entities.creatures.cpdgf4", Translation="uiR2EDcreature_cpdgf4"}, - {Id="palette.entities.creatures.cpdjb1", Translation="uiR2EDcreature_cpdjb1"}, - {Id="palette.entities.creatures.cpdjb2", Translation="uiR2EDcreature_cpdjb2"}, - {Id="palette.entities.creatures.cpdjb3", Translation="uiR2EDcreature_cpdjb3"}, - {Id="palette.entities.creatures.cpdjb4", Translation="uiR2EDcreature_cpdjb4"}, - {Id="palette.entities.creatures.cpdjc1", Translation="uiR2EDcreature_cpdjc1"}, - {Id="palette.entities.creatures.cpdjc2", Translation="uiR2EDcreature_cpdjc2"}, - {Id="palette.entities.creatures.cpdjc3", Translation="uiR2EDcreature_cpdjc3"}, - {Id="palette.entities.creatures.cpdjc4", Translation="uiR2EDcreature_cpdjc4"}, - {Id="palette.entities.creatures.cpdje4", Translation="uiR2EDcreature_cpdje4"}, - {Id="palette.entities.creatures.cpefd1", Translation="uiR2EDcreature_cpefd1"}, - {Id="palette.entities.creatures.cpefd2", Translation="uiR2EDcreature_cpefd2"}, - {Id="palette.entities.creatures.cpefd3", Translation="uiR2EDcreature_cpefd3"}, - {Id="palette.entities.creatures.cpefd4", Translation="uiR2EDcreature_cpefd4"}, - {Id="palette.entities.creatures.cpefe1", Translation="uiR2EDcreature_cpefe1"}, - {Id="palette.entities.creatures.cpefe2", Translation="uiR2EDcreature_cpefe2"}, - {Id="palette.entities.creatures.cpefe3", Translation="uiR2EDcreature_cpefe3"}, - {Id="palette.entities.creatures.cpefe4", Translation="uiR2EDcreature_cpefe4"}, - -- {Id="palette.entities.creatures.cpegb1", Translation="uiR2EDcreature_cpegb1"}, - -- {Id="palette.entities.creatures.cpegb2", Translation="uiR2EDcreature_cpegb2"}, - -- {Id="palette.entities.creatures.cpegb3", Translation="uiR2EDcreature_cpegb3"}, - -- {Id="palette.entities.creatures.cpegb4", Translation="uiR2EDcreature_cpegb4"}, - -- {Id="palette.entities.creatures.cpegc1", Translation="uiR2EDcreature_cpegc1"}, - -- {Id="palette.entities.creatures.cpegc2", Translation="uiR2EDcreature_cpegc2"}, - -- {Id="palette.entities.creatures.cpegc3", Translation="uiR2EDcreature_cpegc3"}, - -- {Id="palette.entities.creatures.cpegc4", Translation="uiR2EDcreature_cpegc4"}, - -- {Id="palette.entities.creatures.cpegd1", Translation="uiR2EDcreature_cpegd1"}, - -- {Id="palette.entities.creatures.cpegd2", Translation="uiR2EDcreature_cpegd2"}, - -- {Id="palette.entities.creatures.cpegd3", Translation="uiR2EDcreature_cpegd3"}, - -- {Id="palette.entities.creatures.cpegd4", Translation="uiR2EDcreature_cpegd4"}, - -- {Id="palette.entities.creatures.cpege1", Translation="uiR2EDcreature_cpege1"}, - -- {Id="palette.entities.creatures.cpege2", Translation="uiR2EDcreature_cpege2"}, - -- {Id="palette.entities.creatures.cpege3", Translation="uiR2EDcreature_cpege3"}, - -- {Id="palette.entities.creatures.cpege4", Translation="uiR2EDcreature_cpege4"}, - -- {Id="palette.entities.creatures.cpegf1", Translation="uiR2EDcreature_cpegf1"}, - -- {Id="palette.entities.creatures.cpegf2", Translation="uiR2EDcreature_cpegf2"}, - -- {Id="palette.entities.creatures.cpegf3", Translation="uiR2EDcreature_cpegf3"}, - -- {Id="palette.entities.creatures.cpegf4", Translation="uiR2EDcreature_cpegf4"}, - {Id="palette.entities.creatures.cpejf1", Translation="uiR2EDcreature_cpejf1"}, - {Id="palette.entities.creatures.cpejf2", Translation="uiR2EDcreature_cpejf2"}, - {Id="palette.entities.creatures.cpejf3", Translation="uiR2EDcreature_cpejf3"}, - {Id="palette.entities.creatures.cpejf4", Translation="uiR2EDcreature_cpejf4"}, - {Id="palette.entities.creatures.cpfdb1", Translation="uiR2EDcreature_cpfdb1"}, - {Id="palette.entities.creatures.cpfdb2", Translation="uiR2EDcreature_cpfdb2"}, - {Id="palette.entities.creatures.cpfdb3", Translation="uiR2EDcreature_cpfdb3"}, - {Id="palette.entities.creatures.cpfdb4", Translation="uiR2EDcreature_cpfdb4"}, - {Id="palette.entities.creatures.cpfdc1", Translation="uiR2EDcreature_cpfdc1"}, - {Id="palette.entities.creatures.cpfdc2", Translation="uiR2EDcreature_cpfdc2"}, - {Id="palette.entities.creatures.cpfdc3", Translation="uiR2EDcreature_cpfdc3"}, - {Id="palette.entities.creatures.cpfdc4", Translation="uiR2EDcreature_cpfdc4"}, - {Id="palette.entities.creatures.cpfdd1", Translation="uiR2EDcreature_cpfdd1"}, - {Id="palette.entities.creatures.cpfdd2", Translation="uiR2EDcreature_cpfdd2"}, - {Id="palette.entities.creatures.cpfdd3", Translation="uiR2EDcreature_cpfdd3"}, - {Id="palette.entities.creatures.cpfdd4", Translation="uiR2EDcreature_cpfdd4"}, - {Id="palette.entities.creatures.cpfdf4", Translation="uiR2EDcreature_cpfdf4"}, - -- {Id="palette.entities.creatures.cpfgb1", Translation="uiR2EDcreature_cpfgb1"}, - -- {Id="palette.entities.creatures.cpfgb2", Translation="uiR2EDcreature_cpfgb2"}, - -- {Id="palette.entities.creatures.cpfgb3", Translation="uiR2EDcreature_cpfgb3"}, - -- {Id="palette.entities.creatures.cpfgb4", Translation="uiR2EDcreature_cpfgb4"}, - -- {Id="palette.entities.creatures.cpfgc1", Translation="uiR2EDcreature_cpfgc1"}, - -- {Id="palette.entities.creatures.cpfgc2", Translation="uiR2EDcreature_cpfgc2"}, - -- {Id="palette.entities.creatures.cpfgc3", Translation="uiR2EDcreature_cpfgc3"}, - -- {Id="palette.entities.creatures.cpfgc4", Translation="uiR2EDcreature_cpfgc4"}, - -- {Id="palette.entities.creatures.cpfgd1", Translation="uiR2EDcreature_cpfgd1"}, - -- {Id="palette.entities.creatures.cpfgd2", Translation="uiR2EDcreature_cpfgd2"}, - -- {Id="palette.entities.creatures.cpfgd3", Translation="uiR2EDcreature_cpfgd3"}, - -- {Id="palette.entities.creatures.cpfgd4", Translation="uiR2EDcreature_cpfgd4"}, - -- {Id="palette.entities.creatures.cpfge1", Translation="uiR2EDcreature_cpfge1"}, - -- {Id="palette.entities.creatures.cpfge2", Translation="uiR2EDcreature_cpfge2"}, - -- {Id="palette.entities.creatures.cpfge3", Translation="uiR2EDcreature_cpfge3"}, - -- {Id="palette.entities.creatures.cpfge4", Translation="uiR2EDcreature_cpfge4"}, - -- {Id="palette.entities.creatures.cpfgf1", Translation="uiR2EDcreature_cpfgf1"}, - -- {Id="palette.entities.creatures.cpfgf2", Translation="uiR2EDcreature_cpfgf2"}, - -- {Id="palette.entities.creatures.cpfgf3", Translation="uiR2EDcreature_cpfgf3"}, - -- {Id="palette.entities.creatures.cpfgf4", Translation="uiR2EDcreature_cpfgf4"} - } - }, - - - -- Degens (primitive tribes) - creatures_degens = - { - instances = - { - -- {Id="palette.entities.creatures.cdagb1", Translation="uiR2EDcreature_cdagb1"}, - -- {Id="palette.entities.creatures.cdagb2", Translation="uiR2EDcreature_cdagb2"}, - -- {Id="palette.entities.creatures.cdagb3", Translation="uiR2EDcreature_cdagb3"}, - -- {Id="palette.entities.creatures.cdagb4", Translation="uiR2EDcreature_cdagb4"}, - -- {Id="palette.entities.creatures.cdagc1", Translation="uiR2EDcreature_cdagc1"}, - - -- {Id="palette.entities.creatures.cdagc2", Translation="uiR2EDcreature_cdagc2"}, - -- {Id="palette.entities.creatures.cdagc3", Translation="uiR2EDcreature_cdagc3"}, - -- {Id="palette.entities.creatures.cdagc4", Translation="uiR2EDcreature_cdagc4"}, - -- {Id="palette.entities.creatures.cdagd1", Translation="uiR2EDcreature_cdagd1"}, - -- {Id="palette.entities.creatures.cdagd2", Translation="uiR2EDcreature_cdagd2"}, - -- {Id="palette.entities.creatures.cdagd3", Translation="uiR2EDcreature_cdagd3"}, - -- {Id="palette.entities.creatures.cdagd4", Translation="uiR2EDcreature_cdagd4"}, - -- {Id="palette.entities.creatures.cdage1", Translation="uiR2EDcreature_cdage1"}, - -- {Id="palette.entities.creatures.cdage2", Translation="uiR2EDcreature_cdage2"}, - -- {Id="palette.entities.creatures.cdage3", Translation="uiR2EDcreature_cdage3"}, - -- {Id="palette.entities.creatures.cdage4", Translation="uiR2EDcreature_cdage4"}, - -- {Id="palette.entities.creatures.cdagf1", Translation="uiR2EDcreature_cdagf1"}, - -- {Id="palette.entities.creatures.cdagf2", Translation="uiR2EDcreature_cdagf2"}, - -- {Id="palette.entities.creatures.cdagf3", Translation="uiR2EDcreature_cdagf3"}, - -- {Id="palette.entities.creatures.cdagf4", Translation="uiR2EDcreature_cdagf4"}, - {Id="palette.entities.creatures.cdald1", Translation="uiR2EDcreature_cdald1"}, - {Id="palette.entities.creatures.cdald2", Translation="uiR2EDcreature_cdald2"}, - {Id="palette.entities.creatures.cdald3", Translation="uiR2EDcreature_cdald3"}, - {Id="palette.entities.creatures.cdald4", Translation="uiR2EDcreature_cdald4"}, - {Id="palette.entities.creatures.cdale1", Translation="uiR2EDcreature_cdale1"}, - {Id="palette.entities.creatures.cdale2", Translation="uiR2EDcreature_cdale2"}, - {Id="palette.entities.creatures.cdale3", Translation="uiR2EDcreature_cdale3"}, - {Id="palette.entities.creatures.cdale4", Translation="uiR2EDcreature_cdale4"}, - {Id="palette.entities.creatures.cdapd1", Translation="uiR2EDcreature_cdapd1"}, - {Id="palette.entities.creatures.cdapd2", Translation="uiR2EDcreature_cdapd2"}, - {Id="palette.entities.creatures.cdapd3", Translation="uiR2EDcreature_cdapd3"}, - {Id="palette.entities.creatures.cdapd4", Translation="uiR2EDcreature_cdapd4"}, - {Id="palette.entities.creatures.cdape1", Translation="uiR2EDcreature_cdape1"}, - {Id="palette.entities.creatures.cdape2", Translation="uiR2EDcreature_cdape2"}, - {Id="palette.entities.creatures.cdape3", Translation="uiR2EDcreature_cdape3"}, - {Id="palette.entities.creatures.cdape4", Translation="uiR2EDcreature_cdape4"}, - {Id="palette.entities.creatures.cdbfd1", Translation="uiR2EDcreature_cdbfd1"}, - {Id="palette.entities.creatures.cdbfd2", Translation="uiR2EDcreature_cdbfd2"}, - {Id="palette.entities.creatures.cdbfd3", Translation="uiR2EDcreature_cdbfd3"}, - {Id="palette.entities.creatures.cdbfd4", Translation="uiR2EDcreature_cdbfd4"}, - {Id="palette.entities.creatures.cdbfe1", Translation="uiR2EDcreature_cdbfe1"}, - {Id="palette.entities.creatures.cdbfe2", Translation="uiR2EDcreature_cdbfe2"}, - {Id="palette.entities.creatures.cdbfe3", Translation="uiR2EDcreature_cdbfe3"}, - {Id="palette.entities.creatures.cdbfe4", Translation="uiR2EDcreature_cdbfe4"}, - -- {Id="palette.entities.creatures.cdbgb1", Translation="uiR2EDcreature_cdbgb1"}, - -- {Id="palette.entities.creatures.cdbgb2", Translation="uiR2EDcreature_cdbgb2"}, - -- {Id="palette.entities.creatures.cdbgb3", Translation="uiR2EDcreature_cdbgb3"}, - -- {Id="palette.entities.creatures.cdbgb4", Translation="uiR2EDcreature_cdbgb4"}, - -- {Id="palette.entities.creatures.cdbgc1", Translation="uiR2EDcreature_cdbgc1"}, - -- {Id="palette.entities.creatures.cdbgc2", Translation="uiR2EDcreature_cdbgc2"}, - -- {Id="palette.entities.creatures.cdbgc3", Translation="uiR2EDcreature_cdbgc3"}, - -- {Id="palette.entities.creatures.cdbgc4", Translation="uiR2EDcreature_cdbgc4"}, - -- {Id="palette.entities.creatures.cdbgd1", Translation="uiR2EDcreature_cdbgd1"}, - -- {Id="palette.entities.creatures.cdbgd2", Translation="uiR2EDcreature_cdbgd2"}, - -- {Id="palette.entities.creatures.cdbgd3", Translation="uiR2EDcreature_cdbgd3"}, - -- {Id="palette.entities.creatures.cdbgd4", Translation="uiR2EDcreature_cdbgd4"}, - -- {Id="palette.entities.creatures.cdbge1", Translation="uiR2EDcreature_cdbge1"}, - -- {Id="palette.entities.creatures.cdbge2", Translation="uiR2EDcreature_cdbge2"}, - -- {Id="palette.entities.creatures.cdbge3", Translation="uiR2EDcreature_cdbge3"}, - -- {Id="palette.entities.creatures.cdbge4", Translation="uiR2EDcreature_cdbge4"}, - -- {Id="palette.entities.creatures.cdbgf1", Translation="uiR2EDcreature_cdbgf1"}, - -- {Id="palette.entities.creatures.cdbgf2", Translation="uiR2EDcreature_cdbgf2"}, - -- {Id="palette.entities.creatures.cdbgf3", Translation="uiR2EDcreature_cdbgf3"}, - -- {Id="palette.entities.creatures.cdbgf4", Translation="uiR2EDcreature_cdbgf4"}, - {Id="palette.entities.creatures.cdbjd1", Translation="uiR2EDcreature_cdbjd1"}, - {Id="palette.entities.creatures.cdbjd2", Translation="uiR2EDcreature_cdbjd2"}, - {Id="palette.entities.creatures.cdbjd3", Translation="uiR2EDcreature_cdbjd3"}, - {Id="palette.entities.creatures.cdbjd4", Translation="uiR2EDcreature_cdbjd4"}, - {Id="palette.entities.creatures.cdbje1", Translation="uiR2EDcreature_cdbje1"}, - {Id="palette.entities.creatures.cdbje2", Translation="uiR2EDcreature_cdbje2"}, - {Id="palette.entities.creatures.cdbje3", Translation="uiR2EDcreature_cdbje3"}, - {Id="palette.entities.creatures.cdbje4", Translation="uiR2EDcreature_cdbje4"}, - {Id="palette.entities.creatures.cdcdd1", Translation="uiR2EDcreature_cdcdd1"}, - {Id="palette.entities.creatures.cdcdd2", Translation="uiR2EDcreature_cdcdd2"}, - {Id="palette.entities.creatures.cdcdd3", Translation="uiR2EDcreature_cdcdd3"}, - {Id="palette.entities.creatures.cdcdd4", Translation="uiR2EDcreature_cdcdd4"}, - {Id="palette.entities.creatures.cdcde1", Translation="uiR2EDcreature_cdcde1"}, - {Id="palette.entities.creatures.cdcde2", Translation="uiR2EDcreature_cdcde2"}, - {Id="palette.entities.creatures.cdcde3", Translation="uiR2EDcreature_cdcde3"}, - {Id="palette.entities.creatures.cdcde4", Translation="uiR2EDcreature_cdcde4"}, - -- {Id="palette.entities.creatures.cdcgb1", Translation="uiR2EDcreature_cdcgb1"}, - -- {Id="palette.entities.creatures.cdcgb2", Translation="uiR2EDcreature_cdcgb2"}, - -- {Id="palette.entities.creatures.cdcgb3", Translation="uiR2EDcreature_cdcgb3"}, - -- {Id="palette.entities.creatures.cdcgb4", Translation="uiR2EDcreature_cdcgb4"}, - -- {Id="palette.entities.creatures.cdcgc1", Translation="uiR2EDcreature_cdcgc1"}, - -- {Id="palette.entities.creatures.cdcgc2", Translation="uiR2EDcreature_cdcgc2"}, - -- {Id="palette.entities.creatures.cdcgc3", Translation="uiR2EDcreature_cdcgc3"}, - -- {Id="palette.entities.creatures.cdcgc4", Translation="uiR2EDcreature_cdcgc4"}, - -- {Id="palette.entities.creatures.cdcgd1", Translation="uiR2EDcreature_cdcgd1"}, - -- {Id="palette.entities.creatures.cdcgd2", Translation="uiR2EDcreature_cdcgd2"}, - -- {Id="palette.entities.creatures.cdcgd3", Translation="uiR2EDcreature_cdcgd3"}, - -- {Id="palette.entities.creatures.cdcgd4", Translation="uiR2EDcreature_cdcgd4"}, - -- {Id="palette.entities.creatures.cdcge1", Translation="uiR2EDcreature_cdcge1"}, - -- {Id="palette.entities.creatures.cdcge2", Translation="uiR2EDcreature_cdcge2"}, - -- {Id="palette.entities.creatures.cdcge3", Translation="uiR2EDcreature_cdcge3"}, - -- {Id="palette.entities.creatures.cdcge4", Translation="uiR2EDcreature_cdcge4"}, - -- {Id="palette.entities.creatures.cdcgf1", Translation="uiR2EDcreature_cdcgf1"}, - -- {Id="palette.entities.creatures.cdcgf2", Translation="uiR2EDcreature_cdcgf2"}, - -- {Id="palette.entities.creatures.cdcgf3", Translation="uiR2EDcreature_cdcgf3"}, - -- {Id="palette.entities.creatures.cdcgf4", Translation="uiR2EDcreature_cdcgf4"} - } - }, - - - -- Kitins - creatures_kitins_passive= - { - instances = - { - {Id="palette.entities.creatures.ckhda1", Translation="uiR2EDcreature_ckhda1"}, - {Id="palette.entities.creatures.ckhdb1", Translation="uiR2EDcreature_ckhdb1"}, - {Id="palette.entities.creatures.ckhdb2", Translation="uiR2EDcreature_ckhdb2"}, - {Id="palette.entities.creatures.ckhdb3", Translation="uiR2EDcreature_ckhdb3"}, - {Id="palette.entities.creatures.ckhdb4", Translation="uiR2EDcreature_ckhdb4"}, - {Id="palette.entities.creatures.ckhdc1", Translation="uiR2EDcreature_ckhdc1"}, - {Id="palette.entities.creatures.ckhdc2", Translation="uiR2EDcreature_ckhdc2"}, - {Id="palette.entities.creatures.ckhdc3", Translation="uiR2EDcreature_ckhdc3"}, - {Id="palette.entities.creatures.ckhdc4", Translation="uiR2EDcreature_ckhdc4"}, - {Id="palette.entities.creatures.ckhdd1", Translation="uiR2EDcreature_ckhdd1"}, - {Id="palette.entities.creatures.ckhdd2", Translation="uiR2EDcreature_ckhdd2"}, - {Id="palette.entities.creatures.ckhdd3", Translation="uiR2EDcreature_ckhdd3"}, - {Id="palette.entities.creatures.ckhdd4", Translation="uiR2EDcreature_ckhdd4"}, - {Id="palette.entities.creatures.ckhde1", Translation="uiR2EDcreature_ckhde1"}, - {Id="palette.entities.creatures.ckhde2", Translation="uiR2EDcreature_ckhde2"}, - {Id="palette.entities.creatures.ckhde3", Translation="uiR2EDcreature_ckhde3"}, - {Id="palette.entities.creatures.ckhde4", Translation="uiR2EDcreature_ckhde4"}, - {Id="palette.entities.creatures.ckhdf1", Translation="uiR2EDcreature_ckhdf1"}, - {Id="palette.entities.creatures.ckhdf2", Translation="uiR2EDcreature_ckhdf2"}, - {Id="palette.entities.creatures.ckhdf3", Translation="uiR2EDcreature_ckhdf3"}, - {Id="palette.entities.creatures.ckhdf4", Translation="uiR2EDcreature_ckhdf4"}, - {Id="palette.entities.creatures.ckhfa1", Translation="uiR2EDcreature_ckhfa1"}, - {Id="palette.entities.creatures.ckhfb1", Translation="uiR2EDcreature_ckhfb1"}, - {Id="palette.entities.creatures.ckhfb2", Translation="uiR2EDcreature_ckhfb2"}, - {Id="palette.entities.creatures.ckhfb3", Translation="uiR2EDcreature_ckhfb3"}, - {Id="palette.entities.creatures.ckhfb4", Translation="uiR2EDcreature_ckhfb4"}, - {Id="palette.entities.creatures.ckhfc1", Translation="uiR2EDcreature_ckhfc1"}, - {Id="palette.entities.creatures.ckhfc2", Translation="uiR2EDcreature_ckhfc2"}, - {Id="palette.entities.creatures.ckhfc3", Translation="uiR2EDcreature_ckhfc3"}, - {Id="palette.entities.creatures.ckhfc4", Translation="uiR2EDcreature_ckhfc4"}, - {Id="palette.entities.creatures.ckhfd1", Translation="uiR2EDcreature_ckhfd1"}, - {Id="palette.entities.creatures.ckhfd2", Translation="uiR2EDcreature_ckhfd2"}, - {Id="palette.entities.creatures.ckhfd3", Translation="uiR2EDcreature_ckhfd3"}, - {Id="palette.entities.creatures.ckhfd4", Translation="uiR2EDcreature_ckhfd4"}, - {Id="palette.entities.creatures.ckhfe1", Translation="uiR2EDcreature_ckhfe1"}, - {Id="palette.entities.creatures.ckhfe2", Translation="uiR2EDcreature_ckhfe2"}, - {Id="palette.entities.creatures.ckhfe3", Translation="uiR2EDcreature_ckhfe3"}, - {Id="palette.entities.creatures.ckhfe4", Translation="uiR2EDcreature_ckhfe4"}, - {Id="palette.entities.creatures.ckhff1", Translation="uiR2EDcreature_ckhff1"}, - {Id="palette.entities.creatures.ckhff2", Translation="uiR2EDcreature_ckhff2"}, - {Id="palette.entities.creatures.ckhff3", Translation="uiR2EDcreature_ckhff3"}, - {Id="palette.entities.creatures.ckhff4", Translation="uiR2EDcreature_ckhff4"}, - {Id="palette.entities.creatures.ckhja1", Translation="uiR2EDcreature_ckhja1"}, - {Id="palette.entities.creatures.ckhjb1", Translation="uiR2EDcreature_ckhjb1"}, - {Id="palette.entities.creatures.ckhjb2", Translation="uiR2EDcreature_ckhjb2"}, - {Id="palette.entities.creatures.ckhjb3", Translation="uiR2EDcreature_ckhjb3"}, - {Id="palette.entities.creatures.ckhjb4", Translation="uiR2EDcreature_ckhjb4"}, - {Id="palette.entities.creatures.ckhjc1", Translation="uiR2EDcreature_ckhjc1"}, - {Id="palette.entities.creatures.ckhjc2", Translation="uiR2EDcreature_ckhjc2"}, - {Id="palette.entities.creatures.ckhjc3", Translation="uiR2EDcreature_ckhjc3"}, - {Id="palette.entities.creatures.ckhjc4", Translation="uiR2EDcreature_ckhjc4"}, - {Id="palette.entities.creatures.ckhjd1", Translation="uiR2EDcreature_ckhjd1"}, - {Id="palette.entities.creatures.ckhjd2", Translation="uiR2EDcreature_ckhjd2"}, - {Id="palette.entities.creatures.ckhjd3", Translation="uiR2EDcreature_ckhjd3"}, - {Id="palette.entities.creatures.ckhjd4", Translation="uiR2EDcreature_ckhjd4"}, - {Id="palette.entities.creatures.ckhje1", Translation="uiR2EDcreature_ckhje1"}, - {Id="palette.entities.creatures.ckhje2", Translation="uiR2EDcreature_ckhje2"}, - {Id="palette.entities.creatures.ckhje3", Translation="uiR2EDcreature_ckhje3"}, - {Id="palette.entities.creatures.ckhje4", Translation="uiR2EDcreature_ckhje4"}, - {Id="palette.entities.creatures.ckhjf1", Translation="uiR2EDcreature_ckhjf1"}, - {Id="palette.entities.creatures.ckhjf2", Translation="uiR2EDcreature_ckhjf2"}, - {Id="palette.entities.creatures.ckhjf3", Translation="uiR2EDcreature_ckhjf3"}, - {Id="palette.entities.creatures.ckhjf4", Translation="uiR2EDcreature_ckhjf4"}, - {Id="palette.entities.creatures.ckhla1", Translation="uiR2EDcreature_ckhla1"}, - {Id="palette.entities.creatures.ckhlb1", Translation="uiR2EDcreature_ckhlb1"}, - {Id="palette.entities.creatures.ckhlb2", Translation="uiR2EDcreature_ckhlb2"}, - {Id="palette.entities.creatures.ckhlb3", Translation="uiR2EDcreature_ckhlb3"}, - {Id="palette.entities.creatures.ckhlb4", Translation="uiR2EDcreature_ckhlb4"}, - {Id="palette.entities.creatures.ckhlc1", Translation="uiR2EDcreature_ckhlc1"}, - {Id="palette.entities.creatures.ckhlc2", Translation="uiR2EDcreature_ckhlc2"}, - {Id="palette.entities.creatures.ckhlc3", Translation="uiR2EDcreature_ckhlc3"}, - {Id="palette.entities.creatures.ckhlc4", Translation="uiR2EDcreature_ckhlc4"}, - {Id="palette.entities.creatures.ckhld1", Translation="uiR2EDcreature_ckhld1"}, - {Id="palette.entities.creatures.ckhld2", Translation="uiR2EDcreature_ckhld2"}, - {Id="palette.entities.creatures.ckhld3", Translation="uiR2EDcreature_ckhld3"}, - {Id="palette.entities.creatures.ckhld4", Translation="uiR2EDcreature_ckhld4"}, - {Id="palette.entities.creatures.ckhle1", Translation="uiR2EDcreature_ckhle1"}, - {Id="palette.entities.creatures.ckhle2", Translation="uiR2EDcreature_ckhle2"}, - {Id="palette.entities.creatures.ckhle3", Translation="uiR2EDcreature_ckhle3"}, - {Id="palette.entities.creatures.ckhle4", Translation="uiR2EDcreature_ckhle4"}, - {Id="palette.entities.creatures.ckhlf1", Translation="uiR2EDcreature_ckhlf1"}, - {Id="palette.entities.creatures.ckhlf2", Translation="uiR2EDcreature_ckhlf2"}, - {Id="palette.entities.creatures.ckhlf3", Translation="uiR2EDcreature_ckhlf3"}, - {Id="palette.entities.creatures.ckhlf4", Translation="uiR2EDcreature_ckhlf4"}, - {Id="palette.entities.creatures.ckhpd1", Translation="uiR2EDcreature_ckhpd1"}, - {Id="palette.entities.creatures.ckhpd2", Translation="uiR2EDcreature_ckhpd2"}, - {Id="palette.entities.creatures.ckhpd3", Translation="uiR2EDcreature_ckhpd3"}, - {Id="palette.entities.creatures.ckhpd4", Translation="uiR2EDcreature_ckhpd4"}, - {Id="palette.entities.creatures.ckhpe1", Translation="uiR2EDcreature_ckhpe1"}, - {Id="palette.entities.creatures.ckhpe2", Translation="uiR2EDcreature_ckhpe2"}, - {Id="palette.entities.creatures.ckhpe3", Translation="uiR2EDcreature_ckhpe3"}, - {Id="palette.entities.creatures.ckhpe4", Translation="uiR2EDcreature_ckhpe4"}, - {Id="palette.entities.creatures.ckhpf1", Translation="uiR2EDcreature_ckhpf1"}, - {Id="palette.entities.creatures.ckhpf2", Translation="uiR2EDcreature_ckhpf2"}, - {Id="palette.entities.creatures.ckhpf3", Translation="uiR2EDcreature_ckhpf3"}, - {Id="palette.entities.creatures.ckhpf4", Translation="uiR2EDcreature_ckhpf4"}, - {Id="palette.entities.creatures.ckgde1", Translation="uiR2EDcreature_ckgde1"}, - {Id="palette.entities.creatures.ckgde2", Translation="uiR2EDcreature_ckgde2"}, - {Id="palette.entities.creatures.ckgde3", Translation="uiR2EDcreature_ckgde3"}, - {Id="palette.entities.creatures.ckgde4", Translation="uiR2EDcreature_ckgde4"}, - {Id="palette.entities.creatures.ckgdf1", Translation="uiR2EDcreature_ckgdf1"}, - {Id="palette.entities.creatures.ckgdf2", Translation="uiR2EDcreature_ckgdf2"}, - {Id="palette.entities.creatures.ckgdf3", Translation="uiR2EDcreature_ckgdf3"}, - {Id="palette.entities.creatures.ckgdf4", Translation="uiR2EDcreature_ckgdf4"}, - {Id="palette.entities.creatures.ckgfe1", Translation="uiR2EDcreature_ckgfe1"}, - {Id="palette.entities.creatures.ckgfe2", Translation="uiR2EDcreature_ckgfe2"}, - {Id="palette.entities.creatures.ckgfe3", Translation="uiR2EDcreature_ckgfe3"}, - {Id="palette.entities.creatures.ckgfe4", Translation="uiR2EDcreature_ckgfe4"}, - {Id="palette.entities.creatures.ckgff1", Translation="uiR2EDcreature_ckgff1"}, - {Id="palette.entities.creatures.ckgff2", Translation="uiR2EDcreature_ckgff2"}, - {Id="palette.entities.creatures.ckgff3", Translation="uiR2EDcreature_ckgff3"}, - {Id="palette.entities.creatures.ckgff4", Translation="uiR2EDcreature_ckgff4"}, - -- {Id="palette.entities.creatures.ckggb1", Translation="uiR2EDcreature_ckggb1"}, - -- {Id="palette.entities.creatures.ckggb2", Translation="uiR2EDcreature_ckggb2"}, - -- {Id="palette.entities.creatures.ckggb3", Translation="uiR2EDcreature_ckggb3"}, - -- {Id="palette.entities.creatures.ckggb4", Translation="uiR2EDcreature_ckggb4"}, - -- {Id="palette.entities.creatures.ckggc1", Translation="uiR2EDcreature_ckggc1"}, - -- {Id="palette.entities.creatures.ckggc2", Translation="uiR2EDcreature_ckggc2"}, - -- {Id="palette.entities.creatures.ckggc3", Translation="uiR2EDcreature_ckggc3"}, - -- {Id="palette.entities.creatures.ckggc4", Translation="uiR2EDcreature_ckggc4"}, - -- {Id="palette.entities.creatures.ckggd1", Translation="uiR2EDcreature_ckggd1"}, - -- {Id="palette.entities.creatures.ckggd2", Translation="uiR2EDcreature_ckggd2"}, - -- {Id="palette.entities.creatures.ckggd3", Translation="uiR2EDcreature_ckggd3"}, - -- {Id="palette.entities.creatures.ckggd4", Translation="uiR2EDcreature_ckggd4"}, - -- {Id="palette.entities.creatures.ckgge1", Translation="uiR2EDcreature_ckgge1"}, - -- {Id="palette.entities.creatures.ckgge2", Translation="uiR2EDcreature_ckgge2"}, - -- {Id="palette.entities.creatures.ckgge3", Translation="uiR2EDcreature_ckgge3"}, - -- {Id="palette.entities.creatures.ckgge4", Translation="uiR2EDcreature_ckgge4"}, - -- {Id="palette.entities.creatures.ckggf1", Translation="uiR2EDcreature_ckggf1"}, - -- {Id="palette.entities.creatures.ckggf2", Translation="uiR2EDcreature_ckggf2"}, - -- {Id="palette.entities.creatures.ckggf3", Translation="uiR2EDcreature_ckggf3"}, - -- {Id="palette.entities.creatures.ckggf4", Translation="uiR2EDcreature_ckggf4"}, - {Id="palette.entities.creatures.ckgje1", Translation="uiR2EDcreature_ckgje1"}, - {Id="palette.entities.creatures.ckgje2", Translation="uiR2EDcreature_ckgje2"}, - {Id="palette.entities.creatures.ckgje3", Translation="uiR2EDcreature_ckgje3"}, - {Id="palette.entities.creatures.ckgje4", Translation="uiR2EDcreature_ckgje4"}, - {Id="palette.entities.creatures.ckgjf1", Translation="uiR2EDcreature_ckgjf1"}, - {Id="palette.entities.creatures.ckgjf2", Translation="uiR2EDcreature_ckgjf2"}, - {Id="palette.entities.creatures.ckgjf3", Translation="uiR2EDcreature_ckgjf3"}, - {Id="palette.entities.creatures.ckgjf4", Translation="uiR2EDcreature_ckgjf4"}, - {Id="palette.entities.creatures.ckgle1", Translation="uiR2EDcreature_ckgle1"}, - {Id="palette.entities.creatures.ckgle2", Translation="uiR2EDcreature_ckgle2"}, - {Id="palette.entities.creatures.ckgle3", Translation="uiR2EDcreature_ckgle3"}, - {Id="palette.entities.creatures.ckgle4", Translation="uiR2EDcreature_ckgle4"}, - {Id="palette.entities.creatures.ckglf1", Translation="uiR2EDcreature_ckglf1"}, - {Id="palette.entities.creatures.ckglf2", Translation="uiR2EDcreature_ckglf2"}, - {Id="palette.entities.creatures.ckglf3", Translation="uiR2EDcreature_ckglf3"}, - {Id="palette.entities.creatures.ckglf4", Translation="uiR2EDcreature_ckglf4"}, - {Id="palette.entities.creatures.ckgpe1", Translation="uiR2EDcreature_ckgpe1"}, - {Id="palette.entities.creatures.ckgpe2", Translation="uiR2EDcreature_ckgpe2"}, - {Id="palette.entities.creatures.ckgpe3", Translation="uiR2EDcreature_ckgpe3"}, - {Id="palette.entities.creatures.ckgpe4", Translation="uiR2EDcreature_ckgpe4"}, - {Id="palette.entities.creatures.ckgpf1", Translation="uiR2EDcreature_ckgpf1"}, - {Id="palette.entities.creatures.ckgpf2", Translation="uiR2EDcreature_ckgpf2"}, - {Id="palette.entities.creatures.ckgpf3", Translation="uiR2EDcreature_ckgpf3"}, - {Id="palette.entities.creatures.ckgpf4", Translation="uiR2EDcreature_ckgpf4"}, - {Id="palette.entities.creatures.ckidc1", Translation="uiR2EDcreature_ckidc1"}, - {Id="palette.entities.creatures.ckidc2", Translation="uiR2EDcreature_ckidc2"}, - {Id="palette.entities.creatures.ckidc3", Translation="uiR2EDcreature_ckidc3"}, - {Id="palette.entities.creatures.ckidc4", Translation="uiR2EDcreature_ckidc4"}, - {Id="palette.entities.creatures.ckidd1", Translation="uiR2EDcreature_ckidd1"}, - {Id="palette.entities.creatures.ckidd2", Translation="uiR2EDcreature_ckidd2"}, - {Id="palette.entities.creatures.ckidd3", Translation="uiR2EDcreature_ckidd3"}, - {Id="palette.entities.creatures.ckidd4", Translation="uiR2EDcreature_ckidd4"}, - {Id="palette.entities.creatures.ckide1", Translation="uiR2EDcreature_ckide1"}, - {Id="palette.entities.creatures.ckide2", Translation="uiR2EDcreature_ckide2"}, - {Id="palette.entities.creatures.ckide3", Translation="uiR2EDcreature_ckide3"}, - {Id="palette.entities.creatures.ckide4", Translation="uiR2EDcreature_ckide4"}, - {Id="palette.entities.creatures.ckidf1", Translation="uiR2EDcreature_ckidf1"}, - {Id="palette.entities.creatures.ckidf2", Translation="uiR2EDcreature_ckidf2"}, - {Id="palette.entities.creatures.ckidf3", Translation="uiR2EDcreature_ckidf3"}, - {Id="palette.entities.creatures.ckidf4", Translation="uiR2EDcreature_ckidf4"}, - {Id="palette.entities.creatures.ckifc1", Translation="uiR2EDcreature_ckifc1"}, - {Id="palette.entities.creatures.ckifc2", Translation="uiR2EDcreature_ckifc2"}, - {Id="palette.entities.creatures.ckifc3", Translation="uiR2EDcreature_ckifc3"}, - {Id="palette.entities.creatures.ckifc4", Translation="uiR2EDcreature_ckifc4"}, - {Id="palette.entities.creatures.ckifd1", Translation="uiR2EDcreature_ckifd1"}, - {Id="palette.entities.creatures.ckifd2", Translation="uiR2EDcreature_ckifd2"}, - {Id="palette.entities.creatures.ckifd3", Translation="uiR2EDcreature_ckifd3"}, - {Id="palette.entities.creatures.ckifd4", Translation="uiR2EDcreature_ckifd4"}, - {Id="palette.entities.creatures.ckife1", Translation="uiR2EDcreature_ckife1"}, - {Id="palette.entities.creatures.ckife2", Translation="uiR2EDcreature_ckife2"}, - {Id="palette.entities.creatures.ckife3", Translation="uiR2EDcreature_ckife3"}, - {Id="palette.entities.creatures.ckife4", Translation="uiR2EDcreature_ckife4"}, - {Id="palette.entities.creatures.ckiff1", Translation="uiR2EDcreature_ckiff1"}, - {Id="palette.entities.creatures.ckiff2", Translation="uiR2EDcreature_ckiff2"}, - {Id="palette.entities.creatures.ckiff3", Translation="uiR2EDcreature_ckiff3"}, - {Id="palette.entities.creatures.ckiff4", Translation="uiR2EDcreature_ckiff4"}, - -- {Id="palette.entities.creatures.ckigb1", Translation="uiR2EDcreature_ckigb1"}, - -- {Id="palette.entities.creatures.ckigb2", Translation="uiR2EDcreature_ckigb2"}, - -- {Id="palette.entities.creatures.ckigb3", Translation="uiR2EDcreature_ckigb3"}, - -- {Id="palette.entities.creatures.ckigb4", Translation="uiR2EDcreature_ckigb4"}, - -- {Id="palette.entities.creatures.ckigc1", Translation="uiR2EDcreature_ckigc1"}, - -- {Id="palette.entities.creatures.ckigc2", Translation="uiR2EDcreature_ckigc2"}, - -- {Id="palette.entities.creatures.ckigc3", Translation="uiR2EDcreature_ckigc3"}, - -- {Id="palette.entities.creatures.ckigc4", Translation="uiR2EDcreature_ckigc4"}, - -- {Id="palette.entities.creatures.ckigd1", Translation="uiR2EDcreature_ckigd1"}, - -- {Id="palette.entities.creatures.ckigd2", Translation="uiR2EDcreature_ckigd2"}, - -- {Id="palette.entities.creatures.ckigd3", Translation="uiR2EDcreature_ckigd3"}, - -- {Id="palette.entities.creatures.ckigd4", Translation="uiR2EDcreature_ckigd4"}, - -- {Id="palette.entities.creatures.ckige1", Translation="uiR2EDcreature_ckige1"}, - -- {Id="palette.entities.creatures.ckige2", Translation="uiR2EDcreature_ckige2"}, - -- {Id="palette.entities.creatures.ckige3", Translation="uiR2EDcreature_ckige3"}, - -- {Id="palette.entities.creatures.ckige4", Translation="uiR2EDcreature_ckige4"}, - -- {Id="palette.entities.creatures.ckigf1", Translation="uiR2EDcreature_ckigf1"}, - -- {Id="palette.entities.creatures.ckigf2", Translation="uiR2EDcreature_ckigf2"}, - -- {Id="palette.entities.creatures.ckigf3", Translation="uiR2EDcreature_ckigf3"}, - -- {Id="palette.entities.creatures.ckigf4", Translation="uiR2EDcreature_ckigf4"}, - {Id="palette.entities.creatures.ckijc1", Translation="uiR2EDcreature_ckijc1"}, - {Id="palette.entities.creatures.ckijc2", Translation="uiR2EDcreature_ckijc2"}, - {Id="palette.entities.creatures.ckijc3", Translation="uiR2EDcreature_ckijc3"}, - {Id="palette.entities.creatures.ckijc4", Translation="uiR2EDcreature_ckijc4"}, - {Id="palette.entities.creatures.ckijd1", Translation="uiR2EDcreature_ckijd1"}, - {Id="palette.entities.creatures.ckijd2", Translation="uiR2EDcreature_ckijd2"}, - {Id="palette.entities.creatures.ckijd3", Translation="uiR2EDcreature_ckijd3"}, - {Id="palette.entities.creatures.ckijd4", Translation="uiR2EDcreature_ckijd4"}, - {Id="palette.entities.creatures.ckije1", Translation="uiR2EDcreature_ckije1"}, - {Id="palette.entities.creatures.ckije2", Translation="uiR2EDcreature_ckije2"}, - {Id="palette.entities.creatures.ckije3", Translation="uiR2EDcreature_ckije3"}, - {Id="palette.entities.creatures.ckije4", Translation="uiR2EDcreature_ckije4"}, - {Id="palette.entities.creatures.ckijf1", Translation="uiR2EDcreature_ckijf1"}, - {Id="palette.entities.creatures.ckijf2", Translation="uiR2EDcreature_ckijf2"}, - {Id="palette.entities.creatures.ckijf3", Translation="uiR2EDcreature_ckijf3"}, - {Id="palette.entities.creatures.ckijf4", Translation="uiR2EDcreature_ckijf4"}, - {Id="palette.entities.creatures.ckilc1", Translation="uiR2EDcreature_ckilc1"}, - {Id="palette.entities.creatures.ckilc2", Translation="uiR2EDcreature_ckilc2"}, - {Id="palette.entities.creatures.ckilc3", Translation="uiR2EDcreature_ckilc3"}, - {Id="palette.entities.creatures.ckilc4", Translation="uiR2EDcreature_ckilc4"}, - {Id="palette.entities.creatures.ckild1", Translation="uiR2EDcreature_ckild1"}, - {Id="palette.entities.creatures.ckild2", Translation="uiR2EDcreature_ckild2"}, - {Id="palette.entities.creatures.ckild3", Translation="uiR2EDcreature_ckild3"}, - {Id="palette.entities.creatures.ckild4", Translation="uiR2EDcreature_ckild4"}, - {Id="palette.entities.creatures.ckile1", Translation="uiR2EDcreature_ckile1"}, - {Id="palette.entities.creatures.ckile2", Translation="uiR2EDcreature_ckile2"}, - {Id="palette.entities.creatures.ckile3", Translation="uiR2EDcreature_ckile3"}, - {Id="palette.entities.creatures.ckile4", Translation="uiR2EDcreature_ckile4"}, - {Id="palette.entities.creatures.ckilf1", Translation="uiR2EDcreature_ckilf1"}, - {Id="palette.entities.creatures.ckilf2", Translation="uiR2EDcreature_ckilf2"}, - {Id="palette.entities.creatures.ckilf3", Translation="uiR2EDcreature_ckilf3"}, - {Id="palette.entities.creatures.ckilf4", Translation="uiR2EDcreature_ckilf4"}, - {Id="palette.entities.creatures.ckipd1", Translation="uiR2EDcreature_ckipd1"}, - {Id="palette.entities.creatures.ckipd2", Translation="uiR2EDcreature_ckipd2"}, - {Id="palette.entities.creatures.ckipd3", Translation="uiR2EDcreature_ckipd3"}, - {Id="palette.entities.creatures.ckipd4", Translation="uiR2EDcreature_ckipd4"}, - {Id="palette.entities.creatures.ckipe1", Translation="uiR2EDcreature_ckipe1"}, - {Id="palette.entities.creatures.ckipe2", Translation="uiR2EDcreature_ckipe2"}, - {Id="palette.entities.creatures.ckipe3", Translation="uiR2EDcreature_ckipe3"}, - {Id="palette.entities.creatures.ckipe4", Translation="uiR2EDcreature_ckipe4"}, - {Id="palette.entities.creatures.ckipf1", Translation="uiR2EDcreature_ckipf1"}, - {Id="palette.entities.creatures.ckipf2", Translation="uiR2EDcreature_ckipf2"}, - {Id="palette.entities.creatures.ckipf3", Translation="uiR2EDcreature_ckipf3"}, - {Id="palette.entities.creatures.ckipf4", Translation="uiR2EDcreature_ckipf4"}, - } - }, - - creatures_kitins= - { - instances = - { - {Id="palette.entities.creatures.ckade1", Translation="uiR2EDcreature_ckade1"}, - {Id="palette.entities.creatures.ckade2", Translation="uiR2EDcreature_ckade2"}, - {Id="palette.entities.creatures.ckade3", Translation="uiR2EDcreature_ckade3"}, - {Id="palette.entities.creatures.ckade4", Translation="uiR2EDcreature_ckade4"}, - {Id="palette.entities.creatures.ckadf1", Translation="uiR2EDcreature_ckadf1"}, - {Id="palette.entities.creatures.ckadf2", Translation="uiR2EDcreature_ckadf2"}, - {Id="palette.entities.creatures.ckadf3", Translation="uiR2EDcreature_ckadf3"}, - {Id="palette.entities.creatures.ckadf4", Translation="uiR2EDcreature_ckadf4"}, - {Id="palette.entities.creatures.ckafe1", Translation="uiR2EDcreature_ckafe1"}, - {Id="palette.entities.creatures.ckafe2", Translation="uiR2EDcreature_ckafe2"}, - {Id="palette.entities.creatures.ckafe3", Translation="uiR2EDcreature_ckafe3"}, - {Id="palette.entities.creatures.ckafe4", Translation="uiR2EDcreature_ckafe4"}, - {Id="palette.entities.creatures.ckaff1", Translation="uiR2EDcreature_ckaff1"}, - {Id="palette.entities.creatures.ckaff2", Translation="uiR2EDcreature_ckaff2"}, - {Id="palette.entities.creatures.ckaff3", Translation="uiR2EDcreature_ckaff3"}, - {Id="palette.entities.creatures.ckaff4", Translation="uiR2EDcreature_ckaff4"}, - -- {Id="palette.entities.creatures.ckagb1", Translation="uiR2EDcreature_ckagb1"}, - -- {Id="palette.entities.creatures.ckagb2", Translation="uiR2EDcreature_ckagb2"}, - -- {Id="palette.entities.creatures.ckagb3", Translation="uiR2EDcreature_ckagb3"}, - -- {Id="palette.entities.creatures.ckagb4", Translation="uiR2EDcreature_ckagb4"}, - -- {Id="palette.entities.creatures.ckagc1", Translation="uiR2EDcreature_ckagc1"}, - -- {Id="palette.entities.creatures.ckagc2", Translation="uiR2EDcreature_ckagc2"}, - -- {Id="palette.entities.creatures.ckagc3", Translation="uiR2EDcreature_ckagc3"}, - -- {Id="palette.entities.creatures.ckagc4", Translation="uiR2EDcreature_ckagc4"}, - -- {Id="palette.entities.creatures.ckagd1", Translation="uiR2EDcreature_ckagd1"}, - -- {Id="palette.entities.creatures.ckagd2", Translation="uiR2EDcreature_ckagd2"}, - -- {Id="palette.entities.creatures.ckagd3", Translation="uiR2EDcreature_ckagd3"}, - -- {Id="palette.entities.creatures.ckagd4", Translation="uiR2EDcreature_ckagd4"}, - -- {Id="palette.entities.creatures.ckage1", Translation="uiR2EDcreature_ckage1"}, - -- {Id="palette.entities.creatures.ckage2", Translation="uiR2EDcreature_ckage2"}, - -- {Id="palette.entities.creatures.ckage3", Translation="uiR2EDcreature_ckage3"}, - -- {Id="palette.entities.creatures.ckage4", Translation="uiR2EDcreature_ckage4"}, - -- {Id="palette.entities.creatures.ckagf1", Translation="uiR2EDcreature_ckagf1"}, - -- {Id="palette.entities.creatures.ckagf2", Translation="uiR2EDcreature_ckagf2"}, - -- {Id="palette.entities.creatures.ckagf3", Translation="uiR2EDcreature_ckagf3"}, - -- {Id="palette.entities.creatures.ckagf4", Translation="uiR2EDcreature_ckagf4"}, - {Id="palette.entities.creatures.ckaje1", Translation="uiR2EDcreature_ckaje1"}, - {Id="palette.entities.creatures.ckaje2", Translation="uiR2EDcreature_ckaje2"}, - {Id="palette.entities.creatures.ckaje3", Translation="uiR2EDcreature_ckaje3"}, - {Id="palette.entities.creatures.ckaje4", Translation="uiR2EDcreature_ckaje4"}, - {Id="palette.entities.creatures.ckajf1", Translation="uiR2EDcreature_ckajf1"}, - {Id="palette.entities.creatures.ckajf2", Translation="uiR2EDcreature_ckajf2"}, - {Id="palette.entities.creatures.ckajf3", Translation="uiR2EDcreature_ckajf3"}, - {Id="palette.entities.creatures.ckajf4", Translation="uiR2EDcreature_ckajf4"}, - {Id="palette.entities.creatures.ckale1", Translation="uiR2EDcreature_ckale1"}, - {Id="palette.entities.creatures.ckale2", Translation="uiR2EDcreature_ckale2"}, - {Id="palette.entities.creatures.ckale3", Translation="uiR2EDcreature_ckale3"}, - {Id="palette.entities.creatures.ckale4", Translation="uiR2EDcreature_ckale4"}, - {Id="palette.entities.creatures.ckalf1", Translation="uiR2EDcreature_ckalf1"}, - {Id="palette.entities.creatures.ckalf2", Translation="uiR2EDcreature_ckalf2"}, - {Id="palette.entities.creatures.ckalf3", Translation="uiR2EDcreature_ckalf3"}, - {Id="palette.entities.creatures.ckalf4", Translation="uiR2EDcreature_ckalf4"}, - {Id="palette.entities.creatures.ckape1", Translation="uiR2EDcreature_ckape1"}, - {Id="palette.entities.creatures.ckape2", Translation="uiR2EDcreature_ckape2"}, - {Id="palette.entities.creatures.ckape3", Translation="uiR2EDcreature_ckape3"}, - {Id="palette.entities.creatures.ckape4", Translation="uiR2EDcreature_ckape4"}, - {Id="palette.entities.creatures.ckapf1", Translation="uiR2EDcreature_ckapf1"}, - {Id="palette.entities.creatures.ckapf2", Translation="uiR2EDcreature_ckapf2"}, - {Id="palette.entities.creatures.ckapf3", Translation="uiR2EDcreature_ckapf3"}, - {Id="palette.entities.creatures.ckapf4", Translation="uiR2EDcreature_ckapf4"}, - {Id="palette.entities.creatures.ckbde1", Translation="uiR2EDcreature_ckbde1"}, - {Id="palette.entities.creatures.ckbde2", Translation="uiR2EDcreature_ckbde2"}, - {Id="palette.entities.creatures.ckbde3", Translation="uiR2EDcreature_ckbde3"}, - {Id="palette.entities.creatures.ckbde4", Translation="uiR2EDcreature_ckbde4"}, - {Id="palette.entities.creatures.ckbdf1", Translation="uiR2EDcreature_ckbdf1"}, - {Id="palette.entities.creatures.ckbdf2", Translation="uiR2EDcreature_ckbdf2"}, - {Id="palette.entities.creatures.ckbdf3", Translation="uiR2EDcreature_ckbdf3"}, - {Id="palette.entities.creatures.ckbdf4", Translation="uiR2EDcreature_ckbdf4"}, - {Id="palette.entities.creatures.ckbfe1", Translation="uiR2EDcreature_ckbfe1"}, - {Id="palette.entities.creatures.ckbfe2", Translation="uiR2EDcreature_ckbfe2"}, - {Id="palette.entities.creatures.ckbfe3", Translation="uiR2EDcreature_ckbfe3"}, - {Id="palette.entities.creatures.ckbfe4", Translation="uiR2EDcreature_ckbfe4"}, - {Id="palette.entities.creatures.ckbff1", Translation="uiR2EDcreature_ckbff1"}, - {Id="palette.entities.creatures.ckbff2", Translation="uiR2EDcreature_ckbff2"}, - {Id="palette.entities.creatures.ckbff3", Translation="uiR2EDcreature_ckbff3"}, - {Id="palette.entities.creatures.ckbff4", Translation="uiR2EDcreature_ckbff4"}, - -- {Id="palette.entities.creatures.ckbgb1", Translation="uiR2EDcreature_ckbgb1"}, - -- {Id="palette.entities.creatures.ckbgb2", Translation="uiR2EDcreature_ckbgb2"}, - -- {Id="palette.entities.creatures.ckbgb3", Translation="uiR2EDcreature_ckbgb3"}, - -- {Id="palette.entities.creatures.ckbgb4", Translation="uiR2EDcreature_ckbgb4"}, - -- {Id="palette.entities.creatures.ckbgc1", Translation="uiR2EDcreature_ckbgc1"}, - -- {Id="palette.entities.creatures.ckbgc2", Translation="uiR2EDcreature_ckbgc2"}, - -- {Id="palette.entities.creatures.ckbgc3", Translation="uiR2EDcreature_ckbgc3"}, - -- {Id="palette.entities.creatures.ckbgc4", Translation="uiR2EDcreature_ckbgc4"}, - -- {Id="palette.entities.creatures.ckbgd1", Translation="uiR2EDcreature_ckbgd1"}, - -- {Id="palette.entities.creatures.ckbgd2", Translation="uiR2EDcreature_ckbgd2"}, - -- {Id="palette.entities.creatures.ckbgd3", Translation="uiR2EDcreature_ckbgd3"}, - -- {Id="palette.entities.creatures.ckbgd4", Translation="uiR2EDcreature_ckbgd4"}, - -- {Id="palette.entities.creatures.ckbge1", Translation="uiR2EDcreature_ckbge1"}, - -- {Id="palette.entities.creatures.ckbge2", Translation="uiR2EDcreature_ckbge2"}, - -- {Id="palette.entities.creatures.ckbge3", Translation="uiR2EDcreature_ckbge3"}, - -- {Id="palette.entities.creatures.ckbge4", Translation="uiR2EDcreature_ckbge4"}, - -- {Id="palette.entities.creatures.ckbgf1", Translation="uiR2EDcreature_ckbgf1"}, - -- {Id="palette.entities.creatures.ckbgf2", Translation="uiR2EDcreature_ckbgf2"}, - -- {Id="palette.entities.creatures.ckbgf3", Translation="uiR2EDcreature_ckbgf3"}, - -- {Id="palette.entities.creatures.ckbgf4", Translation="uiR2EDcreature_ckbgf4"}, - {Id="palette.entities.creatures.ckbje1", Translation="uiR2EDcreature_ckbje1"}, - {Id="palette.entities.creatures.ckbje2", Translation="uiR2EDcreature_ckbje2"}, - {Id="palette.entities.creatures.ckbje3", Translation="uiR2EDcreature_ckbje3"}, - {Id="palette.entities.creatures.ckbje4", Translation="uiR2EDcreature_ckbje4"}, - {Id="palette.entities.creatures.ckbjf1", Translation="uiR2EDcreature_ckbjf1"}, - {Id="palette.entities.creatures.ckbjf2", Translation="uiR2EDcreature_ckbjf2"}, - {Id="palette.entities.creatures.ckbjf3", Translation="uiR2EDcreature_ckbjf3"}, - {Id="palette.entities.creatures.ckbjf4", Translation="uiR2EDcreature_ckbjf4"}, - {Id="palette.entities.creatures.ckble1", Translation="uiR2EDcreature_ckble1"}, - {Id="palette.entities.creatures.ckble2", Translation="uiR2EDcreature_ckble2"}, - {Id="palette.entities.creatures.ckble3", Translation="uiR2EDcreature_ckble3"}, - {Id="palette.entities.creatures.ckble4", Translation="uiR2EDcreature_ckble4"}, - {Id="palette.entities.creatures.ckblf1", Translation="uiR2EDcreature_ckblf1"}, - {Id="palette.entities.creatures.ckblf2", Translation="uiR2EDcreature_ckblf2"}, - {Id="palette.entities.creatures.ckblf3", Translation="uiR2EDcreature_ckblf3"}, - {Id="palette.entities.creatures.ckblf4", Translation="uiR2EDcreature_ckblf4"}, - {Id="palette.entities.creatures.ckbpe1", Translation="uiR2EDcreature_ckbpe1"}, - {Id="palette.entities.creatures.ckbpe2", Translation="uiR2EDcreature_ckbpe2"}, - {Id="palette.entities.creatures.ckbpe3", Translation="uiR2EDcreature_ckbpe3"}, - {Id="palette.entities.creatures.ckbpe4", Translation="uiR2EDcreature_ckbpe4"}, - {Id="palette.entities.creatures.ckbpf1", Translation="uiR2EDcreature_ckbpf1"}, - {Id="palette.entities.creatures.ckbpf2", Translation="uiR2EDcreature_ckbpf2"}, - {Id="palette.entities.creatures.ckbpf3", Translation="uiR2EDcreature_ckbpf3"}, - {Id="palette.entities.creatures.ckbpf4", Translation="uiR2EDcreature_ckbpf4"}, - {Id="palette.entities.creatures.ckcde1", Translation="uiR2EDcreature_ckcde1"}, - {Id="palette.entities.creatures.ckcde2", Translation="uiR2EDcreature_ckcde2"}, - {Id="palette.entities.creatures.ckcde3", Translation="uiR2EDcreature_ckcde3"}, - {Id="palette.entities.creatures.ckcde4", Translation="uiR2EDcreature_ckcde4"}, - {Id="palette.entities.creatures.ckcdf1", Translation="uiR2EDcreature_ckcdf1"}, - {Id="palette.entities.creatures.ckcdf2", Translation="uiR2EDcreature_ckcdf2"}, - {Id="palette.entities.creatures.ckcdf3", Translation="uiR2EDcreature_ckcdf3"}, - {Id="palette.entities.creatures.ckcdf4", Translation="uiR2EDcreature_ckcdf4"}, - {Id="palette.entities.creatures.ckcfe1", Translation="uiR2EDcreature_ckcfe1"}, - {Id="palette.entities.creatures.ckcfe2", Translation="uiR2EDcreature_ckcfe2"}, - {Id="palette.entities.creatures.ckcfe3", Translation="uiR2EDcreature_ckcfe3"}, - {Id="palette.entities.creatures.ckcfe4", Translation="uiR2EDcreature_ckcfe4"}, - {Id="palette.entities.creatures.ckcff1", Translation="uiR2EDcreature_ckcff1"}, - {Id="palette.entities.creatures.ckcff2", Translation="uiR2EDcreature_ckcff2"}, - {Id="palette.entities.creatures.ckcff3", Translation="uiR2EDcreature_ckcff3"}, - {Id="palette.entities.creatures.ckcff4", Translation="uiR2EDcreature_ckcff4"}, - -- {Id="palette.entities.creatures.ckcgb1", Translation="uiR2EDcreature_ckcgb1"}, - -- {Id="palette.entities.creatures.ckcgb2", Translation="uiR2EDcreature_ckcgb2"}, - -- {Id="palette.entities.creatures.ckcgb3", Translation="uiR2EDcreature_ckcgb3"}, - -- {Id="palette.entities.creatures.ckcgb4", Translation="uiR2EDcreature_ckcgb4"}, - -- {Id="palette.entities.creatures.ckcgc1", Translation="uiR2EDcreature_ckcgc1"}, - -- {Id="palette.entities.creatures.ckcgc2", Translation="uiR2EDcreature_ckcgc2"}, - -- {Id="palette.entities.creatures.ckcgc3", Translation="uiR2EDcreature_ckcgc3"}, - -- {Id="palette.entities.creatures.ckcgc4", Translation="uiR2EDcreature_ckcgc4"}, - -- {Id="palette.entities.creatures.ckcgd1", Translation="uiR2EDcreature_ckcgd1"}, - -- {Id="palette.entities.creatures.ckcgd2", Translation="uiR2EDcreature_ckcgd2"}, - -- {Id="palette.entities.creatures.ckcgd3", Translation="uiR2EDcreature_ckcgd3"}, - -- {Id="palette.entities.creatures.ckcgd4", Translation="uiR2EDcreature_ckcgd4"}, - -- {Id="palette.entities.creatures.ckcge1", Translation="uiR2EDcreature_ckcge1"}, - -- {Id="palette.entities.creatures.ckcge2", Translation="uiR2EDcreature_ckcge2"}, - -- {Id="palette.entities.creatures.ckcge3", Translation="uiR2EDcreature_ckcge3"}, - -- {Id="palette.entities.creatures.ckcge4", Translation="uiR2EDcreature_ckcge4"}, - -- {Id="palette.entities.creatures.ckcgf1", Translation="uiR2EDcreature_ckcgf1"}, - -- {Id="palette.entities.creatures.ckcgf2", Translation="uiR2EDcreature_ckcgf2"}, - -- {Id="palette.entities.creatures.ckcgf3", Translation="uiR2EDcreature_ckcgf3"}, - -- {Id="palette.entities.creatures.ckcgf4", Translation="uiR2EDcreature_ckcgf4"}, - {Id="palette.entities.creatures.ckcje1", Translation="uiR2EDcreature_ckcje1"}, - {Id="palette.entities.creatures.ckcje2", Translation="uiR2EDcreature_ckcje2"}, - {Id="palette.entities.creatures.ckcje3", Translation="uiR2EDcreature_ckcje3"}, - {Id="palette.entities.creatures.ckcje4", Translation="uiR2EDcreature_ckcje4"}, - {Id="palette.entities.creatures.ckcjf1", Translation="uiR2EDcreature_ckcjf1"}, - {Id="palette.entities.creatures.ckcjf2", Translation="uiR2EDcreature_ckcjf2"}, - {Id="palette.entities.creatures.ckcjf3", Translation="uiR2EDcreature_ckcjf3"}, - {Id="palette.entities.creatures.ckcjf4", Translation="uiR2EDcreature_ckcjf4"}, - {Id="palette.entities.creatures.ckcle1", Translation="uiR2EDcreature_ckcle1"}, - {Id="palette.entities.creatures.ckcle2", Translation="uiR2EDcreature_ckcle2"}, - {Id="palette.entities.creatures.ckcle3", Translation="uiR2EDcreature_ckcle3"}, - {Id="palette.entities.creatures.ckcle4", Translation="uiR2EDcreature_ckcle4"}, - {Id="palette.entities.creatures.ckclf1", Translation="uiR2EDcreature_ckclf1"}, - {Id="palette.entities.creatures.ckclf2", Translation="uiR2EDcreature_ckclf2"}, - {Id="palette.entities.creatures.ckclf3", Translation="uiR2EDcreature_ckclf3"}, - {Id="palette.entities.creatures.ckclf4", Translation="uiR2EDcreature_ckclf4"}, - {Id="palette.entities.creatures.ckcpe1", Translation="uiR2EDcreature_ckcpe1"}, - {Id="palette.entities.creatures.ckcpe2", Translation="uiR2EDcreature_ckcpe2"}, - {Id="palette.entities.creatures.ckcpe3", Translation="uiR2EDcreature_ckcpe3"}, - {Id="palette.entities.creatures.ckcpe4", Translation="uiR2EDcreature_ckcpe4"}, - {Id="palette.entities.creatures.ckcpf1", Translation="uiR2EDcreature_ckcpf1"}, - {Id="palette.entities.creatures.ckcpf2", Translation="uiR2EDcreature_ckcpf2"}, - {Id="palette.entities.creatures.ckcpf3", Translation="uiR2EDcreature_ckcpf3"}, - {Id="palette.entities.creatures.ckcpf4", Translation="uiR2EDcreature_ckcpf4"}, - {Id="palette.entities.creatures.ckddd1", Translation="uiR2EDcreature_ckddd1"}, - {Id="palette.entities.creatures.ckddd2", Translation="uiR2EDcreature_ckddd2"}, - {Id="palette.entities.creatures.ckddd3", Translation="uiR2EDcreature_ckddd3"}, - {Id="palette.entities.creatures.ckddd4", Translation="uiR2EDcreature_ckddd4"}, - {Id="palette.entities.creatures.ckdde1", Translation="uiR2EDcreature_ckdde1"}, - {Id="palette.entities.creatures.ckdde2", Translation="uiR2EDcreature_ckdde2"}, - {Id="palette.entities.creatures.ckdde3", Translation="uiR2EDcreature_ckdde3"}, - {Id="palette.entities.creatures.ckdde4", Translation="uiR2EDcreature_ckdde4"}, - {Id="palette.entities.creatures.ckddf1", Translation="uiR2EDcreature_ckddf1"}, - {Id="palette.entities.creatures.ckddf2", Translation="uiR2EDcreature_ckddf2"}, - {Id="palette.entities.creatures.ckddf3", Translation="uiR2EDcreature_ckddf3"}, - {Id="palette.entities.creatures.ckddf4", Translation="uiR2EDcreature_ckddf4"}, - {Id="palette.entities.creatures.ckdfd1", Translation="uiR2EDcreature_ckdfd1"}, - {Id="palette.entities.creatures.ckdfd2", Translation="uiR2EDcreature_ckdfd2"}, - {Id="palette.entities.creatures.ckdfd3", Translation="uiR2EDcreature_ckdfd3"}, - {Id="palette.entities.creatures.ckdfd4", Translation="uiR2EDcreature_ckdfd4"}, - {Id="palette.entities.creatures.ckdfe1", Translation="uiR2EDcreature_ckdfe1"}, - {Id="palette.entities.creatures.ckdfe2", Translation="uiR2EDcreature_ckdfe2"}, - {Id="palette.entities.creatures.ckdfe3", Translation="uiR2EDcreature_ckdfe3"}, - {Id="palette.entities.creatures.ckdfe4", Translation="uiR2EDcreature_ckdfe4"}, - {Id="palette.entities.creatures.ckdff1", Translation="uiR2EDcreature_ckdff1"}, - {Id="palette.entities.creatures.ckdff2", Translation="uiR2EDcreature_ckdff2"}, - {Id="palette.entities.creatures.ckdff3", Translation="uiR2EDcreature_ckdff3"}, - {Id="palette.entities.creatures.ckdff4", Translation="uiR2EDcreature_ckdff4"}, - -- {Id="palette.entities.creatures.ckdgb1", Translation="uiR2EDcreature_ckdgb1"}, - -- {Id="palette.entities.creatures.ckdgb2", Translation="uiR2EDcreature_ckdgb2"}, - -- {Id="palette.entities.creatures.ckdgb3", Translation="uiR2EDcreature_ckdgb3"}, - -- {Id="palette.entities.creatures.ckdgb4", Translation="uiR2EDcreature_ckdgb4"}, - -- {Id="palette.entities.creatures.ckdgc1", Translation="uiR2EDcreature_ckdgc1"}, - -- {Id="palette.entities.creatures.ckdgc2", Translation="uiR2EDcreature_ckdgc2"}, - -- {Id="palette.entities.creatures.ckdgc3", Translation="uiR2EDcreature_ckdgc3"}, - -- {Id="palette.entities.creatures.ckdgc4", Translation="uiR2EDcreature_ckdgc4"}, - -- {Id="palette.entities.creatures.ckdgd1", Translation="uiR2EDcreature_ckdgd1"}, - -- {Id="palette.entities.creatures.ckdgd2", Translation="uiR2EDcreature_ckdgd2"}, - -- {Id="palette.entities.creatures.ckdgd3", Translation="uiR2EDcreature_ckdgd3"}, - -- {Id="palette.entities.creatures.ckdgd4", Translation="uiR2EDcreature_ckdgd4"}, - -- {Id="palette.entities.creatures.ckdge1", Translation="uiR2EDcreature_ckdge1"}, - -- {Id="palette.entities.creatures.ckdge2", Translation="uiR2EDcreature_ckdge2"}, - -- {Id="palette.entities.creatures.ckdge3", Translation="uiR2EDcreature_ckdge3"}, - -- {Id="palette.entities.creatures.ckdge4", Translation="uiR2EDcreature_ckdge4"}, - -- {Id="palette.entities.creatures.ckdgf1", Translation="uiR2EDcreature_ckdgf1"}, - -- {Id="palette.entities.creatures.ckdgf2", Translation="uiR2EDcreature_ckdgf2"}, - -- {Id="palette.entities.creatures.ckdgf3", Translation="uiR2EDcreature_ckdgf3"}, - -- {Id="palette.entities.creatures.ckdgf4", Translation="uiR2EDcreature_ckdgf4"}, - {Id="palette.entities.creatures.ckdjd1", Translation="uiR2EDcreature_ckdjd1"}, - {Id="palette.entities.creatures.ckdjd2", Translation="uiR2EDcreature_ckdjd2"}, - {Id="palette.entities.creatures.ckdjd3", Translation="uiR2EDcreature_ckdjd3"}, - {Id="palette.entities.creatures.ckdjd4", Translation="uiR2EDcreature_ckdjd4"}, - {Id="palette.entities.creatures.ckdje1", Translation="uiR2EDcreature_ckdje1"}, - {Id="palette.entities.creatures.ckdje2", Translation="uiR2EDcreature_ckdje2"}, - {Id="palette.entities.creatures.ckdje3", Translation="uiR2EDcreature_ckdje3"}, - {Id="palette.entities.creatures.ckdje4", Translation="uiR2EDcreature_ckdje4"}, - {Id="palette.entities.creatures.ckdjf1", Translation="uiR2EDcreature_ckdjf1"}, - {Id="palette.entities.creatures.ckdjf2", Translation="uiR2EDcreature_ckdjf2"}, - {Id="palette.entities.creatures.ckdjf3", Translation="uiR2EDcreature_ckdjf3"}, - {Id="palette.entities.creatures.ckdjf4", Translation="uiR2EDcreature_ckdjf4"}, - {Id="palette.entities.creatures.ckdld1", Translation="uiR2EDcreature_ckdld1"}, - {Id="palette.entities.creatures.ckdld2", Translation="uiR2EDcreature_ckdld2"}, - {Id="palette.entities.creatures.ckdld3", Translation="uiR2EDcreature_ckdld3"}, - {Id="palette.entities.creatures.ckdld4", Translation="uiR2EDcreature_ckdld4"}, - {Id="palette.entities.creatures.ckdle1", Translation="uiR2EDcreature_ckdle1"}, - {Id="palette.entities.creatures.ckdle2", Translation="uiR2EDcreature_ckdle2"}, - {Id="palette.entities.creatures.ckdle3", Translation="uiR2EDcreature_ckdle3"}, - {Id="palette.entities.creatures.ckdle4", Translation="uiR2EDcreature_ckdle4"}, - {Id="palette.entities.creatures.ckdlf1", Translation="uiR2EDcreature_ckdlf1"}, - {Id="palette.entities.creatures.ckdlf2", Translation="uiR2EDcreature_ckdlf2"}, - {Id="palette.entities.creatures.ckdlf3", Translation="uiR2EDcreature_ckdlf3"}, - {Id="palette.entities.creatures.ckdlf4", Translation="uiR2EDcreature_ckdlf4"}, - {Id="palette.entities.creatures.ckdpd1", Translation="uiR2EDcreature_ckdpd1"}, - {Id="palette.entities.creatures.ckdpd2", Translation="uiR2EDcreature_ckdpd2"}, - {Id="palette.entities.creatures.ckdpd3", Translation="uiR2EDcreature_ckdpd3"}, - {Id="palette.entities.creatures.ckdpd4", Translation="uiR2EDcreature_ckdpd4"}, - {Id="palette.entities.creatures.ckdpe1", Translation="uiR2EDcreature_ckdpe1"}, - {Id="palette.entities.creatures.ckdpe2", Translation="uiR2EDcreature_ckdpe2"}, - {Id="palette.entities.creatures.ckdpe3", Translation="uiR2EDcreature_ckdpe3"}, - {Id="palette.entities.creatures.ckdpe4", Translation="uiR2EDcreature_ckdpe4"}, - {Id="palette.entities.creatures.ckdpf1", Translation="uiR2EDcreature_ckdpf1"}, - {Id="palette.entities.creatures.ckdpf2", Translation="uiR2EDcreature_ckdpf2"}, - {Id="palette.entities.creatures.ckdpf3", Translation="uiR2EDcreature_ckdpf3"}, - {Id="palette.entities.creatures.ckdpf4", Translation="uiR2EDcreature_ckdpf4"}, - {Id="palette.entities.creatures.ckede1", Translation="uiR2EDcreature_ckede1"}, - {Id="palette.entities.creatures.ckede2", Translation="uiR2EDcreature_ckede2"}, - {Id="palette.entities.creatures.ckede3", Translation="uiR2EDcreature_ckede3"}, - {Id="palette.entities.creatures.ckede4", Translation="uiR2EDcreature_ckede4"}, - {Id="palette.entities.creatures.ckedf1", Translation="uiR2EDcreature_ckedf1"}, - {Id="palette.entities.creatures.ckedf2", Translation="uiR2EDcreature_ckedf2"}, - {Id="palette.entities.creatures.ckedf3", Translation="uiR2EDcreature_ckedf3"}, - {Id="palette.entities.creatures.ckedf4", Translation="uiR2EDcreature_ckedf4"}, - {Id="palette.entities.creatures.ckefe1", Translation="uiR2EDcreature_ckefe1"}, - {Id="palette.entities.creatures.ckefe2", Translation="uiR2EDcreature_ckefe2"}, - {Id="palette.entities.creatures.ckefe3", Translation="uiR2EDcreature_ckefe3"}, - {Id="palette.entities.creatures.ckefe4", Translation="uiR2EDcreature_ckefe4"}, - {Id="palette.entities.creatures.ckeff1", Translation="uiR2EDcreature_ckeff1"}, - {Id="palette.entities.creatures.ckeff2", Translation="uiR2EDcreature_ckeff2"}, - {Id="palette.entities.creatures.ckeff3", Translation="uiR2EDcreature_ckeff3"}, - {Id="palette.entities.creatures.ckeff4", Translation="uiR2EDcreature_ckeff4"}, - -- {Id="palette.entities.creatures.ckegb1", Translation="uiR2EDcreature_ckegb1"}, - -- {Id="palette.entities.creatures.ckegb2", Translation="uiR2EDcreature_ckegb2"}, - -- {Id="palette.entities.creatures.ckegb3", Translation="uiR2EDcreature_ckegb3"}, - -- {Id="palette.entities.creatures.ckegb4", Translation="uiR2EDcreature_ckegb4"}, - -- {Id="palette.entities.creatures.ckegc1", Translation="uiR2EDcreature_ckegc1"}, - -- {Id="palette.entities.creatures.ckegc2", Translation="uiR2EDcreature_ckegc2"}, - -- {Id="palette.entities.creatures.ckegc3", Translation="uiR2EDcreature_ckegc3"}, - -- {Id="palette.entities.creatures.ckegc4", Translation="uiR2EDcreature_ckegc4"}, - -- {Id="palette.entities.creatures.ckegd1", Translation="uiR2EDcreature_ckegd1"}, - -- {Id="palette.entities.creatures.ckegd2", Translation="uiR2EDcreature_ckegd2"}, - -- {Id="palette.entities.creatures.ckegd3", Translation="uiR2EDcreature_ckegd3"}, - -- {Id="palette.entities.creatures.ckegd4", Translation="uiR2EDcreature_ckegd4"}, - -- {Id="palette.entities.creatures.ckege1", Translation="uiR2EDcreature_ckege1"}, - -- {Id="palette.entities.creatures.ckege2", Translation="uiR2EDcreature_ckege2"}, - -- {Id="palette.entities.creatures.ckege3", Translation="uiR2EDcreature_ckege3"}, - -- {Id="palette.entities.creatures.ckege4", Translation="uiR2EDcreature_ckege4"}, - -- {Id="palette.entities.creatures.ckegf1", Translation="uiR2EDcreature_ckegf1"}, - -- {Id="palette.entities.creatures.ckegf2", Translation="uiR2EDcreature_ckegf2"}, - -- {Id="palette.entities.creatures.ckegf3", Translation="uiR2EDcreature_ckegf3"}, - -- {Id="palette.entities.creatures.ckegf4", Translation="uiR2EDcreature_ckegf4"}, - {Id="palette.entities.creatures.ckeje1", Translation="uiR2EDcreature_ckeje1"}, - {Id="palette.entities.creatures.ckeje2", Translation="uiR2EDcreature_ckeje2"}, - {Id="palette.entities.creatures.ckeje3", Translation="uiR2EDcreature_ckeje3"}, - {Id="palette.entities.creatures.ckeje4", Translation="uiR2EDcreature_ckeje4"}, - {Id="palette.entities.creatures.ckejf1", Translation="uiR2EDcreature_ckejf1"}, - {Id="palette.entities.creatures.ckejf2", Translation="uiR2EDcreature_ckejf2"}, - {Id="palette.entities.creatures.ckejf3", Translation="uiR2EDcreature_ckejf3"}, - {Id="palette.entities.creatures.ckejf4", Translation="uiR2EDcreature_ckejf4"}, - {Id="palette.entities.creatures.ckele1", Translation="uiR2EDcreature_ckele1"}, - {Id="palette.entities.creatures.ckele2", Translation="uiR2EDcreature_ckele2"}, - {Id="palette.entities.creatures.ckele3", Translation="uiR2EDcreature_ckele3"}, - {Id="palette.entities.creatures.ckele4", Translation="uiR2EDcreature_ckele4"}, - {Id="palette.entities.creatures.ckelf1", Translation="uiR2EDcreature_ckelf1"}, - {Id="palette.entities.creatures.ckelf2", Translation="uiR2EDcreature_ckelf2"}, - {Id="palette.entities.creatures.ckelf3", Translation="uiR2EDcreature_ckelf3"}, - {Id="palette.entities.creatures.ckelf4", Translation="uiR2EDcreature_ckelf4"}, - {Id="palette.entities.creatures.ckepe1", Translation="uiR2EDcreature_ckepe1"}, - {Id="palette.entities.creatures.ckepe2", Translation="uiR2EDcreature_ckepe2"}, - {Id="palette.entities.creatures.ckepe3", Translation="uiR2EDcreature_ckepe3"}, - {Id="palette.entities.creatures.ckepe4", Translation="uiR2EDcreature_ckepe4"}, - {Id="palette.entities.creatures.ckepf1", Translation="uiR2EDcreature_ckepf1"}, - {Id="palette.entities.creatures.ckepf2", Translation="uiR2EDcreature_ckepf2"}, - {Id="palette.entities.creatures.ckepf3", Translation="uiR2EDcreature_ckepf3"}, - {Id="palette.entities.creatures.ckepf4", Translation="uiR2EDcreature_ckepf4"}, - {Id="palette.entities.creatures.ckfde1", Translation="uiR2EDcreature_ckfde1"}, - {Id="palette.entities.creatures.ckfde2", Translation="uiR2EDcreature_ckfde2"}, - {Id="palette.entities.creatures.ckfde3", Translation="uiR2EDcreature_ckfde3"}, - {Id="palette.entities.creatures.ckfde4", Translation="uiR2EDcreature_ckfde4"}, - {Id="palette.entities.creatures.ckfdf1", Translation="uiR2EDcreature_ckfdf1"}, - {Id="palette.entities.creatures.ckfdf2", Translation="uiR2EDcreature_ckfdf2"}, - {Id="palette.entities.creatures.ckfdf3", Translation="uiR2EDcreature_ckfdf3"}, - {Id="palette.entities.creatures.ckfdf4", Translation="uiR2EDcreature_ckfdf4"}, - {Id="palette.entities.creatures.ckffe1", Translation="uiR2EDcreature_ckffe1"}, - {Id="palette.entities.creatures.ckffe2", Translation="uiR2EDcreature_ckffe2"}, - {Id="palette.entities.creatures.ckffe3", Translation="uiR2EDcreature_ckffe3"}, - {Id="palette.entities.creatures.ckffe4", Translation="uiR2EDcreature_ckffe4"}, - {Id="palette.entities.creatures.ckfff1", Translation="uiR2EDcreature_ckfff1"}, - {Id="palette.entities.creatures.ckfff2", Translation="uiR2EDcreature_ckfff2"}, - {Id="palette.entities.creatures.ckfff3", Translation="uiR2EDcreature_ckfff3"}, - {Id="palette.entities.creatures.ckfff4", Translation="uiR2EDcreature_ckfff4"}, - {Id="palette.entities.creatures.ckfje1", Translation="uiR2EDcreature_ckfje1"}, - {Id="palette.entities.creatures.ckfje2", Translation="uiR2EDcreature_ckfje2"}, - {Id="palette.entities.creatures.ckfje3", Translation="uiR2EDcreature_ckfje3"}, - {Id="palette.entities.creatures.ckfje4", Translation="uiR2EDcreature_ckfje4"}, - {Id="palette.entities.creatures.ckfjf1", Translation="uiR2EDcreature_ckfjf1"}, - {Id="palette.entities.creatures.ckfjf2", Translation="uiR2EDcreature_ckfjf2"}, - {Id="palette.entities.creatures.ckfjf3", Translation="uiR2EDcreature_ckfjf3"}, - {Id="palette.entities.creatures.ckfjf4", Translation="uiR2EDcreature_ckfjf4"}, - {Id="palette.entities.creatures.ckfle1", Translation="uiR2EDcreature_ckfle1"}, - {Id="palette.entities.creatures.ckfle2", Translation="uiR2EDcreature_ckfle2"}, - {Id="palette.entities.creatures.ckfle3", Translation="uiR2EDcreature_ckfle3"}, - {Id="palette.entities.creatures.ckfle4", Translation="uiR2EDcreature_ckfle4"}, - {Id="palette.entities.creatures.ckflf1", Translation="uiR2EDcreature_ckflf1"}, - {Id="palette.entities.creatures.ckflf2", Translation="uiR2EDcreature_ckflf2"}, - {Id="palette.entities.creatures.ckflf3", Translation="uiR2EDcreature_ckflf3"}, - {Id="palette.entities.creatures.ckflf4", Translation="uiR2EDcreature_ckflf4"}, - {Id="palette.entities.creatures.ckfpe1", Translation="uiR2EDcreature_ckfpe1"}, - {Id="palette.entities.creatures.ckfpe2", Translation="uiR2EDcreature_ckfpe2"}, - {Id="palette.entities.creatures.ckfpe3", Translation="uiR2EDcreature_ckfpe3"}, - {Id="palette.entities.creatures.ckfpe4", Translation="uiR2EDcreature_ckfpe4"}, - {Id="palette.entities.creatures.ckfpf1", Translation="uiR2EDcreature_ckfpf1"}, - {Id="palette.entities.creatures.ckfpf2", Translation="uiR2EDcreature_ckfpf2"}, - {Id="palette.entities.creatures.ckfpf3", Translation="uiR2EDcreature_ckfpf3"}, - {Id="palette.entities.creatures.ckfpf4", Translation="uiR2EDcreature_ckfpf4"}, - {Id="palette.entities.creatures.ckjdd1", Translation="uiR2EDcreature_ckjdd1"}, - {Id="palette.entities.creatures.ckjdd2", Translation="uiR2EDcreature_ckjdd2"}, - {Id="palette.entities.creatures.ckjdd3", Translation="uiR2EDcreature_ckjdd3"}, - {Id="palette.entities.creatures.ckjdd4", Translation="uiR2EDcreature_ckjdd4"}, - {Id="palette.entities.creatures.ckjde1", Translation="uiR2EDcreature_ckjde1"}, - {Id="palette.entities.creatures.ckjde2", Translation="uiR2EDcreature_ckjde2"}, - {Id="palette.entities.creatures.ckjde3", Translation="uiR2EDcreature_ckjde3"}, - {Id="palette.entities.creatures.ckjde4", Translation="uiR2EDcreature_ckjde4"}, - {Id="palette.entities.creatures.ckjdf1", Translation="uiR2EDcreature_ckjdf1"}, - {Id="palette.entities.creatures.ckjdf2", Translation="uiR2EDcreature_ckjdf2"}, - {Id="palette.entities.creatures.ckjdf3", Translation="uiR2EDcreature_ckjdf3"}, - {Id="palette.entities.creatures.ckjdf4", Translation="uiR2EDcreature_ckjdf4"}, - {Id="palette.entities.creatures.ckjfd1", Translation="uiR2EDcreature_ckjfd1"}, - {Id="palette.entities.creatures.ckjfd2", Translation="uiR2EDcreature_ckjfd2"}, - {Id="palette.entities.creatures.ckjfd3", Translation="uiR2EDcreature_ckjfd3"}, - {Id="palette.entities.creatures.ckjfd4", Translation="uiR2EDcreature_ckjfd4"}, - {Id="palette.entities.creatures.ckjfe1", Translation="uiR2EDcreature_ckjfe1"}, - {Id="palette.entities.creatures.ckjfe2", Translation="uiR2EDcreature_ckjfe2"}, - {Id="palette.entities.creatures.ckjfe3", Translation="uiR2EDcreature_ckjfe3"}, - {Id="palette.entities.creatures.ckjfe4", Translation="uiR2EDcreature_ckjfe4"}, - {Id="palette.entities.creatures.ckjff1", Translation="uiR2EDcreature_ckjff1"}, - {Id="palette.entities.creatures.ckjff2", Translation="uiR2EDcreature_ckjff2"}, - {Id="palette.entities.creatures.ckjff3", Translation="uiR2EDcreature_ckjff3"}, - {Id="palette.entities.creatures.ckjff4", Translation="uiR2EDcreature_ckjff4"}, - -- {Id="palette.entities.creatures.ckjgb1", Translation="uiR2EDcreature_ckjgb1"}, - -- {Id="palette.entities.creatures.ckjgb2", Translation="uiR2EDcreature_ckjgb2"}, - -- {Id="palette.entities.creatures.ckjgb3", Translation="uiR2EDcreature_ckjgb3"}, - -- {Id="palette.entities.creatures.ckjgb4", Translation="uiR2EDcreature_ckjgb4"}, - -- {Id="palette.entities.creatures.ckjgc1", Translation="uiR2EDcreature_ckjgc1"}, - -- {Id="palette.entities.creatures.ckjgc2", Translation="uiR2EDcreature_ckjgc2"}, - -- {Id="palette.entities.creatures.ckjgc3", Translation="uiR2EDcreature_ckjgc3"}, - -- {Id="palette.entities.creatures.ckjgc4", Translation="uiR2EDcreature_ckjgc4"}, - -- {Id="palette.entities.creatures.ckjgd1", Translation="uiR2EDcreature_ckjgd1"}, - -- {Id="palette.entities.creatures.ckjgd2", Translation="uiR2EDcreature_ckjgd2"}, - -- {Id="palette.entities.creatures.ckjgd3", Translation="uiR2EDcreature_ckjgd3"}, - -- {Id="palette.entities.creatures.ckjgd4", Translation="uiR2EDcreature_ckjgd4"}, - -- {Id="palette.entities.creatures.ckjge1", Translation="uiR2EDcreature_ckjge1"}, - -- {Id="palette.entities.creatures.ckjge2", Translation="uiR2EDcreature_ckjge2"}, - -- {Id="palette.entities.creatures.ckjge3", Translation="uiR2EDcreature_ckjge3"}, - -- {Id="palette.entities.creatures.ckjge4", Translation="uiR2EDcreature_ckjge4"}, - -- {Id="palette.entities.creatures.ckjgf1", Translation="uiR2EDcreature_ckjgf1"}, - -- {Id="palette.entities.creatures.ckjgf2", Translation="uiR2EDcreature_ckjgf2"}, - -- {Id="palette.entities.creatures.ckjgf3", Translation="uiR2EDcreature_ckjgf3"}, - -- {Id="palette.entities.creatures.ckjgf4", Translation="uiR2EDcreature_ckjgf4"}, - {Id="palette.entities.creatures.ckjjd1", Translation="uiR2EDcreature_ckjjd1"}, - {Id="palette.entities.creatures.ckjjd2", Translation="uiR2EDcreature_ckjjd2"}, - {Id="palette.entities.creatures.ckjjd3", Translation="uiR2EDcreature_ckjjd3"}, - {Id="palette.entities.creatures.ckjjd4", Translation="uiR2EDcreature_ckjjd4"}, - {Id="palette.entities.creatures.ckjje1", Translation="uiR2EDcreature_ckjje1"}, - {Id="palette.entities.creatures.ckjje2", Translation="uiR2EDcreature_ckjje2"}, - {Id="palette.entities.creatures.ckjje3", Translation="uiR2EDcreature_ckjje3"}, - {Id="palette.entities.creatures.ckjje4", Translation="uiR2EDcreature_ckjje4"}, - {Id="palette.entities.creatures.ckjjf1", Translation="uiR2EDcreature_ckjjf1"}, - {Id="palette.entities.creatures.ckjjf2", Translation="uiR2EDcreature_ckjjf2"}, - {Id="palette.entities.creatures.ckjjf3", Translation="uiR2EDcreature_ckjjf3"}, - {Id="palette.entities.creatures.ckjjf4", Translation="uiR2EDcreature_ckjjf4"}, - {Id="palette.entities.creatures.ckjld1", Translation="uiR2EDcreature_ckjld1"}, - {Id="palette.entities.creatures.ckjld2", Translation="uiR2EDcreature_ckjld2"}, - {Id="palette.entities.creatures.ckjld3", Translation="uiR2EDcreature_ckjld3"}, - {Id="palette.entities.creatures.ckjld4", Translation="uiR2EDcreature_ckjld4"}, - {Id="palette.entities.creatures.ckjle1", Translation="uiR2EDcreature_ckjle1"}, - {Id="palette.entities.creatures.ckjle2", Translation="uiR2EDcreature_ckjle2"}, - {Id="palette.entities.creatures.ckjle3", Translation="uiR2EDcreature_ckjle3"}, - {Id="palette.entities.creatures.ckjle4", Translation="uiR2EDcreature_ckjle4"}, - {Id="palette.entities.creatures.ckjlf1", Translation="uiR2EDcreature_ckjlf1"}, - {Id="palette.entities.creatures.ckjlf2", Translation="uiR2EDcreature_ckjlf2"}, - {Id="palette.entities.creatures.ckjlf3", Translation="uiR2EDcreature_ckjlf3"}, - {Id="palette.entities.creatures.ckjlf4", Translation="uiR2EDcreature_ckjlf4"}, - {Id="palette.entities.creatures.ckjpd1", Translation="uiR2EDcreature_ckjpd1"}, - {Id="palette.entities.creatures.ckjpd2", Translation="uiR2EDcreature_ckjpd2"}, - {Id="palette.entities.creatures.ckjpd3", Translation="uiR2EDcreature_ckjpd3"}, - {Id="palette.entities.creatures.ckjpd4", Translation="uiR2EDcreature_ckjpd4"}, - {Id="palette.entities.creatures.ckjpe1", Translation="uiR2EDcreature_ckjpe1"}, - {Id="palette.entities.creatures.ckjpe2", Translation="uiR2EDcreature_ckjpe2"}, - {Id="palette.entities.creatures.ckjpe3", Translation="uiR2EDcreature_ckjpe3"}, - {Id="palette.entities.creatures.ckjpe4", Translation="uiR2EDcreature_ckjpe4"}, - {Id="palette.entities.creatures.ckjpf1", Translation="uiR2EDcreature_ckjpf1"}, - {Id="palette.entities.creatures.ckjpf2", Translation="uiR2EDcreature_ckjpf2"}, - {Id="palette.entities.creatures.ckjpf3", Translation="uiR2EDcreature_ckjpf3"}, - {Id="palette.entities.creatures.ckjpf4", Translation="uiR2EDcreature_ckjpf4"} - } - }, - - - -- Named Passives - creatures_named_passives = - { - instances = - { - {Id="palette.entities.creatures.cbajf5", Translation="uiR2EDcreature_cbajf5"}, - {Id="palette.entities.creatures.cbbpe7", Translation="uiR2EDcreature_cbbpe7"}, - {Id="palette.entities.creatures.cbbde5", Translation="uiR2EDcreature_cbbde5"}, - {Id="palette.entities.creatures.cbbdd7", Translation="uiR2EDcreature_cbbdd7"}, - {Id="palette.entities.creatures.cbcld5", Translation="uiR2EDcreature_cbcld5"}, - {Id="palette.entities.creatures.cbclc7", Translation="uiR2EDcreature_cbclc7"}, - {Id="palette.entities.creatures.cbajb7", Translation="uiR2EDcreature_cbajb7"}, - {Id="palette.entities.creatures.chldf7", Translation="uiR2EDcreature_chldf7"}, - {Id="palette.entities.creatures.chsdf7", Translation="uiR2EDcreature_chsdf7"}, - {Id="palette.entities.creatures.chwff7", Translation="uiR2EDcreature_chwff7"}, - {Id="palette.entities.creatures.chxjf7", Translation="uiR2EDcreature_chxjf7"}, - {Id="palette.entities.creatures.chtjf7", Translation="uiR2EDcreature_chtjf7"}, - {Id="palette.entities.creatures.chulf7", Translation="uiR2EDcreature_chulf7"}, - {Id="palette.entities.creatures.chgpf7", Translation="uiR2EDcreature_chgpf7"}, - {Id="palette.entities.creatures.chlpf7", Translation="uiR2EDcreature_chlpf7"}, - {Id="palette.entities.creatures.chhpf7", Translation="uiR2EDcreature_chhpf7"}, - {Id="palette.entities.creatures.chvpf7", Translation="uiR2EDcreature_chvpf7"}, - {Id="palette.entities.creatures.chldf5", Translation="uiR2EDcreature_chldf5"}, - {Id="palette.entities.creatures.chsdf5", Translation="uiR2EDcreature_chsdf5"}, - {Id="palette.entities.creatures.chlff5", Translation="uiR2EDcreature_chlff5"}, - {Id="palette.entities.creatures.chvff5", Translation="uiR2EDcreature_chvff5"}, - {Id="palette.entities.creatures.chajf5", Translation="uiR2EDcreature_chajf5"}, - {Id="palette.entities.creatures.chtjf5", Translation="uiR2EDcreature_chtjf5"}, - {Id="palette.entities.creatures.chrlf5", Translation="uiR2EDcreature_chrlf5"}, - {Id="palette.entities.creatures.chhpf5", Translation="uiR2EDcreature_chhpf5"}, - {Id="palette.entities.creatures.chlpf5", Translation="uiR2EDcreature_chlpf5"}, - {Id="palette.entities.creatures.chgpf5", Translation="uiR2EDcreature_chgpf5"}, - {Id="palette.entities.creatures.chtde7", Translation="uiR2EDcreature_chtde7"}, - {Id="palette.entities.creatures.chwde7", Translation="uiR2EDcreature_chwde7"}, - {Id="palette.entities.creatures.chpde7", Translation="uiR2EDcreature_chpde7"}, - {Id="palette.entities.creatures.chlfe7", Translation="uiR2EDcreature_chlfe7"}, - {Id="palette.entities.creatures.chqfe7", Translation="uiR2EDcreature_chqfe7"}, - {Id="palette.entities.creatures.chrfe7", Translation="uiR2EDcreature_chrfe7"}, - {Id="palette.entities.creatures.chvfe7", Translation="uiR2EDcreature_chvfe7"}, - {Id="palette.entities.creatures.chvje7", Translation="uiR2EDcreature_chvje7"}, - {Id="palette.entities.creatures.chuje7", Translation="uiR2EDcreature_chuje7"}, - {Id="palette.entities.creatures.chsle7", Translation="uiR2EDcreature_chsle7"}, - {Id="palette.entities.creatures.chale7", Translation="uiR2EDcreature_chale7"}, - {Id="palette.entities.creatures.chele7", Translation="uiR2EDcreature_chele7"}, - {Id="palette.entities.creatures.chlpe7", Translation="uiR2EDcreature_chlpe7"}, - {Id="palette.entities.creatures.chxpe7", Translation="uiR2EDcreature_chxpe7"}, - {Id="palette.entities.creatures.chape7", Translation="uiR2EDcreature_chape7"}, - {Id="palette.entities.creatures.chgde5", Translation="uiR2EDcreature_chgde5"}, - {Id="palette.entities.creatures.chkde5", Translation="uiR2EDcreature_chkde5"}, - {Id="palette.entities.creatures.chwde5", Translation="uiR2EDcreature_chwde5"}, - {Id="palette.entities.creatures.chafe5", Translation="uiR2EDcreature_chafe5"}, - {Id="palette.entities.creatures.chlfe5", Translation="uiR2EDcreature_chlfe5"}, - {Id="palette.entities.creatures.chqfe5", Translation="uiR2EDcreature_chqfe5"}, - {Id="palette.entities.creatures.chrfe5", Translation="uiR2EDcreature_chrfe5"}, - {Id="palette.entities.creatures.cheje5", Translation="uiR2EDcreature_cheje5"}, - {Id="palette.entities.creatures.chuje5", Translation="uiR2EDcreature_chuje5"}, - {Id="palette.entities.creatures.chale5", Translation="uiR2EDcreature_chale5"}, - {Id="palette.entities.creatures.chsle5", Translation="uiR2EDcreature_chsle5"}, - {Id="palette.entities.creatures.chhle5", Translation="uiR2EDcreature_chhle5"}, - {Id="palette.entities.creatures.chlpe5", Translation="uiR2EDcreature_chlpe5"}, - {Id="palette.entities.creatures.chxpe5", Translation="uiR2EDcreature_chxpe5"}, - {Id="palette.entities.creatures.chape5", Translation="uiR2EDcreature_chape5"}, - {Id="palette.entities.creatures.chbpe5", Translation="uiR2EDcreature_chbpe5"}, - {Id="palette.entities.creatures.chmdd7", Translation="uiR2EDcreature_chmdd7"}, - {Id="palette.entities.creatures.chpfd7", Translation="uiR2EDcreature_chpfd7"}, - {Id="palette.entities.creatures.chkjd7", Translation="uiR2EDcreature_chkjd7"}, - {Id="palette.entities.creatures.chcld7", Translation="uiR2EDcreature_chcld7"}, - {Id="palette.entities.creatures.chgpd7", Translation="uiR2EDcreature_chgpd7"}, - {Id="palette.entities.creatures.chhdd5", Translation="uiR2EDcreature_chhdd5"}, - {Id="palette.entities.creatures.chmdd5", Translation="uiR2EDcreature_chmdd5"}, - {Id="palette.entities.creatures.chnfd5", Translation="uiR2EDcreature_chnfd5"}, - {Id="palette.entities.creatures.chcjd5", Translation="uiR2EDcreature_chcjd5"}, - {Id="palette.entities.creatures.cheld5", Translation="uiR2EDcreature_cheld5"}, - {Id="palette.entities.creatures.chgpd5", Translation="uiR2EDcreature_chgpd5"}, - {Id="palette.entities.creatures.chbpd5", Translation="uiR2EDcreature_chbpd5"}, - {Id="palette.entities.creatures.chnjc7", Translation="uiR2EDcreature_chnjc7"}, - {Id="palette.entities.creatures.chhdc5", Translation="uiR2EDcreature_chhdc5"}, - {Id="palette.entities.creatures.chpdc5", Translation="uiR2EDcreature_chpdc5"}, - {Id="palette.entities.creatures.chafc5", Translation="uiR2EDcreature_chafc5"}, - {Id="palette.entities.creatures.chclc5", Translation="uiR2EDcreature_chclc5"}, - {Id="palette.entities.creatures.chblc5", Translation="uiR2EDcreature_chblc5"}, - {Id="palette.entities.creatures.chcdb7", Translation="uiR2EDcreature_chcdb7"}, - {Id="palette.entities.creatures.chbfb7", Translation="uiR2EDcreature_chbfb7"}, - {Id="palette.entities.creatures.chflb7", Translation="uiR2EDcreature_chflb7"}, - {Id="palette.entities.creatures.chgdb5", Translation="uiR2EDcreature_chgdb5"}, - {Id="palette.entities.creatures.chdfb5", Translation="uiR2EDcreature_chdfb5"}, - {Id="palette.entities.creatures.chfjb5", Translation="uiR2EDcreature_chfjb5"} - } - }, - - - -- Named Predators - creatures_named_predators = - { - instances = - { - {Id="palette.entities.creatures.cckdf7", Translation="uiR2EDcreature_cckdf7"}, - {Id="palette.entities.creatures.ccmff7", Translation="uiR2EDcreature_ccmff7"}, - {Id="palette.entities.creatures.cceff7", Translation="uiR2EDcreature_cceff7"}, - {Id="palette.entities.creatures.ccijf7", Translation="uiR2EDcreature_ccijf7"}, - {Id="palette.entities.creatures.ccpjf7", Translation="uiR2EDcreature_ccpjf7"}, - {Id="palette.entities.creatures.ccnlf7", Translation="uiR2EDcreature_ccnlf7"}, - {Id="palette.entities.creatures.ccclf7", Translation="uiR2EDcreature_ccclf7"}, - {Id="palette.entities.creatures.ccgpf7", Translation="uiR2EDcreature_ccgpf7"}, - {Id="palette.entities.creatures.ccmpf7", Translation="uiR2EDcreature_ccmpf7"}, - {Id="palette.entities.creatures.ccopf7", Translation="uiR2EDcreature_ccopf7"}, - {Id="palette.entities.creatures.ccepf7", Translation="uiR2EDcreature_ccepf7"}, - {Id="palette.entities.creatures.ccidf5", Translation="uiR2EDcreature_ccidf5"}, - {Id="palette.entities.creatures.ccdff5", Translation="uiR2EDcreature_ccdff5"}, - {Id="palette.entities.creatures.cckff5", Translation="uiR2EDcreature_cckff5"}, - {Id="palette.entities.creatures.ccfjf5", Translation="uiR2EDcreature_ccfjf5"}, - {Id="palette.entities.creatures.ccdlf5", Translation="uiR2EDcreature_ccdlf5"}, - {Id="palette.entities.creatures.ccflf5", Translation="uiR2EDcreature_ccflf5"}, - {Id="palette.entities.creatures.ccmpf5", Translation="uiR2EDcreature_ccmpf5"}, - {Id="palette.entities.creatures.ccopf5", Translation="uiR2EDcreature_ccopf5"}, - {Id="palette.entities.creatures.ccgpf5", Translation="uiR2EDcreature_ccgpf5"}, - {Id="palette.entities.creatures.cchde7", Translation="uiR2EDcreature_cchde7"}, - {Id="palette.entities.creatures.cclde7", Translation="uiR2EDcreature_cclde7"}, - {Id="palette.entities.creatures.ccdfe7", Translation="uiR2EDcreature_ccdfe7"}, - {Id="palette.entities.creatures.cckfe7", Translation="uiR2EDcreature_cckfe7"}, - {Id="palette.entities.creatures.ccafe7", Translation="uiR2EDcreature_ccafe7"}, - {Id="palette.entities.creatures.ccdle7", Translation="uiR2EDcreature_ccdle7"}, - {Id="palette.entities.creatures.ccope7", Translation="uiR2EDcreature_ccope7"}, - {Id="palette.entities.creatures.ccfpe7", Translation="uiR2EDcreature_ccfpe7"}, - {Id="palette.entities.creatures.cchpe7", Translation="uiR2EDcreature_cchpe7"}, - {Id="palette.entities.creatures.ccbde5", Translation="uiR2EDcreature_ccbde5"}, - {Id="palette.entities.creatures.cchde5", Translation="uiR2EDcreature_cchde5"}, - {Id="palette.entities.creatures.cclde5", Translation="uiR2EDcreature_cclde5"}, - {Id="palette.entities.creatures.ccdfe5", Translation="uiR2EDcreature_ccdfe5"}, - {Id="palette.entities.creatures.cckfe5", Translation="uiR2EDcreature_cckfe5"}, - {Id="palette.entities.creatures.ccaje5", Translation="uiR2EDcreature_ccaje5"}, - {Id="palette.entities.creatures.ccdje5", Translation="uiR2EDcreature_ccdje5"}, - {Id="palette.entities.creatures.ccele5", Translation="uiR2EDcreature_ccele5"}, - {Id="palette.entities.creatures.ccdle5", Translation="uiR2EDcreature_ccdle5"}, - {Id="palette.entities.creatures.ccope5", Translation="uiR2EDcreature_ccope5"}, - {Id="palette.entities.creatures.cchpe5", Translation="uiR2EDcreature_cchpe5"}, - {Id="palette.entities.creatures.ccidd7", Translation="uiR2EDcreature_ccidd7"}, - {Id="palette.entities.creatures.cccdd7", Translation="uiR2EDcreature_cccdd7"}, - {Id="palette.entities.creatures.ccjfd7", Translation="uiR2EDcreature_ccjfd7"}, - {Id="palette.entities.creatures.ccfjd7", Translation="uiR2EDcreature_ccfjd7"}, - {Id="palette.entities.creatures.ccnpd7", Translation="uiR2EDcreature_ccnpd7"}, - {Id="palette.entities.creatures.ccipd7", Translation="uiR2EDcreature_ccipd7"}, - {Id="palette.entities.creatures.cchdd5", Translation="uiR2EDcreature_cchdd5"}, - {Id="palette.entities.creatures.ccidd5", Translation="uiR2EDcreature_ccidd5"}, - {Id="palette.entities.creatures.ccafd5", Translation="uiR2EDcreature_ccafd5"}, - {Id="palette.entities.creatures.ccjfd5", Translation="uiR2EDcreature_ccjfd5"}, - {Id="palette.entities.creatures.ccijd5", Translation="uiR2EDcreature_ccijd5"}, - {Id="palette.entities.creatures.ccajd5", Translation="uiR2EDcreature_ccajd5"}, - {Id="palette.entities.creatures.ccfld5", Translation="uiR2EDcreature_ccfld5"}, - {Id="palette.entities.creatures.ccipd5", Translation="uiR2EDcreature_ccipd5"}, - {Id="palette.entities.creatures.ccbdc7", Translation="uiR2EDcreature_ccbdc7"}, - {Id="palette.entities.creatures.ccelc7", Translation="uiR2EDcreature_ccelc7"}, - {Id="palette.entities.creatures.ccafc5", Translation="uiR2EDcreature_ccafc5"}, - {Id="palette.entities.creatures.ccdjc5", Translation="uiR2EDcreature_ccdjc5"}, - {Id="palette.entities.creatures.cccdb7", Translation="uiR2EDcreature_cccdb7"}, - {Id="palette.entities.creatures.ccejb7", Translation="uiR2EDcreature_ccejb7"} - } - }, - - - -- Named Plants - creatures_named_plants = - { - instances = - { - {Id="palette.entities.creatures.cpfdf7", Translation="uiR2EDcreature_cpfdf7"}, - {Id="palette.entities.creatures.cpblf7", Translation="uiR2EDcreature_cpblf7"}, - -- {Id="palette.entities.creatures.cpapf7", Translation="uiR2EDcreature_cpapf7"}, - {Id="palette.entities.creatures.cpcpf7", Translation="uiR2EDcreature_cpcpf7"}, - {Id="palette.entities.creatures.cpefe7", Translation="uiR2EDcreature_cpefe7"}, - {Id="palette.entities.creatures.cpdje7", Translation="uiR2EDcreature_cpdje7"}, - -- {Id="palette.entities.creatures.cpapd7", Translation="uiR2EDcreature_cpapd7"}, - {Id="palette.entities.creatures.cpcfc7", Translation="uiR2EDcreature_cpcfc7"} - } - }, - - - -- Named Degens - creatures_named_degens = - { - instances = - { - {Id="palette.entities.creatures.cdbfe7", Translation="uiR2EDcreature_cdbfe7"}, - {Id="palette.entities.creatures.cdbje7", Translation="uiR2EDcreature_cdbje7"}, - {Id="palette.entities.creatures.cdale7", Translation="uiR2EDcreature_cdale7"}, - {Id="palette.entities.creatures.cdcde5", Translation="uiR2EDcreature_cdcde5"}, - {Id="palette.entities.creatures.cdbfe5", Translation="uiR2EDcreature_cdbfe5"}, - {Id="palette.entities.creatures.cdbje5", Translation="uiR2EDcreature_cdbje5"}, - {Id="palette.entities.creatures.cdcdd7", Translation="uiR2EDcreature_cdcdd7"}, - {Id="palette.entities.creatures.cdapd7", Translation="uiR2EDcreature_cdapd7"}, - {Id="palette.entities.creatures.cdcdd5", Translation="uiR2EDcreature_cdcdd5"}, - {Id="palette.entities.creatures.cdapd5", Translation="uiR2EDcreature_cdapd5"}, - {Id="palette.entities.creatures.cdalc5", Translation="uiR2EDcreature_cdalc5"} - } - }, - - - -- Named Kitins - creatures_named_kitins = - { - instances = - { - {Id="palette.entities.creatures.ckddf7", Translation="uiR2EDcreature_ckddf7"}, - {Id="palette.entities.creatures.ckhdf7", Translation="uiR2EDcreature_ckhdf7"}, - {Id="palette.entities.creatures.ckiff7", Translation="uiR2EDcreature_ckiff7"}, - {Id="palette.entities.creatures.ckfjf7", Translation="uiR2EDcreature_ckfjf7"}, - {Id="palette.entities.creatures.ckglf7", Translation="uiR2EDcreature_ckglf7"}, - {Id="palette.entities.creatures.ckdpf7", Translation="uiR2EDcreature_ckdpf7"}, - {Id="palette.entities.creatures.ckfpf7", Translation="uiR2EDcreature_ckfpf7"}, - {Id="palette.entities.creatures.ckipf7", Translation="uiR2EDcreature_ckipf7"}, - {Id="palette.entities.creatures.ckepf7", Translation="uiR2EDcreature_ckepf7"}, - {Id="palette.entities.creatures.ckgpf7", Translation="uiR2EDcreature_ckgpf7"}, - {Id="palette.entities.creatures.ckbpf7", Translation="uiR2EDcreature_ckbpf7"}, - {Id="palette.entities.creatures.ckjpf7", Translation="uiR2EDcreature_ckjpf7"}, - {Id="palette.entities.creatures.ckfdf5", Translation="uiR2EDcreature_ckfdf5"}, - {Id="palette.entities.creatures.ckedf5", Translation="uiR2EDcreature_ckedf5"}, - {Id="palette.entities.creatures.ckgff5", Translation="uiR2EDcreature_ckgff5"}, - {Id="palette.entities.creatures.ckdjf5", Translation="uiR2EDcreature_ckdjf5"}, - {Id="palette.entities.creatures.ckdlf5", Translation="uiR2EDcreature_ckdlf5"}, - {Id="palette.entities.creatures.ckglf5", Translation="uiR2EDcreature_ckglf5"}, - {Id="palette.entities.creatures.ckhpf5", Translation="uiR2EDcreature_ckhpf5"}, - {Id="palette.entities.creatures.ckgpf5", Translation="uiR2EDcreature_ckgpf5"}, - {Id="palette.entities.creatures.ckepf5", Translation="uiR2EDcreature_ckepf5"}, - {Id="palette.entities.creatures.ckjpf5", Translation="uiR2EDcreature_ckjpf5"}, - {Id="palette.entities.creatures.ckipf5", Translation="uiR2EDcreature_ckipf5"}, - {Id="palette.entities.creatures.ckfpf5", Translation="uiR2EDcreature_ckfpf5"}, - {Id="palette.entities.creatures.ckdpf5", Translation="uiR2EDcreature_ckdpf5"}, - {Id="palette.entities.creatures.ckede7", Translation="uiR2EDcreature_ckede7"}, - {Id="palette.entities.creatures.ckjde7", Translation="uiR2EDcreature_ckjde7"}, - {Id="palette.entities.creatures.ckdfe7", Translation="uiR2EDcreature_ckdfe7"}, - {Id="palette.entities.creatures.ckdje7", Translation="uiR2EDcreature_ckdje7"}, - {Id="palette.entities.creatures.ckeje7", Translation="uiR2EDcreature_ckeje7"}, - {Id="palette.entities.creatures.ckfje7", Translation="uiR2EDcreature_ckfje7"}, - {Id="palette.entities.creatures.ckele7", Translation="uiR2EDcreature_ckele7"}, - {Id="palette.entities.creatures.ckhpe7", Translation="uiR2EDcreature_ckhpe7"}, - {Id="palette.entities.creatures.ckfpe7", Translation="uiR2EDcreature_ckfpe7"}, - {Id="palette.entities.creatures.ckape7", Translation="uiR2EDcreature_ckape7"}, - {Id="palette.entities.creatures.ckhde5", Translation="uiR2EDcreature_ckhde5"}, - {Id="palette.entities.creatures.ckdde5", Translation="uiR2EDcreature_ckdde5"}, - {Id="palette.entities.creatures.ckede5", Translation="uiR2EDcreature_ckede5"}, - {Id="palette.entities.creatures.ckide5", Translation="uiR2EDcreature_ckide5"}, - {Id="palette.entities.creatures.ckefe5", Translation="uiR2EDcreature_ckefe5"}, - {Id="palette.entities.creatures.ckffe5", Translation="uiR2EDcreature_ckffe5"}, - {Id="palette.entities.creatures.ckdfe5", Translation="uiR2EDcreature_ckdfe5"}, - {Id="palette.entities.creatures.ckgfe5", Translation="uiR2EDcreature_ckgfe5"}, - {Id="palette.entities.creatures.ckhfe5", Translation="uiR2EDcreature_ckhfe5"}, - {Id="palette.entities.creatures.ckife5", Translation="uiR2EDcreature_ckife5"}, - {Id="palette.entities.creatures.ckjfe5", Translation="uiR2EDcreature_ckjfe5"}, - {Id="palette.entities.creatures.ckeje5", Translation="uiR2EDcreature_ckeje5"}, - {Id="palette.entities.creatures.ckfje5", Translation="uiR2EDcreature_ckfje5"}, - {Id="palette.entities.creatures.ckije5", Translation="uiR2EDcreature_ckije5"}, --- {Id="palette.entities.creatures.ckdje5", Translation="uiR2EDcreature_ckdje5"}, - {Id="palette.entities.creatures.ckgle5", Translation="uiR2EDcreature_ckgle5"}, - {Id="palette.entities.creatures.ckhle5", Translation="uiR2EDcreature_ckhle5"}, - {Id="palette.entities.creatures.ckdle5", Translation="uiR2EDcreature_ckdle5"}, - {Id="palette.entities.creatures.ckepe5", Translation="uiR2EDcreature_ckepe5"}, - {Id="palette.entities.creatures.ckdpe5", Translation="uiR2EDcreature_ckdpe5"}, - {Id="palette.entities.creatures.ckipe5", Translation="uiR2EDcreature_ckipe5"}, - {Id="palette.entities.creatures.ckfpe5", Translation="uiR2EDcreature_ckfpe5"}, - {Id="palette.entities.creatures.ckgpe5", Translation="uiR2EDcreature_ckgpe5"}, - {Id="palette.entities.creatures.ckhdd7", Translation="uiR2EDcreature_ckhdd7"}, - {Id="palette.entities.creatures.ckhfd7", Translation="uiR2EDcreature_ckhfd7"}, - {Id="palette.entities.creatures.ckdjd7", Translation="uiR2EDcreature_ckdjd7"}, - {Id="palette.entities.creatures.ckdld7", Translation="uiR2EDcreature_ckdld7"}, - {Id="palette.entities.creatures.ckjld7", Translation="uiR2EDcreature_ckjld7"}, - {Id="palette.entities.creatures.ckdpd7", Translation="uiR2EDcreature_ckdpd7"}, - {Id="palette.entities.creatures.ckhdd5", Translation="uiR2EDcreature_ckhdd5"}, - {Id="palette.entities.creatures.ckjpd5", Translation="uiR2EDcreature_ckjpd5"}, - {Id="palette.entities.creatures.ckhpd5", Translation="uiR2EDcreature_ckhpd5"}, - {Id="palette.entities.creatures.ckijc5", Translation="uiR2EDcreature_ckijc5"} - } - }, - - - -- Invasion Kitins - creatures_invasion_kitins = - { - instances = - { - {Id="palette.entities.creatures.ckgif4", Translation="uiR2EDcreature_ckgif4"}, - {Id="palette.entities.creatures.ckaif4", Translation="uiR2EDcreature_ckaif4"}, - {Id="palette.entities.creatures.ckdif4", Translation="uiR2EDcreature_ckdif4"}, - {Id="palette.entities.creatures.ckbif4", Translation="uiR2EDcreature_ckbif4"}, - {Id="palette.entities.creatures.ckhif4", Translation="uiR2EDcreature_ckhif4"}, - {Id="palette.entities.creatures.ckjif4", Translation="uiR2EDcreature_ckjif4"}, - {Id="palette.entities.creatures.ckeif4", Translation="uiR2EDcreature_ckeif4"}, - {Id="palette.entities.creatures.ckfif4", Translation="uiR2EDcreature_ckfif4"}, - {Id="palette.entities.creatures.ckcif4", Translation="uiR2EDcreature_ckcif4"}, - {Id="palette.entities.creatures.ckiif4", Translation="uiR2EDcreature_ckiif4"}, - {Id="palette.entities.creatures.ckfrf4", Translation="uiR2EDcreature_ckfrf4"}, - {Id="palette.entities.creatures.ckgif3", Translation="uiR2EDcreature_ckgif3"}, - {Id="palette.entities.creatures.ckaif3", Translation="uiR2EDcreature_ckaif3"}, - {Id="palette.entities.creatures.ckdif3", Translation="uiR2EDcreature_ckdif3"}, - {Id="palette.entities.creatures.ckbif3", Translation="uiR2EDcreature_ckbif3"}, - {Id="palette.entities.creatures.ckhif3", Translation="uiR2EDcreature_ckhif3"}, - {Id="palette.entities.creatures.ckjif3", Translation="uiR2EDcreature_ckjif3"}, - {Id="palette.entities.creatures.ckeif3", Translation="uiR2EDcreature_ckeif3"}, - {Id="palette.entities.creatures.ckfif3", Translation="uiR2EDcreature_ckfif3"}, - {Id="palette.entities.creatures.ckcif3", Translation="uiR2EDcreature_ckcif3"}, - {Id="palette.entities.creatures.ckiif3", Translation="uiR2EDcreature_ckiif3"}, - {Id="palette.entities.creatures.ckfrf3", Translation="uiR2EDcreature_ckfrf3"}, - {Id="palette.entities.creatures.ckgif2", Translation="uiR2EDcreature_ckgif2"}, - {Id="palette.entities.creatures.ckaif2", Translation="uiR2EDcreature_ckaif2"}, - {Id="palette.entities.creatures.ckdif2", Translation="uiR2EDcreature_ckdif2"}, - {Id="palette.entities.creatures.ckbif2", Translation="uiR2EDcreature_ckbif2"}, - {Id="palette.entities.creatures.ckhif2", Translation="uiR2EDcreature_ckhif2"}, - - {Id="palette.entities.creatures.ckjif2", Translation="uiR2EDcreature_ckjif2"}, - {Id="palette.entities.creatures.ckeif2", Translation="uiR2EDcreature_ckeif2"}, - {Id="palette.entities.creatures.ckfif2", Translation="uiR2EDcreature_ckfif2"}, - {Id="palette.entities.creatures.ckcif2", Translation="uiR2EDcreature_ckcif2"}, - {Id="palette.entities.creatures.ckiif2", Translation="uiR2EDcreature_ckiif2"}, - {Id="palette.entities.creatures.ckfrf2", Translation="uiR2EDcreature_ckfrf2"}, - {Id="palette.entities.creatures.ckgif1", Translation="uiR2EDcreature_ckgif1"}, - {Id="palette.entities.creatures.ckaif1", Translation="uiR2EDcreature_ckaif1"}, - {Id="palette.entities.creatures.ckdif1", Translation="uiR2EDcreature_ckdif1"}, - {Id="palette.entities.creatures.ckbif1", Translation="uiR2EDcreature_ckbif1"}, - {Id="palette.entities.creatures.ckhif1", Translation="uiR2EDcreature_ckhif1"}, - {Id="palette.entities.creatures.ckjif1", Translation="uiR2EDcreature_ckjif1"}, - {Id="palette.entities.creatures.ckeif1", Translation="uiR2EDcreature_ckeif1"}, - {Id="palette.entities.creatures.ckfif1", Translation="uiR2EDcreature_ckfif1"}, - {Id="palette.entities.creatures.ckcif1", Translation="uiR2EDcreature_ckcif1"}, - {Id="palette.entities.creatures.ckiif1", Translation="uiR2EDcreature_ckiif1"}, - {Id="palette.entities.creatures.ckfrf1", Translation="uiR2EDcreature_ckfrf1"}, - {Id="palette.entities.creatures.ckgie4", Translation="uiR2EDcreature_ckgie4"}, - {Id="palette.entities.creatures.ckaie4", Translation="uiR2EDcreature_ckaie4"}, - {Id="palette.entities.creatures.ckdie4", Translation="uiR2EDcreature_ckdie4"}, - {Id="palette.entities.creatures.ckbie4", Translation="uiR2EDcreature_ckbie4"}, - {Id="palette.entities.creatures.ckhie4", Translation="uiR2EDcreature_ckhie4"}, - {Id="palette.entities.creatures.ckjie4", Translation="uiR2EDcreature_ckjie4"}, - {Id="palette.entities.creatures.ckeie4", Translation="uiR2EDcreature_ckeie4"}, - {Id="palette.entities.creatures.ckfie4", Translation="uiR2EDcreature_ckfie4"}, - {Id="palette.entities.creatures.ckcie4", Translation="uiR2EDcreature_ckcie4"}, - {Id="palette.entities.creatures.ckiie4", Translation="uiR2EDcreature_ckiie4"}, - {Id="palette.entities.creatures.ckfre4", Translation="uiR2EDcreature_ckfre4"}, - {Id="palette.entities.creatures.ckgie3", Translation="uiR2EDcreature_ckgie3"}, - {Id="palette.entities.creatures.ckaie3", Translation="uiR2EDcreature_ckaie3"}, - {Id="palette.entities.creatures.ckdie3", Translation="uiR2EDcreature_ckdie3"}, - {Id="palette.entities.creatures.ckbie3", Translation="uiR2EDcreature_ckbie3"}, - {Id="palette.entities.creatures.ckhie3", Translation="uiR2EDcreature_ckhie3"}, - {Id="palette.entities.creatures.ckjie3", Translation="uiR2EDcreature_ckjie3"}, - {Id="palette.entities.creatures.ckeie3", Translation="uiR2EDcreature_ckeie3"}, - {Id="palette.entities.creatures.ckfie3", Translation="uiR2EDcreature_ckfie3"}, - {Id="palette.entities.creatures.ckcie3", Translation="uiR2EDcreature_ckcie3"}, - {Id="palette.entities.creatures.ckiie3", Translation="uiR2EDcreature_ckiie3"}, - {Id="palette.entities.creatures.ckfre3", Translation="uiR2EDcreature_ckfre3"}, - {Id="palette.entities.creatures.ckgie2", Translation="uiR2EDcreature_ckgie2"}, - {Id="palette.entities.creatures.ckaie2", Translation="uiR2EDcreature_ckaie2"}, - {Id="palette.entities.creatures.ckdie2", Translation="uiR2EDcreature_ckdie2"}, - {Id="palette.entities.creatures.ckbie2", Translation="uiR2EDcreature_ckbie2"}, - {Id="palette.entities.creatures.ckhie2", Translation="uiR2EDcreature_ckhie2"}, - {Id="palette.entities.creatures.ckjie2", Translation="uiR2EDcreature_ckjie2"}, - {Id="palette.entities.creatures.ckeie2", Translation="uiR2EDcreature_ckeie2"}, - {Id="palette.entities.creatures.ckfie2", Translation="uiR2EDcreature_ckfie2"}, - {Id="palette.entities.creatures.ckcie2", Translation="uiR2EDcreature_ckcie2"}, - {Id="palette.entities.creatures.ckiie2", Translation="uiR2EDcreature_ckiie2"}, - {Id="palette.entities.creatures.ckfre2", Translation="uiR2EDcreature_ckfre2"}, - {Id="palette.entities.creatures.ckgie1", Translation="uiR2EDcreature_ckgie1"}, - {Id="palette.entities.creatures.ckaie1", Translation="uiR2EDcreature_ckaie1"}, - {Id="palette.entities.creatures.ckdie1", Translation="uiR2EDcreature_ckdie1"}, - {Id="palette.entities.creatures.ckbie1", Translation="uiR2EDcreature_ckbie1"}, - {Id="palette.entities.creatures.ckhie1", Translation="uiR2EDcreature_ckhie1"}, - {Id="palette.entities.creatures.ckjie1", Translation="uiR2EDcreature_ckjie1"}, - {Id="palette.entities.creatures.ckeie1", Translation="uiR2EDcreature_ckeie1"}, - {Id="palette.entities.creatures.ckfie1", Translation="uiR2EDcreature_ckfie1"}, - {Id="palette.entities.creatures.ckcie1", Translation="uiR2EDcreature_ckcie1"}, - {Id="palette.entities.creatures.ckiie1", Translation="uiR2EDcreature_ckiie1"}, - {Id="palette.entities.creatures.ckfre1", Translation="uiR2EDcreature_ckfre1"}, - {Id="palette.entities.creatures.ckgid4", Translation="uiR2EDcreature_ckgid4"}, - {Id="palette.entities.creatures.ckaid4", Translation="uiR2EDcreature_ckaid4"}, - {Id="palette.entities.creatures.ckdid4", Translation="uiR2EDcreature_ckdid4"}, - {Id="palette.entities.creatures.ckbid4", Translation="uiR2EDcreature_ckbid4"}, - {Id="palette.entities.creatures.ckhid4", Translation="uiR2EDcreature_ckhid4"}, - {Id="palette.entities.creatures.ckjid4", Translation="uiR2EDcreature_ckjid4"}, - {Id="palette.entities.creatures.ckeid4", Translation="uiR2EDcreature_ckeid4"}, - {Id="palette.entities.creatures.ckfid4", Translation="uiR2EDcreature_ckfid4"}, - {Id="palette.entities.creatures.ckcid4", Translation="uiR2EDcreature_ckcid4"}, - {Id="palette.entities.creatures.ckiid4", Translation="uiR2EDcreature_ckiid4"}, - {Id="palette.entities.creatures.ckfrd4", Translation="uiR2EDcreature_ckfrd4"}, - {Id="palette.entities.creatures.ckgid3", Translation="uiR2EDcreature_ckgid3"}, - {Id="palette.entities.creatures.ckaid3", Translation="uiR2EDcreature_ckaid3"}, - {Id="palette.entities.creatures.ckdid3", Translation="uiR2EDcreature_ckdid3"}, - {Id="palette.entities.creatures.ckbid3", Translation="uiR2EDcreature_ckbid3"}, - {Id="palette.entities.creatures.ckhid3", Translation="uiR2EDcreature_ckhid3"}, - {Id="palette.entities.creatures.ckjid3", Translation="uiR2EDcreature_ckjid3"}, - {Id="palette.entities.creatures.ckeid3", Translation="uiR2EDcreature_ckeid3"}, - {Id="palette.entities.creatures.ckfid3", Translation="uiR2EDcreature_ckfid3"}, - - {Id="palette.entities.creatures.ckcid3", Translation="uiR2EDcreature_ckcid3"}, - {Id="palette.entities.creatures.ckiid3", Translation="uiR2EDcreature_ckiid3"}, - {Id="palette.entities.creatures.ckfrd3", Translation="uiR2EDcreature_ckfrd3"}, - {Id="palette.entities.creatures.ckgid2", Translation="uiR2EDcreature_ckgid2"}, - {Id="palette.entities.creatures.ckaid2", Translation="uiR2EDcreature_ckaid2"}, - {Id="palette.entities.creatures.ckdid2", Translation="uiR2EDcreature_ckdid2"}, - {Id="palette.entities.creatures.ckbid2", Translation="uiR2EDcreature_ckbid2"}, - {Id="palette.entities.creatures.ckhid2", Translation="uiR2EDcreature_ckhid2"}, - {Id="palette.entities.creatures.ckjid2", Translation="uiR2EDcreature_ckjid2"}, - {Id="palette.entities.creatures.ckeid2", Translation="uiR2EDcreature_ckeid2"}, - {Id="palette.entities.creatures.ckfid2", Translation="uiR2EDcreature_ckfid2"}, - {Id="palette.entities.creatures.ckcid2", Translation="uiR2EDcreature_ckcid2"}, - {Id="palette.entities.creatures.ckiid2", Translation="uiR2EDcreature_ckiid2"}, - {Id="palette.entities.creatures.ckfrd2", Translation="uiR2EDcreature_ckfrd2"}, - {Id="palette.entities.creatures.ckgid1", Translation="uiR2EDcreature_ckgid1"}, - {Id="palette.entities.creatures.ckaid1", Translation="uiR2EDcreature_ckaid1"}, - {Id="palette.entities.creatures.ckdid1", Translation="uiR2EDcreature_ckdid1"}, - {Id="palette.entities.creatures.ckbid1", Translation="uiR2EDcreature_ckbid1"}, - {Id="palette.entities.creatures.ckhid1", Translation="uiR2EDcreature_ckhid1"}, - {Id="palette.entities.creatures.ckjid1", Translation="uiR2EDcreature_ckjid1"}, - {Id="palette.entities.creatures.ckeid1", Translation="uiR2EDcreature_ckeid1"}, - {Id="palette.entities.creatures.ckfid1", Translation="uiR2EDcreature_ckfid1"}, - {Id="palette.entities.creatures.ckcid1", Translation="uiR2EDcreature_ckcid1"}, - {Id="palette.entities.creatures.ckiid1", Translation="uiR2EDcreature_ckiid1"}, - {Id="palette.entities.creatures.ckfrd1", Translation="uiR2EDcreature_ckfrd1"}, - {Id="palette.entities.creatures.ckgic4", Translation="uiR2EDcreature_ckgic4"}, - {Id="palette.entities.creatures.ckaic4", Translation="uiR2EDcreature_ckaic4"}, - {Id="palette.entities.creatures.ckdic4", Translation="uiR2EDcreature_ckdic4"}, - {Id="palette.entities.creatures.ckbic4", Translation="uiR2EDcreature_ckbic4"}, - {Id="palette.entities.creatures.ckhic4", Translation="uiR2EDcreature_ckhic4"}, - {Id="palette.entities.creatures.ckjic4", Translation="uiR2EDcreature_ckjic4"}, - {Id="palette.entities.creatures.ckeic4", Translation="uiR2EDcreature_ckeic4"}, - {Id="palette.entities.creatures.ckfic4", Translation="uiR2EDcreature_ckfic4"}, - {Id="palette.entities.creatures.ckcic4", Translation="uiR2EDcreature_ckcic4"}, - {Id="palette.entities.creatures.ckiic4", Translation="uiR2EDcreature_ckiic4"}, - {Id="palette.entities.creatures.ckfrc4", Translation="uiR2EDcreature_ckfrc4"}, - {Id="palette.entities.creatures.ckgic3", Translation="uiR2EDcreature_ckgic3"}, - {Id="palette.entities.creatures.ckaic3", Translation="uiR2EDcreature_ckaic3"}, - {Id="palette.entities.creatures.ckdic3", Translation="uiR2EDcreature_ckdic3"}, - {Id="palette.entities.creatures.ckbic3", Translation="uiR2EDcreature_ckbic3"}, - {Id="palette.entities.creatures.ckhic3", Translation="uiR2EDcreature_ckhic3"}, - {Id="palette.entities.creatures.ckjic3", Translation="uiR2EDcreature_ckjic3"}, - {Id="palette.entities.creatures.ckeic3", Translation="uiR2EDcreature_ckeic3"}, - {Id="palette.entities.creatures.ckfic3", Translation="uiR2EDcreature_ckfic3"}, - {Id="palette.entities.creatures.ckcic3", Translation="uiR2EDcreature_ckcic3"}, - {Id="palette.entities.creatures.ckiic3", Translation="uiR2EDcreature_ckiic3"}, - {Id="palette.entities.creatures.ckfrc3", Translation="uiR2EDcreature_ckfrc3"}, - {Id="palette.entities.creatures.ckgic2", Translation="uiR2EDcreature_ckgic2"}, - {Id="palette.entities.creatures.ckaic2", Translation="uiR2EDcreature_ckaic2"}, - {Id="palette.entities.creatures.ckdic2", Translation="uiR2EDcreature_ckdic2"}, - {Id="palette.entities.creatures.ckbic2", Translation="uiR2EDcreature_ckbic2"}, - {Id="palette.entities.creatures.ckhic2", Translation="uiR2EDcreature_ckhic2"}, - {Id="palette.entities.creatures.ckjic2", Translation="uiR2EDcreature_ckjic2"}, - {Id="palette.entities.creatures.ckeic2", Translation="uiR2EDcreature_ckeic2"}, - {Id="palette.entities.creatures.ckfic2", Translation="uiR2EDcreature_ckfic2"}, - {Id="palette.entities.creatures.ckcic2", Translation="uiR2EDcreature_ckcic2"}, - {Id="palette.entities.creatures.ckiic2", Translation="uiR2EDcreature_ckiic2"}, - {Id="palette.entities.creatures.ckfrc2", Translation="uiR2EDcreature_ckfrc2"}, - {Id="palette.entities.creatures.ckgic1", Translation="uiR2EDcreature_ckgic1"}, - {Id="palette.entities.creatures.ckaic1", Translation="uiR2EDcreature_ckaic1"}, - {Id="palette.entities.creatures.ckdic1", Translation="uiR2EDcreature_ckdic1"}, - {Id="palette.entities.creatures.ckbic1", Translation="uiR2EDcreature_ckbic1"}, - {Id="palette.entities.creatures.ckhic1", Translation="uiR2EDcreature_ckhic1"}, - {Id="palette.entities.creatures.ckjic1", Translation="uiR2EDcreature_ckjic1"}, - {Id="palette.entities.creatures.ckeic1", Translation="uiR2EDcreature_ckeic1"}, - {Id="palette.entities.creatures.ckfic1", Translation="uiR2EDcreature_ckfic1"}, - {Id="palette.entities.creatures.ckcic1", Translation="uiR2EDcreature_ckcic1"}, - {Id="palette.entities.creatures.ckiic1", Translation="uiR2EDcreature_ckiic1"}, - {Id="palette.entities.creatures.ckfrc1", Translation="uiR2EDcreature_ckfrc1"}, - {Id="palette.entities.creatures.ckgib4", Translation="uiR2EDcreature_ckgib4"}, - {Id="palette.entities.creatures.ckaib4", Translation="uiR2EDcreature_ckaib4"}, - {Id="palette.entities.creatures.ckdib4", Translation="uiR2EDcreature_ckdib4"}, - {Id="palette.entities.creatures.ckbib4", Translation="uiR2EDcreature_ckbib4"}, - {Id="palette.entities.creatures.ckhib4", Translation="uiR2EDcreature_ckhib4"}, - {Id="palette.entities.creatures.ckjib4", Translation="uiR2EDcreature_ckjib4"}, - {Id="palette.entities.creatures.ckeib4", Translation="uiR2EDcreature_ckeib4"}, - {Id="palette.entities.creatures.ckfib4", Translation="uiR2EDcreature_ckfib4"}, - {Id="palette.entities.creatures.ckcib4", Translation="uiR2EDcreature_ckcib4"}, - {Id="palette.entities.creatures.ckiib4", Translation="uiR2EDcreature_ckiib4"}, - {Id="palette.entities.creatures.ckfrb4", Translation="uiR2EDcreature_ckfrb4"}, - {Id="palette.entities.creatures.ckgib3", Translation="uiR2EDcreature_ckgib3"}, - {Id="palette.entities.creatures.ckaib3", Translation="uiR2EDcreature_ckaib3"}, - {Id="palette.entities.creatures.ckdib3", Translation="uiR2EDcreature_ckdib3"}, - {Id="palette.entities.creatures.ckbib3", Translation="uiR2EDcreature_ckbib3"}, - {Id="palette.entities.creatures.ckhib3", Translation="uiR2EDcreature_ckhib3"}, - {Id="palette.entities.creatures.ckjib3", Translation="uiR2EDcreature_ckjib3"}, - {Id="palette.entities.creatures.ckeib3", Translation="uiR2EDcreature_ckeib3"}, - {Id="palette.entities.creatures.ckfib3", Translation="uiR2EDcreature_ckfib3"}, - {Id="palette.entities.creatures.ckcib3", Translation="uiR2EDcreature_ckcib3"}, - {Id="palette.entities.creatures.ckiib3", Translation="uiR2EDcreature_ckiib3"}, - {Id="palette.entities.creatures.ckfrb3", Translation="uiR2EDcreature_ckfrb3"}, - {Id="palette.entities.creatures.ckgib2", Translation="uiR2EDcreature_ckgib2"}, - {Id="palette.entities.creatures.ckaib2", Translation="uiR2EDcreature_ckaib2"}, - {Id="palette.entities.creatures.ckdib2", Translation="uiR2EDcreature_ckdib2"}, - {Id="palette.entities.creatures.ckbib2", Translation="uiR2EDcreature_ckbib2"}, - {Id="palette.entities.creatures.ckhib2", Translation="uiR2EDcreature_ckhib2"}, - {Id="palette.entities.creatures.ckjib2", Translation="uiR2EDcreature_ckjib2"}, - {Id="palette.entities.creatures.ckeib2", Translation="uiR2EDcreature_ckeib2"}, - {Id="palette.entities.creatures.ckfib2", Translation="uiR2EDcreature_ckfib2"}, - {Id="palette.entities.creatures.ckcib2", Translation="uiR2EDcreature_ckcib2"}, - {Id="palette.entities.creatures.ckiib2", Translation="uiR2EDcreature_ckiib2"}, - {Id="palette.entities.creatures.ckfrb2", Translation="uiR2EDcreature_ckfrb2"}, - {Id="palette.entities.creatures.ckgib1", Translation="uiR2EDcreature_ckgib1"}, - {Id="palette.entities.creatures.ckaib1", Translation="uiR2EDcreature_ckaib1"}, - {Id="palette.entities.creatures.ckdib1", Translation="uiR2EDcreature_ckdib1"}, - {Id="palette.entities.creatures.ckbib1", Translation="uiR2EDcreature_ckbib1"}, - {Id="palette.entities.creatures.ckhib1", Translation="uiR2EDcreature_ckhib1"}, - {Id="palette.entities.creatures.ckjib1", Translation="uiR2EDcreature_ckjib1"}, - {Id="palette.entities.creatures.ckeib1", Translation="uiR2EDcreature_ckeib1"}, - {Id="palette.entities.creatures.ckfib1", Translation="uiR2EDcreature_ckfib1"}, - {Id="palette.entities.creatures.ckcib1", Translation="uiR2EDcreature_ckcib1"}, - {Id="palette.entities.creatures.ckiib1", Translation="uiR2EDcreature_ckiib1"}, - {Id="palette.entities.creatures.ckfrb1", Translation="uiR2EDcreature_ckfrb1"} - } - } - }, - - npc = - { --- sadge cuthroats = --- sadge { --- sadge fyros_cutthroats = --- sadge { --- sadge instances = --- sadge { --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_a_f_f", Translation="uiR2EDnpc_cuthroat_b_melee_a_f_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_b_f_f", Translation="uiR2EDnpc_cuthroat_b_melee_b_f_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_c_f_f", Translation="uiR2EDnpc_cuthroat_b_melee_c_f_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_a_f_f", Translation="uiR2EDnpc_cuthroat_b_range_a_f_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_b_f_f", Translation="uiR2EDnpc_cuthroat_b_range_b_f_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_c_f_f", Translation="uiR2EDnpc_cuthroat_b_range_c_f_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_c_f_h", Translation="uiR2EDnpc_cuthroat_b_range_c_f_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_b_f_h", Translation="uiR2EDnpc_cuthroat_b_melee_b_f_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_c_f_h", Translation="uiR2EDnpc_cuthroat_b_melee_c_f_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_a_f_h", Translation="uiR2EDnpc_cuthroat_b_melee_a_f_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_a_f_h", Translation="uiR2EDnpc_cuthroat_b_range_a_f_h"}, --- sadge --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_b_f_h", Translation="uiR2EDnpc_cuthroat_b_range_b_f_h"}, --- sadge } --- sadge }, --- sadge matis_cutthroats = --- sadge { --- sadge instances = --- sadge { --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_c_m_f", Translation="uiR2EDnpc_cuthroat_b_melee_c_m_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_b_m_f", Translation="uiR2EDnpc_cuthroat_b_range_b_m_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_a_m_f", Translation="uiR2EDnpc_cuthroat_b_melee_a_m_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_b_m_f", Translation="uiR2EDnpc_cuthroat_b_melee_b_m_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_c_m_f", Translation="uiR2EDnpc_cuthroat_b_range_c_m_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_a_m_f", Translation="uiR2EDnpc_cuthroat_b_range_a_m_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_b_m_h", Translation="uiR2EDnpc_cuthroat_b_melee_b_m_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_a_m_h", Translation="uiR2EDnpc_cuthroat_b_range_a_m_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_c_m_h", Translation="uiR2EDnpc_cuthroat_b_range_c_m_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_a_m_h", Translation="uiR2EDnpc_cuthroat_b_melee_a_m_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_b_m_h", Translation="uiR2EDnpc_cuthroat_b_range_b_m_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_c_m_h", Translation="uiR2EDnpc_cuthroat_b_melee_c_m_h"}, --- sadge } --- sadge }, --- sadge tryker_cutthroats = --- sadge { --- sadge instances = --- sadge { --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_b_t_f", Translation="uiR2EDnpc_cuthroat_b_melee_b_t_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_b_t_f", Translation="uiR2EDnpc_cuthroat_b_range_b_t_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_a_t_f", Translation="uiR2EDnpc_cuthroat_b_melee_a_t_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_c_t_f", Translation="uiR2EDnpc_cuthroat_b_melee_c_t_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_c_t_f", Translation="uiR2EDnpc_cuthroat_b_range_c_t_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_a_t_f", Translation="uiR2EDnpc_cuthroat_b_range_a_t_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_c_t_h", Translation="uiR2EDnpc_cuthroat_b_range_c_t_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_a_t_h", Translation="uiR2EDnpc_cuthroat_b_range_a_t_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_b_t_h", Translation="uiR2EDnpc_cuthroat_b_range_b_t_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_a_t_h", Translation="uiR2EDnpc_cuthroat_b_melee_a_t_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_b_t_h", Translation="uiR2EDnpc_cuthroat_b_melee_b_t_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_c_t_h", Translation="uiR2EDnpc_cuthroat_b_melee_c_t_h"}, --- sadge } --- sadge }, --- sadge zorai_cutthroats = --- sadge { --- sadge instances = --- sadge { --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_b_z_f", Translation="uiR2EDnpc_cuthroat_b_melee_b_z_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_c_z_f", Translation="uiR2EDnpc_cuthroat_b_melee_c_z_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_a_z_f", Translation="uiR2EDnpc_cuthroat_b_range_a_z_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_c_z_f", Translation="uiR2EDnpc_cuthroat_b_range_c_z_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_b_z_f", Translation="uiR2EDnpc_cuthroat_b_range_b_z_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_a_z_f", Translation="uiR2EDnpc_cuthroat_b_melee_a_z_f"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_a_z_h", Translation="uiR2EDnpc_cuthroat_b_melee_a_z_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_a_z_h", Translation="uiR2EDnpc_cuthroat_b_range_a_z_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_b_z_h", Translation="uiR2EDnpc_cuthroat_b_melee_b_z_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_melee_c_z_h", Translation="uiR2EDnpc_cuthroat_b_melee_c_z_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_b_z_h", Translation="uiR2EDnpc_cuthroat_b_range_b_z_h"}, --- sadge {Id="palette.entities.npcs.cuthroats.cuthroat_b_range_c_z_h", Translation="uiR2EDnpc_cuthroat_b_range_c_z_h"}, --- sadge } --- sadge } --- sadge }, - - --- sadge guards = --- sadge { --- sadge fyros_guards = --- sadge { --- sadge instances = --- sadge { --- sadge {Id="palette.entities.npcs.guards.fyros_guard_l_b_f", Translation="uiR2EDnpc_fyros_guard_l_b_f"}, --- sadge {Id="palette.entities.npcs.guards.fyros_guard_l_b_h", Translation="uiR2EDnpc_fyros_guard_l_b_h"}, --- sadge {Id="palette.entities.npcs.guards.fyros_guard_l_c_f", Translation="uiR2EDnpc_fyros_guard_l_c_f"}, --- sadge {Id="palette.entities.npcs.guards.fyros_guard_l_c_h", Translation="uiR2EDnpc_fyros_guard_l_c_h"}, --- sadge {Id="palette.entities.npcs.guards.fyros_guard_l_d_f", Translation="uiR2EDnpc_fyros_guard_l_d_f"}, --- sadge {Id="palette.entities.npcs.guards.fyros_guard_l_d_h", Translation="uiR2EDnpc_fyros_guard_l_d_h"}, --- sadge {Id="palette.entities.npcs.guards.fyros_guard_l_e_f", Translation="uiR2EDnpc_fyros_guard_l_e_f"}, --- sadge {Id="palette.entities.npcs.guards.fyros_guard_l_e_h", Translation="uiR2EDnpc_fyros_guard_l_e_h"}, --- sadge {Id="palette.entities.npcs.guards.fyros_guard_l_f_f", Translation="uiR2EDnpc_fyros_guard_l_f_f"}, --- sadge {Id="palette.entities.npcs.guards.fyros_guard_l_f_h", Translation="uiR2EDnpc_fyros_guard_l_f_h"}, --- sadge } --- sadge }, --- sadge matis_guards = --- sadge { --- sadge instances = --- sadge { --- sadge {Id="palette.entities.npcs.guards.matis_guard_l_b_f", Translation="uiR2EDnpc_matis_guard_l_b_f"}, --- sadge {Id="palette.entities.npcs.guards.matis_guard_l_b_h", Translation="uiR2EDnpc_matis_guard_l_b_h"}, --- sadge {Id="palette.entities.npcs.guards.matis_guard_l_c_f", Translation="uiR2EDnpc_matis_guard_l_c_f"}, --- sadge {Id="palette.entities.npcs.guards.matis_guard_l_c_h", Translation="uiR2EDnpc_matis_guard_l_c_h"}, --- sadge {Id="palette.entities.npcs.guards.matis_guard_l_d_f", Translation="uiR2EDnpc_matis_guard_l_d_f"}, --- sadge {Id="palette.entities.npcs.guards.matis_guard_l_d_h", Translation="uiR2EDnpc_matis_guard_l_d_h"}, --- sadge {Id="palette.entities.npcs.guards.matis_guard_l_e_f", Translation="uiR2EDnpc_matis_guard_l_e_f"}, --- sadge {Id="palette.entities.npcs.guards.matis_guard_l_e_h", Translation="uiR2EDnpc_matis_guard_l_e_h"}, --- sadge {Id="palette.entities.npcs.guards.matis_guard_l_f_f", Translation="uiR2EDnpc_matis_guard_l_f_f"}, --- sadge {Id="palette.entities.npcs.guards.matis_guard_l_f_h", Translation="uiR2EDnpc_matis_guard_l_f_h"}, --- sadge } --- sadge }, --- sadge tryker_guards = --- sadge { --- sadge instances = --- sadge { --- sadge {Id="palette.entities.npcs.guards.tryker_guard_l_b_f", Translation="uiR2EDnpc_tryker_guard_l_b_f"}, --- sadge {Id="palette.entities.npcs.guards.tryker_guard_l_b_h", Translation="uiR2EDnpc_tryker_guard_l_b_h"}, --- sadge {Id="palette.entities.npcs.guards.tryker_guard_l_c_f", Translation="uiR2EDnpc_tryker_guard_l_c_f"}, --- sadge {Id="palette.entities.npcs.guards.tryker_guard_l_c_h", Translation="uiR2EDnpc_tryker_guard_l_c_h"}, --- sadge {Id="palette.entities.npcs.guards.tryker_guard_l_d_f", Translation="uiR2EDnpc_tryker_guard_l_d_f"}, --- sadge {Id="palette.entities.npcs.guards.tryker_guard_l_d_h", Translation="uiR2EDnpc_tryker_guard_l_d_h"}, --- sadge {Id="palette.entities.npcs.guards.tryker_guard_l_e_f", Translation="uiR2EDnpc_tryker_guard_l_e_f"}, --- sadge {Id="palette.entities.npcs.guards.tryker_guard_l_e_h", Translation="uiR2EDnpc_tryker_guard_l_e_h"}, --- sadge {Id="palette.entities.npcs.guards.tryker_guard_l_f_f", Translation="uiR2EDnpc_tryker_guard_l_f_f"}, --- sadge {Id="palette.entities.npcs.guards.tryker_guard_l_f_h", Translation="uiR2EDnpc_tryker_guard_l_f_h"}, --- sadge } --- sadge }, --- sadge zorai_guards = --- sadge { --- sadge instances = --- sadge { --- sadge {Id="palette.entities.npcs.guards.zorai_guard_l_b_f", Translation="uiR2EDnpc_zorai_guard_l_b_f"}, --- sadge {Id="palette.entities.npcs.guards.zorai_guard_l_b_h", Translation="uiR2EDnpc_zorai_guard_l_b_h"}, --- sadge {Id="palette.entities.npcs.guards.zorai_guard_l_c_f", Translation="uiR2EDnpc_zorai_guard_l_c_f"}, --- sadge {Id="palette.entities.npcs.guards.zorai_guard_l_c_h", Translation="uiR2EDnpc_zorai_guard_l_c_h"}, --- sadge {Id="palette.entities.npcs.guards.zorai_guard_l_d_f", Translation="uiR2EDnpc_zorai_guard_l_d_f"}, --- sadge {Id="palette.entities.npcs.guards.zorai_guard_l_d_h", Translation="uiR2EDnpc_zorai_guard_l_d_h"}, --- sadge {Id="palette.entities.npcs.guards.zorai_guard_l_e_f", Translation="uiR2EDnpc_zorai_guard_l_e_f"}, --- sadge {Id="palette.entities.npcs.guards.zorai_guard_l_e_h", Translation="uiR2EDnpc_zorai_guard_l_e_h"}, --- sadge {Id="palette.entities.npcs.guards.zorai_guard_l_f_f", Translation="uiR2EDnpc_zorai_guard_l_f_f"}, --- sadge {Id="palette.entities.npcs.guards.zorai_guard_l_f_h", Translation="uiR2EDnpc_zorai_guard_l_f_h"}, --- sadge } --- sadge } --- sadge }, - - --- sadge primitives = --- sadge { --- sadge cute = --- sadge { --- sadge instances = --- sadge { --- sadge {Id="palette.entities.npcs.cute.npc_cute_mature_b", Translation="uiR2EDnpc_npc_cute_mature_b"}, --- sadge {Id="palette.entities.npcs.cute.npc_cute_mature_c", Translation="uiR2EDnpc_npc_cute_mature_c"}, --- sadge {Id="palette.entities.npcs.cute.npc_cute_mature_d", Translation="uiR2EDnpc_npc_cute_mature_d"}, --- sadge {Id="palette.entities.npcs.cute.npc_cute_mature_e", Translation="uiR2EDnpc_npc_cute_mature_e"}, --- sadge {Id="palette.entities.npcs.cute.npc_cute_mature_f", Translation="uiR2EDnpc_npc_cute_mature_f"}, --- sadge {Id="palette.entities.npcs.cute.npc_cute_venerable_b", Translation="uiR2EDnpc_npc_cute_venerable_b"}, --- sadge {Id="palette.entities.npcs.cute.npc_cute_venerable_c", Translation="uiR2EDnpc_npc_cute_venerable_c"}, --- sadge {Id="palette.entities.npcs.cute.npc_cute_venerable_d", Translation="uiR2EDnpc_npc_cute_venerable_d"}, --- sadge {Id="palette.entities.npcs.cute.npc_cute_venerable_e", Translation="uiR2EDnpc_npc_cute_venerable_e"}, --- sadge {Id="palette.entities.npcs.cute.npc_cute_venerable_f", Translation="uiR2EDnpc_npc_cute_venerable_f"}, --- sadge {Id="palette.entities.npcs.cute.npc_cute_weapon_b", Translation="uiR2EDnpc_npc_cute_weapon_b"}, --- sadge {Id="palette.entities.npcs.cute.npc_cute_weapon_c", Translation="uiR2EDnpc_npc_cute_weapon_c"}, --- sadge {Id="palette.entities.npcs.cute.npc_cute_weapon_d", Translation="uiR2EDnpc_npc_cute_weapon_d"}, --- sadge {Id="palette.entities.npcs.cute.npc_cute_weapon_e", Translation="uiR2EDnpc_npc_cute_weapon_e"}, --- sadge {Id="palette.entities.npcs.cute.npc_cute_weapon_f", Translation="uiR2EDnpc_npc_cute_weapon_f"}, --- sadge } --- sadge }, --- sadge frahar = --- sadge { --- sadge instances = --- sadge { --- sadge {Id="palette.entities.npcs.frahar.npc_frahar_ancient_b", Translation="uiR2EDnpc_npc_frahar_ancient_b"}, --- sadge {Id="palette.entities.npcs.frahar.npc_frahar_ancient_c", Translation="uiR2EDnpc_npc_frahar_ancient_c"}, --- sadge {Id="palette.entities.npcs.frahar.npc_frahar_ancient_d", Translation="uiR2EDnpc_npc_frahar_ancient_d"}, --- sadge {Id="palette.entities.npcs.frahar.npc_frahar_ancient_e", Translation="uiR2EDnpc_npc_frahar_ancient_e"}, --- sadge {Id="palette.entities.npcs.frahar.npc_frahar_ancient_f", Translation="uiR2EDnpc_npc_frahar_ancient_f"}, --- sadge {Id="palette.entities.npcs.frahar.npc_frahar_patriarchal_b", Translation="uiR2EDnpc_npc_frahar_patriarchal_b"}, --- sadge {Id="palette.entities.npcs.frahar.npc_frahar_patriarchal_c", Translation="uiR2EDnpc_npc_frahar_patriarchal_c"}, --- sadge {Id="palette.entities.npcs.frahar.npc_frahar_patriarchal_d", Translation="uiR2EDnpc_npc_frahar_patriarchal_d"}, --- sadge {Id="palette.entities.npcs.frahar.npc_frahar_patriarchal_e", Translation="uiR2EDnpc_npc_frahar_patriarchal_e"}, --- sadge {Id="palette.entities.npcs.frahar.npc_frahar_patriarchal_f", Translation="uiR2EDnpc_npc_frahar_patriarchal_f"}, --- sadge {Id="palette.entities.npcs.frahar.npc_frahar_weapon_b", Translation="uiR2EDnpc_npc_frahar_weapon_b"}, --- sadge {Id="palette.entities.npcs.frahar.npc_frahar_weapon_c", Translation="uiR2EDnpc_npc_frahar_weapon_c"}, --- sadge {Id="palette.entities.npcs.frahar.npc_frahar_weapon_d", Translation="uiR2EDnpc_npc_frahar_weapon_d"}, --- sadge {Id="palette.entities.npcs.frahar.npc_frahar_weapon_e", Translation="uiR2EDnpc_npc_frahar_weapon_e"}, --- sadge {Id="palette.entities.npcs.frahar.npc_frahar_weapon_f", Translation="uiR2EDnpc_npc_frahar_weapon_f"}, --- sadge } --- sadge }, --- sadge gibbai = --- sadge { --- sadge instances = --- sadge { --- sadge {Id="palette.entities.npcs.gibbai.npc_gibbay_old_b", Translation="uiR2EDnpc_npc_gibbay_old_b"}, --- sadge {Id="palette.entities.npcs.gibbai.npc_gibbay_old_c", Translation="uiR2EDnpc_npc_gibbay_old_c"}, --- sadge {Id="palette.entities.npcs.gibbai.npc_gibbay_old_d", Translation="uiR2EDnpc_npc_gibbay_old_d"}, --- sadge {Id="palette.entities.npcs.gibbai.npc_gibbay_old_e", Translation="uiR2EDnpc_npc_gibbay_old_e"}, --- sadge {Id="palette.entities.npcs.gibbai.npc_gibbay_old_f", Translation="uiR2EDnpc_npc_gibbay_old_f"}, --- sadge {Id="palette.entities.npcs.gibbai.npc_gibbay_weapon_b", Translation="uiR2EDnpc_npc_gibbay_weapon_b"}, --- sadge {Id="palette.entities.npcs.gibbai.npc_gibbay_weapon_c", Translation="uiR2EDnpc_npc_gibbay_weapon_c"}, --- sadge {Id="palette.entities.npcs.gibbai.npc_gibbay_weapon_d", Translation="uiR2EDnpc_npc_gibbay_weapon_d"}, --- sadge {Id="palette.entities.npcs.gibbai.npc_gibbay_weapon_e", Translation="uiR2EDnpc_npc_gibbay_weapon_e"}, --- sadge {Id="palette.entities.npcs.gibbai.npc_gibbay_weapon_f", Translation="uiR2EDnpc_npc_gibbay_weapon_f"}, --- sadge {Id="palette.entities.npcs.gibbai.npc_gibbay_wise_b", Translation="uiR2EDnpc_npc_gibbay_wise_b"}, --- sadge {Id="palette.entities.npcs.gibbai.npc_gibbay_wise_c", Translation="uiR2EDnpc_npc_gibbay_wise_c"}, --- sadge {Id="palette.entities.npcs.gibbai.npc_gibbay_wise_d", Translation="uiR2EDnpc_npc_gibbay_wise_d"}, --- sadge {Id="palette.entities.npcs.gibbai.npc_gibbay_wise_e", Translation="uiR2EDnpc_npc_gibbay_wise_e"}, --- sadge {Id="palette.entities.npcs.gibbai.npc_gibbay_wise_f", Translation="uiR2EDnpc_npc_gibbay_wise_f"} --- sadge } --- sadge } --- sadge }, - - - kami = - { - instances = - { --- {Id="palette.entities.npcs.kami.kami_guardian_k_g", Translation="uiR2EDnpc_kami_guardian_k_g"}, --- {Id="palette.entities.npcs.kami.kami_guide_k_g", Translation="uiR2EDnpc_kami_guide_k_g"}, - - {Id="palette.entities.npcs.kami.kami_guardian_b", Translation="uiR2EDnpc_kami_guardian_b"}, - {Id="palette.entities.npcs.kami.kami_guardian_c", Translation="uiR2EDnpc_kami_guardian_c"}, - {Id="palette.entities.npcs.kami.kami_guardian_d", Translation="uiR2EDnpc_kami_guardian_d"}, - {Id="palette.entities.npcs.kami.kami_guardian_e", Translation="uiR2EDnpc_kami_guardian_e"}, - {Id="palette.entities.npcs.kami.kami_guardian_f", Translation="uiR2EDnpc_kami_guardian_f"}, - {Id="palette.entities.npcs.kami.kami_preacher_b", Translation="uiR2EDnpc_kami_preacher_b"}, - {Id="palette.entities.npcs.kami.kami_preacher_c", Translation="uiR2EDnpc_kami_preacher_c"}, - {Id="palette.entities.npcs.kami.kami_preacher_d", Translation="uiR2EDnpc_kami_preacher_d"}, - {Id="palette.entities.npcs.kami.kami_preacher_e", Translation="uiR2EDnpc_kami_preacher_e"}, - {Id="palette.entities.npcs.kami.kami_preacher_f", Translation="uiR2EDnpc_kami_preacher_f"}, - - {Id="palette.entities.npcs.kami.kami_guardian_2_b", Translation="uiR2EDnpc_kami_guardian_2_b"}, - {Id="palette.entities.npcs.kami.kami_guardian_2_c", Translation="uiR2EDnpc_kami_guardian_2_c"}, - {Id="palette.entities.npcs.kami.kami_guardian_2_d", Translation="uiR2EDnpc_kami_guardian_2_d"}, - {Id="palette.entities.npcs.kami.kami_guardian_2_e", Translation="uiR2EDnpc_kami_guardian_2_e"}, - {Id="palette.entities.npcs.kami.kami_guardian_2_f", Translation="uiR2EDnpc_kami_guardian_2_f"}, --- {Id="palette.entities.npcs.kami.kami_guardian_2_g", Translation="uiR2EDnpc_kami_guardian_2_g"}, - {Id="palette.entities.npcs.kami.kami_preacher_2_b", Translation="uiR2EDnpc_kami_preacher_2_b"}, - {Id="palette.entities.npcs.kami.kami_preacher_2_c", Translation="uiR2EDnpc_kami_preacher_2_c"}, - {Id="palette.entities.npcs.kami.kami_preacher_2_d", Translation="uiR2EDnpc_kami_preacher_2_d"}, - {Id="palette.entities.npcs.kami.kami_preacher_2_e", Translation="uiR2EDnpc_kami_preacher_2_e"}, - {Id="palette.entities.npcs.kami.kami_preacher_2_f", Translation="uiR2EDnpc_kami_preacher_2_f"}, --- {Id="palette.entities.npcs.kami.kami_preacher_2_g", Translation="uiR2EDnpc_kami_preacher_2_g"}, - - {Id="palette.entities.npcs.kami.kami_guardian_3_b", Translation="uiR2EDnpc_kami_guardian_3_b"}, - {Id="palette.entities.npcs.kami.kami_guardian_3_c", Translation="uiR2EDnpc_kami_guardian_3_c"}, - {Id="palette.entities.npcs.kami.kami_guardian_3_d", Translation="uiR2EDnpc_kami_guardian_3_d"}, - {Id="palette.entities.npcs.kami.kami_guardian_3_e", Translation="uiR2EDnpc_kami_guardian_3_e"}, - {Id="palette.entities.npcs.kami.kami_guardian_3_f", Translation="uiR2EDnpc_kami_guardian_3_f"}, --- {Id="palette.entities.npcs.kami.kami_guardian_3_g", Translation="uiR2EDnpc_kami_guardian_3_g"}, - {Id="palette.entities.npcs.kami.kami_preacher_3_b", Translation="uiR2EDnpc_kami_preacher_3_b"}, - {Id="palette.entities.npcs.kami.kami_preacher_3_c", Translation="uiR2EDnpc_kami_preacher_3_c"}, - {Id="palette.entities.npcs.kami.kami_preacher_3_d", Translation="uiR2EDnpc_kami_preacher_3_d"}, - {Id="palette.entities.npcs.kami.kami_preacher_3_e", Translation="uiR2EDnpc_kami_preacher_3_e"}, - {Id="palette.entities.npcs.kami.kami_preacher_3_f", Translation="uiR2EDnpc_kami_preacher_3_f"}, --- {Id="palette.entities.npcs.kami.kami_preacher_3_g", Translation="uiR2EDnpc_kami_preacher_3_g"}, - - {Id="palette.entities.npcs.kami.kami_guardian_4_b", Translation="uiR2EDnpc_kami_guardian_4_b"}, - {Id="palette.entities.npcs.kami.kami_guardian_4_c", Translation="uiR2EDnpc_kami_guardian_4_c"}, - {Id="palette.entities.npcs.kami.kami_guardian_4_d", Translation="uiR2EDnpc_kami_guardian_4_d"}, - {Id="palette.entities.npcs.kami.kami_guardian_4_e", Translation="uiR2EDnpc_kami_guardian_4_e"}, - {Id="palette.entities.npcs.kami.kami_guardian_4_f", Translation="uiR2EDnpc_kami_guardian_4_f"}, --- {Id="palette.entities.npcs.kami.kami_guardian_4_g", Translation="uiR2EDnpc_kami_guardian_4_g"}, - {Id="palette.entities.npcs.kami.kami_preacher_4_b", Translation="uiR2EDnpc_kami_preacher_4_b"}, - {Id="palette.entities.npcs.kami.kami_preacher_4_c", Translation="uiR2EDnpc_kami_preacher_4_c"}, - {Id="palette.entities.npcs.kami.kami_preacher_4_d", Translation="uiR2EDnpc_kami_preacher_4_d"}, - {Id="palette.entities.npcs.kami.kami_preacher_4_e", Translation="uiR2EDnpc_kami_preacher_4_e"}, - {Id="palette.entities.npcs.kami.kami_preacher_4_f", Translation="uiR2EDnpc_kami_preacher_4_f"}, --- {Id="palette.entities.npcs.kami.kami_preacher_4_g", Translation="uiR2EDnpc_kami_preacher_4_g"}, - } - }, - - karavan = - { - instances = - { - {Id="palette.entities.npcs.karavan.karavan_guard_k_f_b", Translation="uiR2EDnpc_karavan_guard_k_f_b"}, - {Id="palette.entities.npcs.karavan.karavan_guard_k_h_b", Translation="uiR2EDnpc_karavan_guard_k_h_b"}, - {Id="palette.entities.npcs.karavan.karavan_emissary_f_b", Translation="uiR2EDnpc_karavan_emissary_f_b"}, - {Id="palette.entities.npcs.karavan.karavan_emissary_h_b", Translation="uiR2EDnpc_karavan_emissary_h_b"}, - - {Id="palette.entities.npcs.karavan.karavan_guard_k_f_c", Translation="uiR2EDnpc_karavan_guard_k_f_c"}, - {Id="palette.entities.npcs.karavan.karavan_guard_k_h_c", Translation="uiR2EDnpc_karavan_guard_k_h_c"}, - {Id="palette.entities.npcs.karavan.karavan_emissary_f_c", Translation="uiR2EDnpc_karavan_emissary_f_c"}, - {Id="palette.entities.npcs.karavan.karavan_emissary_h_c", Translation="uiR2EDnpc_karavan_emissary_h_c"}, - - {Id="palette.entities.npcs.karavan.karavan_guard_k_f_d", Translation="uiR2EDnpc_karavan_guard_k_f_d"}, - {Id="palette.entities.npcs.karavan.karavan_guard_k_h_d", Translation="uiR2EDnpc_karavan_guard_k_h_d"}, - {Id="palette.entities.npcs.karavan.karavan_emissary_f_d", Translation="uiR2EDnpc_karavan_emissary_f_d"}, - {Id="palette.entities.npcs.karavan.karavan_emissary_h_d", Translation="uiR2EDnpc_karavan_emissary_h_d"}, - - {Id="palette.entities.npcs.karavan.karavan_guard_k_f_e", Translation="uiR2EDnpc_karavan_guard_k_f_e"}, - {Id="palette.entities.npcs.karavan.karavan_guard_k_h_e", Translation="uiR2EDnpc_karavan_guard_k_h_e"}, - {Id="palette.entities.npcs.karavan.karavan_emissary_f_e", Translation="uiR2EDnpc_karavan_emissary_f_e"}, - {Id="palette.entities.npcs.karavan.karavan_emissary_h_e", Translation="uiR2EDnpc_karavan_emissary_h_e"}, - - {Id="palette.entities.npcs.karavan.karavan_guard_k_f_f", Translation="uiR2EDnpc_karavan_guard_k_f_f"}, - {Id="palette.entities.npcs.karavan.karavan_guard_k_h_f", Translation="uiR2EDnpc_karavan_guard_k_h_f"}, - {Id="palette.entities.npcs.karavan.karavan_emissary_f_f", Translation="uiR2EDnpc_karavan_emissary_f_f"}, - {Id="palette.entities.npcs.karavan.karavan_emissary_h_f", Translation="uiR2EDnpc_karavan_emissary_h_f"}, - } - }, - - genericNpcs = - { - instances = - { --- {Id="palette.entities.players.fyros_male", Translation="uiR2EDnpc_fyros_h"}, --- sadge {Id="palette.entities.players.fyros_female", Translation="uiR2EDnpc_fyros_f"}, --- {Id="palette.entities.players.matis_male", Translation="uiR2EDnpc_matis_h"}, --- sadge {Id="palette.entities.players.matis_female", Translation="uiR2EDnpc_matis_f"}, --- {Id="palette.entities.players.tryker_male", Translation="uiR2EDnpc_tryker_h"}, --- sadge {Id="palette.entities.players.tryker_female", Translation="uiR2EDnpc_tryker_f"}, --- {Id="palette.entities.players.zorai_male", Translation="uiR2EDnpc_zorai_h"}, --- sadge {Id="palette.entities.players.zorai_female", Translation="uiR2EDnpc_zorai_f"}, - - {Id="palette.entities.npcs.civils.f_civil_20", Translation="uiR2EDnpc_fyros_h"}, - {Id="palette.entities.npcs.civils.m_civil_20", Translation="uiR2EDnpc_matis_h"}, - {Id="palette.entities.npcs.civils.t_civil_20", Translation="uiR2EDnpc_tryker_h"}, - {Id="palette.entities.npcs.civils.z_civil_20", Translation="uiR2EDnpc_zorai_h"}, - - {Id="palette.entities.npcs.civils.f_civil_70", Translation="uiR2EDnpc_fyros_h"}, - {Id="palette.entities.npcs.civils.m_civil_70", Translation="uiR2EDnpc_matis_h"}, - {Id="palette.entities.npcs.civils.t_civil_70", Translation="uiR2EDnpc_tryker_h"}, - {Id="palette.entities.npcs.civils.z_civil_70", Translation="uiR2EDnpc_zorai_h"}, - - {Id="palette.entities.npcs.civils.f_civil_120", Translation="uiR2EDnpc_fyros_h"}, - {Id="palette.entities.npcs.civils.m_civil_120", Translation="uiR2EDnpc_matis_h"}, - {Id="palette.entities.npcs.civils.t_civil_120", Translation="uiR2EDnpc_tryker_h"}, - {Id="palette.entities.npcs.civils.z_civil_120", Translation="uiR2EDnpc_zorai_h"}, - - {Id="palette.entities.npcs.civils.f_civil_170", Translation="uiR2EDnpc_fyros_h"}, - {Id="palette.entities.npcs.civils.m_civil_170", Translation="uiR2EDnpc_matis_h"}, - {Id="palette.entities.npcs.civils.t_civil_170", Translation="uiR2EDnpc_tryker_h"}, - {Id="palette.entities.npcs.civils.z_civil_170", Translation="uiR2EDnpc_zorai_h"}, - - {Id="palette.entities.npcs.civils.f_civil_220", Translation="uiR2EDnpc_fyros_h"}, - {Id="palette.entities.npcs.civils.m_civil_220", Translation="uiR2EDnpc_matis_h"}, - {Id="palette.entities.npcs.civils.t_civil_220", Translation="uiR2EDnpc_tryker_h"}, - {Id="palette.entities.npcs.civils.z_civil_220", Translation="uiR2EDnpc_zorai_h"}, - } - }, - guards = - { - instances = - { - {Id="palette.entities.npcs.guards.f_guard_45", Translation="uiR2EDnpc_f_guard"}, - {Id="palette.entities.npcs.guards.m_guard_45", Translation="uiR2EDnpc_m_guard"}, - {Id="palette.entities.npcs.guards.t_guard_45", Translation="uiR2EDnpc_t_guard"}, - {Id="palette.entities.npcs.guards.z_guard_45", Translation="uiR2EDnpc_z_guard"}, - - {Id="palette.entities.npcs.guards.f_guard_95", Translation="uiR2EDnpc_f_guard"}, - {Id="palette.entities.npcs.guards.m_guard_95", Translation="uiR2EDnpc_m_guard"}, - {Id="palette.entities.npcs.guards.t_guard_95", Translation="uiR2EDnpc_t_guard"}, - {Id="palette.entities.npcs.guards.z_guard_95", Translation="uiR2EDnpc_z_guard"}, - - {Id="palette.entities.npcs.guards.f_guard_145", Translation="uiR2EDnpc_f_guard"}, - {Id="palette.entities.npcs.guards.m_guard_145", Translation="uiR2EDnpc_m_guard"}, - {Id="palette.entities.npcs.guards.t_guard_145", Translation="uiR2EDnpc_t_guard"}, - {Id="palette.entities.npcs.guards.z_guard_145", Translation="uiR2EDnpc_z_guard"}, - - {Id="palette.entities.npcs.guards.f_guard_195", Translation="uiR2EDnpc_f_guard"}, - {Id="palette.entities.npcs.guards.m_guard_195", Translation="uiR2EDnpc_m_guard"}, - {Id="palette.entities.npcs.guards.t_guard_195", Translation="uiR2EDnpc_t_guard"}, - {Id="palette.entities.npcs.guards.z_guard_195", Translation="uiR2EDnpc_z_guard"}, - - {Id="palette.entities.npcs.guards.f_guard_245", Translation="uiR2EDnpc_f_guard"}, - {Id="palette.entities.npcs.guards.m_guard_245", Translation="uiR2EDnpc_m_guard"}, - {Id="palette.entities.npcs.guards.t_guard_245", Translation="uiR2EDnpc_t_guard"}, - {Id="palette.entities.npcs.guards.z_guard_245", Translation="uiR2EDnpc_z_guard"}, - } - }, - cuthroats = - { - instances = - { - {Id="palette.entities.npcs.bandits.f_melee_dd_20", Translation="uiR2EDnpc_f_melee_dd"}, - {Id="palette.entities.npcs.bandits.m_melee_dd_20", Translation="uiR2EDnpc_m_melee_dd"}, - {Id="palette.entities.npcs.bandits.t_melee_dd_20", Translation="uiR2EDnpc_t_melee_dd"}, - {Id="palette.entities.npcs.bandits.z_melee_dd_20", Translation="uiR2EDnpc_z_melee_dd"}, - - {Id="palette.entities.npcs.bandits.f_melee_dd_70", Translation="uiR2EDnpc_f_melee_dd"}, - {Id="palette.entities.npcs.bandits.m_melee_dd_70", Translation="uiR2EDnpc_m_melee_dd"}, - {Id="palette.entities.npcs.bandits.t_melee_dd_70", Translation="uiR2EDnpc_t_melee_dd"}, - {Id="palette.entities.npcs.bandits.z_melee_dd_70", Translation="uiR2EDnpc_z_melee_dd"}, - - {Id="palette.entities.npcs.bandits.f_melee_dd_120", Translation="uiR2EDnpc_f_melee_dd"}, - {Id="palette.entities.npcs.bandits.m_melee_dd_120", Translation="uiR2EDnpc_m_melee_dd"}, - {Id="palette.entities.npcs.bandits.t_melee_dd_120", Translation="uiR2EDnpc_t_melee_dd"}, - {Id="palette.entities.npcs.bandits.z_melee_dd_120", Translation="uiR2EDnpc_z_melee_dd"}, - - {Id="palette.entities.npcs.bandits.f_melee_dd_170", Translation="uiR2EDnpc_f_melee_dd"}, - {Id="palette.entities.npcs.bandits.m_melee_dd_170", Translation="uiR2EDnpc_m_melee_dd"}, - {Id="palette.entities.npcs.bandits.t_melee_dd_170", Translation="uiR2EDnpc_t_melee_dd"}, - {Id="palette.entities.npcs.bandits.z_melee_dd_170", Translation="uiR2EDnpc_z_melee_dd"}, - - {Id="palette.entities.npcs.bandits.f_melee_dd_220", Translation="uiR2EDnpc_f_melee_dd"}, - {Id="palette.entities.npcs.bandits.m_melee_dd_220", Translation="uiR2EDnpc_m_melee_dd"}, - {Id="palette.entities.npcs.bandits.t_melee_dd_220", Translation="uiR2EDnpc_t_melee_dd"}, - {Id="palette.entities.npcs.bandits.z_melee_dd_220", Translation="uiR2EDnpc_z_melee_dd"}, - - - {Id="palette.entities.npcs.bandits.f_melee_tank_20", Translation="uiR2EDnpc_f_melee_tank"}, - {Id="palette.entities.npcs.bandits.m_melee_tank_20", Translation="uiR2EDnpc_m_melee_tank"}, - {Id="palette.entities.npcs.bandits.t_melee_tank_20", Translation="uiR2EDnpc_t_melee_tank"}, - {Id="palette.entities.npcs.bandits.z_melee_tank_20", Translation="uiR2EDnpc_z_melee_tank"}, - - {Id="palette.entities.npcs.bandits.f_melee_tank_70", Translation="uiR2EDnpc_f_melee_tank"}, - {Id="palette.entities.npcs.bandits.m_melee_tank_70", Translation="uiR2EDnpc_m_melee_tank"}, - {Id="palette.entities.npcs.bandits.t_melee_tank_70", Translation="uiR2EDnpc_t_melee_tank"}, - {Id="palette.entities.npcs.bandits.z_melee_tank_70", Translation="uiR2EDnpc_z_melee_tank"}, - - {Id="palette.entities.npcs.bandits.f_melee_tank_120", Translation="uiR2EDnpc_f_melee_tank"}, - {Id="palette.entities.npcs.bandits.m_melee_tank_120", Translation="uiR2EDnpc_m_melee_tank"}, - {Id="palette.entities.npcs.bandits.t_melee_tank_120", Translation="uiR2EDnpc_t_melee_tank"}, - {Id="palette.entities.npcs.bandits.z_melee_tank_120", Translation="uiR2EDnpc_z_melee_tank"}, - - {Id="palette.entities.npcs.bandits.f_melee_tank_170", Translation="uiR2EDnpc_f_melee_tank"}, - {Id="palette.entities.npcs.bandits.m_melee_tank_170", Translation="uiR2EDnpc_m_melee_tank"}, - {Id="palette.entities.npcs.bandits.t_melee_tank_170", Translation="uiR2EDnpc_t_melee_tank"}, - {Id="palette.entities.npcs.bandits.z_melee_tank_170", Translation="uiR2EDnpc_z_melee_tank"}, - - {Id="palette.entities.npcs.bandits.f_melee_tank_220", Translation="uiR2EDnpc_f_melee_tank"}, - {Id="palette.entities.npcs.bandits.m_melee_tank_220", Translation="uiR2EDnpc_m_melee_tank"}, - {Id="palette.entities.npcs.bandits.t_melee_tank_220", Translation="uiR2EDnpc_t_melee_tank"}, - {Id="palette.entities.npcs.bandits.z_melee_tank_220", Translation="uiR2EDnpc_z_melee_tank"}, - - - {Id="palette.entities.npcs.bandits.f_light_melee_20", Translation="uiR2EDnpc_f_light_melee"}, - {Id="palette.entities.npcs.bandits.m_light_melee_20", Translation="uiR2EDnpc_m_light_melee"}, - {Id="palette.entities.npcs.bandits.t_light_melee_20", Translation="uiR2EDnpc_t_light_melee"}, - {Id="palette.entities.npcs.bandits.z_light_melee_20", Translation="uiR2EDnpc_z_light_melee"}, - - {Id="palette.entities.npcs.bandits.f_light_melee_70", Translation="uiR2EDnpc_f_light_melee"}, - {Id="palette.entities.npcs.bandits.m_light_melee_70", Translation="uiR2EDnpc_m_light_melee"}, - {Id="palette.entities.npcs.bandits.t_light_melee_70", Translation="uiR2EDnpc_t_light_melee"}, - {Id="palette.entities.npcs.bandits.z_light_melee_70", Translation="uiR2EDnpc_z_light_melee"}, - - {Id="palette.entities.npcs.bandits.f_light_melee_120", Translation="uiR2EDnpc_f_light_melee"}, - {Id="palette.entities.npcs.bandits.m_light_melee_120", Translation="uiR2EDnpc_m_light_melee"}, - {Id="palette.entities.npcs.bandits.t_light_melee_120", Translation="uiR2EDnpc_t_light_melee"}, - {Id="palette.entities.npcs.bandits.z_light_melee_120", Translation="uiR2EDnpc_z_light_melee"}, - - {Id="palette.entities.npcs.bandits.f_light_melee_170", Translation="uiR2EDnpc_f_light_melee"}, - {Id="palette.entities.npcs.bandits.m_light_melee_170", Translation="uiR2EDnpc_m_light_melee"}, - {Id="palette.entities.npcs.bandits.t_light_melee_170", Translation="uiR2EDnpc_t_light_melee"}, - {Id="palette.entities.npcs.bandits.z_light_melee_170", Translation="uiR2EDnpc_z_light_melee"}, - - {Id="palette.entities.npcs.bandits.f_light_melee_220", Translation="uiR2EDnpc_f_light_melee"}, - {Id="palette.entities.npcs.bandits.m_light_melee_220", Translation="uiR2EDnpc_m_light_melee"}, - {Id="palette.entities.npcs.bandits.t_light_melee_220", Translation="uiR2EDnpc_t_light_melee"}, - {Id="palette.entities.npcs.bandits.z_light_melee_220", Translation="uiR2EDnpc_z_light_melee"}, - - --- sadge {Id="palette.entities.npcs.bandits.f_healer_20", Translation="uiR2EDnpc_f_healer"}, --- sadge {Id="palette.entities.npcs.bandits.m_healer_20", Translation="uiR2EDnpc_m_healer"}, --- sadge {Id="palette.entities.npcs.bandits.t_healer_20", Translation="uiR2EDnpc_t_healer"}, --- sadge {Id="palette.entities.npcs.bandits.z_healer_20", Translation="uiR2EDnpc_z_healer"}, --- sadge --- sadge {Id="palette.entities.npcs.bandits.f_healer_70", Translation="uiR2EDnpc_f_healer"}, --- sadge {Id="palette.entities.npcs.bandits.m_healer_70", Translation="uiR2EDnpc_m_healer"}, --- sadge {Id="palette.entities.npcs.bandits.t_healer_70", Translation="uiR2EDnpc_t_healer"}, --- sadge {Id="palette.entities.npcs.bandits.z_healer_70", Translation="uiR2EDnpc_z_healer"}, --- sadge --- sadge {Id="palette.entities.npcs.bandits.f_healer_120", Translation="uiR2EDnpc_f_healer"}, --- sadge {Id="palette.entities.npcs.bandits.m_healer_120", Translation="uiR2EDnpc_m_healer"}, --- sadge {Id="palette.entities.npcs.bandits.t_healer_120", Translation="uiR2EDnpc_t_healer"}, --- sadge {Id="palette.entities.npcs.bandits.z_healer_120", Translation="uiR2EDnpc_z_healer"}, --- sadge --- sadge {Id="palette.entities.npcs.bandits.f_healer_170", Translation="uiR2EDnpc_f_healer"}, --- sadge {Id="palette.entities.npcs.bandits.m_healer_170", Translation="uiR2EDnpc_m_healer"}, --- sadge {Id="palette.entities.npcs.bandits.t_healer_170", Translation="uiR2EDnpc_t_healer"}, --- sadge {Id="palette.entities.npcs.bandits.z_healer_170", Translation="uiR2EDnpc_z_healer"}, --- sadge --- sadge {Id="palette.entities.npcs.bandits.f_healer_220", Translation="uiR2EDnpc_f_healer"}, --- sadge {Id="palette.entities.npcs.bandits.m_healer_220", Translation="uiR2EDnpc_m_healer"}, --- sadge {Id="palette.entities.npcs.bandits.t_healer_220", Translation="uiR2EDnpc_t_healer"}, --- sadge {Id="palette.entities.npcs.bandits.z_healer_220", Translation="uiR2EDnpc_z_healer"}, - - - {Id="palette.entities.npcs.bandits.f_mage_damage_dealer_20", Translation="uiR2EDnpc_f_mage_damage_dealer"}, - {Id="palette.entities.npcs.bandits.m_mage_damage_dealer_20", Translation="uiR2EDnpc_m_mage_damage_dealer"}, - {Id="palette.entities.npcs.bandits.t_mage_damage_dealer_20", Translation="uiR2EDnpc_t_mage_damage_dealer"}, - {Id="palette.entities.npcs.bandits.z_mage_damage_dealer_20", Translation="uiR2EDnpc_z_mage_damage_dealer"}, - - {Id="palette.entities.npcs.bandits.f_mage_damage_dealer_70", Translation="uiR2EDnpc_f_mage_damage_dealer"}, - {Id="palette.entities.npcs.bandits.m_mage_damage_dealer_70", Translation="uiR2EDnpc_m_mage_damage_dealer"}, - {Id="palette.entities.npcs.bandits.t_mage_damage_dealer_70", Translation="uiR2EDnpc_t_mage_damage_dealer"}, - {Id="palette.entities.npcs.bandits.z_mage_damage_dealer_70", Translation="uiR2EDnpc_z_mage_damage_dealer"}, - - {Id="palette.entities.npcs.bandits.f_mage_damage_dealer_120", Translation="uiR2EDnpc_f_mage_damage_dealer"}, - {Id="palette.entities.npcs.bandits.m_mage_damage_dealer_120", Translation="uiR2EDnpc_m_mage_damage_dealer"}, - {Id="palette.entities.npcs.bandits.t_mage_damage_dealer_120", Translation="uiR2EDnpc_t_mage_damage_dealer"}, - {Id="palette.entities.npcs.bandits.z_mage_damage_dealer_120", Translation="uiR2EDnpc_z_mage_damage_dealer"}, - - {Id="palette.entities.npcs.bandits.f_mage_damage_dealer_170", Translation="uiR2EDnpc_f_mage_damage_dealer"}, - {Id="palette.entities.npcs.bandits.m_mage_damage_dealer_170", Translation="uiR2EDnpc_m_mage_damage_dealer"}, - {Id="palette.entities.npcs.bandits.t_mage_damage_dealer_170", Translation="uiR2EDnpc_t_mage_damage_dealer"}, - {Id="palette.entities.npcs.bandits.z_mage_damage_dealer_170", Translation="uiR2EDnpc_z_mage_damage_dealer"}, - - {Id="palette.entities.npcs.bandits.f_mage_damage_dealer_220", Translation="uiR2EDnpc_f_mage_damage_dealer"}, - {Id="palette.entities.npcs.bandits.m_mage_damage_dealer_220", Translation="uiR2EDnpc_m_mage_damage_dealer"}, - {Id="palette.entities.npcs.bandits.t_mage_damage_dealer_220", Translation="uiR2EDnpc_t_mage_damage_dealer"}, - {Id="palette.entities.npcs.bandits.z_mage_damage_dealer_220", Translation="uiR2EDnpc_z_mage_damage_dealer"}, - - - {Id="palette.entities.npcs.bandits.f_mage_aoe_20", Translation="uiR2EDnpc_f_mage_aoe"}, - {Id="palette.entities.npcs.bandits.m_mage_aoe_20", Translation="uiR2EDnpc_m_mage_aoe"}, - {Id="palette.entities.npcs.bandits.t_mage_aoe_20", Translation="uiR2EDnpc_t_mage_aoe"}, - {Id="palette.entities.npcs.bandits.z_mage_aoe_20", Translation="uiR2EDnpc_z_mage_aoe"}, - - {Id="palette.entities.npcs.bandits.f_mage_aoe_70", Translation="uiR2EDnpc_f_mage_aoe"}, - {Id="palette.entities.npcs.bandits.m_mage_aoe_70", Translation="uiR2EDnpc_m_mage_aoe"}, - {Id="palette.entities.npcs.bandits.t_mage_aoe_70", Translation="uiR2EDnpc_t_mage_aoe"}, - {Id="palette.entities.npcs.bandits.z_mage_aoe_70", Translation="uiR2EDnpc_z_mage_aoe"}, - - {Id="palette.entities.npcs.bandits.f_mage_aoe_120", Translation="uiR2EDnpc_f_mage_aoe"}, - {Id="palette.entities.npcs.bandits.m_mage_aoe_120", Translation="uiR2EDnpc_m_mage_aoe"}, - {Id="palette.entities.npcs.bandits.t_mage_aoe_120", Translation="uiR2EDnpc_t_mage_aoe"}, - {Id="palette.entities.npcs.bandits.z_mage_aoe_120", Translation="uiR2EDnpc_z_mage_aoe"}, - - {Id="palette.entities.npcs.bandits.f_mage_aoe_170", Translation="uiR2EDnpc_f_mage_aoe"}, - {Id="palette.entities.npcs.bandits.m_mage_aoe_170", Translation="uiR2EDnpc_m_mage_aoe"}, - {Id="palette.entities.npcs.bandits.t_mage_aoe_170", Translation="uiR2EDnpc_t_mage_aoe"}, - {Id="palette.entities.npcs.bandits.z_mage_aoe_170", Translation="uiR2EDnpc_z_mage_aoe"}, - - {Id="palette.entities.npcs.bandits.f_mage_aoe_220", Translation="uiR2EDnpc_f_mage_aoe"}, - {Id="palette.entities.npcs.bandits.m_mage_aoe_220", Translation="uiR2EDnpc_m_mage_aoe"}, - {Id="palette.entities.npcs.bandits.t_mage_aoe_220", Translation="uiR2EDnpc_t_mage_aoe"}, - {Id="palette.entities.npcs.bandits.z_mage_aoe_220", Translation="uiR2EDnpc_z_mage_aoe"}, - - - {Id="palette.entities.npcs.bandits.f_mage_atysian_curser_20", Translation="uiR2EDnpc_f_mage_atysian_curser"}, - {Id="palette.entities.npcs.bandits.m_mage_atysian_curser_20", Translation="uiR2EDnpc_m_mage_atysian_curser"}, - {Id="palette.entities.npcs.bandits.t_mage_atysian_curser_20", Translation="uiR2EDnpc_t_mage_atysian_curser"}, - {Id="palette.entities.npcs.bandits.z_mage_atysian_curser_20", Translation="uiR2EDnpc_z_mage_atysian_curser"}, - - {Id="palette.entities.npcs.bandits.f_mage_atysian_curser_70", Translation="uiR2EDnpc_f_mage_atysian_curser"}, - {Id="palette.entities.npcs.bandits.m_mage_atysian_curser_70", Translation="uiR2EDnpc_m_mage_atysian_curser"}, - {Id="palette.entities.npcs.bandits.t_mage_atysian_curser_70", Translation="uiR2EDnpc_t_mage_atysian_curser"}, - {Id="palette.entities.npcs.bandits.z_mage_atysian_curser_70", Translation="uiR2EDnpc_z_mage_atysian_curser"}, - - {Id="palette.entities.npcs.bandits.f_mage_atysian_curser_120", Translation="uiR2EDnpc_f_mage_atysian_curser"}, - {Id="palette.entities.npcs.bandits.m_mage_atysian_curser_120", Translation="uiR2EDnpc_m_mage_atysian_curser"}, - {Id="palette.entities.npcs.bandits.t_mage_atysian_curser_120", Translation="uiR2EDnpc_t_mage_atysian_curser"}, - {Id="palette.entities.npcs.bandits.z_mage_atysian_curser_120", Translation="uiR2EDnpc_z_mage_atysian_curser"}, - - {Id="palette.entities.npcs.bandits.f_mage_atysian_curser_170", Translation="uiR2EDnpc_f_mage_atysian_curser"}, - {Id="palette.entities.npcs.bandits.m_mage_atysian_curser_170", Translation="uiR2EDnpc_m_mage_atysian_curser"}, - {Id="palette.entities.npcs.bandits.t_mage_atysian_curser_170", Translation="uiR2EDnpc_t_mage_atysian_curser"}, - {Id="palette.entities.npcs.bandits.z_mage_atysian_curser_170", Translation="uiR2EDnpc_z_mage_atysian_curser"}, - - {Id="palette.entities.npcs.bandits.f_mage_atysian_curser_220", Translation="uiR2EDnpc_f_mage_atysian_curser"}, - {Id="palette.entities.npcs.bandits.m_mage_atysian_curser_220", Translation="uiR2EDnpc_m_mage_atysian_curser"}, - {Id="palette.entities.npcs.bandits.t_mage_atysian_curser_220", Translation="uiR2EDnpc_t_mage_atysian_curser"}, - {Id="palette.entities.npcs.bandits.z_mage_atysian_curser_220", Translation="uiR2EDnpc_z_mage_atysian_curser"}, - - - {Id="palette.entities.npcs.bandits.f_mage_celestial_curser_20", Translation="uiR2EDnpc_f_mage_celestial_curser"}, - {Id="palette.entities.npcs.bandits.m_mage_celestial_curser_20", Translation="uiR2EDnpc_m_mage_celestial_curser"}, - {Id="palette.entities.npcs.bandits.t_mage_celestial_curser_20", Translation="uiR2EDnpc_t_mage_celestial_curser"}, - {Id="palette.entities.npcs.bandits.z_mage_celestial_curser_20", Translation="uiR2EDnpc_z_mage_celestial_curser"}, - - {Id="palette.entities.npcs.bandits.f_mage_celestial_curser_70", Translation="uiR2EDnpc_f_mage_celestial_curser"}, - {Id="palette.entities.npcs.bandits.m_mage_celestial_curser_70", Translation="uiR2EDnpc_m_mage_celestial_curser"}, - {Id="palette.entities.npcs.bandits.t_mage_celestial_curser_70", Translation="uiR2EDnpc_t_mage_celestial_curser"}, - {Id="palette.entities.npcs.bandits.z_mage_celestial_curser_70", Translation="uiR2EDnpc_z_mage_celestial_curser"}, - - {Id="palette.entities.npcs.bandits.f_mage_celestial_curser_120", Translation="uiR2EDnpc_f_mage_celestial_curser"}, - {Id="palette.entities.npcs.bandits.m_mage_celestial_curser_120", Translation="uiR2EDnpc_m_mage_celestial_curser"}, - {Id="palette.entities.npcs.bandits.t_mage_celestial_curser_120", Translation="uiR2EDnpc_t_mage_celestial_curser"}, - {Id="palette.entities.npcs.bandits.z_mage_celestial_curser_120", Translation="uiR2EDnpc_z_mage_celestial_curser"}, - - {Id="palette.entities.npcs.bandits.f_mage_celestial_curser_170", Translation="uiR2EDnpc_f_mage_celestial_curser"}, - {Id="palette.entities.npcs.bandits.m_mage_celestial_curser_170", Translation="uiR2EDnpc_m_mage_celestial_curser"}, - {Id="palette.entities.npcs.bandits.t_mage_celestial_curser_170", Translation="uiR2EDnpc_t_mage_celestial_curser"}, - {Id="palette.entities.npcs.bandits.z_mage_celestial_curser_170", Translation="uiR2EDnpc_z_mage_celestial_curser"}, - - {Id="palette.entities.npcs.bandits.f_mage_celestial_curser_220", Translation="uiR2EDnpc_f_mage_celestial_curser"}, - {Id="palette.entities.npcs.bandits.m_mage_celestial_curser_220", Translation="uiR2EDnpc_m_mage_celestial_curser"}, - {Id="palette.entities.npcs.bandits.t_mage_celestial_curser_220", Translation="uiR2EDnpc_t_mage_celestial_curser"}, - {Id="palette.entities.npcs.bandits.z_mage_celestial_curser_220", Translation="uiR2EDnpc_z_mage_celestial_curser"}, - - }, --- --- civillight = --- { --- instances = --- { --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_b1", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_b1"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_b2", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_b2"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_b3", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_b3"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_b4", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_b4"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_c1", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_c1"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_c2", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_c2"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_c3", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_c3"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_c4", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_c4"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_d1", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_d1"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_d2", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_d2"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_d3", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_d3"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_d4", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_d4"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_e1", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_e1"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_e2", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_e2"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_e3", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_e3"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_e4", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_e4"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_f1", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_f1"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_f2", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_f2"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_f3", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_f3"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_blunt_f4", Translation="uiR2EDnpc_ring_civil_light_melee_blunt_f4"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_b1", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_b1"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_b2", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_b2"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_b3", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_b3"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_b4", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_b4"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_c1", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_c1"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_c2", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_c2"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_c3", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_c3"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_c4", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_c4"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_d1", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_d1"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_d2", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_d2"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_d3", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_d3"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_d4", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_d4"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_e1", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_e1"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_e2", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_e2"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_e3", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_e3"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_e4", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_e4"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_f1", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_f1"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_f2", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_f2"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_f3", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_f3"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_pierce_f4", Translation="uiR2EDnpc_ring_civil_light_melee_pierce_f4"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_b1", Translation="uiR2EDnpc_ring_civil_light_melee_slash_b1"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_b2", Translation="uiR2EDnpc_ring_civil_light_melee_slash_b2"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_b3", Translation="uiR2EDnpc_ring_civil_light_melee_slash_b3"}, - --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_b4", Translation="uiR2EDnpc_ring_civil_light_melee_slash_b4"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_c1", Translation="uiR2EDnpc_ring_civil_light_melee_slash_c1"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_c2", Translation="uiR2EDnpc_ring_civil_light_melee_slash_c2"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_c3", Translation="uiR2EDnpc_ring_civil_light_melee_slash_c3"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_c4", Translation="uiR2EDnpc_ring_civil_light_melee_slash_c4"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_d1", Translation="uiR2EDnpc_ring_civil_light_melee_slash_d1"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_d2", Translation="uiR2EDnpc_ring_civil_light_melee_slash_d2"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_d3", Translation="uiR2EDnpc_ring_civil_light_melee_slash_d3"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_d4", Translation="uiR2EDnpc_ring_civil_light_melee_slash_d4"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_e1", Translation="uiR2EDnpc_ring_civil_light_melee_slash_e1"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_e2", Translation="uiR2EDnpc_ring_civil_light_melee_slash_e2"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_e3", Translation="uiR2EDnpc_ring_civil_light_melee_slash_e3"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_e4", Translation="uiR2EDnpc_ring_civil_light_melee_slash_e4"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_f1", Translation="uiR2EDnpc_ring_civil_light_melee_slash_f1"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_f2", Translation="uiR2EDnpc_ring_civil_light_melee_slash_f2"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_f3", Translation="uiR2EDnpc_ring_civil_light_melee_slash_f3"}, --- {Id="palette.entities.npcs.bandits.ring_civil_light_melee_slash_f4", Translation="uiR2EDnpc_ring_civil_light_melee_slash_f4"} --- } --- }, --- --- guard = --- { --- guardmelee = --- { --- instances = --- { --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_b1", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_b1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_b2", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_b2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_b3", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_b3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_b4", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_b4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_c1", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_c1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_c2", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_c2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_c3", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_c3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_c4", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_c4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_d1", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_d1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_d2", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_d2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_d3", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_d3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_d4", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_d4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_e1", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_e1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_e2", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_e2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_e3", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_e3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_e4", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_e4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_f1", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_f1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_f2", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_f2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_f3", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_f3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_blunt_f4", Translation="uiR2EDnpc_ring_guard_melee_tank_blunt_f4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_b1", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_b1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_b2", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_b2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_b3", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_b3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_b4", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_b4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_c1", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_c1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_c2", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_c2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_c3", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_c3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_c4", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_c4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_d1", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_d1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_d2", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_d2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_d3", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_d3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_d4", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_d4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_e1", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_e1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_e2", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_e2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_e3", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_e3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_e4", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_e4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_f1", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_f1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_f2", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_f2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_f3", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_f3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_pierce_f4", Translation="uiR2EDnpc_ring_guard_melee_tank_pierce_f4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_b1", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_b1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_b2", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_b2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_b3", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_b3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_b4", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_b4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_c1", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_c1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_c2", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_c2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_c3", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_c3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_c4", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_c4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_d1", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_d1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_d2", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_d2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_d3", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_d3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_d4", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_d4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_e1", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_e1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_e2", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_e2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_e3", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_e3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_e4", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_e4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_f1", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_f1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_f2", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_f2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_f3", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_f3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_melee_tank_slash_f4", Translation="uiR2EDnpc_ring_guard_melee_tank_slash_f4"} --- } --- }, --- guardranged = --- { --- instances = --- { --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_b1", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_b1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_b2", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_b2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_b3", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_b3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_b4", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_b4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_c1", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_c1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_c2", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_c2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_c3", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_c3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_c4", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_c4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_d1", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_d1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_d2", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_d2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_d3", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_d3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_d4", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_d4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_e1", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_e1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_e2", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_e2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_e3", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_e3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_e4", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_e4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_f1", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_f1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_f2", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_f2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_f3", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_f3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_blunt_f4", Translation="uiR2EDnpc_ring_guard_ranged_tank_blunt_f4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_b1", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_b1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_b2", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_b2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_b3", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_b3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_b4", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_b4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_c1", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_c1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_c2", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_c2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_c3", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_c3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_c4", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_c4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_d1", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_d1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_d2", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_d2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_d3", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_d3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_d4", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_d4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_e1", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_e1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_e2", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_e2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_e3", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_e3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_e4", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_e4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_f1", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_f1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_f2", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_f2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_f3", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_f3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_pierce_f4", Translation="uiR2EDnpc_ring_guard_ranged_tank_pierce_f4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_b1", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_b1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_b2", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_b2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_b3", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_b3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_b4", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_b4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_c1", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_c1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_c2", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_c2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_c3", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_c3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_c4", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_c4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_d1", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_d1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_d2", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_d2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_d3", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_d3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_d4", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_d4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_e1", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_e1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_e2", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_e2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_e3", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_e3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_e4", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_e4"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_f1", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_f1"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_f2", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_f2"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_f3", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_f3"}, --- {Id="palette.entities.npcs.bandits.ring_guard_ranged_tank_slash_f4", Translation="uiR2EDnpc_ring_guard_ranged_tank_slash_f4"} --- } --- } --- }, --- --- healer = --- { --- instances = --- { --- {Id="palette.entities.npcs.bandits.ring_healer_b1", Translation="uiR2EDnpc_ring_healer_b1"}, --- {Id="palette.entities.npcs.bandits.ring_healer_b2", Translation="uiR2EDnpc_ring_healer_b2"}, --- {Id="palette.entities.npcs.bandits.ring_healer_b3", Translation="uiR2EDnpc_ring_healer_b3"}, --- {Id="palette.entities.npcs.bandits.ring_healer_b4", Translation="uiR2EDnpc_ring_healer_b4"}, --- {Id="palette.entities.npcs.bandits.ring_healer_c1", Translation="uiR2EDnpc_ring_healer_c1"}, --- {Id="palette.entities.npcs.bandits.ring_healer_c2", Translation="uiR2EDnpc_ring_healer_c2"}, --- {Id="palette.entities.npcs.bandits.ring_healer_c3", Translation="uiR2EDnpc_ring_healer_c3"}, --- {Id="palette.entities.npcs.bandits.ring_healer_c4", Translation="uiR2EDnpc_ring_healer_c4"}, --- {Id="palette.entities.npcs.bandits.ring_healer_d1", Translation="uiR2EDnpc_ring_healer_d1"}, --- {Id="palette.entities.npcs.bandits.ring_healer_d2", Translation="uiR2EDnpc_ring_healer_d2"}, --- {Id="palette.entities.npcs.bandits.ring_healer_d3", Translation="uiR2EDnpc_ring_healer_d3"}, --- {Id="palette.entities.npcs.bandits.ring_healer_d4", Translation="uiR2EDnpc_ring_healer_d4"}, --- {Id="palette.entities.npcs.bandits.ring_healer_e1", Translation="uiR2EDnpc_ring_healer_e1"}, --- {Id="palette.entities.npcs.bandits.ring_healer_e2", Translation="uiR2EDnpc_ring_healer_e2"}, --- {Id="palette.entities.npcs.bandits.ring_healer_e3", Translation="uiR2EDnpc_ring_healer_e3"}, --- {Id="palette.entities.npcs.bandits.ring_healer_e4", Translation="uiR2EDnpc_ring_healer_e4"}, --- {Id="palette.entities.npcs.bandits.ring_healer_f1", Translation="uiR2EDnpc_ring_healer_f1"}, --- {Id="palette.entities.npcs.bandits.ring_healer_f2", Translation="uiR2EDnpc_ring_healer_f2"}, --- {Id="palette.entities.npcs.bandits.ring_healer_f3", Translation="uiR2EDnpc_ring_healer_f3"}, --- {Id="palette.entities.npcs.bandits.ring_healer_f4", Translation="uiR2EDnpc_ring_healer_f4"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_b1", Translation="uiR2EDnpc_ring_healer_ot_b1"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_b2", Translation="uiR2EDnpc_ring_healer_ot_b2"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_b3", Translation="uiR2EDnpc_ring_healer_ot_b3"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_b4", Translation="uiR2EDnpc_ring_healer_ot_b4"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_c1", Translation="uiR2EDnpc_ring_healer_ot_c1"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_c2", Translation="uiR2EDnpc_ring_healer_ot_c2"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_c3", Translation="uiR2EDnpc_ring_healer_ot_c3"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_c4", Translation="uiR2EDnpc_ring_healer_ot_c4"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_d1", Translation="uiR2EDnpc_ring_healer_ot_d1"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_d2", Translation="uiR2EDnpc_ring_healer_ot_d2"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_d3", Translation="uiR2EDnpc_ring_healer_ot_d3"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_d4", Translation="uiR2EDnpc_ring_healer_ot_d4"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_e1", Translation="uiR2EDnpc_ring_healer_ot_e1"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_e2", Translation="uiR2EDnpc_ring_healer_ot_e2"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_e3", Translation="uiR2EDnpc_ring_healer_ot_e3"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_e4", Translation="uiR2EDnpc_ring_healer_ot_e4"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_f1", Translation="uiR2EDnpc_ring_healer_ot_f1"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_f2", Translation="uiR2EDnpc_ring_healer_ot_f2"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_f3", Translation="uiR2EDnpc_ring_healer_ot_f3"}, --- {Id="palette.entities.npcs.bandits.ring_healer_ot_f4", Translation="uiR2EDnpc_ring_healer_ot_f4"} --- } --- }, --- --- lightmelee = --- { --- instances = --- { --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_b1", Translation="uiR2EDnpc_ring_light_melee_blunt_b1"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_b2", Translation="uiR2EDnpc_ring_light_melee_blunt_b2"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_b3", Translation="uiR2EDnpc_ring_light_melee_blunt_b3"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_b4", Translation="uiR2EDnpc_ring_light_melee_blunt_b4"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_c1", Translation="uiR2EDnpc_ring_light_melee_blunt_c1"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_c2", Translation="uiR2EDnpc_ring_light_melee_blunt_c2"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_c3", Translation="uiR2EDnpc_ring_light_melee_blunt_c3"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_c4", Translation="uiR2EDnpc_ring_light_melee_blunt_c4"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_d1", Translation="uiR2EDnpc_ring_light_melee_blunt_d1"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_d2", Translation="uiR2EDnpc_ring_light_melee_blunt_d2"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_d3", Translation="uiR2EDnpc_ring_light_melee_blunt_d3"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_d4", Translation="uiR2EDnpc_ring_light_melee_blunt_d4"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_e1", Translation="uiR2EDnpc_ring_light_melee_blunt_e1"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_e2", Translation="uiR2EDnpc_ring_light_melee_blunt_e2"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_e3", Translation="uiR2EDnpc_ring_light_melee_blunt_e3"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_e4", Translation="uiR2EDnpc_ring_light_melee_blunt_e4"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_f1", Translation="uiR2EDnpc_ring_light_melee_blunt_f1"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_f2", Translation="uiR2EDnpc_ring_light_melee_blunt_f2"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_f3", Translation="uiR2EDnpc_ring_light_melee_blunt_f3"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_blunt_f4", Translation="uiR2EDnpc_ring_light_melee_blunt_f4"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_b1", Translation="uiR2EDnpc_ring_light_melee_pierce_b1"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_b2", Translation="uiR2EDnpc_ring_light_melee_pierce_b2"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_b3", Translation="uiR2EDnpc_ring_light_melee_pierce_b3"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_b4", Translation="uiR2EDnpc_ring_light_melee_pierce_b4"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_c1", Translation="uiR2EDnpc_ring_light_melee_pierce_c1"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_c2", Translation="uiR2EDnpc_ring_light_melee_pierce_c2"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_c3", Translation="uiR2EDnpc_ring_light_melee_pierce_c3"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_c4", Translation="uiR2EDnpc_ring_light_melee_pierce_c4"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_d1", Translation="uiR2EDnpc_ring_light_melee_pierce_d1"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_d2", Translation="uiR2EDnpc_ring_light_melee_pierce_d2"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_d3", Translation="uiR2EDnpc_ring_light_melee_pierce_d3"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_d4", Translation="uiR2EDnpc_ring_light_melee_pierce_d4"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_e1", Translation="uiR2EDnpc_ring_light_melee_pierce_e1"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_e2", Translation="uiR2EDnpc_ring_light_melee_pierce_e2"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_e3", Translation="uiR2EDnpc_ring_light_melee_pierce_e3"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_e4", Translation="uiR2EDnpc_ring_light_melee_pierce_e4"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_f1", Translation="uiR2EDnpc_ring_light_melee_pierce_f1"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_f2", Translation="uiR2EDnpc_ring_light_melee_pierce_f2"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_f3", Translation="uiR2EDnpc_ring_light_melee_pierce_f3"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_pierce_f4", Translation="uiR2EDnpc_ring_light_melee_pierce_f4"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_b1", Translation="uiR2EDnpc_ring_light_melee_slash_b1"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_b2", Translation="uiR2EDnpc_ring_light_melee_slash_b2"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_b3", Translation="uiR2EDnpc_ring_light_melee_slash_b3"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_b4", Translation="uiR2EDnpc_ring_light_melee_slash_b4"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_c1", Translation="uiR2EDnpc_ring_light_melee_slash_c1"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_c2", Translation="uiR2EDnpc_ring_light_melee_slash_c2"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_c3", Translation="uiR2EDnpc_ring_light_melee_slash_c3"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_c4", Translation="uiR2EDnpc_ring_light_melee_slash_c4"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_d1", Translation="uiR2EDnpc_ring_light_melee_slash_d1"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_d2", Translation="uiR2EDnpc_ring_light_melee_slash_d2"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_d3", Translation="uiR2EDnpc_ring_light_melee_slash_d3"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_d4", Translation="uiR2EDnpc_ring_light_melee_slash_d4"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_e1", Translation="uiR2EDnpc_ring_light_melee_slash_e1"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_e2", Translation="uiR2EDnpc_ring_light_melee_slash_e2"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_e3", Translation="uiR2EDnpc_ring_light_melee_slash_e3"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_e4", Translation="uiR2EDnpc_ring_light_melee_slash_e4"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_f1", Translation="uiR2EDnpc_ring_light_melee_slash_f1"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_f2", Translation="uiR2EDnpc_ring_light_melee_slash_f2"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_f3", Translation="uiR2EDnpc_ring_light_melee_slash_f3"}, --- {Id="palette.entities.npcs.bandits.ring_light_melee_slash_f4", Translation="uiR2EDnpc_ring_light_melee_slash_f4"} --- } --- }, --- --- lightranged = --- { --- instances = --- { --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_b1", Translation="uiR2EDnpc_ring_light_ranged_blunt_b1"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_b2", Translation="uiR2EDnpc_ring_light_ranged_blunt_b2"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_b3", Translation="uiR2EDnpc_ring_light_ranged_blunt_b3"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_b4", Translation="uiR2EDnpc_ring_light_ranged_blunt_b4"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_c1", Translation="uiR2EDnpc_ring_light_ranged_blunt_c1"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_c2", Translation="uiR2EDnpc_ring_light_ranged_blunt_c2"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_c3", Translation="uiR2EDnpc_ring_light_ranged_blunt_c3"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_c4", Translation="uiR2EDnpc_ring_light_ranged_blunt_c4"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_d1", Translation="uiR2EDnpc_ring_light_ranged_blunt_d1"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_d2", Translation="uiR2EDnpc_ring_light_ranged_blunt_d2"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_d3", Translation="uiR2EDnpc_ring_light_ranged_blunt_d3"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_d4", Translation="uiR2EDnpc_ring_light_ranged_blunt_d4"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_e1", Translation="uiR2EDnpc_ring_light_ranged_blunt_e1"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_e2", Translation="uiR2EDnpc_ring_light_ranged_blunt_e2"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_e3", Translation="uiR2EDnpc_ring_light_ranged_blunt_e3"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_e4", Translation="uiR2EDnpc_ring_light_ranged_blunt_e4"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_f1", Translation="uiR2EDnpc_ring_light_ranged_blunt_f1"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_f2", Translation="uiR2EDnpc_ring_light_ranged_blunt_f2"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_f3", Translation="uiR2EDnpc_ring_light_ranged_blunt_f3"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_blunt_f4", Translation="uiR2EDnpc_ring_light_ranged_blunt_f4"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_b1", Translation="uiR2EDnpc_ring_light_ranged_pierce_b1"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_b2", Translation="uiR2EDnpc_ring_light_ranged_pierce_b2"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_b3", Translation="uiR2EDnpc_ring_light_ranged_pierce_b3"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_b4", Translation="uiR2EDnpc_ring_light_ranged_pierce_b4"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_c1", Translation="uiR2EDnpc_ring_light_ranged_pierce_c1"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_c2", Translation="uiR2EDnpc_ring_light_ranged_pierce_c2"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_c3", Translation="uiR2EDnpc_ring_light_ranged_pierce_c3"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_c4", Translation="uiR2EDnpc_ring_light_ranged_pierce_c4"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_d1", Translation="uiR2EDnpc_ring_light_ranged_pierce_d1"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_d2", Translation="uiR2EDnpc_ring_light_ranged_pierce_d2"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_d3", Translation="uiR2EDnpc_ring_light_ranged_pierce_d3"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_d4", Translation="uiR2EDnpc_ring_light_ranged_pierce_d4"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_e1", Translation="uiR2EDnpc_ring_light_ranged_pierce_e1"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_e2", Translation="uiR2EDnpc_ring_light_ranged_pierce_e2"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_e3", Translation="uiR2EDnpc_ring_light_ranged_pierce_e3"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_e4", Translation="uiR2EDnpc_ring_light_ranged_pierce_e4"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_f1", Translation="uiR2EDnpc_ring_light_ranged_pierce_f1"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_f2", Translation="uiR2EDnpc_ring_light_ranged_pierce_f2"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_f3", Translation="uiR2EDnpc_ring_light_ranged_pierce_f3"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_pierce_f4", Translation="uiR2EDnpc_ring_light_ranged_pierce_f4"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_b1", Translation="uiR2EDnpc_ring_light_ranged_slash_b1"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_b2", Translation="uiR2EDnpc_ring_light_ranged_slash_b2"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_b3", Translation="uiR2EDnpc_ring_light_ranged_slash_b3"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_b4", Translation="uiR2EDnpc_ring_light_ranged_slash_b4"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_c1", Translation="uiR2EDnpc_ring_light_ranged_slash_c1"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_c2", Translation="uiR2EDnpc_ring_light_ranged_slash_c2"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_c3", Translation="uiR2EDnpc_ring_light_ranged_slash_c3"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_c4", Translation="uiR2EDnpc_ring_light_ranged_slash_c4"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_d1", Translation="uiR2EDnpc_ring_light_ranged_slash_d1"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_d2", Translation="uiR2EDnpc_ring_light_ranged_slash_d2"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_d3", Translation="uiR2EDnpc_ring_light_ranged_slash_d3"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_d4", Translation="uiR2EDnpc_ring_light_ranged_slash_d4"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_e1", Translation="uiR2EDnpc_ring_light_ranged_slash_e1"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_e2", Translation="uiR2EDnpc_ring_light_ranged_slash_e2"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_e3", Translation="uiR2EDnpc_ring_light_ranged_slash_e3"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_e4", Translation="uiR2EDnpc_ring_light_ranged_slash_e4"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_f1", Translation="uiR2EDnpc_ring_light_ranged_slash_f1"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_f2", Translation="uiR2EDnpc_ring_light_ranged_slash_f2"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_f3", Translation="uiR2EDnpc_ring_light_ranged_slash_f3"}, --- {Id="palette.entities.npcs.bandits.ring_light_ranged_slash_f4", Translation="uiR2EDnpc_ring_light_ranged_slash_f4"} --- } --- }, --- --- magicaoe = --- { --- magicaoebasic = --- { --- instances = --- { --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_b1", Translation="uiR2EDnpc_ring_magic_aoe_acid_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_b2", Translation="uiR2EDnpc_ring_magic_aoe_acid_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_b3", Translation="uiR2EDnpc_ring_magic_aoe_acid_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_b4", Translation="uiR2EDnpc_ring_magic_aoe_acid_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_c1", Translation="uiR2EDnpc_ring_magic_aoe_acid_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_c2", Translation="uiR2EDnpc_ring_magic_aoe_acid_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_c3", Translation="uiR2EDnpc_ring_magic_aoe_acid_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_c4", Translation="uiR2EDnpc_ring_magic_aoe_acid_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_d1", Translation="uiR2EDnpc_ring_magic_aoe_acid_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_d2", Translation="uiR2EDnpc_ring_magic_aoe_acid_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_d3", Translation="uiR2EDnpc_ring_magic_aoe_acid_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_d4", Translation="uiR2EDnpc_ring_magic_aoe_acid_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_e1", Translation="uiR2EDnpc_ring_magic_aoe_acid_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_e2", Translation="uiR2EDnpc_ring_magic_aoe_acid_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_e3", Translation="uiR2EDnpc_ring_magic_aoe_acid_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_e4", Translation="uiR2EDnpc_ring_magic_aoe_acid_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_f1", Translation="uiR2EDnpc_ring_magic_aoe_acid_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_f2", Translation="uiR2EDnpc_ring_magic_aoe_acid_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_f3", Translation="uiR2EDnpc_ring_magic_aoe_acid_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_acid_f4", Translation="uiR2EDnpc_ring_magic_aoe_acid_f4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_b1", Translation="uiR2EDnpc_ring_magic_aoe_cold_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_b2", Translation="uiR2EDnpc_ring_magic_aoe_cold_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_b3", Translation="uiR2EDnpc_ring_magic_aoe_cold_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_b4", Translation="uiR2EDnpc_ring_magic_aoe_cold_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_c1", Translation="uiR2EDnpc_ring_magic_aoe_cold_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_c2", Translation="uiR2EDnpc_ring_magic_aoe_cold_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_c3", Translation="uiR2EDnpc_ring_magic_aoe_cold_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_c4", Translation="uiR2EDnpc_ring_magic_aoe_cold_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_d1", Translation="uiR2EDnpc_ring_magic_aoe_cold_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_d2", Translation="uiR2EDnpc_ring_magic_aoe_cold_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_d3", Translation="uiR2EDnpc_ring_magic_aoe_cold_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_d4", Translation="uiR2EDnpc_ring_magic_aoe_cold_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_e1", Translation="uiR2EDnpc_ring_magic_aoe_cold_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_e2", Translation="uiR2EDnpc_ring_magic_aoe_cold_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_e3", Translation="uiR2EDnpc_ring_magic_aoe_cold_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_e4", Translation="uiR2EDnpc_ring_magic_aoe_cold_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_f1", Translation="uiR2EDnpc_ring_magic_aoe_cold_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_f2", Translation="uiR2EDnpc_ring_magic_aoe_cold_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_f3", Translation="uiR2EDnpc_ring_magic_aoe_cold_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_cold_f4", Translation="uiR2EDnpc_ring_magic_aoe_cold_f4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_b1", Translation="uiR2EDnpc_ring_magic_aoe_rot_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_b2", Translation="uiR2EDnpc_ring_magic_aoe_rot_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_b3", Translation="uiR2EDnpc_ring_magic_aoe_rot_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_b4", Translation="uiR2EDnpc_ring_magic_aoe_rot_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_c1", Translation="uiR2EDnpc_ring_magic_aoe_rot_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_c2", Translation="uiR2EDnpc_ring_magic_aoe_rot_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_c3", Translation="uiR2EDnpc_ring_magic_aoe_rot_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_c4", Translation="uiR2EDnpc_ring_magic_aoe_rot_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_d1", Translation="uiR2EDnpc_ring_magic_aoe_rot_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_d2", Translation="uiR2EDnpc_ring_magic_aoe_rot_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_d3", Translation="uiR2EDnpc_ring_magic_aoe_rot_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_d4", Translation="uiR2EDnpc_ring_magic_aoe_rot_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_e1", Translation="uiR2EDnpc_ring_magic_aoe_rot_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_e2", Translation="uiR2EDnpc_ring_magic_aoe_rot_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_e3", Translation="uiR2EDnpc_ring_magic_aoe_rot_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_e4", Translation="uiR2EDnpc_ring_magic_aoe_rot_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_f1", Translation="uiR2EDnpc_ring_magic_aoe_rot_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_f2", Translation="uiR2EDnpc_ring_magic_aoe_rot_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_f3", Translation="uiR2EDnpc_ring_magic_aoe_rot_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_rot_f4", Translation="uiR2EDnpc_ring_magic_aoe_rot_f4"} --- } --- }, --- magicaoeracial = --- { --- instances = --- { --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_b1", Translation="uiR2EDnpc_ring_magic_aoe_electricity_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_b2", Translation="uiR2EDnpc_ring_magic_aoe_electricity_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_b3", Translation="uiR2EDnpc_ring_magic_aoe_electricity_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_b4", Translation="uiR2EDnpc_ring_magic_aoe_electricity_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_c1", Translation="uiR2EDnpc_ring_magic_aoe_electricity_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_c2", Translation="uiR2EDnpc_ring_magic_aoe_electricity_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_c3", Translation="uiR2EDnpc_ring_magic_aoe_electricity_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_c4", Translation="uiR2EDnpc_ring_magic_aoe_electricity_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_d1", Translation="uiR2EDnpc_ring_magic_aoe_electricity_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_d2", Translation="uiR2EDnpc_ring_magic_aoe_electricity_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_d3", Translation="uiR2EDnpc_ring_magic_aoe_electricity_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_d4", Translation="uiR2EDnpc_ring_magic_aoe_electricity_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_e1", Translation="uiR2EDnpc_ring_magic_aoe_electricity_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_e2", Translation="uiR2EDnpc_ring_magic_aoe_electricity_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_e3", Translation="uiR2EDnpc_ring_magic_aoe_electricity_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_e4", Translation="uiR2EDnpc_ring_magic_aoe_electricity_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_f1", Translation="uiR2EDnpc_ring_magic_aoe_electricity_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_f2", Translation="uiR2EDnpc_ring_magic_aoe_electricity_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_f3", Translation="uiR2EDnpc_ring_magic_aoe_electricity_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_electricity_f4", Translation="uiR2EDnpc_ring_magic_aoe_electricity_f4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_b1", Translation="uiR2EDnpc_ring_magic_aoe_fire_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_b2", Translation="uiR2EDnpc_ring_magic_aoe_fire_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_b3", Translation="uiR2EDnpc_ring_magic_aoe_fire_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_b4", Translation="uiR2EDnpc_ring_magic_aoe_fire_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_c1", Translation="uiR2EDnpc_ring_magic_aoe_fire_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_c2", Translation="uiR2EDnpc_ring_magic_aoe_fire_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_c3", Translation="uiR2EDnpc_ring_magic_aoe_fire_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_c4", Translation="uiR2EDnpc_ring_magic_aoe_fire_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_d1", Translation="uiR2EDnpc_ring_magic_aoe_fire_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_d2", Translation="uiR2EDnpc_ring_magic_aoe_fire_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_d3", Translation="uiR2EDnpc_ring_magic_aoe_fire_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_d4", Translation="uiR2EDnpc_ring_magic_aoe_fire_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_e1", Translation="uiR2EDnpc_ring_magic_aoe_fire_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_e2", Translation="uiR2EDnpc_ring_magic_aoe_fire_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_e3", Translation="uiR2EDnpc_ring_magic_aoe_fire_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_e4", Translation="uiR2EDnpc_ring_magic_aoe_fire_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_f1", Translation="uiR2EDnpc_ring_magic_aoe_fire_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_f2", Translation="uiR2EDnpc_ring_magic_aoe_fire_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_f3", Translation="uiR2EDnpc_ring_magic_aoe_fire_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_fire_f4", Translation="uiR2EDnpc_ring_magic_aoe_fire_f4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_b1", Translation="uiR2EDnpc_ring_magic_aoe_poison_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_b2", Translation="uiR2EDnpc_ring_magic_aoe_poison_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_b3", Translation="uiR2EDnpc_ring_magic_aoe_poison_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_b4", Translation="uiR2EDnpc_ring_magic_aoe_poison_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_c1", Translation="uiR2EDnpc_ring_magic_aoe_poison_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_c2", Translation="uiR2EDnpc_ring_magic_aoe_poison_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_c3", Translation="uiR2EDnpc_ring_magic_aoe_poison_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_c4", Translation="uiR2EDnpc_ring_magic_aoe_poison_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_d1", Translation="uiR2EDnpc_ring_magic_aoe_poison_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_d2", Translation="uiR2EDnpc_ring_magic_aoe_poison_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_d3", Translation="uiR2EDnpc_ring_magic_aoe_poison_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_d4", Translation="uiR2EDnpc_ring_magic_aoe_poison_d4"}, --- --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_e1", Translation="uiR2EDnpc_ring_magic_aoe_poison_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_e2", Translation="uiR2EDnpc_ring_magic_aoe_poison_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_e3", Translation="uiR2EDnpc_ring_magic_aoe_poison_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_e4", Translation="uiR2EDnpc_ring_magic_aoe_poison_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_f1", Translation="uiR2EDnpc_ring_magic_aoe_poison_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_f2", Translation="uiR2EDnpc_ring_magic_aoe_poison_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_f3", Translation="uiR2EDnpc_ring_magic_aoe_poison_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_poison_f4", Translation="uiR2EDnpc_ring_magic_aoe_poison_f4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_b1", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_b2", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_b3", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_b4", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_c1", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_c2", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_c3", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_c4", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_d1", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_d2", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_d3", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_d4", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_e1", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_e2", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_e3", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_e4", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_f1", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_f2", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_f3", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_aoe_shockwave_f4", Translation="uiR2EDnpc_ring_magic_aoe_shockwave_f4"} --- } --- } --- }, --- --- magiccurser = --- { --- magiccurseratysianaffliction = --- { --- instances = --- { --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_b1", Translation="uiR2EDnpc_ring_magic_curser_blind_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_b2", Translation="uiR2EDnpc_ring_magic_curser_blind_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_b3", Translation="uiR2EDnpc_ring_magic_curser_blind_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_b4", Translation="uiR2EDnpc_ring_magic_curser_blind_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_c1", Translation="uiR2EDnpc_ring_magic_curser_blind_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_c2", Translation="uiR2EDnpc_ring_magic_curser_blind_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_c3", Translation="uiR2EDnpc_ring_magic_curser_blind_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_c4", Translation="uiR2EDnpc_ring_magic_curser_blind_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_d1", Translation="uiR2EDnpc_ring_magic_curser_blind_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_d2", Translation="uiR2EDnpc_ring_magic_curser_blind_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_d3", Translation="uiR2EDnpc_ring_magic_curser_blind_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_d4", Translation="uiR2EDnpc_ring_magic_curser_blind_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_e1", Translation="uiR2EDnpc_ring_magic_curser_blind_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_e2", Translation="uiR2EDnpc_ring_magic_curser_blind_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_e3", Translation="uiR2EDnpc_ring_magic_curser_blind_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_e4", Translation="uiR2EDnpc_ring_magic_curser_blind_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_f1", Translation="uiR2EDnpc_ring_magic_curser_blind_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_f2", Translation="uiR2EDnpc_ring_magic_curser_blind_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_f3", Translation="uiR2EDnpc_ring_magic_curser_blind_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_blind_f4", Translation="uiR2EDnpc_ring_magic_curser_blind_f4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_b1", Translation="uiR2EDnpc_ring_magic_curser_madness_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_b2", Translation="uiR2EDnpc_ring_magic_curser_madness_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_b3", Translation="uiR2EDnpc_ring_magic_curser_madness_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_b4", Translation="uiR2EDnpc_ring_magic_curser_madness_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_c1", Translation="uiR2EDnpc_ring_magic_curser_madness_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_c2", Translation="uiR2EDnpc_ring_magic_curser_madness_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_c3", Translation="uiR2EDnpc_ring_magic_curser_madness_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_c4", Translation="uiR2EDnpc_ring_magic_curser_madness_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_d1", Translation="uiR2EDnpc_ring_magic_curser_madness_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_d2", Translation="uiR2EDnpc_ring_magic_curser_madness_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_d3", Translation="uiR2EDnpc_ring_magic_curser_madness_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_d4", Translation="uiR2EDnpc_ring_magic_curser_madness_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_e1", Translation="uiR2EDnpc_ring_magic_curser_madness_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_e2", Translation="uiR2EDnpc_ring_magic_curser_madness_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_e3", Translation="uiR2EDnpc_ring_magic_curser_madness_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_e4", Translation="uiR2EDnpc_ring_magic_curser_madness_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_f1", Translation="uiR2EDnpc_ring_magic_curser_madness_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_f2", Translation="uiR2EDnpc_ring_magic_curser_madness_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_f3", Translation="uiR2EDnpc_ring_magic_curser_madness_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_madness_f4", Translation="uiR2EDnpc_ring_magic_curser_madness_f4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_b1", Translation="uiR2EDnpc_ring_magic_curser_root_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_b2", Translation="uiR2EDnpc_ring_magic_curser_root_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_b3", Translation="uiR2EDnpc_ring_magic_curser_root_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_b4", Translation="uiR2EDnpc_ring_magic_curser_root_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_c1", Translation="uiR2EDnpc_ring_magic_curser_root_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_c2", Translation="uiR2EDnpc_ring_magic_curser_root_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_c3", Translation="uiR2EDnpc_ring_magic_curser_root_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_c4", Translation="uiR2EDnpc_ring_magic_curser_root_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_d1", Translation="uiR2EDnpc_ring_magic_curser_root_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_d2", Translation="uiR2EDnpc_ring_magic_curser_root_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_d3", Translation="uiR2EDnpc_ring_magic_curser_root_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_d4", Translation="uiR2EDnpc_ring_magic_curser_root_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_e1", Translation="uiR2EDnpc_ring_magic_curser_root_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_e2", Translation="uiR2EDnpc_ring_magic_curser_root_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_e3", Translation="uiR2EDnpc_ring_magic_curser_root_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_e4", Translation="uiR2EDnpc_ring_magic_curser_root_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_f1", Translation="uiR2EDnpc_ring_magic_curser_root_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_f2", Translation="uiR2EDnpc_ring_magic_curser_root_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_f3", Translation="uiR2EDnpc_ring_magic_curser_root_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_root_f4", Translation="uiR2EDnpc_ring_magic_curser_root_f4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_b1", Translation="uiR2EDnpc_ring_magic_curser_slow_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_b2", Translation="uiR2EDnpc_ring_magic_curser_slow_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_b3", Translation="uiR2EDnpc_ring_magic_curser_slow_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_b4", Translation="uiR2EDnpc_ring_magic_curser_slow_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_c1", Translation="uiR2EDnpc_ring_magic_curser_slow_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_c2", Translation="uiR2EDnpc_ring_magic_curser_slow_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_c3", Translation="uiR2EDnpc_ring_magic_curser_slow_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_c4", Translation="uiR2EDnpc_ring_magic_curser_slow_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_d1", Translation="uiR2EDnpc_ring_magic_curser_slow_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_d2", Translation="uiR2EDnpc_ring_magic_curser_slow_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_d3", Translation="uiR2EDnpc_ring_magic_curser_slow_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_d4", Translation="uiR2EDnpc_ring_magic_curser_slow_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_e1", Translation="uiR2EDnpc_ring_magic_curser_slow_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_e2", Translation="uiR2EDnpc_ring_magic_curser_slow_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_e3", Translation="uiR2EDnpc_ring_magic_curser_slow_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_e4", Translation="uiR2EDnpc_ring_magic_curser_slow_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_f1", Translation="uiR2EDnpc_ring_magic_curser_slow_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_f2", Translation="uiR2EDnpc_ring_magic_curser_slow_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_f3", Translation="uiR2EDnpc_ring_magic_curser_slow_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_slow_f4", Translation="uiR2EDnpc_ring_magic_curser_slow_f4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_b1", Translation="uiR2EDnpc_ring_magic_curser_snare_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_b2", Translation="uiR2EDnpc_ring_magic_curser_snare_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_b3", Translation="uiR2EDnpc_ring_magic_curser_snare_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_b4", Translation="uiR2EDnpc_ring_magic_curser_snare_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_c1", Translation="uiR2EDnpc_ring_magic_curser_snare_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_c2", Translation="uiR2EDnpc_ring_magic_curser_snare_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_c3", Translation="uiR2EDnpc_ring_magic_curser_snare_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_c4", Translation="uiR2EDnpc_ring_magic_curser_snare_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_d1", Translation="uiR2EDnpc_ring_magic_curser_snare_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_d2", Translation="uiR2EDnpc_ring_magic_curser_snare_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_d3", Translation="uiR2EDnpc_ring_magic_curser_snare_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_d4", Translation="uiR2EDnpc_ring_magic_curser_snare_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_e1", Translation="uiR2EDnpc_ring_magic_curser_snare_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_e2", Translation="uiR2EDnpc_ring_magic_curser_snare_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_e3", Translation="uiR2EDnpc_ring_magic_curser_snare_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_e4", Translation="uiR2EDnpc_ring_magic_curser_snare_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_f1", Translation="uiR2EDnpc_ring_magic_curser_snare_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_f2", Translation="uiR2EDnpc_ring_magic_curser_snare_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_f3", Translation="uiR2EDnpc_ring_magic_curser_snare_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_snare_f4", Translation="uiR2EDnpc_ring_magic_curser_snare_f4"} --- } --- }, --- magiccursercelestialaffliction = --- { --- instances = --- { --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_b1", Translation="uiR2EDnpc_ring_magic_curser_fear_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_b2", Translation="uiR2EDnpc_ring_magic_curser_fear_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_b3", Translation="uiR2EDnpc_ring_magic_curser_fear_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_b4", Translation="uiR2EDnpc_ring_magic_curser_fear_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_c1", Translation="uiR2EDnpc_ring_magic_curser_fear_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_c2", Translation="uiR2EDnpc_ring_magic_curser_fear_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_c3", Translation="uiR2EDnpc_ring_magic_curser_fear_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_c4", Translation="uiR2EDnpc_ring_magic_curser_fear_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_d1", Translation="uiR2EDnpc_ring_magic_curser_fear_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_d2", Translation="uiR2EDnpc_ring_magic_curser_fear_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_d3", Translation="uiR2EDnpc_ring_magic_curser_fear_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_d4", Translation="uiR2EDnpc_ring_magic_curser_fear_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_e1", Translation="uiR2EDnpc_ring_magic_curser_fear_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_e2", Translation="uiR2EDnpc_ring_magic_curser_fear_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_e3", Translation="uiR2EDnpc_ring_magic_curser_fear_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_e4", Translation="uiR2EDnpc_ring_magic_curser_fear_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_f1", Translation="uiR2EDnpc_ring_magic_curser_fear_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_f2", Translation="uiR2EDnpc_ring_magic_curser_fear_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_f3", Translation="uiR2EDnpc_ring_magic_curser_fear_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_fear_f4", Translation="uiR2EDnpc_ring_magic_curser_fear_f4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_b1", Translation="uiR2EDnpc_ring_magic_curser_sleep_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_b2", Translation="uiR2EDnpc_ring_magic_curser_sleep_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_b3", Translation="uiR2EDnpc_ring_magic_curser_sleep_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_b4", Translation="uiR2EDnpc_ring_magic_curser_sleep_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_c1", Translation="uiR2EDnpc_ring_magic_curser_sleep_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_c2", Translation="uiR2EDnpc_ring_magic_curser_sleep_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_c3", Translation="uiR2EDnpc_ring_magic_curser_sleep_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_c4", Translation="uiR2EDnpc_ring_magic_curser_sleep_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_d1", Translation="uiR2EDnpc_ring_magic_curser_sleep_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_d2", Translation="uiR2EDnpc_ring_magic_curser_sleep_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_d3", Translation="uiR2EDnpc_ring_magic_curser_sleep_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_d4", Translation="uiR2EDnpc_ring_magic_curser_sleep_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_e1", Translation="uiR2EDnpc_ring_magic_curser_sleep_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_e2", Translation="uiR2EDnpc_ring_magic_curser_sleep_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_e3", Translation="uiR2EDnpc_ring_magic_curser_sleep_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_e4", Translation="uiR2EDnpc_ring_magic_curser_sleep_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_f1", Translation="uiR2EDnpc_ring_magic_curser_sleep_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_f2", Translation="uiR2EDnpc_ring_magic_curser_sleep_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_f3", Translation="uiR2EDnpc_ring_magic_curser_sleep_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_sleep_f4", Translation="uiR2EDnpc_ring_magic_curser_sleep_f4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_b1", Translation="uiR2EDnpc_ring_magic_curser_stun_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_b2", Translation="uiR2EDnpc_ring_magic_curser_stun_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_b3", Translation="uiR2EDnpc_ring_magic_curser_stun_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_b4", Translation="uiR2EDnpc_ring_magic_curser_stun_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_c1", Translation="uiR2EDnpc_ring_magic_curser_stun_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_c2", Translation="uiR2EDnpc_ring_magic_curser_stun_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_c3", Translation="uiR2EDnpc_ring_magic_curser_stun_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_c4", Translation="uiR2EDnpc_ring_magic_curser_stun_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_d1", Translation="uiR2EDnpc_ring_magic_curser_stun_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_d2", Translation="uiR2EDnpc_ring_magic_curser_stun_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_d3", Translation="uiR2EDnpc_ring_magic_curser_stun_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_d4", Translation="uiR2EDnpc_ring_magic_curser_stun_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_e1", Translation="uiR2EDnpc_ring_magic_curser_stun_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_e2", Translation="uiR2EDnpc_ring_magic_curser_stun_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_e3", Translation="uiR2EDnpc_ring_magic_curser_stun_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_e4", Translation="uiR2EDnpc_ring_magic_curser_stun_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_f1", Translation="uiR2EDnpc_ring_magic_curser_stun_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_f2", Translation="uiR2EDnpc_ring_magic_curser_stun_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_f3", Translation="uiR2EDnpc_ring_magic_curser_stun_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_curser_stun_f4", Translation="uiR2EDnpc_ring_magic_curser_stun_f4"} --- --- } --- } --- }, --- --- magicdamagedealer = --- { --- magicdamagedealerbasic = --- { --- instances = --- { --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_b1", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_b2", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_b3", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_b4", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_c1", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_c2", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_c3", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_c4", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_d1", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_d2", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_d3", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_d4", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_e1", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_e2", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_e3", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_e4", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_f1", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_f2", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_f3", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_acid_f4", Translation="uiR2EDnpc_ring_magic_damage_dealer_acid_f4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_b1", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_b2", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_b3", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_b4", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_c1", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_c2", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_c3", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_c4", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_d1", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_d2", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_d3", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_d4", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_e1", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_e2", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_e3", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_e4", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_f1", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_f2", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_f3", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_cold_f4", Translation="uiR2EDnpc_ring_magic_damage_dealer_cold_f4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_b1", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_b2", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_b3", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_b4", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_c1", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_c2", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_c3", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_c4", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_d1", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_d2", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_d3", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_d4", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_e1", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_e2", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_e3", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_e4", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_f1", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_f2", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_f3", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_rot_f4", Translation="uiR2EDnpc_ring_magic_damage_dealer_rot_f4"} --- } --- }, --- magicdamagedealerracial = --- { --- instances = --- { --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_b1", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_b2", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_b3", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_b4", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_c1", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_c2", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_c3", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_c4", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_d1", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_d2", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_d3", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_d4", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_e1", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_e2", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_e3", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_e4", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_f1", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_f2", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_f3", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_electricity_f4", Translation="uiR2EDnpc_ring_magic_damage_dealer_electricity_f4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_b1", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_b2", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_b3", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_b4", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_c1", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_c2", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_c3", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_c4", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_d1", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_d2", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_d3", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_d4", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_e1", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_e2", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_e3", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_e4", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_f1", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_f2", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_f3", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_fire_f4", Translation="uiR2EDnpc_ring_magic_damage_dealer_fire_f4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_b1", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_b2", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_b3", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_b4", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_c1", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_c2", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_c3", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_c4", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_d1", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_d2", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_d3", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_d4", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_e1", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_e2", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_e3", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_e4", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_f1", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_f2", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_f3", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_poison_f4", Translation="uiR2EDnpc_ring_magic_damage_dealer_poison_f4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_b1", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_b1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_b2", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_b2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_b3", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_b3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_b4", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_b4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_c1", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_c1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_c2", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_c2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_c3", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_c3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_c4", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_c4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_d1", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_d1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_d2", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_d2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_d3", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_d3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_d4", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_d4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_e1", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_e1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_e2", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_e2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_e3", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_e3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_e4", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_e4"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_f1", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_f1"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_f2", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_f2"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_f3", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_f3"}, --- {Id="palette.entities.npcs.bandits.ring_magic_damage_dealer_shockwave_f4", Translation="uiR2EDnpc_ring_magic_damage_dealer_shockwave_f4"}, --- --- } --- } --- }, --- --- meleedamagedealer = --- { --- instances = --- { --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_b1", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_b1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_b2", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_b2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_b3", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_b3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_b4", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_b4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_c1", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_c1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_c2", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_c2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_c3", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_c3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_c4", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_c4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_d1", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_d1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_d2", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_d2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_d3", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_d3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_d4", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_d4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_e1", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_e1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_e2", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_e2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_e3", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_e3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_e4", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_e4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_f1", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_f1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_f2", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_f2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_f3", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_f3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_blunt_f4", Translation="uiR2EDnpc_ring_melee_damage_dealer_blunt_f4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_b1", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_b1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_b2", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_b2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_b3", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_b3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_b4", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_b4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_c1", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_c1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_c2", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_c2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_c3", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_c3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_c4", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_c4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_d1", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_d1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_d2", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_d2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_d3", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_d3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_d4", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_d4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_e1", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_e1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_e2", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_e2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_e3", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_e3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_e4", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_e4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_f1", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_f1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_f2", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_f2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_f3", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_f3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_pierce_f4", Translation="uiR2EDnpc_ring_melee_damage_dealer_pierce_f4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_b1", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_b1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_b2", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_b2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_b3", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_b3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_b4", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_b4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_c1", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_c1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_c2", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_c2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_c3", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_c3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_c4", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_c4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_d1", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_d1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_d2", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_d2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_d3", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_d3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_d4", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_d4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_e1", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_e1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_e2", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_e2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_e3", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_e3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_e4", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_e4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_f1", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_f1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_f2", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_f2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_f3", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_f3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_damage_dealer_slash_f4", Translation="uiR2EDnpc_ring_melee_damage_dealer_slash_f4"} --- } --- }, --- --- meleetank = --- { --- instances = --- { --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_b1", Translation="uiR2EDnpc_ring_melee_tank_blunt_b1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_b2", Translation="uiR2EDnpc_ring_melee_tank_blunt_b2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_b3", Translation="uiR2EDnpc_ring_melee_tank_blunt_b3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_b4", Translation="uiR2EDnpc_ring_melee_tank_blunt_b4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_c1", Translation="uiR2EDnpc_ring_melee_tank_blunt_c1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_c2", Translation="uiR2EDnpc_ring_melee_tank_blunt_c2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_c3", Translation="uiR2EDnpc_ring_melee_tank_blunt_c3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_c4", Translation="uiR2EDnpc_ring_melee_tank_blunt_c4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_d1", Translation="uiR2EDnpc_ring_melee_tank_blunt_d1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_d2", Translation="uiR2EDnpc_ring_melee_tank_blunt_d2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_d3", Translation="uiR2EDnpc_ring_melee_tank_blunt_d3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_d4", Translation="uiR2EDnpc_ring_melee_tank_blunt_d4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_e1", Translation="uiR2EDnpc_ring_melee_tank_blunt_e1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_e2", Translation="uiR2EDnpc_ring_melee_tank_blunt_e2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_e3", Translation="uiR2EDnpc_ring_melee_tank_blunt_e3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_e4", Translation="uiR2EDnpc_ring_melee_tank_blunt_e4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_f1", Translation="uiR2EDnpc_ring_melee_tank_blunt_f1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_f2", Translation="uiR2EDnpc_ring_melee_tank_blunt_f2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_f3", Translation="uiR2EDnpc_ring_melee_tank_blunt_f3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_blunt_f4", Translation="uiR2EDnpc_ring_melee_tank_blunt_f4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_b1", Translation="uiR2EDnpc_ring_melee_tank_pierce_b1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_b2", Translation="uiR2EDnpc_ring_melee_tank_pierce_b2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_b3", Translation="uiR2EDnpc_ring_melee_tank_pierce_b3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_b4", Translation="uiR2EDnpc_ring_melee_tank_pierce_b4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_c1", Translation="uiR2EDnpc_ring_melee_tank_pierce_c1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_c2", Translation="uiR2EDnpc_ring_melee_tank_pierce_c2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_c3", Translation="uiR2EDnpc_ring_melee_tank_pierce_c3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_c4", Translation="uiR2EDnpc_ring_melee_tank_pierce_c4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_d1", Translation="uiR2EDnpc_ring_melee_tank_pierce_d1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_d2", Translation="uiR2EDnpc_ring_melee_tank_pierce_d2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_d3", Translation="uiR2EDnpc_ring_melee_tank_pierce_d3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_d4", Translation="uiR2EDnpc_ring_melee_tank_pierce_d4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_e1", Translation="uiR2EDnpc_ring_melee_tank_pierce_e1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_e2", Translation="uiR2EDnpc_ring_melee_tank_pierce_e2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_e3", Translation="uiR2EDnpc_ring_melee_tank_pierce_e3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_e4", Translation="uiR2EDnpc_ring_melee_tank_pierce_e4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_f1", Translation="uiR2EDnpc_ring_melee_tank_pierce_f1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_f2", Translation="uiR2EDnpc_ring_melee_tank_pierce_f2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_f3", Translation="uiR2EDnpc_ring_melee_tank_pierce_f3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_pierce_f4", Translation="uiR2EDnpc_ring_melee_tank_pierce_f4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_b1", Translation="uiR2EDnpc_ring_melee_tank_slash_b1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_b2", Translation="uiR2EDnpc_ring_melee_tank_slash_b2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_b3", Translation="uiR2EDnpc_ring_melee_tank_slash_b3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_b4", Translation="uiR2EDnpc_ring_melee_tank_slash_b4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_c1", Translation="uiR2EDnpc_ring_melee_tank_slash_c1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_c2", Translation="uiR2EDnpc_ring_melee_tank_slash_c2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_c3", Translation="uiR2EDnpc_ring_melee_tank_slash_c3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_c4", Translation="uiR2EDnpc_ring_melee_tank_slash_c4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_d1", Translation="uiR2EDnpc_ring_melee_tank_slash_d1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_d2", Translation="uiR2EDnpc_ring_melee_tank_slash_d2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_d3", Translation="uiR2EDnpc_ring_melee_tank_slash_d3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_d4", Translation="uiR2EDnpc_ring_melee_tank_slash_d4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_e1", Translation="uiR2EDnpc_ring_melee_tank_slash_e1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_e2", Translation="uiR2EDnpc_ring_melee_tank_slash_e2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_e3", Translation="uiR2EDnpc_ring_melee_tank_slash_e3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_e4", Translation="uiR2EDnpc_ring_melee_tank_slash_e4"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_f1", Translation="uiR2EDnpc_ring_melee_tank_slash_f1"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_f2", Translation="uiR2EDnpc_ring_melee_tank_slash_f2"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_f3", Translation="uiR2EDnpc_ring_melee_tank_slash_f3"}, --- {Id="palette.entities.npcs.bandits.ring_melee_tank_slash_f4", Translation="uiR2EDnpc_ring_melee_tank_slash_f4"} --- } --- }, --- --- rangeddamagedealer = --- { --- instances = --- { --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_b1", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_b1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_b2", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_b2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_b3", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_b3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_b4", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_b4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_c1", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_c1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_c2", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_c2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_c3", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_c3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_c4", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_c4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_d1", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_d1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_d2", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_d2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_d3", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_d3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_d4", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_d4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_e1", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_e1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_e2", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_e2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_e3", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_e3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_e4", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_e4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_f1", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_f1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_f2", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_f2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_f3", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_f3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_blunt_f4", Translation="uiR2EDnpc_ring_ranged_damage_dealer_blunt_f4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_b1", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_b1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_b2", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_b2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_b3", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_b3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_b4", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_b4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_c1", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_c1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_c2", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_c2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_c3", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_c3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_c4", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_c4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_d1", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_d1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_d2", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_d2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_d3", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_d3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_d4", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_d4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_e1", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_e1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_e2", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_e2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_e3", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_e3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_e4", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_e4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_f1", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_f1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_f2", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_f2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_f3", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_f3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_pierce_f4", Translation="uiR2EDnpc_ring_ranged_damage_dealer_pierce_f4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_b1", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_b1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_b2", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_b2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_b3", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_b3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_b4", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_b4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_c1", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_c1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_c2", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_c2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_c3", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_c3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_c4", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_c4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_d1", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_d1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_d2", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_d2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_d3", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_d3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_d4", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_d4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_e1", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_e1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_e2", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_e2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_e3", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_e3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_e4", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_e4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_f1", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_f1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_f2", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_f2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_f3", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_f3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_damage_dealer_slash_f4", Translation="uiR2EDnpc_ring_ranged_damage_dealer_slash_f4"} --- } --- }, --- --- rangedtank = --- { --- instances = --- { --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_b1", Translation="uiR2EDnpc_ring_ranged_tank_blunt_b1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_b2", Translation="uiR2EDnpc_ring_ranged_tank_blunt_b2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_b3", Translation="uiR2EDnpc_ring_ranged_tank_blunt_b3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_b4", Translation="uiR2EDnpc_ring_ranged_tank_blunt_b4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_c1", Translation="uiR2EDnpc_ring_ranged_tank_blunt_c1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_c2", Translation="uiR2EDnpc_ring_ranged_tank_blunt_c2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_c3", Translation="uiR2EDnpc_ring_ranged_tank_blunt_c3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_c4", Translation="uiR2EDnpc_ring_ranged_tank_blunt_c4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_d1", Translation="uiR2EDnpc_ring_ranged_tank_blunt_d1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_d2", Translation="uiR2EDnpc_ring_ranged_tank_blunt_d2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_d3", Translation="uiR2EDnpc_ring_ranged_tank_blunt_d3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_d4", Translation="uiR2EDnpc_ring_ranged_tank_blunt_d4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_e1", Translation="uiR2EDnpc_ring_ranged_tank_blunt_e1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_e2", Translation="uiR2EDnpc_ring_ranged_tank_blunt_e2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_e3", Translation="uiR2EDnpc_ring_ranged_tank_blunt_e3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_e4", Translation="uiR2EDnpc_ring_ranged_tank_blunt_e4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_f1", Translation="uiR2EDnpc_ring_ranged_tank_blunt_f1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_f2", Translation="uiR2EDnpc_ring_ranged_tank_blunt_f2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_f3", Translation="uiR2EDnpc_ring_ranged_tank_blunt_f3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_blunt_f4", Translation="uiR2EDnpc_ring_ranged_tank_blunt_f4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_b1", Translation="uiR2EDnpc_ring_ranged_tank_pierce_b1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_b2", Translation="uiR2EDnpc_ring_ranged_tank_pierce_b2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_b3", Translation="uiR2EDnpc_ring_ranged_tank_pierce_b3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_b4", Translation="uiR2EDnpc_ring_ranged_tank_pierce_b4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_c1", Translation="uiR2EDnpc_ring_ranged_tank_pierce_c1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_c2", Translation="uiR2EDnpc_ring_ranged_tank_pierce_c2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_c3", Translation="uiR2EDnpc_ring_ranged_tank_pierce_c3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_c4", Translation="uiR2EDnpc_ring_ranged_tank_pierce_c4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_d1", Translation="uiR2EDnpc_ring_ranged_tank_pierce_d1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_d2", Translation="uiR2EDnpc_ring_ranged_tank_pierce_d2"}, - --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_d3", Translation="uiR2EDnpc_ring_ranged_tank_pierce_d3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_d4", Translation="uiR2EDnpc_ring_ranged_tank_pierce_d4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_e1", Translation="uiR2EDnpc_ring_ranged_tank_pierce_e1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_e2", Translation="uiR2EDnpc_ring_ranged_tank_pierce_e2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_e3", Translation="uiR2EDnpc_ring_ranged_tank_pierce_e3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_e4", Translation="uiR2EDnpc_ring_ranged_tank_pierce_e4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_f1", Translation="uiR2EDnpc_ring_ranged_tank_pierce_f1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_f2", Translation="uiR2EDnpc_ring_ranged_tank_pierce_f2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_f3", Translation="uiR2EDnpc_ring_ranged_tank_pierce_f3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_pierce_f4", Translation="uiR2EDnpc_ring_ranged_tank_pierce_f4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_b1", Translation="uiR2EDnpc_ring_ranged_tank_slash_b1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_b2", Translation="uiR2EDnpc_ring_ranged_tank_slash_b2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_b3", Translation="uiR2EDnpc_ring_ranged_tank_slash_b3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_b4", Translation="uiR2EDnpc_ring_ranged_tank_slash_b4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_c1", Translation="uiR2EDnpc_ring_ranged_tank_slash_c1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_c2", Translation="uiR2EDnpc_ring_ranged_tank_slash_c2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_c3", Translation="uiR2EDnpc_ring_ranged_tank_slash_c3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_c4", Translation="uiR2EDnpc_ring_ranged_tank_slash_c4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_d1", Translation="uiR2EDnpc_ring_ranged_tank_slash_d1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_d2", Translation="uiR2EDnpc_ring_ranged_tank_slash_d2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_d3", Translation="uiR2EDnpc_ring_ranged_tank_slash_d3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_d4", Translation="uiR2EDnpc_ring_ranged_tank_slash_d4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_e1", Translation="uiR2EDnpc_ring_ranged_tank_slash_e1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_e2", Translation="uiR2EDnpc_ring_ranged_tank_slash_e2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_e3", Translation="uiR2EDnpc_ring_ranged_tank_slash_e3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_e4", Translation="uiR2EDnpc_ring_ranged_tank_slash_e4"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_f1", Translation="uiR2EDnpc_ring_ranged_tank_slash_f1"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_f2", Translation="uiR2EDnpc_ring_ranged_tank_slash_f2"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_f3", Translation="uiR2EDnpc_ring_ranged_tank_slash_f3"}, --- {Id="palette.entities.npcs.bandits.ring_ranged_tank_slash_f4", Translation="uiR2EDnpc_ring_ranged_tank_slash_f4"} --- } --- } - } - }, - }, - - BotEntries = - { - --botObjects = - --{ - civilian_clutter = - { - instances = - { - {Id="palette.entities.botobjects.jar", Translation="uiR2EDbotObjJar"}, - {Id="palette.entities.botobjects.jar_3", Translation="uiR2EDbotObjJar3"}, - {Id="palette.entities.botobjects.jar_fallen", Translation="uiR2EDbotObjJarFallen"}, - {Id="palette.entities.botobjects.barrel1", Translation="uiR2EDbotObjBarrel1"}, - {Id="palette.entities.botobjects.barrels_3", Translation="uiR2EDbotObjBarrels3"}, - {Id="palette.entities.botobjects.crate1", Translation="uiR2EDbotObjCrate1"}, - {Id="palette.entities.botobjects.crate2", Translation="uiR2EDbotObjCrate3"}, - {Id="palette.entities.botobjects.barrel_broken_1", Translation="uiR2EDbotObjBarrelBroken1"}, - {Id="palette.entities.botobjects.chest", Translation="uiR2EDbotObjChest"}, - {Id="palette.entities.botobjects.chest_old", Translation="uiR2EDbotObjChestOld"}, - {Id="palette.entities.botobjects.chariot", Translation="uiR2EDbotObjChariot"}, - {Id="palette.entities.botobjects.chariot_working", Translation="uiR2EDbotObjChariotWorking"}, - {Id="palette.entities.botobjects.campfire", Translation="uiR2EDbotObjCampFire"}, - {Id="palette.entities.botobjects.campfire_out", Translation="uiR2EDbotObjCampfireOut"}, - --{Id="palette.entities.botobjects.campfire_off", Translation="uiR2EDbotObjCampfireOff"}, - {Id="palette.entities.botobjects.counter", Translation="uiR2EDbotObjCounter"}, - {Id="palette.entities.botobjects.street_lamp", Translation="uiR2EDbotObjStreetLamp"}, - {Id="palette.entities.botobjects.street_lamp_off", Translation="uiR2EDbotObjStreetLampOff"}, - {Id="palette.entities.botobjects.fire_base", Translation="uiR2EDbotObjFireBase"}, - {Id="palette.entities.botobjects.flame_courage", Translation="uiR2EDbotObjflameCourage"}, - {Id="palette.entities.botobjects.flame_justice", Translation="uiR2EDbotObjflameJustice"}, - {Id="palette.entities.botobjects.flame_discipline", Translation="uiR2EDbotObjflameDiscipline"}, - {Id="palette.entities.botobjects.flame_verite", Translation="uiR2EDbotObjflameTruth"} - } - }, - - graveyard_clutter = - { - instances = - { - {Id="palette.entities.botobjects.tomb_1", Translation="uiR2EDbotObjTomb1"}, - {Id="palette.entities.botobjects.tomb_2", Translation="uiR2EDbotObjTomb2"}, - {Id="palette.entities.botobjects.tomb_3", Translation="uiR2EDbotObjTomb3"}, - {Id="palette.entities.botobjects.tomb_4", Translation="uiR2EDbotObjTomb4"}, - {Id="palette.entities.botobjects.tomb_5", Translation="uiR2EDbotObjTomb5"}, - } - }, - - bags_and_packs = - { - instances = - { - {Id="palette.entities.botobjects.bag_a", Translation="uiR2EDbotObjBagA"}, - {Id="palette.entities.botobjects.bag_b", Translation="uiR2EDbotObjBagB"}, - {Id="palette.entities.botobjects.pack_1", Translation="uiR2EDbotObjPack1"}, - {Id="palette.entities.botobjects.pack_2", Translation="uiR2EDbotObjPack2"}, - {Id="palette.entities.botobjects.pack_3", Translation="uiR2EDbotObjPack3"}, - {Id="palette.entities.botobjects.pack_4", Translation="uiR2EDbotObjPack4"}, - {Id="palette.entities.botobjects.pack_5", Translation="uiR2EDbotObjPack5"} - } - }, - - road_signs = - { - road_signs_fyros = - { - instances = - { - {Id="palette.entities.botobjects.merchant_melee_fyros", Translation="uiR2EDbotObjMerchantMeleeFyros"}, - {Id="palette.entities.botobjects.merchant_range_fyros", Translation="uiR2EDbotObjMerchantRangeFyros"}, - {Id="palette.entities.botobjects.merchant_armor_fyros", Translation="uiR2EDbotObjMerchantArmorFyros"}, - {Id="palette.entities.botobjects.merchant_RM_fyros", Translation="uiR2EDbotObjMerchantRMFyros"}, - {Id="palette.entities.botobjects.merchant_tool_fyros", Translation="uiR2EDbotObjMerchantToolFyros"}, - {Id="palette.entities.botobjects.merchant_focus_fyros", Translation="uiR2EDbotObjMerchantFocusFyros"}, - {Id="palette.entities.botobjects.merchant_haircut_fyros", Translation="uiR2EDbotObjMerchantHaircutFyros"}, - {Id="palette.entities.botobjects.merchant_tatoo_fyros", Translation="uiR2EDbotObjMerchantTatooFyros"}, - {Id="palette.entities.botobjects.merchant_bijoux_fyros", Translation="uiR2EDbotObjMerchantBijouxFyros"}, - } - }, - - road_signs_matis = - { - instances = - { - {Id="palette.entities.botobjects.merchant_melee_matis", Translation="uiR2EDbotObjMerchantMeleeMatis"}, - {Id="palette.entities.botobjects.merchant_range_matis", Translation="uiR2EDbotObjMerchantRangeMatis"}, - {Id="palette.entities.botobjects.merchant_armor_matis", Translation="uiR2EDbotObjMerchantArmorMatis"}, - {Id="palette.entities.botobjects.merchant_RM_matis", Translation="uiR2EDbotObjMerchantRMMatis"}, - {Id="palette.entities.botobjects.merchant_tool_matis", Translation="uiR2EDbotObjMerchantToolMatis"}, - {Id="palette.entities.botobjects.merchant_focus_matis", Translation="uiR2EDbotObjMerchantFocusMatis"}, - {Id="palette.entities.botobjects.merchant_haircut_matis", Translation="uiR2EDbotObjMerchantHaircutMatis"}, - {Id="palette.entities.botobjects.merchant_tatoo_matis", Translation="uiR2EDbotObjMerchantTatooMatis"}, - {Id="palette.entities.botobjects.merchant_bijoux_matis", Translation="uiR2EDbotObjMerchantBijouxMatis"}, - {Id="palette.entities.botobjects.merchant_bar_matis", Translation="uiR2EDbotObjMerchantBarMatis"}, - {Id="palette.entities.botobjects.fo_milestone", Translation="uiR2EDbotObjFoMilestone"}, - } - }, - - road_signs_tryker = - { - instances = - { - {Id="palette.entities.botobjects.merchant_melee_tryker", Translation="uiR2EDbotObjMerchantMeleeTryker"}, - {Id="palette.entities.botobjects.merchant_range_tryker", Translation="uiR2EDbotObjMerchantRangeTryker"}, - {Id="palette.entities.botobjects.merchant_armor_tryker", Translation="uiR2EDbotObjMerchantArmorTryker"}, - {Id="palette.entities.botobjects.merchant_RM_tryker", Translation="uiR2EDbotObjMerchantRMTryker"}, - {Id="palette.entities.botobjects.merchant_tool_tryker", Translation="uiR2EDbotObjMerchantToolTryker"}, - {Id="palette.entities.botobjects.merchant_focus_tryker", Translation="uiR2EDbotObjMerchantFocusTryker"}, - {Id="palette.entities.botobjects.merchant_haircut_tryker", Translation="uiR2EDbotObjMerchantHaircutTryker"}, - {Id="palette.entities.botobjects.merchant_tatoo_tryker", Translation="uiR2EDbotObjMerchantTatooTryker"}, - {Id="palette.entities.botobjects.merchant_bijoux_tryker", Translation="uiR2EDbotObjMerchantBijouxTryker"}, - } - }, - - road_signs_zorai = - { - instances = - { - {Id="palette.entities.botobjects.merchant_melee_zorai", Translation="uiR2EDbotObjMerchantMeleeZorai"}, - {Id="palette.entities.botobjects.merchant_range_zorai", Translation="uiR2EDbotObjMerchantRangeZorai"}, - {Id="palette.entities.botobjects.merchant_armor_zorai", Translation="uiR2EDbotObjMerchantArmorZorai"}, - {Id="palette.entities.botobjects.merchant_RM_zorai", Translation="uiR2EDbotObjMerchantRMZorai"}, - {Id="palette.entities.botobjects.merchant_tool_zorai", Translation="uiR2EDbotObjMerchantToolZorai"}, - {Id="palette.entities.botobjects.merchant_focus_zorai", Translation="uiR2EDbotObjMerchantFocusZorai"}, - {Id="palette.entities.botobjects.merchant_haircut_zorai", Translation="uiR2EDbotObjMerchantHaircutZorai"}, - {Id="palette.entities.botobjects.merchant_tatoo_zorai", Translation="uiR2EDbotObjMerchantTatooZorai"}, - {Id="palette.entities.botobjects.merchant_bijoux_zorai", Translation="uiR2EDbotObjMerchantBijouxZorai"}, - {Id="palette.entities.botobjects.merchant_bar_zorai", Translation="uiR2EDbotObjMerchantBarZorai"}, - } - }, - - road_signs_others = - { - instances = - { - {Id="palette.entities.botobjects.roadsign", Translation="uiR2EDbotObjRoadsign"}, --- {Id="palette.entities.botobjects.roadsign_fyros", Translation="uiR2EDbotObjRoadsignFyros"}, --- {Id="palette.entities.botobjects.roadsign_zorai", Translation="uiR2EDbotObjRoadsignZorai"}, --- {Id="palette.entities.botobjects.roadsign_tryker", Translation="uiR2EDbotObjRoadsignTryker"}, - {Id="palette.entities.botobjects.milestone", Translation="uiR2EDbotObjMilestone"} - } - } - }, - - totems = - { - instances = - { - {Id="palette.entities.botobjects.totem_pachyderm", Translation="uiR2EDbotObjTotemPachyderm"}, - {Id="palette.entities.botobjects.totem_kitin", Translation="uiR2EDbotObjTotemKitin"}, - {Id="palette.entities.botobjects.totem_bird", Translation="uiR2EDbotObjTotemBird"}, - {Id="palette.entities.botobjects.runic_circle", Translation="uiR2EDbotObjRunicCircle"} - } - }, - - tents = - { - instances = - { - {Id="palette.entities.botobjects.tent", Translation="uiR2EDbotObjTent"}, - {Id="palette.entities.botobjects.tent_fyros", Translation="uiR2EDbotObjTentFyros"}, - {Id="palette.entities.botobjects.tent_matis", Translation="uiR2EDbotObjTentMatis"}, - {Id="palette.entities.botobjects.tent_tryker", Translation="uiR2EDbotObjTentTryker"}, - {Id="palette.entities.botobjects.tent_zorai", Translation="uiR2EDbotObjTentZorai"}, - {Id="palette.entities.botobjects.tent_cosmetics", Translation="uiR2EDbotObjTentCosmetics"} - } - }, - - buildings = - { - instances = - { - {Id="palette.entities.botobjects.hut", Translation="uiR2EDbotObjHut"}, - {Id="palette.entities.botobjects.paddock", Translation="uiR2EDbotObjPaddock"}, - {Id="palette.entities.botobjects.stele", Translation="uiR2EDbotObjStele"}, - {Id="palette.entities.botobjects.wind_turbine", Translation="uiR2EDbotObjWindTurbine"}, - {Id="palette.entities.botobjects.watch_tower", Translation="uiR2EDbotObjWatchTower"}, - {Id="palette.entities.botobjects.hall_of_fame", Translation="uiR2EDbotObjHallOfFame"}, - {Id="palette.entities.botobjects.construction_site", Translation="uiR2EDbotObjConstructionSite"}, - {Id="palette.entities.botobjects.generic_hall", Translation="uiR2EDbotObjGenericHall"} - } - }, - - ruins = - { - instances = - { - {Id="palette.entities.botobjects.tower_ruin", Translation="uiR2EDbotObjTowerRuin"}, - {Id="palette.entities.botobjects.ruin_wall", Translation="uiR2EDbotObjRuinWall"}, - {Id="palette.entities.botobjects.ruin_wall_b", Translation="uiR2EDbotObjRuinWallB"}, - {Id="palette.entities.botobjects.house_ruin", Translation="uiR2EDbotObjHouseRuin"} - } - }, - - kami = - { - instances = - { - {Id="palette.entities.botobjects.banner_kami", Translation="uiR2EDbotObjBannerKami"}, - {Id="palette.entities.botobjects.totem_kami", Translation="uiR2EDbotObjTotemKami"}, - {Id="palette.entities.botobjects.kami_standard", Translation="uiR2EDbotObjKamiStandard"}, - {Id="palette.entities.botobjects.kami_hut", Translation="uiR2EDbotObjKamiHut"}, - {Id="palette.entities.botobjects.kami_watchtower", Translation="uiR2EDbotObjKamiWatchtower"}, - {Id="palette.entities.botobjects.vegetable_wall", Translation="uiR2EDbotObjVegetableWall"}, - {Id="palette.entities.botobjects.vegetable_gateway", Translation="uiR2EDbotObjVegetableGateway"}, --- {Id="palette.entities.botobjects.statue_maduk", Translation="uiR2EDbotObjStatueMaduk"}, - {Id="palette.entities.botobjects.kami_watchtower_off", Translation="uiR2EDbotObjKamiWatchtowerOff"}, --- {Id="palette.entities.botobjects.kami_altar", Translation="uiR2EDbotObjKamiAltar"} - } - }, - - karavan = - { - instances = - { - {Id="palette.entities.botobjects.banner_karavan", Translation="uiR2EDbotObjBannerKaravan"}, - {Id="palette.entities.botobjects.karavan_standard", Translation="uiR2EDbotObjKaravanStandard"}, - {Id="palette.entities.botobjects.karavan_tent", Translation="uiR2EDbotObjKaravanTent"}, - {Id="palette.entities.botobjects.karavan_big_wall", Translation="uiR2EDbotObjKaravanBigWall"}, - {Id="palette.entities.botobjects.karavan_wall", Translation="uiR2EDbotObjKaravanWall"}, --- {Id="palette.entities.botobjects.statue_jena", Translation="uiR2EDbotObjStatueJena"}, - {Id="palette.entities.botobjects.karavan_mirador", Translation="uiR2EDbotObjKaravanMirador"}, - {Id="palette.entities.botobjects.karavan_gateway", Translation="uiR2EDbotObjKaravanGateway"}, - {Id="palette.entities.botobjects.karavan_device", Translation="uiR2EDbotObjKaravanDevice"}, - {Id="palette.entities.botobjects.karavan_watchtower_off", Translation="uiR2EDbotObjKaravanWatchtowerOff"}, --- {Id="palette.entities.botobjects.karavan_altar", Translation="uiR2EDbotObjKaravanAltar"} - } - }, - - kitin = - { - instances = - { - {Id="palette.entities.botobjects.kitin_egg", Translation="uiR2EDbotObjKitinEgg"}, - {Id="palette.entities.botobjects.spot_kitin", Translation="uiR2EDbotObjSpotKitin"} - } - }, - - goo = - { - instances = - { - {Id="palette.entities.botobjects.spot_goo", Translation="uiR2EDbotObjSpotGoo"}, - {Id="palette.entities.botobjects.spot_goo_off", Translation="uiR2EDbotObjSpotGooOff"}, - {Id="palette.entities.botobjects.fx_goo_insect", Translation="uiR2EDbotObjFxGooInsect"}, - {Id="palette.entities.botobjects.fx_goo_mamal", Translation="uiR2EDbotObjFxGooMamal"}, - {Id="palette.entities.botobjects.fx_goo_smoke", Translation="uiR2EDbotObjFxGooSmoke"}, - } - }, - - obstacles = - { - instances = - { - {Id="palette.entities.botobjects.stump", Translation="uiR2EDbotObjStump"}, - {Id="palette.entities.botobjects.landslide_desert", Translation="uiR2EDbotObjLandslideDesert"}, - {Id="palette.entities.botobjects.landslide_jungle", Translation="uiR2EDbotObjLandslideJungle"}, - {Id="palette.entities.botobjects.landslide_lake", Translation="uiR2EDbotObjLandslideLake"}, - {Id="palette.entities.botobjects.barrier", Translation="uiR2EDbotObjBarrier"}, - {Id="palette.entities.botobjects.barrier_T", Translation="uiR2EDbotObjBarrierT"} - } - }, - - carcasses = - { - instances = - { - {Id="palette.entities.botobjects.carrion_mammal", Translation="uiR2EDbotObjCarrionMammal"}, - {Id="palette.entities.botobjects.carrion_insect", Translation="uiR2EDbotObjCarrionInsect"}, - {Id="palette.entities.botobjects.giant_skull", Translation="uiR2EDbotObjGiantSkull"}, - {Id="palette.entities.botobjects.carapace_bul", Translation="uiR2EDbotObjCarapaceBul"}, - {Id="palette.entities.botobjects.carapace_2", Translation="uiR2EDbotObjCarapace2"}, - {Id="palette.entities.botobjects.bones", Translation="uiR2EDbotObjBones"}, - {Id="palette.entities.botobjects.bones_b", Translation="uiR2EDbotObjBonesB"} - } - }, - - fytrees = - { - instances = - { - {Id="palette.entities.botobjects.fy_s1_baobab_a", Translation="uiR2EDbotObjTreeFyBaobabA"}, - {Id="palette.entities.botobjects.fy_s1_baobab_b", Translation="uiR2EDbotObjTreeFyBaobabB"}, - {Id="palette.entities.botobjects.fy_s1_baobab_c", Translation="uiR2EDbotObjTreeFyBaobabC"}, - {Id="palette.entities.botobjects.fy_s1_burnedtree_a", Translation="uiR2EDbotObjTreeFyBurnedTreeA"}, - {Id="palette.entities.botobjects.fy_s1_burnedtree_b", Translation="uiR2EDbotObjTreeFyBurnedTreeB"}, - {Id="palette.entities.botobjects.fy_s1_burnedtree_c", Translation="uiR2EDbotObjTreeFyBurnedTreeC"}, - {Id="palette.entities.botobjects.fy_s1_burnedtree_d", Translation="uiR2EDbotObjTreeFyBurnedTreeD"}, - {Id="palette.entities.botobjects.fy_s1_burnedtree_growth_a", Translation="uiR2EDbotObjTreeFyBurnedTreeGrowthA"}, - {Id="palette.entities.botobjects.fy_s1_burnedtree_growth_b", Translation="uiR2EDbotObjTreeFyBurnedTreeGrowthB"}, - {Id="palette.entities.botobjects.fy_s2_coconuts_a", Translation="uiR2EDbotObjTreeFyCoconutsA"}, - {Id="palette.entities.botobjects.fy_s2_coconuts_b", Translation="uiR2EDbotObjTreeFyCoconutsB"}, - {Id="palette.entities.botobjects.fy_s2_lovejail_a", Translation="uiR2EDbotObjTreeFyLoveJailA"}, - {Id="palette.entities.botobjects.fy_s2_lovejail_b", Translation="uiR2EDbotObjTreeFyLoveJailB"}, - {Id="palette.entities.botobjects.fy_s2_lovejail_c", Translation="uiR2EDbotObjTreeFyLoveJailC"}, - {Id="palette.entities.botobjects.fy_s2_palmtree_a", Translation="uiR2EDbotObjTreeFyPalmTreeA"}, - {Id="palette.entities.botobjects.fy_s2_palmtree_b", Translation="uiR2EDbotObjTreeFyPalmTreeB"}, - {Id="palette.entities.botobjects.fy_s2_palmtree_c", Translation="uiR2EDbotObjTreeFyPalmTreeC"}, - {Id="palette.entities.botobjects.fy_s2_palmtree_d", Translation="uiR2EDbotObjTreeFyPalmTreeD"}, - {Id="palette.entities.botobjects.fy_s2_palmtree_e", Translation="uiR2EDbotObjTreeFyPalmTreeE"}, - {Id="palette.entities.botobjects.fy_s2_papaleaf_a", Translation="uiR2EDbotObjTreeFyPapaLeafA"}, - {Id="palette.entities.botobjects.fy_s2_papaleaf_b", Translation="uiR2EDbotObjTreeFyPapaLeafB"}, - {Id="palette.entities.botobjects.fy_s2_savantree_a", Translation="uiR2EDbotObjTreeFySavanTreeA"}, - {Id="palette.entities.botobjects.fy_s2_savantree_b", Translation="uiR2EDbotObjTreeFySavanTreeB"}, - {Id="palette.entities.botobjects.fy_s2_savantree_c", Translation="uiR2EDbotObjTreeFySavanTreeC"}, - {Id="palette.entities.botobjects.fy_s3_termitiere_a", Translation="uiR2EDbotObjTreeFyTermitiereA"}, - {Id="palette.entities.botobjects.fy_s3_termitiere_b", Translation="uiR2EDbotObjTreeFyTermitiereB"}, - {Id="palette.entities.botobjects.fy_s3_termitiere_c", Translation="uiR2EDbotObjTreeFyTermitiereC"}, - {Id="palette.entities.botobjects.fy_s3_termitiere_d", Translation="uiR2EDbotObjTreeFyTermitiereD"} - } - }, - - fotrees = - { - instances = - { - {Id="palette.entities.botobjects.fo_s1_arbragrelot", Translation="uiR2EDbotObjTreeFoArbraGrelotA"}, - {Id="palette.entities.botobjects.fo_s1_arbreagrelot", Translation="uiR2EDbotObjTreeFoArbraGrelotB"}, - {Id="palette.entities.botobjects.fo_s1_giant_tree", Translation="uiR2EDbotObjTreeFoGiantTree"}, - {Id="palette.entities.botobjects.fo_s1_giant_trunk", Translation="uiR2EDbotObjTreeFoGiantTrunk"}, - {Id="palette.entities.botobjects.fo_s2_arbragrelot", Translation="uiR2EDbotObjTreeFoArbraGrelotC"}, - {Id="palette.entities.botobjects.fo_s2_bigroot_a", Translation="uiR2EDbotObjTreeFoBigRootA"}, - {Id="palette.entities.botobjects.fo_s2_bigroot_b", Translation="uiR2EDbotObjTreeFoBigRootB"}, - {Id="palette.entities.botobjects.fo_s2_bigroot_c", Translation="uiR2EDbotObjTreeFoBigRootC"}, - {Id="palette.entities.botobjects.fo_s2_big_tree", Translation="uiR2EDbotObjTreeFoBigTree"}, - {Id="palette.entities.botobjects.fo_s2_birch", Translation="uiR2EDbotObjTreeFoBirchA"}, - {Id="palette.entities.botobjects.fo_s2_spiketree", Translation="uiR2EDbotObjTreeFoSpikeTree"}, - {Id="palette.entities.botobjects.fo_s3_birch", Translation="uiR2EDbotObjTreeFoBirchB"}, - {Id="palette.entities.botobjects.fo_s3_buissonaepine", Translation="uiR2EDbotObjTreeFoThornBush"}, - {Id="palette.entities.botobjects.fo_s3_champignou_a", Translation="uiR2EDbotObjTreeFoMushroomA"}, - {Id="palette.entities.botobjects.fo_s3_champignou_b", Translation="uiR2EDbotObjTreeFoMushroomB"}, - {Id="palette.entities.botobjects.fo_s3_fougere", Translation="uiR2EDbotObjTreeFoFern"}, --- {Id="palette.entities.botobjects.fo_s3_tree", Translation="uiR2EDbotObjTreeFoTree"} - } - }, - - jutrees = - { - instances = - { - {Id="palette.entities.botobjects.ju_s1_bamboo", Translation="uiR2EDbotObjTreeJuBambooA"}, - {Id="palette.entities.botobjects.ju_s1_canopy_tree", Translation="uiR2EDbotObjTreeJuCanopyTree"}, - {Id="palette.entities.botobjects.ju_s2_big_tree", Translation="uiR2EDbotObjTreeJuBigTree"}, - {Id="palette.entities.botobjects.ju_s2_young_tree", Translation="uiR2EDbotObjTreeJuYoungTree"}, - {Id="palette.entities.botobjects.ju_s3_bamboo", Translation="uiR2EDbotObjTreeJuBambooB"}, - {Id="palette.entities.botobjects.ju_s3_banana_tree", Translation="uiR2EDbotObjTreeJuBananaTree"}, - {Id="palette.entities.botobjects.ju_s3_bush_tree", Translation="uiR2EDbotObjTreeJuBushTree"}, - {Id="palette.entities.botobjects.ju_s3_dead_tree", Translation="uiR2EDbotObjTreeJuDeadTree"}, - {Id="palette.entities.botobjects.ju_s3_fantree", Translation="uiR2EDbotObjTreeJuFanTree"}, - {Id="palette.entities.botobjects.ju_s3_fougere", Translation="uiR2EDbotObjTreeJuFern"}, - {Id="palette.entities.botobjects.ju_s3_plante", Translation="uiR2EDbotObjTreeJuPlant"}, - {Id="palette.entities.botobjects.ju_s3_plantegrasse", Translation="uiR2EDbotObjTreeJuFatPlant"}, - {Id="palette.entities.botobjects.ju_s3_tree", Translation="uiR2EDbotObjTreeJuTree"} - } - }, - - trtrees = - { - instances = - { - {Id="palette.entities.botobjects.tr_s1_bamboo_a", Translation="uiR2EDbotObjTreeTrBambooA"}, --- {Id="palette.entities.botobjects.tr_s1_kelp_a", Translation="uiR2EDbotObjTreeTrKelpA"}, --- {Id="palette.entities.botobjects.tr_s1_kelp_b", Translation="uiR2EDbotObjTreeTrKelpB"}, - {Id="palette.entities.botobjects.tr_s2_bamboo_a", Translation="uiR2EDbotObjTreeTrBambooB"}, --- {Id="palette.entities.botobjects.tr_s2_champiflot_a", Translation="uiR2EDbotObjTreeTrFloatMush"}, - {Id="palette.entities.botobjects.tr_s2_lokness_a", Translation="uiR2EDbotObjTreeTrLoknessA"}, - {Id="palette.entities.botobjects.tr_s2_lokness_b", Translation="uiR2EDbotObjTreeTrLoknessB"}, - {Id="palette.entities.botobjects.tr_s2_lokness_c", Translation="uiR2EDbotObjTreeTrLoknessC"}, - {Id="palette.entities.botobjects.tr_s2_mangrove_a", Translation="uiR2EDbotObjTreeTrMangroveA"}, - {Id="palette.entities.botobjects.tr_s2_mangrove_b", Translation="uiR2EDbotObjTreeTrMangroveB"}, - {Id="palette.entities.botobjects.tr_s2_nenufly_a", Translation="uiR2EDbotObjTreeTrNenuflyA"}, - {Id="palette.entities.botobjects.tr_s2_palmtree_a", Translation="uiR2EDbotObjTreeTrPalmTreeA"}, - {Id="palette.entities.botobjects.tr_s2_palmtree_b", Translation="uiR2EDbotObjTreeTrPalmTreeB"}, - {Id="palette.entities.botobjects.tr_s2_palmtree_c", Translation="uiR2EDbotObjTreeTrPalmTreeC"}, - {Id="palette.entities.botobjects.tr_s2_palmtree_d", Translation="uiR2EDbotObjTreeTrPalmTreeD"}, - {Id="palette.entities.botobjects.tr_s2_palmtree_e", Translation="uiR2EDbotObjTreeTrPalmTreeE"}, - {Id="palette.entities.botobjects.tr_s2_palmtree_f", Translation="uiR2EDbotObjTreeTrPalmTreeF"}, --- {Id="palette.entities.botobjects.tr_s2_sailtree_a", Translation="uiR2EDbotObjTreeTrSailTree"}, --- {Id="palette.entities.botobjects.tr_s2_wigweed_a", Translation="uiR2EDbotObjTreeTrWigWeed"}, --- {Id="palette.entities.botobjects.tr_s3_aquabole_a", Translation="uiR2EDbotObjTreeTrAquaBoleA"}, --- {Id="palette.entities.botobjects.tr_s3_aquabole_b", Translation="uiR2EDbotObjTreeTrAquaBoleB"}, --- {Id="palette.entities.botobjects.tr_s3_aquafeather_a", Translation="uiR2EDbotObjTreeTrAquaFeatherA"}, --- {Id="palette.entities.botobjects.tr_s3_aquafeather_b", Translation="uiR2EDbotObjTreeTrAquaFeatherB"}, --- {Id="palette.entities.botobjects.tr_s3_aquafeather_c", Translation="uiR2EDbotObjTreeTrAquaFeatherC"}, --- {Id="palette.entities.botobjects.tr_s3_flower_a", Translation="uiR2EDbotObjTreeTrFlowerA"}, --- {Id="palette.entities.botobjects.tr_s3_flower_b", Translation="uiR2EDbotObjTreeTrFlowerB"}, --- {Id="palette.entities.botobjects.tr_s3_flower_c", Translation="uiR2EDbotObjTreeTrFlowerC"}, - {Id="palette.entities.botobjects.tr_s3_nenufly_b", Translation="uiR2EDbotObjTreeTrNenuflyB"}, - {Id="palette.entities.botobjects.tr_s3_trumpet_a", Translation="uiR2EDbotObjTreeTrTrumpetA"}, - {Id="palette.entities.botobjects.tr_s3_trumpet_b", Translation="uiR2EDbotObjTreeTrTrumpetB"}, - {Id="palette.entities.botobjects.tr_s3_trumpet_c", Translation="uiR2EDbotObjTreeTrTrumpetC"}, - {Id="palette.entities.botobjects.tr_s3_trumpet_d", Translation="uiR2EDbotObjTreeTrTrumpetD"} - } - }, - - prtrees = - { - instances = - { - {Id="palette.entities.botobjects.pr_s1_lumiseed_a", Translation="uiR2EDbotObjTreePrLumiseedA"}, - {Id="palette.entities.botobjects.pr_s1_lumiseed_b", Translation="uiR2EDbotObjTreePrLumiseedB"}, - {Id="palette.entities.botobjects.pr_s1_lumiseed_c", Translation="uiR2EDbotObjTreePrLumiseedC"}, - {Id="palette.entities.botobjects.pr_s1_lumiseed_d", Translation="uiR2EDbotObjTreePrLumiseedD"}, - {Id="palette.entities.botobjects.pr_s1_rotaflore_a", Translation="uiR2EDbotObjTreePrRotaFloreA"}, - {Id="palette.entities.botobjects.pr_s1_rotaflore_b", Translation="uiR2EDbotObjTreePrRotaFloreB"}, - {Id="palette.entities.botobjects.pr_s1_rotaflore_c", Translation="uiR2EDbotObjTreePrRotaFloreC"}, - {Id="palette.entities.botobjects.pr_s2_mycotree_a", Translation="uiR2EDbotObjTreePrMycotreeA"}, - {Id="palette.entities.botobjects.pr_s2_mycotree_b", Translation="uiR2EDbotObjTreePrMycotreeB"}, - {Id="palette.entities.botobjects.pr_s2_planipushes_a", Translation="uiR2EDbotObjTreePrPlanipushesA"}, - {Id="palette.entities.botobjects.pr_s2_planipushes_b", Translation="uiR2EDbotObjTreePrPlanipushesB"}, - {Id="palette.entities.botobjects.pr_s2_planipushes_c", Translation="uiR2EDbotObjTreePrPlanipushesC"}, - {Id="palette.entities.botobjects.pr_s2_planipushes_d", Translation="uiR2EDbotObjTreePrPlanipushesD"}, - {Id="palette.entities.botobjects.pr_s2_toopetz_a", Translation="uiR2EDbotObjTreePrToopetzA"}, - {Id="palette.entities.botobjects.pr_s2_toopetz_b", Translation="uiR2EDbotObjTreePrToopetzB"}, - {Id="palette.entities.botobjects.pr_s2_toopetz_c", Translation="uiR2EDbotObjTreePrToopetzC"}, - {Id="palette.entities.botobjects.pr_s3_amoeba_a", Translation="uiR2EDbotObjTreePrAmoebaA"}, - {Id="palette.entities.botobjects.pr_s3_amoeba_b", Translation="uiR2EDbotObjTreePrAmoebaB"}, - {Id="palette.entities.botobjects.pr_s3_amoeba_c", Translation="uiR2EDbotObjTreePrAmoebaC"}, - {Id="palette.entities.botobjects.pr_s3_cokamool_a", Translation="uiR2EDbotObjTreePrCokamoolA"}, - {Id="palette.entities.botobjects.pr_s3_cokamool_b", Translation="uiR2EDbotObjTreePrCokamoolB"}, - {Id="palette.entities.botobjects.pr_s3_cokamool_c", Translation="uiR2EDbotObjTreePrCokamoolC"}, - {Id="palette.entities.botobjects.pr_s3_ploomweed_a", Translation="uiR2EDbotObjTreePrPloomWeedA"}, - {Id="palette.entities.botobjects.pr_s3_ploomweed_b", Translation="uiR2EDbotObjTreePrPloomWeedB"}, - {Id="palette.entities.botobjects.pr_s3_small_lumiseed_a", Translation="uiR2EDbotObjTreePrSmallLumiseedA"}, - {Id="palette.entities.botobjects.pr_s3_small_lumiseed_b", Translation="uiR2EDbotObjTreePrSmallLumiseedB"} - } - }, - - enveffects = - { - instances = - { --- {Id="palette.entities.botobjects.fxy_canyon", Translation="uiR2EDbotObjFxCanyon"}, --- {Id="palette.entities.botobjects.fx_desert_sandblasta", Translation="uiR2EDbotObjFxSandblastA"}, --- {Id="palette.entities.botobjects.fx_desert_sandblastb", Translation="uiR2EDbotObjFxSandblastB"}, --- {Id="palette.entities.botobjects.fx_de_firewave", Translation="uiR2EDbotObjFxFirewave"}, --- {Id="palette.entities.botobjects.fx_de_geyser", Translation="uiR2EDbotObjFxGeyser"}, --- {Id="palette.entities.botobjects.fx_de_geyser_fumee", Translation="uiR2EDbotObjFxGeyserFumee"}, - {Id="palette.entities.botobjects.fx_de_vapeurs", Translation="uiR2EDbotObjFxVapeurs"}, - {Id="palette.entities.botobjects.fx_fo_pollen", Translation="uiR2EDbotObjFxPollen"}, - {Id="palette.entities.botobjects.fx_fo_solbirtha", Translation="uiR2EDbotObjFxFoSolbirthA"}, - {Id="palette.entities.botobjects.fx_fo_solbirthb", Translation="uiR2EDbotObjFxFoSolbirthB"}, - {Id="palette.entities.botobjects.fx_fo_solbirthc", Translation="uiR2EDbotObjFxFoSolbirthC"}, --- {Id="palette.entities.botobjects.fx_fo_treefalla", Translation="uiR2EDbotObjFxFoTreeFallA"}, --- {Id="palette.entities.botobjects.fx_fo_treefallb", Translation="uiR2EDbotObjFxFoTreeFallB"}, --- {Id="palette.entities.botobjects.fx_fo_treefallc", Translation="uiR2EDbotObjFxFoTreeFallC"}, --- {Id="palette.entities.botobjects.fx_fo_treefalld", Translation="uiR2EDbotObjFxFoTreeFallD"}, --- {Id="palette.entities.botobjects.fx_fo_treefalle", Translation="uiR2EDbotObjFxFoTreeFallE"}, --- {Id="palette.entities.botobjects.fx_fo_flower", Translation="uiR2EDbotObjFxFoFlower"}, - {Id="palette.entities.botobjects.fx_fo_pollen2", Translation="uiR2EDbotObjFxPollen2"}, --- {Id="palette.entities.botobjects.fx_fy_sandblastadesert", Translation="uiR2EDbotObjFxSandblastaDesert"}, --- {Id="palette.entities.botobjects.fx_fy_sandblastdesert", Translation="uiR2EDbotObjFxSandblastDesert"}, - {Id="palette.entities.botobjects.fx_fy_feu_foret", Translation="uiR2EDbotObjFxFeuForet"}, --- {Id="palette.entities.botobjects.fx_fy_flower", Translation="uiR2EDbotObjFxDeFlower"}, --- {Id="palette.entities.botobjects.fx_ju_ghosta", Translation="uiR2EDbotObjFxGhostA"}, --- {Id="palette.entities.botobjects.fx_ju_ghostb", Translation="uiR2EDbotObjFxGhostB"}, - {Id="palette.entities.botobjects.fx_ju_solbirtha", Translation="uiR2EDbotObjFxJuSolbirthA"}, - {Id="palette.entities.botobjects.fx_ju_solbirthb", Translation="uiR2EDbotObjFxJuSolbirthB"}, - {Id="palette.entities.botobjects.fx_ju_solbirthc", Translation="uiR2EDbotObjFxJuSolbirthC"}, - {Id="palette.entities.botobjects.fx_ju_solbirthd", Translation="uiR2EDbotObjFxJuSolbirthD"}, --- {Id="palette.entities.botobjects.fx_ju_treefalla", Translation="uiR2EDbotObjFxJuTreeFallA"}, --- {Id="palette.entities.botobjects.fx_ju_treefallb", Translation="uiR2EDbotObjFxJuTreeFallB"}, --- {Id="palette.entities.botobjects.fx_ju_treefallc", Translation="uiR2EDbotObjFxJuTreeFallC"}, --- {Id="palette.entities.botobjects.fx_ju_treefalld", Translation="uiR2EDbotObjFxJuTreeFallD"}, - {Id="palette.entities.botobjects.fx_ju_brumes", Translation="uiR2EDbotObjFxBrumes"}, - {Id="palette.entities.botobjects.fx_fo_brumes", Translation="uiR2EDbotObjFxBrumes"}, - {Id="palette.entities.botobjects.fx_ju_brumesb", Translation="uiR2EDbotObjFxBrumesB"}, - {Id="palette.entities.botobjects.fx_fo_brumesb", Translation="uiR2EDbotObjFxBrumesB"}, --- {Id="palette.entities.botobjects.fx_ju_geyser4a", Translation="uiR2EDbotObjFxGeyser4A"}, --- {Id="palette.entities.botobjects.fx_fo_geyser4a", Translation="uiR2EDbotObjFxGeyser4A"}, --- {Id="palette.entities.botobjects.fx_ju_geyser4b", Translation="uiR2EDbotObjFxGeyser4B"}, --- {Id="palette.entities.botobjects.fx_fo_geyser4b", Translation="uiR2EDbotObjFxGeyser4B"}, --- {Id="palette.entities.botobjects.fx_ju_geyser4c", Translation="uiR2EDbotObjFxGeyser4C"}, --- {Id="palette.entities.botobjects.fx_fo_geyser4c", Translation="uiR2EDbotObjFxGeyser4C"}, --- {Id="palette.entities.botobjects.fx_ju_vent", Translation="uiR2EDbotObjFxJuFoVent"}, --- {Id="palette.entities.botobjects.fx_fo_vent", Translation="uiR2EDbotObjFxJuFoVent"}, --- {Id="palette.entities.botobjects.fx_la_vent", Translation="uiR2EDbotObjFxLaVent"}, - {Id="palette.entities.botobjects.fx_tr_pollen", Translation="uiR2EDbotObjFxTrPollen"} - } - }, - - minilife = - { - instances = - { --- {Id="palette.entities.botobjects.fx_fishe", Translation="uiR2EDbotObjFxFishe"}, - {Id="palette.entities.botobjects.fxy_cricketa", Translation="uiR2EDbotObjFxCricketA"}, - {Id="palette.entities.botobjects.fx_de_birda", Translation="uiR2EDbotObjFxBirdA"}, --- {Id="palette.entities.botobjects.fx_de_fishes", Translation="uiR2EDbotObjFxDeFishes"}, --- {Id="palette.entities.botobjects.fx_de_krevette", Translation="uiR2EDbotObjFxKrevette"}, --- {Id="palette.entities.botobjects.fx_de_scorpion2", Translation="uiR2EDbotObjFxDeScorpion2"}, --- {Id="palette.entities.botobjects.fx_de_serpent", Translation="uiR2EDbotObjFxDeSerpent"}, --- {Id="palette.entities.botobjects.fx_de_ver", Translation="uiR2EDbotObjFxVer"}, --- {Id="palette.entities.botobjects.fx_de_waterserpent", Translation="uiR2EDbotObjFxWaterSerpent"}, - {Id="palette.entities.botobjects.fx_fo_bugsa", Translation="uiR2EDbotObjFxFoBugsA"}, - {Id="palette.entities.botobjects.fx_fo_bugsb", Translation="uiR2EDbotObjFxFoBugsB"}, - {Id="palette.entities.botobjects.fx_fo_bugsc", Translation="uiR2EDbotObjFxFoBugsC"}, - {Id="palette.entities.botobjects.fx_fo_colibrisb", Translation="uiR2EDbotObjFxColibrisB"}, - {Id="palette.entities.botobjects.fx_ju_colibrisb", Translation="uiR2EDbotObjFxColibrisB"}, --- {Id="palette.entities.botobjects.fx_fo_fishes", Translation="uiR2EDbotObjFxFoFishes"}, --- {Id="palette.entities.botobjects.fx_fo_serpent", Translation="uiR2EDbotObjFxFoJuSerpent"}, --- {Id="palette.entities.botobjects.fx_ju_serpent", Translation="uiR2EDbotObjFxFoJuSerpent"}, --- {Id="palette.entities.botobjects.fx_fyros_de_scorpion", Translation="uiR2EDbotObjFxScorpion"}, - {Id="palette.entities.botobjects.fx_ju_bata", Translation="uiR2EDbotObjFxBatA"}, - {Id="palette.entities.botobjects.fx_ju_bugsa", Translation="uiR2EDbotObjFxJuBugsA"}, - {Id="palette.entities.botobjects.fx_ju_bugsb", Translation="uiR2EDbotObjFxJuBugsB"}, - {Id="palette.entities.botobjects.fx_ju_dragonflya", Translation="uiR2EDbotObjFxDragonfly"}, --- {Id="palette.entities.botobjects.fx_ju_bibubirdb", Translation="uiR2EDbotObjFxBibubirdB"}, --- {Id="palette.entities.botobjects.fx_fo_bibubirdb", Translation="uiR2EDbotObjFxBibubirdB"}, - {Id="palette.entities.botobjects.fx_ju_birds", Translation="uiR2EDbotObjFxBirds"}, - {Id="palette.entities.botobjects.fx_fo_birds", Translation="uiR2EDbotObjFxBirds"}, --- {Id="palette.entities.botobjects.fx_ju_birdsb", Translation="uiR2EDbotObjFxBirdsB"}, --- {Id="palette.entities.botobjects.fx_fo_birdsb", Translation="uiR2EDbotObjFxBirdsB"}, --- {Id="palette.entities.botobjects.fx_ju_birdsc", Translation="uiR2EDbotObjFxBirdsC"}, --- {Id="palette.entities.botobjects.fx_fo_birdsc", Translation="uiR2EDbotObjFxBirdsC"}, --- {Id="palette.entities.botobjects.fx_ju_fee", Translation="uiR2EDbotObjFxFee"}, --- {Id="palette.entities.botobjects.fx_fo_fee", Translation="uiR2EDbotObjFxFee"}, --- {Id="palette.entities.botobjects.fx_ju_grenouille3", Translation="uiR2EDbotObjFxGrenouille3"}, --- {Id="palette.entities.botobjects.fx_fo_grenouille3", Translation="uiR2EDbotObjFxGrenouille3"}, --- {Id="palette.entities.botobjects.fx_ju_grenouilleb3", Translation="uiR2EDbotObjFxGrenouille3B"}, --- {Id="palette.entities.botobjects.fx_fo_grenouilleb3", Translation="uiR2EDbotObjFxGrenouille3B"}, - {Id="palette.entities.botobjects.fx_ju_grenouillec3", Translation="uiR2EDbotObjFxGrenouille3C"}, - {Id="palette.entities.botobjects.fx_fo_grenouillec3", Translation="uiR2EDbotObjFxGrenouille3C"}, --- {Id="palette.entities.botobjects.fx_ju_ratsc", Translation="uiR2EDbotObjFxRatsC"}, --- {Id="palette.entities.botobjects.fx_fo_ratsc", Translation="uiR2EDbotObjFxRatsC"}, - {Id="palette.entities.botobjects.fx_ju_rotasecte", Translation="uiR2EDbotObjFxRotasecte"}, - {Id="palette.entities.botobjects.fx_fo_rotasecte", Translation="uiR2EDbotObjFxRotasecte"}, - {Id="palette.entities.botobjects.fx_ju_rotasecteb", Translation="uiR2EDbotObjFxRotasecteB"}, - {Id="palette.entities.botobjects.fx_fo_rotasecteb", Translation="uiR2EDbotObjFxRotasecteB"}, --- {Id="palette.entities.botobjects.fx_ju_scorpion2", Translation="uiR2EDbotObjFxJuFoScorpion2"}, --- {Id="palette.entities.botobjects.fx_fo_scorpion2", Translation="uiR2EDbotObjFxJuFoScorpion2"}, --- {Id="palette.entities.botobjects.fx_ju_taupe", Translation="uiR2EDbotObjFxFoTaupe"}, --- {Id="palette.entities.botobjects.fx_fo_taupe", Translation="uiR2EDbotObjFxFoTaupe"}, --- {Id="palette.entities.botobjects.fx_la_birds", Translation="uiR2EDbotObjFxLaBirds"}, --- {Id="palette.entities.botobjects.fx_la_birdsb", Translation="uiR2EDbotObjFxLaBirdsB"}, --- {Id="palette.entities.botobjects.fx_la_serpent", Translation="uiR2EDbotObjFxLaSerpent"}, --- {Id="palette.entities.botobjects.fx_la_serpent_sub", Translation="uiR2EDbotObjFxLaSerpentSub"}, --- {Id="palette.entities.botobjects.fx_la_taupe", Translation="uiR2EDbotObjFxLaTaupe"}, --- {Id="palette.entities.botobjects.fx_ju_bibubirdb", Translation="uiR2EDbotObjFxBibubirdB2"}, --- {Id="palette.entities.botobjects.fx_fo_bibubirdb", Translation="uiR2EDbotObjFxBibubirdB2"}, --- same {Id="palette.entities.botobjects.fx_matis_ju_fo_grenouillec3", Translation="uiR2EDbotObjFxGrenouilleC3"}, - {Id="palette.entities.botobjects.fx_tr_colibris", Translation="uiR2EDbotObjFxTrColibris"}, - {Id="palette.entities.botobjects.fx_tr_cricket_aqua", Translation="uiR2EDbotObjFxCricketAqua"}, - {Id="palette.entities.botobjects.fx_tr_dragonflya", Translation="uiR2EDbotObjFxTrDragonflyA"}, - {Id="palette.entities.botobjects.fx_tr_dragonflyb", Translation="uiR2EDbotObjFxTrDragonflyB"}, --- {Id="palette.entities.botobjects.fx_tr_fishes", Translation="uiR2EDbotObjFxTrFishes"}, --- {Id="palette.entities.botobjects.fx_tr_fishesb", Translation="uiR2EDbotObjFxTrFishesB"}, --- {Id="palette.entities.botobjects.fx_tr_fishesc", Translation="uiR2EDbotObjFxTrFishesC"}, --- {Id="palette.entities.botobjects.fx_tr_serpent", Translation="uiR2EDbotObjFxTrSerpent"}, - } - } - --} - } -} - - -r2.PaletteIdToTranslation = {} -- maps each palette id to its translation, filled at build time by r2_ui_palette.lua - -- this table may be access by C++ to give a name to newinstances created by user -r2.PaletteIdToGroupTranslation = {} -- the same thing for group of NPC - -r2.PaletteIdToType = {} - --- add test entries for levels - -if r2.Config.TestPaletteSelection then --- TMP for nico test - r2.Palette.Entries.selection_test = - { - instances = {} - } - for ecosystem = 1, 4 do - for level = 1, 250, levelStep do - table.insert(r2.Palette.Entries.selection_test.instances, { Id=formatSelectionTextName(level, ecosystem), DirectName="fyros level " .. formatLevel(level) .. ", ecosystem = " .. ecosystemTable[ecosystem]}) - end - end -end - - - diff --git a/code/ryzom/common/data_common/r2/r2_palette_light.lua b/code/ryzom/common/data_common/r2/r2_palette_light.lua deleted file mode 100644 index 31b67b792..000000000 --- a/code/ryzom/common/data_common/r2/r2_palette_light.lua +++ /dev/null @@ -1,1671 +0,0 @@ - - - --- tmp for nico's tests -local function formatLevel(level) - local result = tostring(level) - while string.len(result) ~= 3 do - result = "0" .. result - end - return result -end - -local function formatSelectionTextName(level, ecosystem) - return "palette.selection_test.level_" .. formatLevel(level) .. "_" .. tostring(ecosystem) -end - -local levelStep = 10 -local ecosystemTable = { "", "Desert", "Forest", "Jungle", "Lacustre", "PrimeRoots", "Goo" } - -r2.loadPalette = function() - local entries = {} - - -- test entries for levels & ecosystems - if r2.Config.TestPaletteSelection then - for ecosystem = 1, 4 do - for level = 1,250, levelStep do - local npc = - { - Name="Npc", - Equipment="", - IsStuck=0, - SheetClient="fyros_race_stats", - Level=level, - Ecosystem = ecosystemTable[ecosystem], - AiMovement="stand_on_start_point", - Profile="no_change", - Angle=0, - Position={x=0, y=0, z=0} - } - r2.addPaletteElement(formatSelectionTextName(level, ecosystem), npc) - end - end - end - - -- base class - entries.npc = - { - Name="", - Equipment="", - SheetClient="undef", - Level=1, - AiMovement="stand_on_start_point", --- AiActivity="guard", user Profile instead - IsStuck=0, - - GabaritHeight = 0, - GabaritTorsoWidth = 0, - GabaritArmsWidth = 0, - GabaritLegsWidth = 0, - GabaritBreastSize = 0, - - HairType = 0, - HairColor = 0, - Tattoo = 0, - EyesColor = 0, - - MorphTarget1 = 0, - MorphTarget2 = 0, - MorphTarget3 = 0, - MorphTarget4 = 0, - MorphTarget5 = 0, - MorphTarget6 = 0, - MorphTarget7 = 0, - MorphTarget8 = 0, - - Sex = 0, - JacketModel = 0, - TrouserModel = 0, - FeetModel = 0, - HandsModel = 0, - ArmModel = 0, - WeaponRightHand = 0, - WeaponLeftHand = 0, - - JacketColor = 0, - ArmColor = 0, - HandsColor = 0, - TrouserColor = 0, - FeetColor =0, - - Function = "", - Level = 1, - Profile = "guard", - Speed = 1, - Aggro = 30, - PlayerAttackable = 1, - BotAttackable = 1 - --- Angle=0, --- Position={x=0, y=0, z=0} - } - - r2.addPaletteElement("palette.entities.npc", entries.npc) - - - - - - entries.fyros_male = - { - --Customization="toto", - Name="Fyros Male", - Class="NpcCustom", - Type="base", - Base="palette.entities.npc", - Equipment="fyros_equipment", - SheetClient="basic_fyros_male.creature" - - } - r2.addPaletteElement("palette.entities.players.fyros_male", entries.fyros_male) - - entries.fyros_equipment = - { - helmet = - { - ["heavy helmet"] = "icfahh.sitem" - }, - - chest_plate = - { - ["refugee vest"] = "icravr.sitem", - ["civilian vest"] = "icfacv_3.sitem", - ["light vest"] = "icfalv.sitem", - ["light vest II"] = "icfalv_3.sitem", - ["medium vest"] = "icfamv.sitem", - ["medium vest II"] = "icfamv_3.sitem", - ["heavy vest"] = "icfahv.sitem", - ["heavy vest II"] = "icfahv_3.sitem" - }, - - legs = - { - ["light pants"] = "icfalp.sitem", - ["medium pants"] = "icfamp.sitem", - ["heavy pants"] = "icfahp.sitem", - ["pants 4"] = "icfacp_3.sitem", - ["pants 5"] = "icfahp_3.sitem", - ["pants 6"] = "icfamp_3.sitem", - ["pants 7"] = "icfalp_3.sitem" - }, - - boots = - { - ["light boots"] = "icfalb.sitem", - ["medium boots"] = "icfamb.sitem", - ["heavy boots"] = "icfahb.sitem", - ["boots 4"] = "icfacb_3.sitem", - ["boots 5"] = "icfahb_3.sitem", - ["boots 6"] = "icfamb_3.sitem", - ["boots 7"] = "icfalb_3.sitem" - }, - - gloves = - { - ["light gloves"] = "icfalg.sitem", - ["medium gloves"] = "icfamg.sitem", - ["heavy gloves"] = "icfahg.sitem" - }, - - arms_guard = - { - ["light sleeves"] = "icfals.sitem", - ["medium sleeves"] = "icfams.sitem", - ["heavy sleeves"] = "icfahs.sitem", - ["sleeves 4"] = "icfacs_3.sitem", - ["sleeves 5"] = "icfahs_3.sitem", - ["sleeves 6"] = "icfams_3.sitem", - ["sleeves 7"] = "icfals_3.sitem" - }, - - right_hand = - { - ["dagger"] = "iccm1pd.sitem", - ["mace"] = "iccm1bm.sitem", - ["dagger"] = "iccm1pd.sitem", - ["axe"] = "iccm1sa.sitem", - ["sword"] = "iccm1ss.sitem" - }, - - left_hand = - { - ["dagger"] = "iccm1pd.sitem" - } - } - r2.addR2PlayerEquipment(entries.fyros_male, entries.fyros_equipment) - - entries.fyros_female = - { - Name="Fyros Female", - Class="NpcCustom", - Type="base", - Equipment="fyros_equipment", - Base="palette.entities.npc", - SheetClient="basic_fyros_female.creature" - } - r2.addPaletteElement("palette.entities.players.fyros_female", entries.fyros_female) - r2.addR2PlayerEquipment(entries.fyros_female, entries.fyros_equipment) - - - entries.matis_male = - { - Name="Matis Male", - Class="NpcCustom", - Type="base", - Equipment="fyros_equipment", - Base="palette.entities.npc", - SheetClient="basic_matis_male.creature" - - } - r2.addPaletteElement("palette.entities.players.matis_male", entries.matis_male) - - entries.matis_equipment = - { - helmet = - { - - }, - - chest_plate = - { - ["vest 1"] = "icmacv_3.sitem", - ["vest 2"] = "icmahv_3.sitem", - ["vest 3"] = "icmamv_3.sitem", - ["vest 4"] = "icmalv_3.sitem", - ["vest 5"] = "icravr.sitem" - }, - - legs = - { - ["pants 1"] = "icmacp_3.sitem", - ["pants 2"] = "icmahp_3.sitem", - ["pants 3"] = "icmamp_3.sitem", - ["pants 4"] = "icmalp_3.sitem" - }, - - boots = - { - ["boots 1"] = "icmacb_3.sitem", - ["boots 2"] = "icmahb_3.sitem", - ["boots 3"] = "icmamb_3.sitem", - ["boots 4"] = "icmalb_3.sitem" - }, - - gloves = - { - - }, - - arms_guard = - { - ["sleeves 1"] = "icmacs_3.sitem", - ["sleeves 2"] = "icmahs_3.sitem", - ["sleeves 3"] = "icmams_3.sitem", - ["sleeves 4"] = "icmals_3.sitem" - }, - - right_hand = - { - ["dagger"] = "iccm1pd.sitem", - ["mace"] = "iccm1bm.sitem", - ["dagger"] = "iccm1pd.sitem", - ["axe"] = "iccm1sa.sitem", - ["sword"] = "iccm1ss.sitem" - }, - - left_hand = - { - ["dagger"] = "iccm1pd.sitem" - } - } - --r2.addR2PlayerEquipment(entries.matis_male, entries.matis_equipment) - r2.addR2PlayerEquipment(entries.matis_male, entries.fyros_equipment) - - entries.matis_female = - { - Name="Matis Female", - Class="NpcCustom", - Type="base", - Base="palette.entities.npc", - Equipment="matis_equipment", - SheetClient="basic_matis_female.creature", - - } - r2.addPaletteElement("palette.entities.players.matis_female", entries.matis_female) - r2.addR2PlayerEquipment(entries.matis_female, entries.matis_equipment) - - entries.tryker_male = - { - Name="Tryker Male", - Class="NpcCustom", - Type="base", - Base="palette.entities.npc", - Equipment="tryker_equipment", - SheetClient="basic_tryker_male.creature", - } - r2.addPaletteElement("palette.entities.players.tryker_male", entries.tryker_male) - - entries.tryker_equipment = - { - helmet = - { - - }, - - chest_plate = - { - ["vest 1"] = "ictacv_3.sitem", - ["vest 2"] = "ictahv_3.sitem", - ["vest 3"] = "ictamv_3.sitem", - ["vest 4"] = "ictalv_3.sitem", - }, - - legs = - { - ["pants 1"] = "ictacp_3.sitem", - ["pants 2"] = "ictahp_3.sitem", - ["pants 3"] = "ictamp_3.sitem", - ["pants 4"] = "ictalp_3.sitem" - }, - - boots = - { - ["boots 1"] = "ictacb_3.sitem", - ["boots 2"] = "ictahb_3.sitem", - ["boots 3"] = "ictamb_3.sitem", - ["boots 4"] = "ictalb_3.sitem" - }, - - gloves = - { - - }, - - arms_guard = - { - ["sleeves 1"] = "ictacs_3.sitem", - ["sleeves 2"] = "ictahs_3.sitem", - ["sleeves 3"] = "ictams_3.sitem", - ["sleeves 4"] = "ictals_3.sitem" - }, - - right_hand = - { - ["dagger"] = "iccm1pd.sitem", - ["mace"] = "iccm1bm.sitem", - ["dagger"] = "iccm1pd.sitem", - ["axe"] = "iccm1sa.sitem", - ["sword"] = "iccm1ss.sitem" - }, - - left_hand = - { - ["dagger"] = "iccm1pd.sitem" - } - } - r2.addR2PlayerEquipment(entries.tryker_male, entries.tryker_equipment) - - entries.tryker_female = - { - Name="Tryker Female", - Class="NpcCustom", - Type="base", - Base="palette.entities.npc", - Equipment="tryker_equipment", - SheetClient="basic_tryker_female.creature" - } - r2.addPaletteElement("palette.entities.players.tryker_female", entries.tryker_female) - r2.addR2PlayerEquipment(entries.tryker_female, entries.tryker_equipment) - - entries.zorai_male = - { - Name="Zorai Male", - Class="NpcCustom", - Type="base", - Base="palette.entities.npc", - Equipment="zorai_equipment", - SheetClient="basic_zorai_male.creature" - } - r2.addPaletteElement("palette.entities.players.zorai_male", entries.zorai_male) - - entries.zorai_equipment = - { - helmet = - { - - }, - - chest_plate = - { - ["vest 1"] = "icmacv_3.sitem", - ["vest 2"] = "icmahv_3.sitem", - ["vest 3"] = "icmamv_3.sitem", - ["vest 4"] = "icmalv_3.sitem", - }, - - legs = - { - ["pants 1"] = "icmacp_3.sitem", - ["pants 2"] = "icmahp_3.sitem", - ["pants 3"] = "icmamp_3.sitem", - ["pants 4"] = "icmalp_3.sitem" - }, - - boots = - { - ["boots 1"] = "icmacb_3.sitem", - ["boots 2"] = "icmahb_3.sitem", - ["boots 3"] = "icmamb_3.sitem", - ["boots 4"] = "icmalb_3.sitem" - }, - - gloves = - { - }, - - arms_guard = - { - ["sleeves 1"] = "icmacs_3.sitem", - ["sleeves 2"] = "icmahs_3.sitem", - ["sleeves 3"] = "icmams_3.sitem", - ["sleeves 4"] = "icmals_3.sitem" - }, - - right_hand = - { - ["dagger"] = "iccm1pd.sitem", - ["mace"] = "iccm1bm.sitem", - ["dagger"] = "iccm1pd.sitem", - ["axe"] = "iccm1sa.sitem", - ["sword"] = "iccm1ss.sitem" - }, - - left_hand = - { - ["dagger"] = "iccm1pd.sitem" - } - } - r2.addR2PlayerEquipment(entries.zorai_male, entries.zorai_equipment) - - entries.zorai_female = - { - Name="Zorai Female", - Class="NpcCustom", - Type="base", - Base="palette.entities.npc", - Equipment="zorai_equipment", - SheetClient="basic_zorai_female.creature" - } - r2.addPaletteElement("palette.entities.players.zorai_female", entries.zorai_female) - r2.addR2PlayerEquipment(entries.zorai_female, entries.zorai_equipment) - - - --- bot objects start here -- - -- parent of all bot object (like palette.entities.npc for npcs) - -- abstract element(cannot be instanciated) - entries.botobject = - { - IsStuck=1, - AiMovement="stand_on_start_point", - Profile="no_change" - } - r2.addPaletteElement("palette.entities.botobject", entries.botobject); - - - - entries.barrel1 = - { - Base="palette.entities.botobject", - Name="Barrel 1", - SheetClient="object_1_barrel_broken.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.barrel1", entries.barrel1); - - entries.jar1 = - { - Base="palette.entities.botobject", - Name="Jar 1", - SheetClient="object_jar.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.jar1", entries.jar1); - - entries.jar2 = - { - Base="palette.entities.botobject", - Name = "Jar 2", - SheetClient="object_jar_fallen.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.jar2", entries.jar2); - - entries.crate1 = - { - Base="palette.entities.botobject", - Name="Crate 1", - SheetClient="object_1_crate.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.crate1",entries.crate1) - - entries.crate2 = - { - Base="palette.entities.botobject", - Name="Crate 2", - SheetClient="object_3_crate.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.crate2",entries.crate2) - - entries.bones1 = - { - Base="palette.entities.botobject", - Name="Bones 1", - SheetClient="object_bones.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.bones1",entries.bones1) - - entries.tent1 = - { - Base="palette.entities.botobject", - Name="Tent 1", - SheetClient="object_tent.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tent1",entries.tent1) - - entries.pack1 = - { - Base="palette.entities.botobject", - Name="Pack 1", - SheetClient="object_pack_1.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.pack1",entries.pack1) - --- test Bot-object - - entries.jar= - { - Base="palette.entities.botobject", - Name = "jar", - SheetClient="object_jar.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.jar", entries.jar); - entries.jar_3= - { - Base="palette.entities.botobject", - Name = "jar_3", - SheetClient="object_jar_3.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.jar_3", entries.jar_3); - entries.jar_fallen= - { - Base="palette.entities.botobject", - Name = "jar_fallen", - SheetClient="object_jar_fallen.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.jar_fallen", entries.jar_fallen); - entries.hut= - { - Base="palette.entities.botobject", - Name = "hut", - SheetClient="object_hut.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.hut", entries.hut); - entries.paddock= - { - Base="palette.entities.botobject", - Name = "paddock", - SheetClient="object_paddock.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.paddock", entries.paddock); - entries.totem_kami= - { - Base="palette.entities.botobject", - Name = "totem_kami", - SheetClient="object_totem_kami.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.totem_kami", entries.totem_kami); - entries.totem_pachyderm= - { - Base="palette.entities.botobject", - Name = "totem_pachyderm", - SheetClient="object_totem_pachyderm.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.totem_pachyderm", entries.totem_pachyderm); - entries.tent= - { - Base="palette.entities.botobject", - Name = "tent", - SheetClient="object_tent.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tent", entries.tent); - entries.tent_fyros= - { - Base="palette.entities.botobject", - Name = "tent_fyros", - SheetClient="object_tent_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tent_fyros", entries.tent_fyros); - entries.tent_matis= - { - Base="palette.entities.botobject", - Name = "tent_matis", - SheetClient="object_tent_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tent_matis", entries.tent_matis); - entries.tent_tryker= - { - Base="palette.entities.botobject", - Name = "tent_tryker", - SheetClient="object_tent_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tent_tryker", entries.tent_tryker); - entries.tent_zorai= - { - Base="palette.entities.botobject", - Name = "tent_zorai", - SheetClient="object_tent_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tent_zorai", entries.tent_zorai); - entries.totem_kitin= - { - Base="palette.entities.botobject", - Name = "totem_kitin", - SheetClient="object_totem_kitin.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.totem_kitin", entries.totem_kitin); - entries.totem_bird= - { - Base="palette.entities.botobject", - Name = "totem_bird", - SheetClient="object_totem_bird.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.totem_bird", entries.totem_bird); - entries.tower_ruin= - { - Base="palette.entities.botobject", - Name = "tower_ruin", - SheetClient="object_tower_ruin.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tower_ruin", entries.tower_ruin); - entries.stele= - { - Base="palette.entities.botobject", - Name = "stele", - SheetClient="object_stele.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.stele", entries.stele); - entries.chariot= - { - Base="palette.entities.botobject", - Name = "chariot", - SheetClient="object_chariot.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.chariot", entries.chariot); - entries.chariot_working= - { - Base="palette.entities.botobject", - Name = "chariot_working", - SheetClient="object_chariot_working.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.chariot_working", entries.chariot_working); - entries.wind_turbine= - { - Base="palette.entities.botobject", - Name = "wind_turbine", - SheetClient="object_wind_turbine.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.wind_turbine", entries.wind_turbine); - entries.street_lamp= - { - Base="palette.entities.botobject", - Name = "street_lamp", - SheetClient="object_street_lamp.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.street_lamp", entries.street_lamp); - entries.tomb_1= - { - Base="palette.entities.botobject", - Name = "tomb_1", - SheetClient="object_tomb_1.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tomb_1", entries.tomb_1); - entries.tomb_2= - { - Base="palette.entities.botobject", - Name = "tomb_2", - SheetClient="object_tomb_2.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tomb_2", entries.tomb_2); - entries.tomb_3= - { - Base="palette.entities.botobject", - Name = "tomb_3", - SheetClient="object_tomb_3.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tomb_3", entries.tomb_3); - entries.tomb_4= - { - Base="palette.entities.botobject", - Name = "tomb_4", - SheetClient="object_tomb_4.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tomb_4", entries.tomb_4); - entries.tomb_5= - { - Base="palette.entities.botobject", - Name = "tomb_5", - SheetClient="object_tomb_5.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tomb_5", entries.tomb_5); - entries.campfire= - { - Base="palette.entities.botobject", - Name = "campfire", - SheetClient="object_campfire.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.campfire", entries.campfire); - entries.campfire_out= - { - Base="palette.entities.botobject", - Name = "campfire_out", - SheetClient="object_campfire_out.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.campfire_out", entries.campfire_out); - entries.chest= - { - Base="palette.entities.botobject", - Name = "chest", - SheetClient="object_chest.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.chest", entries.chest); - entries.chest_old= - { - Base="palette.entities.botobject", - Name = "chest_old", - SheetClient="object_chest_old.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.chest_old", entries.chest_old); - entries.stump= - { - Base="palette.entities.botobject", - Name = "stump", - SheetClient="object_stump.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.stump", entries.stump); - entries.carrion_mammal= - { - Base="palette.entities.botobject", - Name = "carrion_mammal", - SheetClient="object_carrion_mammal.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.carrion_mammal", entries.carrion_mammal); - entries.carrion_insect= - { - Base="palette.entities.botobject", - Name = "carrion_insect", - SheetClient="object_carrion_insect.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.carrion_insect", entries.carrion_insect); - entries.bones= - { - Base="palette.entities.botobject", - Name = "bones", - SheetClient="object_bones.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.bones", entries.bones); - entries.bones_b= - { - Base="palette.entities.botobject", - Name = "bones_b", - SheetClient="object_bones_b.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.bones_b", entries.bones_b); - entries.barrier= - { - Base="palette.entities.botobject", - Name = "barrier", - SheetClient="object_barrier.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.barrier", entries.barrier); - entries.barrier_T= - { - Base="palette.entities.botobject", - Name = "barrier_T", - SheetClient="object_barrier_T.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.barrier_T", entries.barrier_T); - entries.house_ruin= - { - Base="palette.entities.botobject", - Name = "house_ruin", - SheetClient="object_house_ruin.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.house_ruin", entries.house_ruin); - entries.roadsign= - { - Base="palette.entities.botobject", - Name = "roadsign", - SheetClient="object_roadsign.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.roadsign", entries.roadsign); - entries.watch_tower= - { - Base="palette.entities.botobject", - Name = "watch_tower", - SheetClient="object_watch_tower.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.watch_tower", entries.watch_tower); - entries.landslide_desert= - { - Base="palette.entities.botobject", - Name = "landslide_desert", - SheetClient="object_landslide_desert.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.landslide_desert", entries.landslide_desert); - entries.tent_cosmetics= - { - Base="palette.entities.botobject", - Name = "tent_cosmetics", - SheetClient="object_tent_cosmetics.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.tent_cosmetics", entries.tent_cosmetics); - entries.landslide_jungle= - { - Base="palette.entities.botobject", - Name = "landslide_jungle", - SheetClient="object_landslide_jungle.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.landslide_jungle", entries.landslide_jungle); - entries.landslide_lake= - { - Base="palette.entities.botobject", - Name = "landslide_lake", - SheetClient="object_landslide_lake.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.landslide_lake", entries.landslide_lake); - entries.carapace_bul= - { - Base="palette.entities.botobject", - Name = "carapace_bul", - SheetClient="object_carapace_bul.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.carapace_bul", entries.carapace_bul); - entries.carapace_2= - { - Base="palette.entities.botobject", - Name = "carapace_2", - SheetClient="object_carapace_2.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.carapace_2", entries.carapace_2); - entries.giant_skull= - { - Base="palette.entities.botobject", - Name = "giant_skull", - SheetClient="object_giant_skull.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.giant_skull", entries.giant_skull); - entries.ruin_wall= - { - Base="palette.entities.botobject", - Name = "ruin_wall", - SheetClient="object_ruin_wall.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.ruin_wall", entries.ruin_wall); - entries.ruin_wall_b= - { - Base="palette.entities.botobject", - Name = "ruin_wall_b", - SheetClient="object_ruin_wall_b.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.ruin_wall_b", entries.ruin_wall_b); - entries.karavan_altar= - { - Base="palette.entities.botobject", - Name = "karavan_altar", - SheetClient="object_karavan_altar.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.karavan_altar", entries.karavan_altar); - entries.kami_altar= - { - Base="palette.entities.botobject", - Name = "kami_altar", - SheetClient="object_kami_altar.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.kami_altar", entries.kami_altar); - entries.milestone= - { - Base="palette.entities.botobject", - Name = "milestone", - SheetClient="object_milestone.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.milestone", entries.milestone); - entries.bag_a= - { - Base="palette.entities.botobject", - Name = "bag_a", - SheetClient="object_bag_a.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.bag_a", entries.bag_a); - entries.bag_b= - { - Base="palette.entities.botobject", - Name = "bag_b", - SheetClient="object_bag_b.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.bag_b", entries.bag_b); - entries.pack_1= - { - Base="palette.entities.botobject", - Name = "pack_1", - SheetClient="object_pack_1.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.pack_1", entries.pack_1); - entries.pack_2= - { - Base="palette.entities.botobject", - Name = "pack_2", - SheetClient="object_pack_2.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.pack_2", entries.pack_2); - entries.pack_3= - { - Base="palette.entities.botobject", - Name = "pack_3", - SheetClient="object_pack_3.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.pack_3", entries.pack_3); - entries.pack_4= - { - Base="palette.entities.botobject", - Name = "pack_4", - SheetClient="object_pack_4.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.pack_4", entries.pack_4); - entries.pack_5= - { - Base="palette.entities.botobject", - Name = "pack_5", - SheetClient="object_pack_5.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.pack_5", entries.pack_5); - entries.runic_circle= - { - Base="palette.entities.botobject", - Name = "runic_circle", - SheetClient="object_runic_circle.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.runic_circle", entries.runic_circle); - entries.karavan_device= - { - Base="palette.entities.botobject", - Name = "karavan_device", - SheetClient="object_karavan_device.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.karavan_device", entries.karavan_device); - entries.kitin_egg= - { - Base="palette.entities.botobject", - Name = "kitin_egg", - SheetClient="object_kitin_egg.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.kitin_egg", entries.kitin_egg); - entries.bones_homin_a= - { - Base="palette.entities.botobject", - Name = "bones_homin_a", - SheetClient="object_bones_homin_a.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.bones_homin_a", entries.bones_homin_a); - entries.bones_homin_b= - { - Base="palette.entities.botobject", - Name = "bones_homin_b", - SheetClient="object_bones_homin_b.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.bones_homin_b", entries.bones_homin_b); - entries.spot_kitin= - { - Base="palette.entities.botobject", - Name = "spot_kitin", - SheetClient="object_spot_kitin.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.spot_kitin", entries.spot_kitin); - entries.spot_goo= - { - Base="palette.entities.botobject", - Name = "spot_goo", - SheetClient="object_spot_goo.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.spot_goo", entries.spot_goo); - entries.merchant_melee_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_melee_fyros", - SheetClient="object_merchant_melee_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_melee_fyros", entries.merchant_melee_fyros); - entries.merchant_melee_matis= - { - Base="palette.entities.botobject", - Name = "merchant_melee_matis", - SheetClient="object_merchant_melee_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_melee_matis", entries.merchant_melee_matis); - entries.merchant_melee_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_melee_tryker", - SheetClient="object_merchant_melee_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_melee_tryker", entries.merchant_melee_tryker); - entries.merchant_melee_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_melee_zorai", - SheetClient="object_merchant_melee_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_melee_zorai", entries.merchant_melee_zorai); - entries.merchant_range_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_range_fyros", - SheetClient="object_merchant_range_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_range_fyros", entries.merchant_range_fyros); - entries.merchant_range_matis= - { - Base="palette.entities.botobject", - Name = "merchant_range_matis", - SheetClient="object_merchant_range_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_range_matis", entries.merchant_range_matis); - entries.merchant_range_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_range_tryker", - SheetClient="object_merchant_range_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_range_tryker", entries.merchant_range_tryker); - entries.merchant_range_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_range_zorai", - SheetClient="object_merchant_range_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_range_zorai", entries.merchant_range_zorai); - entries.merchant_armor_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_armor_fyros", - SheetClient="object_merchant_armor_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_armor_fyros", entries.merchant_armor_fyros); - entries.merchant_armor_matis= - { - Base="palette.entities.botobject", - Name = "merchant_armor_matis", - SheetClient="object_merchant_armor_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_armor_matis", entries.merchant_armor_matis); - entries.merchant_armor_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_armor_tryker", - SheetClient="object_merchant_armor_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_armor_tryker", entries.merchant_armor_tryker); - entries.merchant_armor_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_armor_zorai", - SheetClient="object_merchant_armor_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_armor_zorai", entries.merchant_armor_zorai); - entries.merchant_RM_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_RM_fyros", - SheetClient="object_merchant_RM_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_RM_fyros", entries.merchant_RM_fyros); - entries.merchant_RM_matis= - { - Base="palette.entities.botobject", - Name = "merchant_RM_matis", - SheetClient="object_merchant_RM_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_RM_matis", entries.merchant_RM_matis); - entries.merchant_RM_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_RM_tryker", - SheetClient="object_merchant_RM_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_RM_tryker", entries.merchant_RM_tryker); - entries.merchant_RM_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_RM_zorai", - SheetClient="object_merchant_RM_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_RM_zorai", entries.merchant_RM_zorai); - entries.merchant_tool_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_tool_fyros", - SheetClient="object_merchant_tool_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_tool_fyros", entries.merchant_tool_fyros); - entries.merchant_tool_matis= - { - Base="palette.entities.botobject", - Name = "merchant_tool_matis", - SheetClient="object_merchant_tool_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_tool_matis", entries.merchant_tool_matis); - entries.merchant_tool_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_tool_tryker", - SheetClient="object_merchant_tool_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_tool_tryker", entries.merchant_tool_tryker); - entries.merchant_tool_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_tool_zorai", - SheetClient="object_merchant_tool_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_tool_zorai", entries.merchant_tool_zorai); - entries.merchant_focus_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_focus_fyros", - SheetClient="object_merchant_focus_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_focus_fyros", entries.merchant_focus_fyros); - entries.merchant_focus_matis= - { - Base="palette.entities.botobject", - Name = "merchant_focus_matis", - SheetClient="object_merchant_focus_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_focus_matis", entries.merchant_focus_matis); - entries.merchant_focus_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_focus_tryker", - SheetClient="object_merchant_focus_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_focus_tryker", entries.merchant_focus_tryker); - entries.merchant_focus_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_focus_zorai", - SheetClient="object_merchant_focus_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_focus_zorai", entries.merchant_focus_zorai); - entries.merchant_haircut_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_haircut_fyros", - SheetClient="object_merchant_haircut_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_haircut_fyros", entries.merchant_haircut_fyros); - entries.merchant_haircut_matis= - { - Base="palette.entities.botobject", - Name = "merchant_haircut_matis", - SheetClient="object_merchant_haircut_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_haircut_matis", entries.merchant_haircut_matis); - entries.merchant_haircut_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_haircut_tryker", - SheetClient="object_merchant_haircut_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_haircut_tryker", entries.merchant_haircut_tryker); - entries.merchant_haircut_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_haircut_zorai", - SheetClient="object_merchant_haircut_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_haircut_zorai", entries.merchant_haircut_zorai); - entries.merchant_tatoo_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_tatoo_fyros", - SheetClient="object_merchant_tatoo_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_tatoo_fyros", entries.merchant_tatoo_fyros); - entries.merchant_tatoo_matis= - { - Base="palette.entities.botobject", - Name = "merchant_tatoo_matis", - SheetClient="object_merchant_tatoo_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_tatoo_matis", entries.merchant_tatoo_matis); - entries.merchant_tatoo_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_tatoo_tryker", - SheetClient="object_merchant_tatoo_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_tatoo_tryker", entries.merchant_tatoo_tryker); - entries.merchant_tatoo_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_tatoo_zorai", - SheetClient="object_merchant_tatoo_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_tatoo_zorai", entries.merchant_tatoo_zorai); - entries.merchant_bijoux_fyros= - { - Base="palette.entities.botobject", - Name = "merchant_bijoux_fyros", - SheetClient="object_merchant_bijoux_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_bijoux_fyros", entries.merchant_bijoux_fyros); - entries.merchant_bijoux_matis= - { - Base="palette.entities.botobject", - Name = "merchant_bijoux_matis", - SheetClient="object_merchant_bijoux_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_bijoux_matis", entries.merchant_bijoux_matis); - entries.merchant_bijoux_tryker= - { - Base="palette.entities.botobject", - Name = "merchant_bijoux_tryker", - SheetClient="object_merchant_bijoux_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_bijoux_tryker", entries.merchant_bijoux_tryker); - entries.merchant_bijoux_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_bijoux_zorai", - SheetClient="object_merchant_bijoux_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_bijoux_zorai", entries.merchant_bijoux_zorai); - entries.merchant_bar_matis= - { - Base="palette.entities.botobject", - Name = "merchant_bar_matis", - SheetClient="object_merchant_bar_matis.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_bar_matis", entries.merchant_bar_matis); - entries.merchant_bar_zorai= - { - Base="palette.entities.botobject", - Name = "merchant_bar_zorai", - SheetClient="object_merchant_bar_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.merchant_bar_zorai", entries.merchant_bar_zorai); - entries.roadsign= - { - Base="palette.entities.botobject", - Name = "roadsign", - SheetClient="object_roadsign.creature", - Level=1, - } - --r2.addPaletteElement("palette.entities.botobjects.roadsign", entries.roadsign); - entries.roadsign_fyros= - { - Base="palette.entities.botobject", - Name = "roadsign_fyros", - SheetClient="object_roadsign_fyros.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.roadsign_fyros", entries.roadsign_fyros); - entries.roadsign_zorai= - { - Base="palette.entities.botobject", - Name = "roadsign_zorai", - SheetClient="object_roadsign_zorai.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.roadsign_zorai", entries.roadsign_zorai); - entries.roadsign_tryker= - { - Base="palette.entities.botobject", - Name = "roadsign_tryker", - SheetClient="object_roadsign_tryker.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.roadsign_tryker", entries.roadsign_tryker); - entries.banner_kami= - { - Base="palette.entities.botobject", - Name = "banner_kami", - SheetClient="object_banner_kami.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.banner_kami", entries.banner_kami); - entries.banner_karavan= - { - Base="palette.entities.botobject", - Name = "banner_karavan", - SheetClient="object_banner_karavan.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.banner_karavan", entries.banner_karavan); - entries.counter= - { - Base="palette.entities.botobject", - Name = "counter", - SheetClient="object_counter.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.counter", entries.counter); - entries.homin_body_fyros_H= - { - Base="palette.entities.botobject", - Name = "homin_body_fyros_H", - SheetClient="object_homin_body_fyros_H.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.homin_body_fyros_H", entries.homin_body_fyros_H); - entries.homin_body_fyros_F= - { - Base="palette.entities.botobject", - Name = "homin_body_fyros_F", - SheetClient="object_homin_body_fyros_F.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.homin_body_fyros_F", entries.homin_body_fyros_F); - entries.homin_body_matis_H= - { - Base="palette.entities.botobject", - Name = "homin_body_matis_H", - SheetClient="object_homin_body_matis_H.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.homin_body_matis_H", entries.homin_body_matis_H); - entries.homin_body_matis_F= - { - Base="palette.entities.botobject", - Name = "homin_body_matis_F", - SheetClient="object_homin_body_matis_F.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.homin_body_matis_F", entries.homin_body_matis_F); - entries.homin_body_tryker_H= - { - Base="palette.entities.botobject", - Name = "homin_body_tryker_H", - SheetClient="object_homin_body_tryker_H.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.homin_body_tryker_H", entries.homin_body_tryker_H); - entries.homin_body_tryker_F= - { - Base="palette.entities.botobject", - Name = "homin_body_tryker_F", - SheetClient="object_homin_body_tryker_F.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.homin_body_tryker_F", entries.homin_body_tryker_F); - entries.homin_body_zorai_H= - { - Base="palette.entities.botobject", - Name = "homin_body_zorai_H", - SheetClient="object_homin_body_zorai_H.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.homin_body_zorai_H", entries.homin_body_zorai_H); - entries.homin_body_zorai_F= - { - Base="palette.entities.botobject", - Name = "homin_body_zorai_F", - SheetClient="object_homin_body_zorai_F.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.homin_body_zorai_F", entries.homin_body_zorai_F); - entries.karavan_standard= - { - Base="palette.entities.botobject", - Name = "karavan_standard", - SheetClient="object_karavan_standard.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.karavan_standard", entries.karavan_standard); - entries.karavan_tent= - { - Base="palette.entities.botobject", - Name = "karavan_tent", - SheetClient="object_karavan_tent.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.karavan_tent", entries.karavan_tent); - entries.karavan_big_wall= - { - Base="palette.entities.botobject", - Name = "karavan_big_wall", - SheetClient="object_karavan_big_wall.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.karavan_big_wall", entries.karavan_big_wall); - entries.karavan_wall= - { - Base="palette.entities.botobject", - Name = "karavan_wall", - SheetClient="object_karavan_wall.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.karavan_wall", entries.karavan_wall); - entries.karavan_mirador= - { - Base="palette.entities.botobject", - Name = "karavan_mirador", - SheetClient="object_karavan_mirador.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.karavan_mirador", entries.karavan_mirador); - entries.karavan_gateway= - { - Base="palette.entities.botobject", - Name = "karavan_gateway", - SheetClient="object_karavan_gateway.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.karavan_gateway", entries.karavan_gateway); - entries.kami_standard= - { - Base="palette.entities.botobject", - Name = "kami_standard", - SheetClient="object_kami_standard.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.kami_standard", entries.kami_standard); - entries.kami_hut= - { - Base="palette.entities.botobject", - Name = "kami_hut", - SheetClient="object_kami_hut.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.kami_hut", entries.kami_hut); - entries.vegetable_wall= - { - Base="palette.entities.botobject", - Name = "vegetable_wall", - SheetClient="object_vegetable_wall.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.vegetable_wall", entries.vegetable_wall); - entries.kami_watchtower= - { - Base="palette.entities.botobject", - Name = "kami_watchtower", - SheetClient="object_kami_watchtower.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.kami_watchtower", entries.kami_watchtower); - entries.vegetable_gateway= - { - Base="palette.entities.botobject", - Name = "vegetable_gateway", - SheetClient="object_vegetable_gateway.creature", - Level=1, - } - r2.addPaletteElement("palette.entities.botobjects.vegetable_gateway", entries.vegetable_gateway); - - entries.creature_cbadc1 = { Base="palette.entities.creatures.passive", SheetClient="cbadc1.creature", Level=60, Ecosystem="Desert", Region="c" } r2.addPaletteElement("palette.entities.creatures.cbadc1", entries.creature_cbadc1) - entries.creature_cbagf3 = { Base="palette.entities.creatures.passive", SheetClient="cbagf3.creature", Level=230, Ecosystem="Goo", Region="f" } r2.addPaletteElement("palette.entities.creatures.cbagf3", entries.creature_cbagf3) - entries.creature_chafd3 = { Base="palette.entities.creatures.passive", SheetClient="chafd3.creature", Level=130, Ecosystem="Forest", Region="d" } r2.addPaletteElement("palette.entities.creatures.chafd3", entries.creature_chafd3) - - entries.creature_cpagb1 = { Base="palette.entities.creatures.plant", SheetClient="cpagb1.creature", Level=10, Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpagb1", entries.creature_cpagb1) - entries.creature_cpbgb1 = { Base="palette.entities.creatures.plant", SheetClient="cpbgb1.creature", Level=10, Ecosystem="Goo", Region="b" } r2.addPaletteElement("palette.entities.creatures.cpbgb1", entries.creature_cpbgb1) -end - ---debugInfo(colorTag(0, 255, 0) .. "Building palette table") --- palette hierarchy for the UI -r2.Palette = -{ - UIPath="ui:interface:r2ed_palette:content:sbtree_entities:entity_enclosing:tree_list", - StrId ="uiR2EDentities", - Entries = - { - npc = - { - instances = - { - {Id="palette.entities.players.fyros_male", Translation="uiR2EDnpc_fyros_h"}, - {Id="palette.entities.players.fyros_female", Translation="uiR2EDnpc_fyros_f"}, - {Id="palette.entities.players.matis_male", Translation="uiR2EDnpc_matis_h"}, - {Id="palette.entities.players.matis_female", Translation="uiR2EDnpc_matis_f"}, - {Id="palette.entities.players.tryker_male", Translation="uiR2EDnpc_tryker_h"}, - {Id="palette.entities.players.tryker_female", Translation="uiR2EDnpc_tryker_f"}, - {Id="palette.entities.players.zorai_male", Translation="uiR2EDnpc_zorai_h"}, - {Id="palette.entities.players.zorai_female", Translation="uiR2EDnpc_zorai_f"}, - } - }, - botObjects = - { - instances = - { - {Id="palette.entities.botobjects.jar", Translation="uiR2EDbotObjJar"}, - {Id="palette.entities.botobjects.jar_3", Translation="uiR2EDbotObjJar3"}, - {Id="palette.entities.botobjects.jar_fallen", Translation="uiR2EDbotObjJarFallen"}, - {Id="palette.entities.botobjects.chest", Translation="uiR2EDbotObjChest"}, - {Id="palette.entities.botobjects.chest_old", Translation="uiR2EDbotObjChestOld"}, - {Id="palette.entities.botobjects.chariot", Translation="uiR2EDbotObjChariot"}, - {Id="palette.entities.botobjects.chariot_working", Translation="uiR2EDbotObjChariotWorking"}, - {Id="palette.entities.botobjects.campfire", Translation="uiR2EDbotObjCampFire"}, - {Id="palette.entities.botobjects.campfire_out", Translation="uiR2EDbotObjCampfireOut"}, - } - }, - creatures_passive = - { - instances = - { - {Id="palette.entities.creatures.cpagb1", Translation="uiR2EDcreature_cpagb1"}, - {Id="palette.entities.creatures.cpbgb1", Translation="uiR2EDcreature_cpbgb1"}, - } - }, - creatures_predators = - { - instances = - { - {Id="palette.entities.creatures.cbadc1", Translation="uiR2EDcreature_cbadc1"}, - {Id="palette.entities.creatures.cbagf3", Translation="uiR2EDcreature_cbagf3"}, - {Id="palette.entities.creatures.chafd3", Translation="uiR2EDcreature_chafd3"}, - } - }, - } -} - - -r2.PaletteIdToTranslation = {} -- maps each palette id to its translation, filled at build time by r2_ui_palette.lua - -- this table may be access by C++ to give a name to newinstances created by user -r2.PaletteIdToGroupTranslation = {} -- the same thing for group of NPC -r2.PaletteIdToType = {} --- add test entries for levels - -if r2.Config.TestPaletteSelection then - -- TMP for nico test - r2.Palette.Entries.selection_test = - { - instances = {} - } - for ecosystem = 1, 4 do - for level = 1, 250, levelStep do - table.insert(r2.Palette.Entries.selection_test.instances, { Id=formatSelectionTextName(level, ecosystem), DirectName="fyros level " .. formatLevel(level) .. ", ecosystem = " .. ecosystemTable[ecosystem]}) - end - end -end - ---runCommand("luaObject","r2.Palette") ---debugInfo(colorTag(0, 255, 0) .. "Palette table built") - diff --git a/code/ryzom/common/data_common/r2/r2_piece.lua b/code/ryzom/common/data_common/r2/r2_piece.lua deleted file mode 100644 index 50ba9b7b4..000000000 --- a/code/ryzom/common/data_common/r2/r2_piece.lua +++ /dev/null @@ -1,238 +0,0 @@ -assert(nil) -- component oblsolete -local registerFeature = function() -local feature = {} -feature.maxId=1 -feature.Name = "Piece" - -feature.Description = "A npc dialog test" - -feature.Components= -{ - { - Name="Piece", - Prop = - { - {Name="Zone",Type="Region"}, - {Name="Npcs",Type="Table"}, - {Name="Actions",Type="Table"}, - {Name="Name", Type="String", MaxNumChar="32"} - } - }, - { - Name="PieceEntry", - Prop= - { - {Name="Who",Type="String"}, - {Name="Action",Type="String"}, - {Name="Parameters",Type="String"}, - {Name="Time",Type="String"} - } - } - -} - -feature.createDialog = function(dialog,x,y,r) - --local dialog = r2.newComponent("Piece") - local nbNpc = table.getn(dialog.Npcs) - local pas = (2 * math.pi) / nbNpc - - local max = table.getn(dialog.Actions) - --adding the texts to the TextManager - for i=1,max do - if dialog.Actions[i].Action == "npc_say" - then - local textParam = feature.getTextParam(dialog.Actions[i].Parameters) - debugInfo("Text param: "..textParam) - local entry=r2.registerText(textParam) - dialog.Actions[i].Parameters = entry.InstanceId - debugInfo("New params: "..dialog.Actions[i].Parameters) - end - end - return dialog -end - -feature.getTextParam = function(param) - debugInfo("param:: "..param) - local pos=string.find(param,"\n") - if pos==nil - then - return param - else - return string.sub(param,pos+1) - end -end - -feature.setTextParam = function(param,value) - local pos=string.find(param,"\n") - if pos==nil - then - return param - else - local st = string.sub(param,1,pos) - st = st..value - return st - end -end - -feature.removeDialog = function(dialog) - local max = table.getn(dialog.Actions) - for i=1,max do - if dialog.Actions[i].Action == "npc_say" - then - r2.unregisterText(dialog.Actions[i].Parameters) - end - end -end - -feature.TranslateEntry = function(context) - local entry = context.Component - local multi_actions = r2.newComponent("RtNpcEventHandlerAction") - multi_actions.Action = "multi_actions" - local parameters = entry.Parameters - local getRtId = r2.Features["TextManager"].getRtId - if entry.Action == "npc_say" - then - parameters = getRtId(context,parameters) - debugInfo("npc_say:: "..parameters) - end - local action = Actions.createAction(entry.Action,parameters,entry.Who) - table.insert(multi_actions.Children,action) - - - action = Actions.createAction("set_timer_t0",entry.Time) - table.insert(multi_actions.Children,action) - return multi_actions -end - -feature.loop = function(name) - action = Actions.createAction("begin_state",name) - return action -end - -feature.Translator = function(context) - local actions = context.Feature.Actions - local max = table.getn(actions) - local switch_action = r2.newComponent("RtNpcEventHandlerAction") - local endAction - local action - --endAction = feature.loop("init_"..context.Feature.Name) - endAction = feature.loop("dialog") - switch_action.Action="switch_actions" - switch_action.Parameters = "v0" - - - for i=1,max do - context.Component = actions[i] - local tmpAction = feature.TranslateEntry(context) - table.insert(switch_action.Children,tmpAction) - end - table.insert(switch_action.Children,endAction) - table.insert(context.RtAct.Actions,switch_action) - - ---states creation - local aiState = r2.newComponent("RtAiState") - aiState.Name = "dialog" - table.insert(context.RtAct.AiStates, aiState) - --aiState = r2.newComponent("RtAiState") - --aiState.Name = "init_"..context.Feature.Name - --table.insert(context.RtAct.AiStates, aiState) - - ---next action - local event - event = Actions.createEvent("timer_t0_triggered","dialog") - table.insert(context.RtAct.Events,event) - local multi_action = r2.newComponent("RtNpcEventHandlerAction") - multi_action.Action = "multi_actions" - table.insert(multi_action.Children,switch_action) - action = Actions.createAction("modify_variable","v0 + 1") - table.insert(multi_action.Children,action) - table.insert(context.RtAct.Actions,multi_action) - table.insert(event.ActionsId,multi_action.Id) - - ---action - event = Actions.createEvent("start_of_state","dialog") - local m_action = r2.newComponent("RtNpcEventHandlerAction") - m_action.Action = "multi_actions" - table.insert(context.RtAct.Actions,m_action) - action = Actions.createAction("modify_variable","v0 = 0") - table.insert(m_action.Children,action) - action = Actions.createAction("set_timer_t0","1") - table.insert(m_action.Children,action) - table.insert(event.ActionsId,m_action.Id) - table.insert(context.RtAct.Events,event) - -end - - -feature.Translator2 = function(context) - local actions = context.Feature.Actions - local max = table.getn(actions) - local switch_action = r2.newComponent("RtNpcEventHandlerAction") - local endAction - - endAction = feature.loop("init_"..context.Feature.Name) - - switch_action.Action="switch_actions" - switch_action.Parameters = "v0" - - - for i=1,max do - context.Component = actions[i] - local tmpAction = feature.TranslateEntry(context) - table.insert(switch_action.Children,tmpAction) - end - table.insert(switch_action.Children,endAction) - table.insert(context.RtAct.Actions,switch_action) - - ---states creation - local aiState = r2.newComponent("RtAiState") - aiState.Name = "dialog" - table.insert(context.RtAct.AiStates, aiState) - aiState = r2.newComponent("RtAiState") - aiState.Name = "init_"..context.Feature.Name - table.insert(context.RtAct.AiStates, aiState) - ---next action - local event - event = Actions.createEvent("timer_t0_triggered","dialog") - table.insert(context.RtAct.Events,event) - local multi_action = r2.newComponent("RtNpcEventHandlerAction") - multi_action.Action = "multi_actions" - local action = Actions.createAction("modify_variable","v0 + 1") - table.insert(multi_action.Children,action) - action = Actions.createAction("begin_state","dialog") - table.insert(multi_action.Children,action) - table.insert(context.RtAct.Actions,multi_action) - table.insert(event.ActionsId,multi_action.Id) - ---dialog start - event = Actions.createEvent("start_of_state","init_"..context.Feature.Name) - local m_action = r2.newComponent("RtNpcEventHandlerAction") - m_action.Action = "multi_actions" - action = Actions.createAction("modify_variable","v0 = 0") - table.insert(m_action.Children,action) - action = Actions.createAction("begin_state","dialog") - table.insert(m_action.Children,action) - table.insert(context.RtAct.Actions,m_action) - table.insert(event.ActionsId,m_action.Id) - table.insert(context.RtAct.Events,event) - ---action - event = Actions.createEvent("start_of_state","dialog") - table.insert(event.ActionsId,switch_action.Id) - table.insert(context.RtAct.Events,event) - -end - - - -return feature -end - -r2.Features["Piece"] = registerFeature() - - diff --git a/code/ryzom/common/data_common/r2/r2_plot_item.lua b/code/ryzom/common/data_common/r2/r2_plot_item.lua deleted file mode 100644 index da6530169..000000000 --- a/code/ryzom/common/data_common/r2/r2_plot_item.lua +++ /dev/null @@ -1,472 +0,0 @@ --- plot items. They are global to the scenario and can be given --- by the DM to players - --- //////////////////////////////// --- // PLOT ITEM CLASS DEFINITION // --- //////////////////////////////// - -local maxNumPlotItems = tonumber(getDefine("r2ed_max_num_plot_items")) -local maxNumPlotItemSheets = tonumber(getDefine("r2ed_max_num_plot_item_sheets")) - -local plotItem = -{ - BaseClass = "BaseClass", - Name = "PlotItem", - DisplayerUI = "R2::CDisplayerLua", -- name of the C++ class that displays this object in the ui - DisplayerUIParams = "plotItemDisplayer", -- parameters passed to the ui displayer when it is created - Menu="ui:interface:r2ed_base_menu", - Prop = - { - { Name="SheetId", Type="Number", Visible=false }, - { Name="Name", Type="String", MaxNumChar="32", MaxNumChar="32"}, - { Name="Desc", Type="String" }, - { Name="Comment", Type="String" }, - }, - -- rollout header : allows to view & change the item sheet - PropertySheetHeader = - [[ - - ]], -} - --- from base class -function plotItem.isGlobalObject(this) - return true -end - - -local plotItemNamePrefix = i18n.get("uiR2EDPlotItemNamePrefix") - - -function plotItem.getDisplayName(this) - r2.ScratchUCStr:fromUtf8(this.Name) - return concatUCString(plotItemNamePrefix, r2.ScratchUCStr) -end - -function plotItem.isNextSelectable(this) - return true -end - ---------------------------------------------------------------------------------------------------------- --- get select bar type -function plotItem.SelectBarType(this) - return i18n.get("uiR2EDPlotItems"):toUtf8() -end - ---------------------------------------------------------------------------------------------------------- --- get first parent that is selectable in the select bar -function plotItem.getFirstSelectBarParent(this) - return r2:getCurrentAct() -end - -function plotItem.getSelectBarIcon(this) - return "ICO_mission_purse.tga" -end - -r2.registerComponent(plotItem) - - - --- ///////////// --- // PRIVATE // --- ///////////// - -local itemUCName = ucstring() -- keep a ucstring to avoid creation of string on the fly -local itemUCDesc = ucstring() -- keep a ucstring to avoid creation of string on the fly -local itemUCComment = ucstring() -- keep a ucstring to avoid creation of string on the fly - -local plotItemSheetToDBPath = {} - -local plotItemSheetNbRef = {} -- for each plot item sheet, store the number of references on it - -- each sheet must be use 0 or 1 time in the scenario - -- a ref count > 1 may happen during concurrent edition - -- in which case the user should be warned that some items are duplicated - -local validItemColor = CRGBA(255, 255, 255) -local duplicatedItemColor = CRGBA(255, 0, 0) - --- ///////////////////////// --- // PLOT ITEM DISPLAYER // --- ///////////////////////// - --- Plot item displayer, shared between items -r2.PlotItemDisplayerCommon = {} - - - ----------------------------------------------------------------------------- --- update name for tooltip display + availability -function r2.PlotItemDisplayerCommon:updateNameAndAvailability(instance, sheetId) - if plotItemSheetNbRef[sheetId] == 0 then - r2:setPlotItemInfos(sheetId, i18n.get("uiR2EDPlotItemDefaultName"), ucstring(), ucstring()) - setDbProp(plotItemSheetToDBPath[sheetId], sheetId) -- available again - elseif plotItemSheetNbRef[sheetId] > 1 then - -- duplicated slot, may happen during concurrent edition (bad luck) - r2:setPlotItemInfos(sheetId, i18n.get("uiR2EDDuplicatedPlotItemName"), ucstring(), ucstring()) - setDbProp(plotItemSheetToDBPath[sheetId], 0) -- available again - r2.PlotItemDisplayerCommon:touch() -- force to refresh the icon display - else - itemUCName:fromUtf8(instance.Name) - itemUCDesc:fromUtf8(instance.Desc) - itemUCComment:fromUtf8(instance.Comment) - r2:setPlotItemInfos(sheetId, itemUCName, itemUCDesc, itemUCComment) - setDbProp(plotItemSheetToDBPath[sheetId], 0) -- available again - end -end - ----------------------------------------------------------------------------- --- add a reference on a sheet id for a r2 plot item -function r2.PlotItemDisplayerCommon:addRef(sheetId) - assert(plotItemSheetNbRef[sheetId] >= 0) - plotItemSheetNbRef[sheetId] = plotItemSheetNbRef[sheetId] + 1 -end - ----------------------------------------------------------------------------- --- remove a reference on a sheet id for a r2 plot item --- add a reference on a sheet id -function r2.PlotItemDisplayerCommon:decRef(sheetId) - assert(plotItemSheetNbRef[sheetId] > 0) - plotItemSheetNbRef[sheetId] = plotItemSheetNbRef[sheetId] - 1 -end - - ----------------------------------------------------------------------------- --- show the property window and allows to edit the plot item name -function r2.PlotItemDisplayerCommon:editPlotItemName(instance) - r2:setSelectedInstanceId(instance.InstanceId) - r2:showProperties(instance) - local propWindow = r2.CurrentPropertyWindow - -- tmp : quick & dirty access to the widget ... - if propWindow.active then - propWindow:blink(1) - local editBox = propWindow:find("Name"):find("eb") - if editBox then - setCaptureKeyboard(editBox) - editBox:setSelectionAll() - end - end -end - ----------------------------------------------------------------------------- -function r2.PlotItemDisplayerCommon:onPostCreate(instance) - self:touch() - setDbProp(plotItemSheetToDBPath[instance.SheetId], 0) -- not available for other plot items - -- if created by this client, prompt to enter the name - if instance.User.SelfCreate then - instance.User.SelfCreate = nil - self:editPlotItemName(instance) - end - -- - if instance.User.AddedMsg then - instance.User.AddedMsg = nil - displaySystemInfo(i18n.get("uiR2EDPlotItemAdded"), "BC") - r2.PlotItemsPanel:pop() - end - -- - instance.User.OldSheetId = instance.SheetId - self:addRef(instance.SheetId) - self:updateNameAndAvailability(instance, instance.SheetId) - if instance == r2:getSelectedInstance() then - self:updatePropWindow(instance) - end -end - ----------------------------------------------------------------------------- -function r2.PlotItemDisplayerCommon:onErase(instance) - self:touch() - self:decRef(instance.SheetId) - self:updateNameAndAvailability(instance, instance.SheetId) - if instance == r2.PlotItemsPanel.ItemSelectCaller then - -- discard item selection window if it was opened - getUI("ui:interface:r2ed_choose_plot_item").active = false - self.ItemSelectCaller = nil - end -end - ----------------------------------------------------------------------------- -function r2.PlotItemDisplayerCommon:onSelect(instance, selected) - self:touch() - if selected then - self:updatePropWindow(instance) - end - getUI("ui:interface:r2ed_scenario"):find("delete_plot_item").frozen = not selected - getUI("ui:interface:r2ed_scenario"):find("plot_item_properties").frozen = not selected -end - ----------------------------------------------------------------------------- -function r2.PlotItemDisplayerCommon:updatePropWindow(instance) - -- change the icon displayed in the property sheet - setDbProp("LOCAL:R2:CURR_PLOT_ITEM:SHEET", instance.SheetId) - -- get the property window, maybe not shown yet ... - local propWindow = getUI(r2:getDefaultPropertySheetUIPath("PlotItem")) - -- update color of the sheet in the property window - if propWindow then - self:updateSheetColor(propWindow:find("item_sheet"), instance.SheetId) - end -end - ----------------------------------------------------------------------------- -function r2.PlotItemDisplayerCommon:onAttrModified(instance, attributeName, indexInArray) - self:touch() - if attributeName == "SheetId" then - self:decRef(instance.User.OldSheetId) - self:updateNameAndAvailability(instance, instance.User.OldSheetId) - self:addRef(instance.SheetId) - instance.User.OldSheetId = instance.SheetId - self:updateNameAndAvailability(instance, instance.SheetId) - if instance == r2:getSelectedInstance() then - self:updatePropWindow(instance) - end - end - if attributeName == "Name" or attributeName == "Desc" or attributeName == "Comment" then - self:updateNameAndAvailability(instance, instance.SheetId) - end -end - - ----------------------------------------------------------------------------- -function r2.PlotItemDisplayerCommon:touch() - -- update will be done in main loop only - r2.UIMainLoop.PlotItemsModified = true -end - ----------------------------------------------------------------------------- -function r2.PlotItemDisplayerCommon:updateSheetColor(slot, sheetId) - if plotItemSheetNbRef[sheetId] and plotItemSheetNbRef[sheetId] > 1 then - slot.color = duplicatedItemColor - else - slot.color = validItemColor - end -end - ----------------------------------------------------------------------------- -function r2.PlotItemDisplayerCommon:updateAll() - if r2.Mode ~= "Edit" then return end - r2.PlotItemsPanel.Locked = true - local window = getUI("ui:interface:r2ed_scenario") - local groupListSheet = window:find("plot_items_list") - -- update db sheets for items display - local index = 0 - for k, v in specPairs(r2.Scenario.PlotItems) do - setDbProp("LOCAL:R2:PLOT_ITEMS:" .. tostring(index) ..":SHEET", v.SheetId) - local slot = groupListSheet["item_" .. tostring(index)] - slot.but.pushed = (v == r2:getSelectedInstance()) -- update selection - itemUCName:fromUtf8(v.Name) - self:updateSheetColor(slot.sheet, v.SheetId) - slot.t.uc_hardtext = itemUCName - slot.t.global_color = true - slot.active=true - index = index + 1 - end - -- last slot is the "create new item" slot - if index <= maxNumPlotItems - 1 then - -- special sheet here for new item creation - --setDbProp("LOCAL:R2:PLOT_ITEMS:" .. tostring(index) ..":SHEET", getSheetId("r2_create_new_plot_item.sitem")) - setDbProp("LOCAL:R2:PLOT_ITEMS:" .. tostring(index) ..":SHEET", 0) - local slot = groupListSheet["item_" .. tostring(index)] - slot.but.pushed = false - slot.active=true - slot.t.uc_hardtext = i18n.get("uiR2EDCreateNewItem") - slot.t.global_color = false - slot.sheet.color = validItemColor - window:find("new_plot_item").frozen = false - index = index + 1 - else - window:find("new_plot_item").frozen = true - end - -- remove remaining sheets - while index < maxNumPlotItems do - setDbProp("LOCAL:R2:PLOT_ITEMS:" .. tostring(index) ..":SHEET", 0) - local slot = groupListSheet["item_" .. tostring(index)] - slot.active=false - index = index + 1 - end - r2.PlotItemsPanel.Locked = false -end - - --- Displayer ctor, just return a ref on the shared displayer --- Works because we don't store per displayer infos -function r2:plotItemDisplayer() - return r2.PlotItemDisplayerCommon -end - --- /////////////////////////// --- // PLOT ITEM UI HANDLING // --- /////////////////////////// - - --- UI part -r2.PlotItemsPanel = -{ - Locked = false, -- flag to avoid recursive selection - CreateMode = "", - ItemSelectCaller = nil, -- last plot item that called the 'select item' window (or nil if a new item is created) - TargetRefId = -- if CreateMode is "CreateNewAndAffectToRefId", gives the name of the refid to which the item should be affected - { - Name="", - ParentInstanceId = "" - } -} - - ----------------------------------------------------------------------------- -function r2.PlotItemsPanel:selectItem(index) - if r2.PlotItemsPanel.Locked then return end -- this is a false selection - -- we can't use the sheet here, because concurrent edition may lead to duplicated sheets - -- here, a case that wecan resolve only when the scenario is about to be launched... - if index > r2.Scenario.PlotItems.Size then - debugInfo("bad item index") - end - if index == r2.Scenario.PlotItems.Size then - -- this is the creation slot - r2:setSelectedInstanceId("") - enableModalWindow(getUICaller(), "ui:interface:r2ed_choose_plot_item") - getUICaller().parent.but.pushed= false - self.CreateMode = "CreateNew" - self.ItemSelectCaller = nil - else - -- a new item is selected for real - r2:setSelectedInstanceId(r2.Scenario.PlotItems[index].InstanceId) - r2.PlotItemDisplayerCommon:touch() - end -end - ----------------------------------------------------------------------------- --- for plot item ref. widget (see r2.PlotItemsWidget) : pop the item creation --- window, then affect the created widget to a refid (with name 'refIdName' in object with id 'targetInstanceId') -function r2.PlotItemsPanel:createNewItemAnAffectToRefId(instanceId, refIdName) - if r2.Scenario.PlotItems.Size >= maxNumPlotItems then - displaySystemInfo(i18n.get("uiR2EDNoMorePlotItems"), "BC") - self:pop() - return - end - enableModalWindow(getUICaller(), "ui:interface:r2ed_choose_plot_item") - self.CreateMode = "CreateNewAndAffectToRefId" - self.ItemSelectCaller = nil - self.TargetRefId.Name = refIdName - self.TargetRefId.ParentInstanceId = instanceId -end - ----------------------------------------------------------------------------- -function r2.PlotItemsPanel:changeItem(index) - self:selectItem(index) - -- this is the creation slot - if index == r2.Scenario.PlotItems.Size then - self.CreateMode = "CreateNew" - self.ItemSelectCaller = nil - else - self.CreateMode = "Modify" - self.ItemSelectCaller = r2.Scenario.PlotItems[index] - end - enableModalWindow(getUICaller(), "ui:interface:r2ed_choose_plot_item") - self.ChangeIndex = index - - local window = getUI("ui:interface:r2ed_scenario") - local groupListSheet = window:find("plot_items_list") - if index <= maxNumPlotItems - 1 then - local slot = groupListSheet["item_" .. tostring(index)] - slot.but.pushed = false - end -end - ----------------------------------------------------------------------------- -function r2.PlotItemsPanel:rightClickItem(index) - if r2.PlotItemsPanel.Locked then return end -- this is a false selection - -- we can't use the sheet here, because concurrent edition may lead to duplicated sheets - -- here, a case that wecan resolve only when the scenario is about to be launched... - if index > r2.Scenario.PlotItems.Size then - debugInfo("bad item index") - end - if index == r2.Scenario.PlotItems.Size then - -- this is the creation slot -> no-op - return - else - -- a new item is selected for real - r2:setSelectedInstanceId(r2.Scenario.PlotItems[index].InstanceId) - r2:displayContextMenu() - end -end - ----------------------------------------------------------------------------- --- private -function r2.PlotItemsPanel:createNewItem(sheetDbPath) - local sheetId = getDbProp(sheetDbPath .. ":SHEET") - if self.CreateMode == "CreateNew" then - local newItem = self:requestNewItem(sheetId) - -- since created from this client, add a cookie to pop the property window when the item is created for real - r2:setCookie(newItem.InstanceId, "SelfCreate", true) - elseif self.CreateMode == "CreateNewAndAffectToRefId" then - r2.requestNewAction(i18n.get("uiR2EDCreatePlotItemAction")) - local newItem = self:requestNewItem(sheetId) - r2:setCookie(newItem.InstanceId, "AddedMsg", true) - r2.requestSetNode(self.TargetRefId.ParentInstanceId, self.TargetRefId.Name, newItem.InstanceId) - else - r2.requestNewAction(i18n.get("uiR2EDChangeIconAction")) - r2.requestSetNode(r2.Scenario.PlotItems[self.ChangeIndex].InstanceId, "SheetId", sheetId) - end -end - ----------------------------------------------------------------------------- --- private: create a new item in the plot item list -function r2.PlotItemsPanel:requestNewItem(sheetId) - r2.requestNewAction(i18n.get("uiR2EDCreateNewPlotItemAction")) - local newItem = r2.newComponent("PlotItem") - newItem.SheetId = sheetId - newItem.Name = i18n.get("uiR2EDPlotItemDefaultName"):toUtf8() - newItem.Desc = "" - newItem.Comment = "" - r2.requestInsertNode(r2.Scenario.InstanceId, "PlotItems", -1, "", newItem) - return newItem -end - ----------------------------------------------------------------------------- -function r2.PlotItemsPanel:reinit() - -- map sheetid to the good slot in the db - plotItemSheetToDBPath = {} - plotItemSheetNbRef = {} - --local window = getUI("ui:interface:r2ed_scenario") - --local groupListSheet = window:find("plot_items_list") - for k = 0, maxNumPlotItemSheets - 1 do - local refDbPath = "LOCAL:R2:REFERENCE_PLOT_ITEMS:" .. tostring(k) ..":SHEET" - local availableDbPath = "LOCAL:R2:AVAILABLE_PLOT_ITEMS:" .. tostring(k) ..":SHEET" - local sheetId = getDbProp(refDbPath) - local defaultPlotItemName = i18n.get("uiR2EDPlotItemDefaultName") - if sheetId ~= 0 then - plotItemSheetToDBPath[sheetId] = availableDbPath - plotItemSheetNbRef[sheetId] = 0 - r2:setPlotItemInfos(sheetId, defaultPlotItemName, ucstring(), ucstring()) - setDbProp(availableDbPath, getDbProp(refDbPath)) - end - --local slot = groupListSheet["item_" .. tostring(k)] - --slot.active = false - end - -- empty all slots - for k = 0, maxNumPlotItems - 1 do - setDbProp("LOCAL:R2:PLOT_ITEMS:" .. tostring(k) .. ":SHEET", 0) - end - -- - getUI("ui:interface:r2ed_scenario"):find("delete_plot_item").frozen = true - getUI("ui:interface:r2ed_scenario"):find("plot_item_properties").frozen = true -end - ----------------------------------------------------------------------------- --- pop the plot item tab -function r2.PlotItemsPanel:pop() - local scenarioWnd = getUI("ui:interface:r2ed_scenario") - if not scenarioWnd.active or scenarioWnd:find("scenario_tabs").selection ~= 3 then - scenarioWnd.active = 1 - scenarioWnd:blink(1) - scenarioWnd:find("scenario_tabs").selection = 3 - end -end - diff --git a/code/ryzom/common/data_common/r2/r2_prim_render.lua b/code/ryzom/common/data_common/r2/r2_prim_render.lua deleted file mode 100644 index fac48cdeb..000000000 --- a/code/ryzom/common/data_common/r2/r2_prim_render.lua +++ /dev/null @@ -1,304 +0,0 @@ --- Definition file for primitives rendering - --- enums -r2.PrimRender = {} -r2.PrimRender.Shape = { Star = 0, PolyLine = 1, ClosedPolyLine = 2 } -r2.PrimRender.WrapMode = -{ - Repeat = 0, - Centered = 1, -- centered & clamped texture - Scaled = 2 -- the texture corver the whole quad surface on the world map (not supported for decals, resumes to Repeat) -} - - --- definition of a primitive look --- should be passed as a parameter to the visual displayer of type R2ED::CDisplayerVisualGroup -r2.DefaultPrimLook = -{ - Shape = r2.PrimRender.Shape.Star, - VertexShapeName = "", - VertexShapeScale = 1, - VertexLook = - { - DecalTexture = "", - DecalSize = 1, - DecalColor = CRGBA(255, 255, 255), - DecalDistToEdgeDecal = 0, - WorldMapTexture = "", - WorldMapColor = CRGBA(255, 255, 255) - }, - FirstVertexLook = - { - DecalTexture = "", - DecalSize = 1, - DecalColor = CRGBA(255, 255, 255), - DecalDistToEdgeDecal = 0, - WorldMapTexture = "", - WorldMapColor = CRGBA(255, 255, 255) - }, - EdgeLook = - { - ShapeName = "", - ShapeScale = 1, - DecalTexture = "", - DecalUScale = 1, - DecalWidth = 1, - WorldMapTexture = "", - WorldMapWidth = 0, - WorldMapColor = CRGBA(255, 255, 255), - WrapMode = r2.PrimRender.WrapMode.Repeat, - VorldMapFiltered = true - }, - LastEdgeIsValid = true -} - --- look for region -r2.PrimRender.RegionLook = -{ - Shape = r2.PrimRender.Shape.ClosedPolyLine, - VertexLook = - { - }, - EdgeLook = - { - DecalTexture = "r2_zone_edge.tga", - DecalColor = CRGBA(0, 255, 0, 255), - DecalUScale = 2, - DecalWidth = 0.1, - WrapMode = r2.PrimRender.WrapMode.Repeat, - WorldMapTexture = "r2_map_zone_edge.tga", - WorldMapWidth = 1, - WorldMapColor = CRGBA(0, 255, 0, 255) - } -} - --- look for invalid region (self intersecting) -r2.PrimRender.RegionInvalidLook = -{ - Shape = r2.PrimRender.Shape.ClosedPolyLine, - VertexLook = - { - DecalTexture = "r2_zone_vertex_invalid.tga", - DecalSize = 0.2, - }, - EdgeLook = - { - DecalTexture = "r2_zone_edge.tga", - DecalColor = CRGBA(255, 0, 255), - DecalUScale = 2, - DecalWidth = 0.1, - WrapMode = r2.PrimRender.WrapMode.Repeat, - WorldMapTexture = "r2_map_edge_stipple.tga", - WorldMapWrapMode = r2.PrimRender.WrapMode.Repeat, - WorldMapUScale = 0.5, - WorldMapWidth = 1, - WorldMapColor = CRGBA(127, 127, 127) - } -} - --- look for region being drawn -r2.PrimRender.RegionCreateLook = clone(r2.PrimRender.RegionLook) -r2.PrimRender.RegionCreateLook.VertexShapeName = "r2_region_vertex.shape" -r2.PrimRender.RegionCreateLook.VertexShapeScale = 0.25 -r2.PrimRender.RegionCreateLook.VertexShapeScale = 0.25 -r2.PrimRender.RegionCreateLook.VertexLook.WorldMapTexture ="r2_icon_map_entity_small.tga" -r2.PrimRender.RegionCreateLook.Shape = r2.PrimRender.Shape.PolyLine ---r2_icon_map_entity_small.tga -r2.PrimRender.RegionCreateInvalidLook= clone(r2.PrimRender.RegionInvalidLook) -r2.PrimRender.RegionCreateInvalidLook.VertexShapeName = "" -r2.PrimRender.RegionCreateInvalidLook.Shape = r2.PrimRender.Shape.PolyLine -r2.PrimRender.RegionCreateInvalidLook.VertexLook.WorldMapTexture ="r2_icon_map_entity_small.tga" -r2.PrimRender.RegionCreateInvalidLook.EdgeLook.WorldMapColor = CRGBA(255, 0, 0) --- look when a region can be closed (mouse is on first vertex and there are at least 3 points) -r2.PrimRender.RegionCreateCanCloseLook = clone(r2.PrimRender.RegionCreateLook) -r2.PrimRender.RegionCreateCanCloseLook.EdgeLook.DecalColor = CRGBA(255, 255, 0) -r2.PrimRender.RegionCreateCanCloseLook.EdgeLook.WorldMapColor = CRGBA(255, 255, 0) -r2.PrimRender.RegionCreateCanCloseLook.VertexLook.WorldMapTexture ="r2_icon_map_entity_small.tga" -r2.PrimRender.RegionCreateCanCloseLook.Shape = r2.PrimRender.Shape.ClosedPolyLine - - - --- look for road -r2.PrimRender.RoadLook = -{ - Shape = r2.PrimRender.Shape.PolyLine, - VertexLook = - { - }, - EdgeLook = - { - DecalTexture = "r2_path.tga", - DecalColor = CRGBA(0, 127, 255, 160), - DecalUScale = 0.25, - DecalWidth = 0.4, - DecalWrapMode = r2.PrimRender.WrapMode.Repeat, - WorldMapTexture = "r2_map_edge_arrow.tga", - WorldMapWrapMode = r2.PrimRender.WrapMode.Centered, - WorldMapUScale = 0.3, - WorldMapWidth = 3.5, - WorldMapColor = CRGBA(0, 127, 255, 160) - }, - ClipDownFacing = true -} - -r2.PrimRender.RoadLookInvalid = clone(r2.PrimRender.RegionInvalidLook) -r2.PrimRender.RoadLookInvalid.EdgeLook.WorldMapColor = CRGBA(127, 127, 127, 127) -r2.PrimRender.RoadLookInvalid.EdgeLook.WorldMapTexture = "r2_map_edge_stipple.tga" -r2.PrimRender.RoadLookInvalid.Shape = r2.PrimRender.Shape.PolyLine -r2.PrimRender.RoadLookInvalid.ClipDownFacing = true - -r2.PrimRender.RoadLookInaccessible = clone(r2.PrimRender.RoadLookInvalid) -r2.PrimRender.RoadLookInaccessible.EdgeLook.WorldMapTexture = "*accessibility_texture*" -r2.PrimRender.RoadLookInaccessible.EdgeLook.DecalTexture = "*accessibility_texture*" -r2.PrimRender.RoadLookInaccessible.EdgeLook.WorldMapcolor = CRGBA(255, 0, 255, 255) -r2.PrimRender.RoadLookInaccessible.EdgeLook.WorldMapWidth = 2 -r2.PrimRender.RoadLookInaccessible.EdgeLook.WorldMapFiltered = false -r2.PrimRender.RoadLookInaccessible.EdgeLook.DecalFiltered = false -r2.PrimRender.RoadLookInaccessible.ClipDownFacing = true - - - - - --- look for road being drawn -r2.PrimRender.RoadCreateLook = clone(r2.PrimRender.RoadLook) -r2.PrimRender.RoadCreateLook.VertexShapeName = "r2_road_flag.shape" -r2.PrimRender.RoadCreateLook.VertexShapeScale = 0.4 -r2.PrimRender.RoadCreateLook.VertexLook.WorldMapTexture ="r2_icon_map_entity_small.tga" -r2.PrimRender.RoadCreateInvalidLook = clone(r2.PrimRender.RegionCreateInvalidLook) - - - --- look for group -r2.PrimRender.GroupLook = -{ - Shape = r2.PrimRender.Shape.Star, - VertexLook = - { - DecalTexture = "r2_selection_circle.tga", - DecalSize = 0.5, - DecalDistToEdgeDecal = 0.45, - DecalColor = CRGBA(0, 255, 0, 255), - }, - FirstVertexLook = - { - DecalTexture = "r2_selection_circle_double.tga", - DecalSize = 0.7, - DecalDistToEdgeDecal = 0.62, - DecalColor = CRGBA(0, 255, 0, 255), - }, - EdgeLook = - { - DecalTexture = "r2_arrow.tga", - DecalUScale = 0.5, - DecalWidth = 0.4, - DecalWrapMode = r2.PrimRender.WrapMode.Centered, - DecalColor = CRGBA(0, 255, 0, 255), - WorldMapTexture = "r2_map_edge_arrow.tga", - WorldMapWrapMode = r2.PrimRender.WrapMode.Centered, - WorldMapUScale = -0.6, - WorldMapWidth = 2.5, - WorldMapColor = CRGBA(0, 255, 0, 160) - }, - ClipDownFacing = true -} - --- look for auto group -r2.PrimRender.AutoGroupLook = clone(r2.PrimRender.GroupLook) -r2.PrimRender.AutoGroupLook.VertexLook.DecalColor = CRGBA(0, 255, 0, 80) -r2.PrimRender.AutoGroupLook.FirstVertexLook.DecalColor = CRGBA(0, 255, 0, 80) -r2.PrimRender.AutoGroupLook.EdgeLook.DecalColor = CRGBA(0, 255, 0, 80) -r2.PrimRender.AutoGroupLook.EdgeLook.WorldMapColor = CRGBA(0, 255, 0, 80) - - --- hightlight / selection boxs -r2.PrimRender.SelectBoxLook = -{ - Shape = r2.PrimRender.Shape.ClosedPolyLine, - VertexLook = - { - DecalTexture = "r2_zone_corner.tga", - DecalSize = 0.1, - --DecalDistToEdgeDecal = 0.45, - DecalColor = CRGBA(255, 0, 0, 255), - }, - FirstVertexLook = - { - DecalTexture = "r2_zone_corner.tga", - DecalSize = 0.1, - --DecalDistToEdgeDecal = 0.62, - DecalColor = CRGBA(255, 0, 0, 255), - }, - EdgeLook = - { - DecalTexture = "r2_zone_edge.tga", - DecalUScale = 0.5, - DecalWidth = 0.1, - DecalWrapMode = r2.PrimRender.WrapMode.Centered, - DecalColor = CRGBA(255, 0, 0, 255), - WorldMapTexture = "r2_map_edge_arrow.tga", - WorldMapWrapMode = r2.PrimRender.WrapMode.Centered, - WorldMapUScale = -0.6, - WorldMapWidth = 2.5, - WorldMapColor = CRGBA(255, 0, 0, 40) - } -} - --- nb : edge colors ignored for highlight & slect box : those are taken from hightlight & select decal instead (they are animated) - -r2.PrimRender.HighlightBoxLook = clone(r2.PrimRender.SelectBoxLook) -r2.PrimRender.HighlightBoxLook.VertexLook.DecalColor = CRGBA(255, 255, 255, 255) -r2.PrimRender.HighlightBoxLook.FirstVertexLook.DecalColor = CRGBA(255, 255, 255, 255) -r2.PrimRender.HighlightBoxLook.EdgeLook.DecalColor = CRGBA(255, 255, 255, 255) -r2.PrimRender.HighlightBoxLook.EdgeLook.WorldMapColor = CRGBA(255, 255, 255, 40) - - -r2.PrimRender.SelectBoxLook.EdgeLook.DecalTexture = "r2_select_edge.tga" -r2.PrimRender.SelectBoxLook.EdgeLook.DecalUScale = 2 -r2.PrimRender.SelectBoxLook.EdgeLook.DecalWidth = 0.15 -r2.PrimRender.SelectBoxLook.VertexLook.DecalSize = 0.15 -r2.PrimRender.SelectBoxLook.FirstVertexLook.DecalSize = 0.15 - - -r2.PrimRender.ComponentRegionLook = -{ - Shape = r2.PrimRender.Shape.ClosedPolyLine, - VertexLook = - { - }, - EdgeLook = - { - DecalTexture = "r2_zone_edge.tga", - DecalColor = CRGBA(0, 255, 0, 127), - DecalUScale = 2, - DecalWidth = 0.1, - WrapMode = r2.PrimRender.WrapMode.Repeat, - WorldMapTexture = "r2_map_zone_edge.tga", - WorldMapWidth = 1, - WorldMapColor = CRGBA(0, 255, 0, 32) - } -} - -r2.PrimRender.ComponentRegionInvalidLook = -{ - Shape = r2.PrimRender.Shape.ClosedPolyLine, - VertexLook = - { - }, - EdgeLook = - { - DecalTexture = "r2_zone_edge.tga", - DecalColor = CRGBA(255, 0, 0, 127), - DecalUScale = 2, - DecalWidth = 0.1, - WrapMode = r2.PrimRender.WrapMode.Repeat, - WorldMapTexture = "r2_map_edge_stipple.tga", - WorldMapWrapMode = r2.PrimRender.WrapMode.Repeat, - WorldMapUScale = 0.5, - WorldMapWidth = 1, - WorldMapColor = CRGBA(255, 0, 0, 32) - } -} - - - diff --git a/code/ryzom/common/data_common/r2/r2_refid.lua b/code/ryzom/common/data_common/r2/r2_refid.lua deleted file mode 100644 index 7c3159d22..000000000 --- a/code/ryzom/common/data_common/r2/r2_refid.lua +++ /dev/null @@ -1,24 +0,0 @@ --- A reference id : object like a string but for reference ids - - -r2.RefIdMetatable = -{ - __eq = function(op1, op2) return op1.Value == op2.Value end, - __le = function(op1, op2) return op1.Value <= op2.Value end, - __lt = function(op1, op2) return op1.Value < op2.Value end, - __tostring = function(op) return op.Value end -} - - - -function r2.RefId(value) - assert(value ~= r2) -- in case of r2:RefId(value) - if value == nil then value = "" end - local refId = { Value = tostring(value) } - setmetatable(refId, r2.RefIdMetatable) - return refId -end - -function r2.isRefId(value) - return type(value) == "table" and getmetatable(value) == r2.RefIdMetatable -end diff --git a/code/ryzom/common/data_common/r2/r2_ring_access.xml b/code/ryzom/common/data_common/r2/r2_ring_access.xml deleted file mode 100644 index d3daeca74..000000000 --- a/code/ryzom/common/data_common/r2/r2_ring_access.xml +++ /dev/null @@ -1,2211 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_scenario.lua b/code/ryzom/common/data_common/r2/r2_scenario.lua deleted file mode 100644 index 04db6d467..000000000 --- a/code/ryzom/common/data_common/r2/r2_scenario.lua +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_texts.lua b/code/ryzom/common/data_common/r2/r2_texts.lua deleted file mode 100644 index 279072535..000000000 --- a/code/ryzom/common/data_common/r2/r2_texts.lua +++ /dev/null @@ -1,164 +0,0 @@ -local registerFeature = function() - local feature = {} - feature.Name = "TextManager" - - feature.Description = "A little texts manager" - feature.Components= - { - { - Name="TextManager", - Prop= - { - {Name="InstanceId",Type="String"}, - {Name="Texts",Type="Table"}, - } - }, - { - Name="TextManagerEntry", - Prop= - { - {Name="InstanceId", Type="String" }, - {Name="Text",Type="String"}, - {Name="Count",Type="Number"} - } - } - - } - - - --returns nil if the text is still in the textManager - --else, return a new entry, not inserted in the TextManager - feature.checkText = function(textManager,text) - local texts = r2.Scenario.Texts.Texts - k,entry = next(texts,nil) - while k ~=nil do - local textEntry = entry.Text - if textEntry==text - then - return entry - end - k,entry = next(texts,k) - end - entry = r2.newComponent("TextManagerEntry") - entry.Text=text - entry.Count=0 - return entry - end - - feature.getText = function (textManager, entry) - - debugInfo("feature.getText") - - for i=0, textManager.Texts.Size-1 do - - local text = textManager.Texts[i] - - if text.InstanceId == entry - then - return text.Text - end - end - return nil - end - - --add a text to the text manager. - --if the text exist, increment its counter - feature.addText = function(textManager,text) - local max = table.getn(textManager.Texts) - local entry - - for i=1,max do - entry = textManager.Texts[i] - if entry.Text==text - then - entry.Count = entry.Count+1 - return entry - end - end - - entry = r2.newComponent("TextManagerEntry") - entry.Text=text - entry.Count=1 - table.insert(textManager.Texts,entry) - return entry - end - - --decrement the counter of a text. - --if this counter==0, remove the text from the TextManager - feature.removeText = function(textManager, text) - - for i=0,textManager.Texts.Size-1 do - local entry = textManager.Texts[i] - if entry.Text==text then - - local newCount = entry.Count-1 - - if newCount==0 then - r2.requestEraseNode(entry.InstanceId, "", -1) - else - r2.requestSetNode(entry.InstanceId, "Count", newCount) - end - end - end - end - - - - feature.Translator = function(context) - local comp = context.Feature - local texts = context.Feature.Texts - local entry - local rtTextMgr = context.RtScenario.Texts - --for each entry - local k,v = next(texts,nil) - while v~=nil do - if k~="Keys" - then - --create and fill a RT entry - entry = r2.newComponent("RtEntryText") - entry.Text = v.Text - --insert it in the RT text manager - table.insert(rtTextMgr.Texts,entry) - local tmp = {} - table.insert(tmp,v.InstanceId) - table.insert(tmp,entry.Id) - table.insert(context.TextTranslateId,tmp) - end - k,v = next(texts,k) - end - if table.getn(context.TextTranslateId)==0 - then - debugInfo("translator:: pas d'entrees dans la table!!!") - end - end - - -- ? - feature.getRtId = function(context, instanceId) - local tab = context.TextTranslateId - assert(tab~=nil) - for k,v in pairs(tab) - do - if instanceId == v[1] - then - return v[2] - end - end - local max = table.getn(tab) - if max==0 - then - debugInfo(colorTag(255, 255, 0).."WAR: The text table is empty.") - return - end - - for i=1,max do - if instanceId == tab[i][1] - then - return tab[i][2] - end - end - end - - return feature -end - -r2.Features["TextManager"] = registerFeature() diff --git a/code/ryzom/common/data_common/r2/r2_translator.lua b/code/ryzom/common/data_common/r2/r2_translator.lua deleted file mode 100644 index e1c4701ba..000000000 --- a/code/ryzom/common/data_common/r2/r2_translator.lua +++ /dev/null @@ -1,4676 +0,0 @@ - - -if r2.Translator == nil -then - r2.Translator={} -end - -local Translator = r2.Translator - -Translator.PredatorEnemyFaction = "Player|guard|bandit|herbivore|karavan"; - --- Namespace global -function printMsg(str) - messageBox(str) - debugInfo(colorTag(255,255,0)..str) - local ucStringMsg = ucstring() - ucStringMsg:fromUtf8(str) - displaySystemInfo(ucStringMsg, "BC") - messageBox(str) -end - -function printError( str) - local msg = "Translation WRN:" - debugInfo(colorTag(255,0,0)..msg..str) --- local ucStringMsg = ucstring() --- ucStringMsg:fromUtf8(str) --- displaySystemInfo(ucStringMsg, "BC") - --messageBox(str) - assert(nil) -end - -r2.Translator.MultilineBc = {} - -function Translator.updateEachSecond() - if table.getn( Translator.MultilineBc ) > 0 then - local msg=table.remove(Translator.MultilineBc, 1) - if msg then - local ucStringMsg = ucstring() - ucStringMsg:fromUtf8(msg) - displaySystemInfo(ucStringMsg, "BC") - end - end -end - -function printMsgML(str) - local strs = r2.split(str, "\n") - for k,v in pairs(strs) do - table.insert(Translator.MultilineBc, v) - end -end ---local devMode = false -local devMode = config.R2EDExtendedDebug -local dataDevMode = false - -function printWarning( str) - local msg = "Translation Error:"..str - debugInfo(colorTag(255,0,0)..msg) - -- msg will be displayed when client is back to edition - - -- Just report the last error - if (r2.LastTranslationErrorMsg == nil) then - r2.LastTranslationErrorMsg = str - local ucStringMsg = ucstring("Translation Error") - -- ucStringMsg:fromUtf8(r2.LastTranslationErrorMsg) - displaySystemInfo(ucStringMsg, "BC") - messageBox(str) - end - if devMode then - assert(nil) - else - error(str) -- force to exit current translation - end -end - -function BOMB_IF(condition, str) - if ( not condition) then - printWarning(str) - end -end - --- Namespace r2 -function r2:getScenarioId() - local str = r2:getNamespace() - str = string.gsub(str, "r2_", "") - str = string.gsub(str, "_", "") - local sessionId = tonumber(str) - return sessionId -end - - -function r2:getActId(actIn) - assert(actIn) - local index = -1 - local actId, act = next(r2.Scenario.Acts) - while actId do - index = index + 1 - if (tostring(act.InstanceId) == tostring(actIn.InstanceId)) then return index end - actId, act = next(r2.Scenario.Acts, actId) - - end - assert(nil) - return -1 -end - - --- Namespace Translator -function Translator.getRtGroup(context, instanceId) - assert(context.RtAct) - assert( context ~= nil and type(context)=="table") - assert( instanceId ~= nil and type(instanceId) == "string") - - if context.RtGroups[instanceId]==nil - then - context.RtGroups[instanceId] = r2.newComponent("RtNpcGrp") - context.RtGroups[instanceId].Name = context.RtGroups[instanceId].Id - table.insert(context.RtAct.NpcGrps, context.RtGroups[instanceId]) - end - return context.RtGroups[instanceId] -end - -function Translator.getRtStatesNames(context, instanceId) - local rtNpcGrp = Translator.getRtGroup(context, instanceId) - - local statesNames = context.GroupStatesName[rtNpcGrp.Name] - return statesNames -end - -r2.doTranslateFeatures = function(scenario) - return Translator.doTranslateFeatures(scenario.InstanceId) -end - -r2.translateFeature = function(context) - local component = context.Feature - if (component == nil) then return end - - if component.translate ~= nil then - component:translate(context) - end -end - - -r2.translateFeatures = function(scenario) - - local rtScenario = r2.doTranslateFeatures(scenario) - r2.requestUpdateRtScenario(rtScenario) -end - - - --- creat a context (mainly RtComponent) -Translator.createContext = function(scenario) - local context = {} - context.Scenario = scenario - context.RtScenario = r2.newComponent("RtScenario") - context.TextTranslateId={} - context.Feature=scenario -- obsloete to remove - context.GroupStatesName = {} - context.GroupTriggeredActions = {} - context.Events = {} - context.ActivityStates = {} - context.RtGrps={} - context.RtGroups={} - context.CounterNames={} - context.RtCounters = {} - --context.EasterEggUniqId = {} -- RtGrpId to uniqId - context.ActIdToRtAct = {} - context.InteractingSceneryObjects = {} - return context -end - --- return the equipment of a rtNpc by looking at the visual properties of an hlNpc -Translator.translateEquipment = function(hlNpc) - local instanceId = hlNpc.InstanceId - local equipment = "" - local instance = r2:getInstanceFromId(instanceId) - - if instance:isKindOf("NpcCustom") then - equipment = equipment..r2.getVisualPropertiesFromInstanceId(instanceId); - end - - if equipment == nil then - equipment = "" - end - - local isFauna = hlNpc.IsFauna - if isFauna ~= nil and isFauna == 1 then - -- Npc with default name use default translation system name - local basename = hlNpc.Base - if basename then basename = r2.PaletteIdToTranslation[ basename ] end - if basename == nil or basename ~= hlNpc.Name then - equipment = equipment .. "FAUNA_BOT_USE_BOTNAME\n" - end - end - return equipment -end - --- get an rtNpc aiActivity from an hlNpc eg "civil" -> "normal" -Translator.getAiActivity = function(hlNpc) - assert(hlNpc and type(hlNpc) == "userdata") - local aiActivity = hlNpc.AiActivity - local profile = hlNpc.Profile - local str = "no_change" - - if profile then return "" end - - if profile ~= nil then - if profile == "bandit" then str = "bandit" end - if profile == "guard" then str = "guard" end - if profile == "civil" then str = "normal" end - elseif aiActivity ~= nil then - str = aiActivity - end - - return str; -end - --- get rtNpc from hlNpc -Translator.translateNpc = function(hlNpc, context) - - local function findInTable(instanceId) - for k, v in pairs(context.InteractingSceneryObjects) do - if v == instanceId then return true end - end - return false - end - - - assert(hlNpc and type(hlNpc) == "userdata") - local RtNpc = r2.newComponent("RtNpc") - - - RtNpc.Name = hlNpc.Name - - - RtNpc.SheetClient = hlNpc.SheetClient - - - RtNpc.Sheet = hlNpc.Sheet - if RtNpc.Sheet == nil then RtNpc.Sheet = "" end - - - - if hlNpc:isBotObject() and context and context.InteractingSceneryObjects - and findInTable(hlNpc.InstanceId) then - RtNpc.IsStuck = 0 - RtNpc.Sheet = "object_chest_wisdom_std_sel.creature" - else - RtNpc.IsStuck = hlNpc.IsStuck - end - - RtNpc.Pt = r2.getWorldPos(hlNpc) - RtNpc.Angle = hlNpc.Angle - RtNpc.Equipment = Translator.translateEquipment(hlNpc) - - local animProp = 0 - if not hlNpc:getParentAct():isBaseAct() then - animProp = animProp + 1 -- TODO test if default feature - end - - if hlNpc.IsBotObject ~= 1 then - animProp = animProp + 2 -- Living Creature - end - - if hlNpc.IsBotObject ~= 1 and hlNpc.IsPlant ~= 1 then - animProp = animProp + 4 -- Controlable creature - end - - if hlNpc.IsBotObject ~= 1 and hlNpc.IsNpc == 1 then - animProp = animProp + 8 -- Creature that talk - end - RtNpc.DmProperty = animProp - return RtNpc -end - --- Behavior: the behavior of the npc (or the leader of an group) --- translate the activitySequences of an npc/group -Translator.translateActivities = function (context, hlComponent, behavior, rtNpcGrp, aiActivity) - - assert(context) - assert(hlComponent) - assert(behavior) - assert(rtNpcGrp) - assert(aiActivity) - - local initFun = Logic.initGroupActivitiesTranslation - local translateActivitySequence = Logic.translateActivitySequence - --all the states names of all the sequences of this group - local statesNames="" - local first = true - --for each group's activity - local activityIndex = 1 - - local firstState ="" - --creation of the group's initial state - - local leader = hlComponent - if hlComponent:isKindOf("NpcGrpFeature") then - if table.getn(hlComponent.Components) >= 0 then - leader = hlComponent.Components[0] - else - leader = nil - end - end - - if table.getn(behavior.Activities) == 0 then - - - - - -- create initial and only state - local aiState = r2.newComponent("RtAiState") - statesNames = aiState.Id - r2.Utils.setState(context, behavior, aiState) - aiState.Name = hlComponent.InstanceId..".init" - aiState.AiActivity = aiActivity - table.insert(context.RtAct.AiStates, aiState) - table.insert(aiState.Children, rtNpcGrp.Id) - firstState = aiState.Id - - - else - - local k, v = next(behavior.Activities, nil) - while k do - - if (v.Class == "ActivitySequence") then - initFun(context, hlComponent, v, first, activityIndex, aiActivity, rtNpcGrp) - - if first then - firstState = Logic.StatesByName - end - --translate the activity - translateActivitySequence(context, hlComponent, v, activityIndex, rtNpcGrp) - statesNames = statesNames..Logic.StatesByName.."\n" - activityIndex = activityIndex + 1 - first = false - else - error("Error while translating '" .. hlComponent.Name .. "' its " .. tostring(nbActivity) .." ActiviySequence contains an element of type " .. v.Class) - end - k, v = next(behavior.Activities, k) - - end - end - - - if leader and not leader:isBotObject() then - local category = leader.SubCategory - local aggro = leader.Aggro - if not category then - category = leader.Category - end - - if category then - local event = r2.Translator.createEvent("start_of_state", firstState, rtNpcGrp.Id) - table.insert(context.RtAct.Events, event) - local action = r2.Translator.createAction("bot_init", rtNpcGrp.Id, category, aggro, leader.BotAttackable, leader.PlayerAttackable) - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) - end - end - - context.GroupStatesName[rtNpcGrp.Name] = statesNames - -end - - - -function Translator.initializeFactions(context, leader, rtGrp, aiStateName ) - if leader and not leader:isBotObject() then - local category = leader.SubCategory - local aggro = leader.Aggro - if not category then - category = leader.Category - end - - if category then - local event = r2.Translator.createEvent("start_of_state", aiStateName, rtGrp.Id) - table.insert(context.RtAct.Events, event) - local action = r2.Translator.createAction("faction_init", rtGrp.Id, category, aggro, leader.BotAttackable, leader.PlayerAttackable) - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) - end - end -end - --- translate an eventHandler defined in the behavior of an npc / group --- used to implement translateEventHandlers -Translator.translateEventHandler = function(context, hlNpc, eventHandler, rtNpcGrp) - - local getName = function(object, optionalName) - if optionalName and object.optionalName then return "'"..object.optionalName.."'" end - if object.Name then return "'"..object.Name.."'" end - if object.InstanceId then return "("..object.InstanceId..")" end - return "??" - end - - local event = nil - local firstCondition = nil - local lastCondition = nil - - local target = nil - - - target = hlNpc - - if not target then - printWarning("Error in component '" .. eventHandler.Name.."'") - end - - if tostring(eventHandler.Event.Type) == "" then return nil end - - if not target.getLogicEvent then - local eventName = eventHandler.Name - printWarning("The component '" .. target.Name .. "' seem to not be able to handle events '") - - end - - event, firstCondition, lastCondition = target.getLogicEvent(target, context, eventHandler) - - - if not event then - printWarning("Error in '".. target.Name.. "' the Event Handler '".. eventHandler:getName() .. "' don't seem to work because the event '"..eventHandler.Event.Type.."' don't seem to be implemented." ) - - end - - - - local kCondition, condition = next(eventHandler.Conditions, nil) - while kCondition do - - - local conditionEntity = r2:getInstanceFromId(condition.Entity) - if condition.Condition.Type ~= "" and conditionEntity then - assert(conditionEntity) - local firstCondition2, lastCondition2 = conditionEntity:getLogicCondition(context, condition) - - if not firstCondition2 or not lastCondition2 then - printWarning("Unknown Condition '".. condition.Condition.Type .. "' in EventHandler ".. eventHandler:getName().." in component " .. getName(target)) - return nil - end - - - - if not firstCondition then - firstCondition = firstCondition2 - lastCondition = lastCondition2 - else - table.insert(lastCondition.Children, firstCondition2) - lastCondition = lastCondition2 - end - end - - kCondition, condition = next(eventHandler.Conditions, kCondition) - end - - - local firstAction = nil - local lastAction = nil - - if eventHandler.Actions.Size > 0 then - - local multiAction = nil - if eventHandler.Actions.Size > 1 then - multiAction = Translator.createAction("multi_actions") - end - - local kAction, action = next(eventHandler.Actions, nil) - while kAction do - local actionEntity = r2:getInstanceFromId(action.Entity) - - if action.Action.Type ~= "" and actionEntity then - local firstAction2, lastAction2 = actionEntity:getLogicAction(context, action) - - if not firstAction2 or not lastAction2 then - printWarning("Unknown Action '".. action.Action.Type .. "' in EventHandler ".. eventHandler:getName().." in component " .. getName(target)) - end - - if multiAction then - table.insert(multiAction.Children, firstAction2) - else - firstAction = firstAction2 - end - end - - kAction, action = next(eventHandler.Actions, kAction) - end - - if eventHandler.Actions.Size > 1 then - firstAction = multiAction - end - end - - -- if there is actions then the first executed npc_event_handler_action are the dynamic_if from [firstCondition, lastCondition] - if lastCondition then - table.insert(lastCondition.Children, firstAction) - firstAction = firstCondition - end - - if event and firstAction then - - local actInstanceId = eventHandler:getLogicActInstanceId() - - if (tostring(actInstanceId) == "") then - debugInfo("Invalid Multi act action:"..eventHandler:getName()) - return - end - - - - local rtAct2 = context.ActIdToRtAct[actInstanceId] - local rtAct = context.RtAct - if rtAct2 ~= rtAct then - local baseAct = context.Scenario:getBaseAct() - local index = context.Scenario:getActIndex(actInstanceId) - if index == -1 then - printWarning("Invalid Scenario") - end - local rtNpcGrpBase = r2.Translator.getRtGroup(context, baseAct.InstanceId) - - local action = Translator.createAction("test_act", rtNpcGrpBase.Id , index) - table.insert(action.Children, firstAction) - firstAction = action - end - - -- insert a npc_event_handler - table.insert(rtAct.Events, event) -- TODO use eventHandler-> - - -- insert a npc_event_handler_action - table.insert(event.ActionsId, firstAction.Id) - table.insert(rtAct.Actions, firstAction) - end -end - - --- translates eventHandlers of a npc/group (eventHandlers are defined in beahvior) -Translator.translateEventHandlers = function(context, hlNpc, eventHandlers, rtNpcGrp) - assert(rtNpcGrp) - assert(context) - if (eventHandlers ~= nil) then - local k, v = next (eventHandlers, nil) - while k do - local caller = nil - if devMode then - caller = function (...) local arg = {...} arg[1](arg[2], arg[3], arg[4], arg[5]) return true end - - else - caller = pcall - end - if not caller(Translator.translateEventHandler, context, hlNpc, v, rtNpcGrp) then - local eventType = v.Event.Type - if eventType == nil then eventType = "" end - local componentName = hlNpc.Name - if componentName == nil then componentName = "" end - printWarning("Error in event handler '"..eventType.."' In component "..componentName) - end - k, v = next (eventHandlers, k) - end - end -end - - - - - --- translate a scenario --- scenarioInstanceId the instanceId of the scenario that will be translated to rtData --- returns rtScenario or nil -Translator.doTranslateFeatures = function(scenarioInstanceId) - local ok - local result - - r2.LastTranslationErrorMsg = nil - ok, result = pcall(Translator.doTranslateFeaturesProtected, scenarioInstanceId) - if not ok then - printWarning(result) - end - - return result -end - -function Translator.initStartingActIndex(startingAct) - local startingAct = r2.Scenario.User.SelectedActInstanceId - - local acts = r2.Scenario.Acts - - - local actId, act = next(acts, nil) - local actIndex = 0 - while (actId ~= nil) - do - if startingAct and tostring(act.InstanceId) == startingAct then - r2.setStartingActIndex(actIndex ) - else - r2.setStartingActIndex(1) - end - actIndex = actIndex + 1 - actId, act = next(acts, actId) - end -end -Translator.doTranslateFeaturesProtected = function(scenarioInstanceId) - local scenario = r2:getInstanceFromId(scenarioInstanceId) - assert(scenario) -- something is broken elsewhere - assert( r2.Features ~= nil ) - local acts = scenario.Acts - local context = Translator.createContext(scenario) - local cost = 0 - local rtScenario = context.RtScenario - ----------------------------- - --elements counting - local maxSecondaryActCost = 0 - local baseActCost = 0 - local first=true - - - - -- - -- Recursive method that call a specific function (ie createGhostComponent, pretranslate) on a component - -- and every components it contains. Each component level is treated, so that the function needs to be called - -- only once on the toplevel feature. - -- - local function recursiveFunctionCall(f,components, param) - if (components == nil) then - return - end - local k, v = next(components, nil) - while k do - if v[f] then - v[f](v, param) - end - if v.Components then - recursiveFunctionCall(f, v.Components, param) - end - if v.SubComponents then - recursiveFunctionCall(f, v.SubComponents, param) - end - - k, v = next(components, k) - end - end - - local function recursiveTranslate(components, context) - if (components == nil) then - return - end - local k, v = next(components, nil) - while k do - context.Feature= v - r2.translateFeature(context) - if v.Components then - recursiveTranslate(v.Components, context) - end - if v.SubComponents then - recursiveTranslate(v.SubComponents, context) - end - k, v = next(components, k) - end - end - - local function recursivePretranslate2(components, context) - if (components == nil) then - return - end - local k, v = next(components, nil) - while k do - context.Feature= v - if v.pretranslate2 then v.pretranslate2(v, context) end - - if v.Components then - recursivePretranslate2(v.Components, context) - end - if v.SubComponents then - recursivePretranslate2(v.SubComponents, context) - end - k, v = next(components, k) - end - end - - - -- Management of items (Copy from Edition Data to Rt Data) - do - local plotItemId, plotItem = next(scenario.PlotItems, nil) - while plotItemId do - - assert(type(plotItem.SheetId) == "number") - assert(type(plotItem.Name) == "string") - assert(type(plotItem.Desc) == "string") - assert(type(plotItem.Comment) == "string") - - assert(string.len(plotItem.Name) < 256) - assert(string.len(plotItem.Desc) < 256) - assert(string.len(plotItem.Comment) < 256) - - local rtPlotItem = r2.newComponent("RtPlotItem") - rtPlotItem.SheetId = plotItem.SheetId - - rtPlotItem.Description = plotItem.Desc - - rtPlotItem.Name = plotItem.Name - rtPlotItem.Comment = plotItem.Comment - table.insert(rtScenario.PlotItems, rtPlotItem) - plotItemId, plotItem = next(scenario.PlotItems, plotItemId) - end - - end - - - -- ghost - do - local actId, act = next(acts, nil) - while (actId ~= nil) do - local features = act.Features - recursiveFunctionCall("createGhostComponents", features, act) - - actId, act = next(acts, actId) - end - end - - -- pre Translation - do - - local actId, act = next(acts, nil) - while (actId ~= nil) do - - local rtAct = r2.newComponent("RtAct") - if act.WeatherValue ~=nil and act.ManualWeather == 1 then - rtAct.WeatherValue = 1 + act.WeatherValue - else - rtAct.WeatherValue = 0 - end - rtAct.ActDescription = "" - rtAct.PreActDescription = "" - - if act.ShortDescription then - rtAct.ActDescription = act.ShortDescription - end - if act.PreActDescription then - rtAct.PreActDescription = act.PreActDescription - end - - - context.RtAct = rtAct - - context.ActIdToRtAct[act.InstanceId] = rtAct - - context.Act = act - context.RtAct = rtAct - local features = act.Features - - act:pretranslate(context) - recursiveFunctionCall("pretranslate", features, context) - - - - actId, act = next(acts, actId) - end - end - - ----------------------------- - --texts translation - context.Feature = scenario.Texts - r2.Features["TextManager"].Translator(context) - - --for each act - - local actId, act = next(acts, nil) - while (actId ~= nil) do - cost= 0 - -- debugInfo("Act:: "..act.InstanceId) - - local rtAct = context.ActIdToRtAct[act.InstanceId] - context.RtAct = rtAct - context.Act = act - table.insert(rtScenario.Acts, rtAct) - - - local activitiesIds = act:getActivitiesIds() - --creating states for all the activities of all the groups in this act - local k, v = next(activitiesIds, nil) - while k do - local sequence = r2:getInstanceFromId(v) - if sequence and sequence.Components - then - Logic.createActivityStates(context, sequence) - end - k, v = next(activitiesIds, k) - end - - actId, act = next(acts, actId) - end - - -- translate activities - do - - local actId, act = next(acts, nil) - while (actId ~= nil) do - local rtAct = context.ActIdToRtAct[act.InstanceId] - context.RtAct = rtAct - context.Act = act - - local features = act.Features - recursivePretranslate2(features, context) - - - actId, act = next(acts, actId) - end - end - - local first = true - - actId, act = next(acts, nil) - while (actId ~= nil) do - local rtAct = context.ActIdToRtAct[act.InstanceId] - context.RtAct = rtAct - context.Act = act - - - local features = act.Features - - - assert(features ~= nil or actId == "Keys") - - recursiveTranslate(features, context) - - context.Feature = act - act:translate(context); - -- scenario - if first then - first = false - context.Feature = scenario - scenario:translate(context); - end - - actId, act = next(acts, actId) - end - - - - - -- Location Id - local locationId, location = next(scenario.Locations) - local locationIndex = 0 - local locationMap = {} - - locationMap[""] = 0 - - while locationId do - local rtLocation =r2.newComponent("RtLocation") - rtLocation.Island = location.IslandName - rtLocation.EntryPoint = location.EntryPoint - local enumToInt = {Automatic=0, Spring=1, Summer=2, Autumn=3, Winter=4} - rtLocation.Season = enumToInt[ location.Season ] - locationMap[location.InstanceId] = locationIndex - - table.insert(rtScenario.Locations, rtLocation) - locationIndex = locationIndex + 1 - locationId, location = next(scenario.Locations, locationId) - end - - local startingAct = r2.Scenario.User.SelectedActInstanceId - - - -- Act Name, position - local actId, act = next(acts, nil) - local actIndex = 0 - while (actId ~= nil) - do - - local rtAct = context.ActIdToRtAct[act.InstanceId] - rtAct.Name = act.Name - - rtAct.LocationId = locationMap[ act.LocationId ] - - if startingAct and tostring(act.InstanceId) == startingAct then - r2.setStartingActIndex(actIndex ) - else - r2.setStartingActIndex(1) - end - actIndex = actIndex + 1 - actId, act = next(acts, actId) - end - -- Ring accss - if ( r2.getMustVerifyRingAccessWhileLoadingAnimation()) then - do - local ok, level, err = r2.RingAccess.verifyScenario() - r2.updateScenarioAck(ok, level, err.What) - end - - local ok, err = r2.RingAccess.verifyRtScenario(rtScenario) - if not ok then - printWarning(err.What) - end - end - --- inspect(rtScenario) - return rtScenario -end - --- Returns a RtNpcEventHandlerAction if the action is allowed ---first parameter: action type -Translator.createAction = function(...) - local arg = {...} - local debug=config.R2EDExtendedDebug - local function header(toto) - - if debug then - return "print(\"<"..toto..">\");\n" - end - return "//"..toto - end - - local function footer(toto) - - if debug then - return "print(\"\");\n" - end - return "" - end - - - local action = r2.newComponent("RtNpcEventHandlerAction") - local actionType = arg[1] - action.Action = actionType - action.Name = actionType - - if actionType == "test_act" then - assert(type(arg[2])=="string") - assert(type(arg[3])=="number") - local rtGrpId = arg[2] -- scenario - local actId = arg[3] -- actId - - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - action.Action = "dynamic_if" - action.Parameters = prefix.."CurrentAct == "..tostring(actId) - return action - end - - if actionType == "wander_destination_reached" then - assert(type(arg[2])=="string") - assert(type(arg[3])=="string") - assert(type(arg[4])=="number") - assert(type(arg[5])=="number") - - local rtGrpId = arg[2] - local states = arg[3] - local nextStep = arg[4] - local time = arg[5] - - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - action.Action = "code" - - action.Parameters = - "v2 = ".. nextStep..";\n" .. - "()setTimer("..1+ 10*time..", 0);\n" - - - return action - end - if actionType == "next_road" then - assert(type(arg[2])=="string") - assert(type(arg[3])=="string") - assert(type(arg[4])=="number") - assert(type(arg[5])=="string") - - action.Action = "code" - - local paramCount = tonumber(arg[5]) - if paramCount == nil then - paramCount = "0" - end - paramCount = tostring(paramCount) - - action.Parameters = -[[//next_road -if ( ParamRepeatCount == 0 || ParamGroup.RoadCountLimit < ParamRepeatCount - 1) { - if ( ParamRepeatCount != 0) { ParamGroup.RoadCountLimit = ParamGroup.RoadCountLimit + 1; } - ()ParamGroup.postNextState("ParamState"); -} else { - ParamGroup.RoadCountLimit = 0; - ParamGroup.v2 = ParamActivityIndex; - ()ParamGroup.setTimer(1, 0); -} - -]] - action.Parameters = string.gsub(action.Parameters, "ParamGroup", r2:getNamespace() .. tostring(arg[2])) - action.Parameters = string.gsub(action.Parameters, "ParamState", r2:getNamespace() .. tostring(arg[3])) - action.Parameters = string.gsub(action.Parameters, "ParamActivityIndex", tostring(arg[4])) - action.Parameters = string.gsub(action.Parameters, "ParamRepeatCount", paramCount) - - - - return action - end - - - if actionType == "trigger_zone_min_player" then - assert(type(arg[2])=="string") - assert(type(arg[3])=="string") - assert(type(arg[4])=="number") - local rtGrpId = arg[2] - local states = arg[3] - local nbMinPlayer = arg[4] - - - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - action.Action = "dynamic_if" - if nbMinPlayer == 0 then - action.Parameters = prefix.."Active == 1 && "..prefix.."NbPlayer == 0" - else - action.Parameters = prefix.."Active == 1 && "..prefix.."NbPlayer >= "..tostring(nbMinPlayer) - end - - return action - end - - - if actionType == "on_player_arrived_impl" then - assert(arg[2]) - - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - - action.Parameters = header(actionType).. - "if ( "..prefix.."Active == 1 )\n{\n".. - "\tif ( "..prefix.."Cyclic == 1 )\n".. - "\t{\n".. - "\t\t"..prefix.."Enter = 0 ;\n" .. - "\t\t()"..prefix.."setEvent(1);\n" .. - "\t}\n".. - "\telse if ( "..prefix.."Enter == 1 )\n".. - "\t{\n".. - "\t\t"..prefix.."Enter = 0;\n".. - "\t\t".."()"..prefix.."setEvent(1);\n" .. - "\t}\n" .. - "}\n".. - footer(actionType) - - action.Action = "code" - return action - end - - if actionType == "on_player_left_impl" then - assert(arg[2]) - - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - - action.Parameters = header(actionType).. - "if ( "..prefix.."Active == 1 )\n{\n".. - "\tif ( "..prefix.."Cyclic == 1 )\n".. - "\t{\n".. - "\t\t"..prefix.."Leave = 0 ;\n" .. - "\t\t()"..prefix.."setEvent(2);\n" .. - "\t}\n".. - "\telse if ( "..prefix.."Leave == 1 )\n".. - "\t{\n".. - "\t\t"..prefix.."Leave = 0;\n".. - "\t\t".."()"..prefix.."setEvent(2);\n" .. - "\t}\n" .. - "}" - ..footer(actionType) - - action.Action = "code" - return action - end - if actionType == "trigger_zone_init" then - assert(arg[2]) - assert(arg[3]) - assert(arg[4]) - local rtGrpId = arg[2] - local auto = arg[3] - local cyclic = arg[4] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - - action.Parameters = header(actionType).. - "\t"..prefix.."Active = ".. auto .." ;\n" .. - "\t"..prefix.."Leave = ".. auto .." ;\n" .. - "\t"..prefix.."Enter = ".. auto .." ;\n" .. - "\t"..prefix.."Cyclic = "..tostring(cyclic).." ;\n" .. - "if ("..prefix.."Active == 1)\n".. - "{\n".. - "\t()"..prefix.."setEvent(4);\n" .. - "}\n".. - footer(actionType) - - action.Action = "code" - return action - end - - if actionType == "trigger_zone_activates" then - assert(arg[2]) - - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - - action.Parameters = header(actionType).. - "if (" ..prefix.."Active == 1)\n".. - "{".. - "\t ()" ..prefix.."setEvent(4);\n".. - "}\n".. - "else\n".. - "{\n".. - "\t"..prefix.."Active = 1 ;\n" .. - "\t"..prefix.."Leave = 1 ;\n" .. - "\t"..prefix.."Enter = 1 ;\n" .. - "()"..prefix.."setEvent(4);\n" .. - "}\n".. - footer(actionType) - - action.Action = "code" - return action - end - - if actionType == "trigger_zone_deactivates" then - assert(arg[2]) - - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - - action.Parameters = header(actionType).. - "\t"..prefix.."Active = 0 ;\n" .. - "\t"..prefix.."Leave = 0;\n" .. - "\t"..prefix.."Enter = 0;\n" .. - "()"..prefix.."setEvent(5);\n" .. - footer(actionType) - - action.Action = "code" - return action - end - - if actionType == "act_starts" then - assert(arg[2]) - assert(arg[3]) - assert( type(arg[4]) == "number") - - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - - local rtGrpId2 = arg[3] - local prefix2="" - if rtGrpId2 and rtGrpId2 ~= "" then - prefix2 = r2:getNamespace() .. rtGrpId2.."." - end - - - action.Parameters = header(actionType).. - "()"..prefix.."setTimer(50,0);\n" .. -- act start in 1 second - prefix2.."CurrentAct = " .. tostring( arg[4] ) .. ";\n" .. - "if ( "..prefix2.."v0 == 0 )\n" .. - "{\n".. - "\t()"..prefix2.."setTimer(50,0);\n".. - "\t"..prefix2.."v0 = 0;\n".. - "\t()"..prefix2.."setTimer(150, 1);\n".. - "\t"..prefix2.."ScenarioPoints = 0;\n".. - "}\n".. - - footer(actionType) - - action.Action = "code" - return action - end - - if actionType == "random_chest_activate" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - local eggId =tostring( tonumber(arg[3])) - local actId =tostring( tonumber(arg[4])) - local x = tostring(tonumber(arg[5])) - local y = tostring(tonumber(arg[6])) - local z = tostring(tonumber(arg[7])) - local scenario = tostring( r2:getScenarioId()) - - local item1Weight = arg[8] - local item1Id = arg[9] - local item1Qty = arg[10] - local item1Str = "" - if item1Id and item1Id ~= "" then - item1Str = tostring(item1Id)..":"..tostring(item1Qty) - end - - local item2Weight = arg[11] - local item2Id = arg[12] - local item2Qty = arg[13] - local item2Str = "" - if item2Id and item2Id ~= "" then - item2Str = tostring(item2Id)..":"..tostring(item2Qty) - end - - local item3Weight = arg[14] - local item3Id = arg[15] - local item3Qty = arg[16] - local item3Str = "" - if item3Id and item3Id ~= "" then - item3Str = tostring(item3Id)..":"..tostring(item3Qty) - end - - local name = arg[17] - - local sum12 = tostring(item1Weight + item2Weight) - local sum123 = tostring(item1Weight + item2Weight + item3Weight) - - action.Parameters = "//random_chest_activate\n" - .."(" ..prefix.."r)rndm(0,100);\n" - .."if (" ..prefix.. "r > 0 && "..prefix.."r <= "..tostring(item1Weight)..")\n" - .."{\n\t" - .."()"..prefix.."activateEasterEgg(" .. eggId .. ", " .. scenario .."," .. actId .. ", \"" .. item1Str.. "\", " .. x.. ", " .. y.. ", " .. z .. ", 0, \""..r2:getNamespace() .. rtGrpId.."\", \""..name.."\", \"\");\n" - .."}\n" - .."if (" ..prefix.. "r > "..item1Weight.." && "..prefix.."r <= "..sum12..")\n" - .."{\n\t" - .."()"..prefix.."activateEasterEgg(" .. eggId .. ", " .. scenario .."," .. actId .. ", \"" .. item2Str.. "\", " .. x.. ", " .. y.. ", " .. z .. ", 0, \""..r2:getNamespace() .. rtGrpId.."\", \""..name.."\", \"\");\n" - .."}\n" - .."if (" ..prefix.. "r > "..sum12.." && "..prefix.."r <= "..sum123..")\n" - .."{\n\t" - .."()"..prefix.."activateEasterEgg(" .. eggId .. ", " .. scenario .."," .. actId .. ", \"" .. item3Str.. "\", " .. x.. ", " .. y.. ", " .. z .. ", 0, \""..r2:getNamespace() .. rtGrpId.."\", \""..name.."\", \"\");\n" - .."}\n" - .."()"..prefix.."setEvent(4);\n" - action.Action = "code" - return action - end - - - - if actionType == "easter_egg_activate" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - local eggId =tostring( tonumber(arg[3])) - local actId =tostring( tonumber(arg[4])) - - local items = tostring(arg[5]) - local x = tostring(tonumber(arg[6])) - local y = tostring(tonumber(arg[7])) - local z = tostring(tonumber(arg[8])) - local heading = tostring(tonumber(arg[9])) - local name = tostring(arg[10]) - if not name then name = "" end - local look = arg[11] - if not look then look = "" end - local scenario =tostring( r2:getScenarioId()) - - - - assert(eggId and scenario and items and x and y and z) - if not heading then heading = tostring(0) end - - action.Parameters = "//"..actionType.."\n" .. - "()"..prefix.."activateEasterEgg(" .. eggId .. ", " .. scenario .."," .. actId .. ", \"" .. items.. "\", " .. x.. ", " .. y.. ", " .. z .. "," .. heading .. ", \""..r2:getNamespace() .. rtGrpId.."\", \"".. name .."\", \"".. look .."\");\n".. - "()"..prefix.."setEvent(4);\n" - action.Action = "code" - return action - end - - if actionType == "easter_egg_deactivate" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - local eggId =tostring( tonumber(arg[3])) - local actId =tostring( tonumber(arg[4])) - local scenario =tostring( r2:getScenarioId()) - assert(eggId and scenario) - - action.Parameters = "//"..actionType.."\n" .. - "()"..prefix.."deactivateEasterEgg(" .. eggId .. ", " .. scenario.. "," .. actId..");\n".. - "()"..prefix.."setEvent(5);\n" - - - action.Action = "code" - return action - end - - if actionType == "dialog_starts" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - action.Parameters= - "//"..actionType.."\n" .. - ""..prefix.."start=1;\n" .. - ""..prefix.."v1=0;\n" .. -- intial time before start of dialog is kind of long because we don't want in a start of state that the targeted npc don't exist - "()"..prefix.."setTimer(10, ".. Logic.chatTimerId ..");\n" .. - "()"..prefix.."setEvent(1);" .. "\t//start of dialog\n" - - action.Action = "code" - return action - end - - if actionType == "dialog_continues" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - action.Parameters= - "//"..actionType.."\n" .. - "if ("..prefix.."break == 1) {\n" .. - "\t()"..prefix.."setTimer(1, ".. Logic.chatTimerId ..");\n" .. - "}\n" - - action.Action = "code" - return action - end - - - if actionType == "chat_starts" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - assert(type(arg[3]) == "number") - local index = tonumber(arg[3]) - action.Parameters= - "//"..actionType.."\n" .. - ""..prefix.."start=1;\n" .. - ""..prefix.."v1=".. tostring(index+1)..";\n" .. - "()"..prefix.."setTimer(1, ".. Logic.chatTimerId ..");\n" - - action.Action = "code" - return action - end - - - if actionType == "dialog_stops" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - action.Parameters= - "//"..actionType.."\n" .. - ""..prefix.."start=0;\n" .. - "()"..prefix.."setEvent(2);" .. "\t//end of dialog\n" - - action.Action = "code" - return action - end - - if actionType == "dialog_deactivate" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() ..rtGrpId.."." - end - action.Parameters = prefix.."start = 0;\n" - ..prefix.."Active = 0;\n" - - action.Action = "code" - return action - end - - if actionType == "dialog_init" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - local mustRepeat = tonumber(arg[3]) - local autoStart = tonumber(arg[4]) - assert(mustRepeat) - - action.Parameters= - "//"..actionType.."\n" .. - ""..prefix.."repeat=".. mustRepeat..";\n".. - ""..prefix.."AutoStart=".. autoStart..";\n" - --.."()"..prefix.."setEvent(5); // spawned\n" - - action.Action = "code" - return action - end - - - - if actionType == "chat_step_first" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - local initialWait = tonumber(arg[3]) - assert(initialWait) - action.Parameters = - "//"..actionType.."\n" .. - prefix .. Logic.chatStepVar .. " = 1;\n" .. - "()"..prefix.."setTimer("..tostring(initialWait*10+1) ..", ".. Logic.chatTimerId ..");\n" .. - "()"..prefix.."setEvent(3);" .. "\t//start of chat\n" - - action.Action = "code" - return action - end - - - - if actionType == "chat_step_last" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId .. "." - end - local nbParam = arg[3] - assert(nbParam and type(nbParam) == "number") - - action.Parameters = - "//"..actionType.."\n" .. - prefix..Logic.chatStepVar .. "="..tostring(1+nbParam)..";\n" .. --set because of setEvent - "()"..prefix.."setEvent(4);\n" .. - "if ("..prefix.."repeat == 1) {\n" .. - "\t"..prefix.."start=1;\n" .. - "\t"..prefix..Logic.chatStepVar .. "=0;\n" .. - "\t()"..prefix.."setTimer(4, ".. Logic.chatTimerId ..");\n".. - "\t()"..prefix.."setEvent(2);" .. "\t//end of dialog\n" .. - "\t()"..prefix.."setEvent(1);" .. "\t//start of dialog\n" .. - "} else {\n" .. - "\t"..prefix.."start=0;\n" .. - "\t()"..prefix.."setEvent(2);" .. "\t//end of dialog\n" .. - "}\n" - - action.Action = "code" - return action - end - - if actionType == "chat_step" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - local param = arg[3] - assert(type(param) == "table") - - - --local m_action = action - --m_action.Action = "multi_actions" - - local say ="" - local emote="" - local facing="" - - local startChat = "()"..prefix.."setTimer(2, 0);\n \n" -- timer 0.4 in on seconde - -- create facing action - if param.Facing ~= "" and param.Facing ~= nil and param.Who ~=nil - then - facing = "//facing\n" .. - "(@group1)"..r2:getNamespace()..param.WhoGrp..".context();\n" - .. "(@group2)"..r2:getNamespace()..param.FacingGrp..".context();\n" - .. "()"..r2:getNamespace()..rtGrpId..".facing(@group1,\""..param.Who.."\", @group2, \"".. param.Facing.."\");\n \n" - startChat = "()"..prefix.."setTimer(10, 0);\n \n" -- timer 0.4 in on seconde - - end - - - local mustBreak = prefix.."break = "..tostring(param.Break)..";\n" - if param.Break == 0 then - mustBreak = mustBreak.. - "()"..prefix.."setTimer(" .. tostring(4+10*tonumber(param.Time)).. ", ".. Logic.chatTimerId ..");\n\n" - else - mustBreak = mustBreak .."\n" - end - - do - -- local action = r2.newComponent("RtNpcEventHandlerAction") - action.Action = "code" - action.Parameters = - "//"..actionType.." - ChatStep ".. tostring(param.Index).." \n" .. - prefix.."step = " .. tostring(param.Index) ..";\n \n".. - say..facing..emote.. - - "//set next chat step\n" .. - mustBreak .. - prefix .. Logic.chatStepVar .. " = " .. param.Index .. " + 1;\n \n" .. - - startChat.. - "()"..prefix.."setTimer(25, 2);\n \n".. -- timer 0.9 in on seconde - "//End of dialog\n".. - "()"..prefix.."setEvent(4);\n \n" - -- table.insert(m_action.Children, action) - end - - - - return action - - end - - - if actionType == "chat_step_end" then - - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - local param = arg[3] - assert(type(param) == "table") - - local baseActRtGrpId = arg[4] - assert(type(baseActRtGrpId) == "string") - - if (table.getn(param.Emotes) == 0) then return nil end - - - local code = - "// lauch emote at end of chat step\n \n" .. - "if ("..prefix.."start == 1)\n" .. - "{\n".. - "\tswitch ( ".. prefix.."step )\n".. - "\t{\n" - - local i = 0 - local n = table.getn(param.Emotes) - while i ~= n do - i = i +1 - - - if param.WhoNoEntitys[i] == "_System" or param.WhoNoEntitys[i] == "_DM" then - local say = "" - who = "System" - - local msg = param.Says[i] - if not msg then msg = "" end - - if param.WhoNoEntitys[i] == "_DM" then - - say = "\t\t\t" .. "()".. r2:getNamespace() .. baseActRtGrpId .. ".dssMessage( "..tostring(r2:getScenarioId()) .. ", " - .."\"DM\", \"".. who.. "\", \"" .. msg .. "\");\n \n" - - else - --avoid to display "system :" when a system msg is broadcasted - who = "" - say = "\t\t\t" .. "()".. r2:getNamespace() .. baseActRtGrpId .. ".dssMessage( "..tostring(r2:getScenarioId()) .. ", " - .."\"SYS\", \"".. who.. "\", \"" .. msg .. "\");\n \n" - end - - code = code .. - "\t\t".. "case "..param.Indexs[i].." :\n" .. - "\t\t".. "{\n" .. - say .. - "\t\t".. "}\n \n" - - elseif rtGrpId and param.Whos[i] and param.Whos[i] ~= "" and param.Grps[i] and param.Grps[i] ~= "" then - local say = "" - if param.Says[i] ~= nil and param.Says[i] ~= "" then - say = "\t\t\t" .. "()".. r2:getNamespace() .. rtGrpId .. ".npcSay(@group,\"" .. param.Whos[i] .. "\", \"DSS_" .. tostring(r2:getScenarioId()) .. " " .. param.Says[i] .. "\");\n \n" - end - - local emote = "" - if param.Emotes[i] ~= "" and param.Emotes[i] ~= nil then - local behaviorValue = r2.getEmoteBehaviorFromEmoteId(param.Emotes[i]) - emote = "\t\t\t" .. "()"..r2:getNamespace()..rtGrpId..".emote(@group,\""..param.Whos[i].."\", \""..behaviorValue.."\");\n" - end - - - - code = code .. - "\t\t".. "case "..param.Indexs[i].." :\n" .. - "\t\t".. "{\n" .. - "\t\t\t" .. "(@group)".. r2:getNamespace() .. param.Grps[i] .. ".context();\n \n" .. - say .. - emote .. - "\t\t".. "}\n \n" - end - - end - - code = code .. "\t}\n}" - - - action.Action = "code" - action.Parameters = code - - return action - - end - - --BROADCAST - if actionType == "broadcast_msg" then - local baseActRtGrpId = arg[2] - assert(baseActRtGrpId) - assert(type(baseActRtGrpId) == "string") - - local msg = arg[3] - assert(msg) - assert(type(msg) == "string") - - local who = "" - - action.Parameters = "()".. r2:getNamespace() .. baseActRtGrpId .. ".dssMessage( "..tostring(r2:getScenarioId()) .. ", " - .."\"SYS\", \"".. who.. "\", \"" .. msg .. "\");\n" - - action.Action = "code" - return action - end - - --QUEST ACTIONS - if actionType == "validate_quest_step" then - local questRtGrpId = arg[2] - local prefix = "" - if questRtGrpId and questRtGrpId ~= "" then - prefix = r2:getNamespace() .. questRtGrpId.."." - end - - local taskRtIds = arg[3] - local nbTasks = table.getn(taskRtIds) - - action.Parameters = -[[ - if (]] ..prefix.. [[v2 != 0) - { - switch(]] ..prefix.. [[v2) - { -]] - - --the case (1) never happens : when the quest begins and when the first task is completed, the step index - --is incremented before the action "validate_quest_step" - -- - local i - for i = 2, nbTasks do - action.Parameters = action.Parameters.. -[[ - case ]] ..tostring(i).. [[ : - { - if (]]..taskRtIds[i - 1]..[[Active == 1) - { - ]]..taskRtIds[i - 1]..[[Active = 0; - ()]]..taskRtIds[i - 1]..[[setEvent(5); - } - ()]] ..taskRtIds[i].. [[setEvent(7); - ]] ..taskRtIds[i].. [[Active = 1; - ()]] ..taskRtIds[i].. [[setEvent(4); - } -]] - end - - --last task - action.Parameters = action.Parameters.. -[[ - //default is only used by the last step of the quest - case ]]..tostring(nbTasks + 1) ..[[ : - { - if (]]..taskRtIds[nbTasks]..[[Active == 1) - { - ]]..taskRtIds[nbTasks]..[[Active = 0; - ()]]..taskRtIds[nbTasks]..[[setEvent(5); - } - //if the quest is repeatable - if (]] ..prefix.. [[v1 == 1) - { - //resetting the index to 1 for first quest step - ]] ..prefix.. [[v2 = 1; - //()]] ..taskRtIds[1].. [[setEvent(7); - ]] ..taskRtIds[1].. [[Active = 1; - ()]] ..taskRtIds[1].. [[setEvent(4); - } - else - { - ]] ..prefix.. [[v2 = 0; - } - ()]] ..prefix.. [[setEvent(8); - } - } //!switch -} //!if -]] - - action.Action = "code" - - return action - - end - - - if actionType == "increment_quest_step_index" then - local currentNamespace = r2:getNamespace() - - local questRtGrpId = arg[2] - local prefix = "" - if questRtGrpId and questRtGrpId ~= "" then - prefix = r2:getNamespace() .. questRtGrpId.."." - end - - local currentTaskIndex = arg[3] - - action.Parameters = "if ("..prefix.."v2 == " ..tostring(currentTaskIndex)..")\n" - .."{\n" - .."\t "..prefix.."v2 = " ..prefix.."v2 + 1;\n" - .."\t ()" ..prefix.."setEvent(9);\n" - .."}" - - - action.Action = "code" - return action - end - - - if actionType == "request_item" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - local grpName = r2:getNamespace() .. rtGrpId - - local items = tostring(arg[3]) - assert(items) - - local phrase = tostring(arg[4]) - assert(phrase) - if phrase == "" then phrase = "Ok" end - action.Parameters = - "// request_item\n" - .. "(@groupToNotify)".. grpName ..".context();\n" - .."()receiveMissionItems(\"".. items.."\", \"".. phrase .."\", @groupToNotify);\n" - - - action.Action = "code" - return action - - end - - - if actionType == "give_item" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - local grpName = r2:getNamespace() .. rtGrpId - - local items = tostring(arg[3]) - assert(items) - - local phrase = tostring(arg[4]) - assert(phrase) - if phrase == "" then phrase = "Ok" end - - action.Parameters = - "// give_item\n" - .. "(@groupToNotify)".. grpName ..".context();\n" - .."()giveMissionItems(\"".. items.."\", \"".. phrase .."\", @groupToNotify);\n" - - - - action.Action = "code" - return action - - end - - - if actionType == "give_reward" then - local rtGiverGrpId = arg[2] - local rtGiverName = arg[3] - local rtGiverGrpName = r2:getNamespace()..rtGiverGrpId - - local texts = arg[4] - - local rewardText = texts["rewardText"] - local rareRewardText = texts["rareRewardText"] - local inventoryFullText = texts["inventoryFullText"] - local notEnoughPointsText = texts["notEnoughPointsText"] - - local textsArgs = "\""..rewardText.."\", " - .."\""..rareRewardText.. "\", " - .."\""..inventoryFullText.. "\", " - .."\""..notEnoughPointsText.."\"" - - action.Parameters = "//Give reward (giver : '".. rtGiverName.."')\n" - .."(@groupToNotify)".. rtGiverGrpName..".context();\n" - .."()giveReward("..textsArgs..", @groupToNotify);\n" - - action.Action = "code" - return action - end - - if actionType == "teleport_near" then - local rtGiverGrpId = arg[2] - local rtGiverGrpName = r2:getNamespace()..rtGiverGrpId - local uniqId = arg[3] - local x = arg[4] - local y = arg[5] - local z = arg[6] - - action.Parameters = "//teleport Near\n" - .."(@groupToNotify)".. rtGiverGrpName..".context();\n" - .."()teleportNear("..tostring(x)..", "..tostring(y).. ", ".. tostring(z)..", @groupToNotify);\n" - - action.Action = "code" - return action - end - - if actionType == "talk_to" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - local grpName = r2:getNamespace() .. rtGrpId - - local phrase = tostring(arg[3]) - assert(phrase) - - if phrase == "" then phrase = "Ok" end - - action.Parameters = - "// talk_to\n" - .. "(@groupToNotify)".. grpName ..".context();\n" - .."()talkTo(\"".. phrase .."\", @groupToNotify);\n" - - - action.Action = "code" - return action - - end - - if actionType == "set_value" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - local variable = tostring(arg[3]) - assert(variable) - --local variableLen = string.len(variable) - --assert(variableLen < 8) - --variable = string.lower(variable) - local i = 0; - - assert( type(arg[4]) == 'number' or type(arg[4]) == 'string') - - local value = arg[4] - action.Parameters = prefix .. variable .. " = " .. value..";\n" - action.Action = "code" - return action - end - - --called each time some scenario points - if actionType == "add_scenario_points" then - --scenario rtId - local rtBaseActId = arg[2] - local points = arg[3] - local prefix = "" - if rtBaseActId and rtBaseActId ~= "" then - prefix = r2:getNamespace()..rtBaseActId.."." - end - - action.Parameters = prefix.."ScenarioPoints = "..prefix.."ScenarioPoints + " ..tostring(points)..";\n" - - action.Action = "code" - return action - end - - - --called every 30 seconds or so to avoid sending network msg each time some points are added - if actionType == "set_scenario_points" then - local rtScenarioId = tostring( r2:getScenarioId()) - local rtBaseActId = arg[2] - - local prefix = "" - if rtBaseActId and rtBaseActId ~= "" then - prefix = r2:getNamespace()..rtBaseActId.."." - end - - action.Parameters = "()setScenarioPoints("..rtScenarioId.. ", " ..prefix.."ScenarioPoints);\n" - .."()"..prefix.."setTimer(300,1);\n" - action.Action = "code" - return action - end - - if actionType == "start_scenario_timing" then - local rtScenarioId = tostring( r2:getScenarioId()) - - action.Parameters = "()startScenarioTiming("..rtScenarioId..");\n" - action.Action = "code" - return action - end - - if actionType == "stop_scenario_timing" then - local rtScenarioId = tostring( r2:getScenarioId()) - - action.Parameters = "()endScenarioTiming("..rtScenarioId..");\n" - action.Action = "code" - return action - end - - if actionType == "if_value_equal" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - local variable = tostring(arg[3]) - assert(variable) - local variableLen = string.len(variable) - --variable = string.lower(variable) - local i = 0; - - assert( type(arg[4]) == 'number') - local value = arg[4] - action.Parameters = prefix..variable .. " == " .. value - - if (arg[5] ~= nil ) then - assert( type(arg[5]) == 'table') - local value = arg[4] - action.Parameters = prefix..variable .. " == " .. value - table.insert(action.Children, arg[5]) - end - - - action.Action = "dynamic_if" - - return action - end - - -- "validate_task" is used when the player completed part of a mission but didn't come back to the mission giver - if actionType == "validate_task" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - action.Parameters = "//validateTask \n" - .."if (" ..prefix.."Active == 1 && " ..prefix.."v2 == 1 )\n" - .."{" - .."\n\t" ..prefix.."v2 = 2;\n\t" - .."()" ..prefix.."setEvent(8);\n" - .."}" - action.Action = "code" - - return action - end - - -- "complete_mission" is used when the player comes back to the mission giver after having validated the mission. - if actionType == "complete_mission" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - action.Parameters = "//complete_mission \n" - .."if (" ..prefix.."Active == 1)\n" - .."{" - .."\n\t" ..prefix.."v2 = 2;\n\t" - .."()" ..prefix.."setEvent(9);\n" - .."}" - action.Action = "code" - - return action - end - - if string.find(actionType, "timer_") ~= nil - then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - local timer = tonumber(arg[3]) - assert(0 <= timer and timer <= 3) - - if actionType == "timer_trigger" then - action.Parameters = "()"..prefix.."setTimer(4, "..timer..");\n" - - elseif actionType == "timer_disable" then - action.Parameters = "()"..prefix.."timerDisable("..timer..");\n" - ..prefix.. "Active = 0;" - elseif actionType == "timer_suspend" then - action.Parameters = "()"..prefix.."timerSuspend("..timer..");\n" - elseif actionType == "timer_resume" then - action.Parameters = "()"..prefix.."timerResume("..timer..");\n" - elseif actionType == "timer_enable" then - printWarning("timerEnable is not implemented in AIS!") - action.Parameters = "()"..prefix.."timerEnable("..timer..");\n" -- !!!NOT IMPLEMENTED IN AIS!!! - elseif actionType == "timer_is_enable" then - action.Parameters = "("..prefix.."is_enable"..")"..prefix.."timerIsEnabled("..timer..");\n" - elseif actionType == "timer_is_suspended" then - action.Parameters = "("..prefix.."is_suspended"..")"..prefix.."timerIsSuspended("..timer..");\n" - elseif actionType == "timer_add" or actionType == "timer_sub" then - local wait = tonumber(arg[4]) - assert(wait and 0<= wait) - wait = wait*10 + 4 - if actionType == "timer_sub" then - action.Parameters = "()"..prefix.."timerAdd("..timer..", " .. -wait .. ");\n" - else - action.Parameters = "()"..prefix.."timerAdd("..timer..", " .. wait .. ");\n" - end - elseif actionType == "timer_set" then - local wait = tonumber(arg[4]) - assert(wait and 0<= wait) - wait = wait*10 + 4 - action.Parameters = "()"..prefix.."setTimer("..wait..", " .. timer .. ");\n" - ..prefix.."Active = 1;\n" - - elseif actionType == "timer_set_daytime" then - local hours = tonumber(arg[4]) - local minutes = tonumber(arg[5]) - assert(hours and 0<= hours and hours <= 23) - assert(minutes and 0<= minutes and minutes <= 60) - action.Parameters = "()"..prefix.."timerSetRyzomDaytime("..timer..", " .. hours .. ", "..minutes..");\n" - else - debugInfo(colorTag(255,0,0).."Unhandeld action '" ..actionType .."'") - assert(nil) - end - action.Action = "code" - return action - end - - ------------------------------------- - -- Counter feature - ------------------------------------- - if string.find(actionType, "counter_") ~= nil - then - local rtGrpId = arg[2] - local prefix = "" - - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - -- - -- Action "Init": initializes the counter by storing the initial counter value in v1 - -- and the triggerValue in v2. - -- - if actionType == "counter_init" then - local value = arg[3] - local triggerValue = arg[4] - action.Parameters = prefix.. "v0 = 1;\n" - ..prefix.."v1 = "..value..";\n" - ..prefix.."v2 = "..triggerValue..";\n" - end - - -- - -- Action "increment": checks wether the counter is active or not (var v0 used as a boolean), - -- then increment the counter and enventually checks if the triggerValue (stored in v2) has - -- been reached to trigger a userEvent. - -- - if actionType == "counter_inc" then - action.Name = "counter_inc" - action.Parameters = "if (" ..prefix.. "v0 == 1)\n" - .. "{\n\tif (" ..prefix.. "v1 >= 0)\n" - .. "\t{\n" - .. "\t\t" .. prefix.. "v1 = " ..prefix.. "v1 + 1;\n" - .. "\t\tif (" ..prefix.. "v1 == " ..prefix.."v2)\n" - .. "\t\t{\n" - .. "\t\t\t" .. prefix.. "e=3;\n" - .. "\t\t\t ()" ..prefix.. "setEvent(0);\n" - .. "\t\t}\n" - .."\t}\n}" - --.. "()"..prefix..'debug("v0=");'.."\n" - --.. "()"..prefix..'debug('..prefix..'v0'..');'.."\n" - --.. "()"..prefix..'debug("v1=");'.."\n" - --.. "()"..prefix..'debug('..prefix..'v1'..');'.."\n" - --.. "()"..prefix..'debug("v2=");'.."\n" - --.. "()"..prefix..'debug('..prefix..'v2'..');'.."\n" - end - - -- - -- Action "decrement": works the same as increment (checks if the counter can be decremented) - -- - if actionType == "counter_dec" then - action.Name = "counter_dec" - action.Parameters = "if (" ..prefix.. "v0 == 1)\n" - .. "{\n\tif (" ..prefix.. "v1 > 0)\n" - .. "\t{\n" - .. "\t\t" .. prefix.. "v1 = " ..prefix.. "v1 - 1;\n" - .. "\t\tif (" ..prefix.. "v1 == " ..prefix.. "v2)\n" - .. "\t\t{ \n" - .. "\t\t\t" .. prefix.. "e=3;\n" - .. "\t\t\t()" ..prefix.. "setEvent(0);\n" - .. "\t\t}\n" - .."\t}\n}\n" - .. "()"..prefix..'debug("v0=");'.."\n" - .. "()"..prefix..'debug('..prefix..'v0'..');'.."\n" - .. "()"..prefix..'debug("v1=");'.."\n" - .. "()"..prefix..'debug('..prefix..'v1'..');'.."\n" - .. "()"..prefix..'debug("v2=");'.."\n" - .. "()"..prefix..'debug('..prefix..'v2'..');'.."\n" - end - - if actionType == "counter_enable" then - action.Name = "counter_enable" - action.Parameters = prefix.."v0 = 1;\n" - end - - if actionType == "counter_disable" then - action.Name = "counter_disable" - action.Parameters = prefix.."v0 = 0;\n" - end - - if actionType == "counter_trigger" then - end - - action.Action = "code" - - if actionType == "counter_is_enable" then - action.Name = "counter_is_enable" - action.Action = "dynamic_if" - action.Parameters = prefix.. "v0 == 1\n" - end - - - return action - end - - ------------------------------------- - -- GiveItem Feature - ------------------------------------- - - if string.find(actionType, "giveItem_") ~= nil - then - local rtGrpId = arg[2] - local prefix = "" - - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - if actionType == "giveItem_init" then - local qty = arg[3] - --local triggerValue = arg[4] - action.Parameters = prefix.. "v0 = 1;\n" - ..prefix.."v1 = "..qty..";\n" - --..prefix.."v2 = "..triggerValue..";\n" - end - - if actionType == "giveItem_enable" then - action.Name = "giveItem_enable" - action.Parameters = prefix.."v0 = 1;\n" - end - - if actionType == "giveItem_disable" then - action.Name = "giveItem_disable" - action.Parameters = prefix.."v0 = 0;\n" - end - - action.Action = "code" - - if actionType == "giveItem_is_enable" then - action.Name = "giveItem_is_enable" - action.Action = "dynamic_if" - action.Parameters = prefix.. "v0 == 1\n" - end - - return action - - end - - ------------------------------------- - -- RequestItem Feature - ------------------------------------- - - if string.find(actionType, "requestItem_") ~= nil - then - local rtGrpId = arg[2] - local prefix = "" - - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - if actionType == "requestItem_init" then - local qty = arg[3] - --local triggerValue = arg[4] - action.Parameters = prefix.. "v0 = 1;\n" - ..prefix.."v1 = "..qty..";\n" - --..prefix.."v2 = "..triggerValue..";\n" - end - - if actionType == "requestItem_enable" then - action.Name = "requestItem_enable" - action.Parameters = prefix.."v0 = 1;\n" - end - - if actionType == "requestItem_disable" then - action.Name = "requestItem_disable" - action.Parameters = prefix.."v0 = 0;\n" - end - - action.Action = "code" - - if actionType == "requestItem_is_enable" then - action.Name = "requestItem_is_enable" - action.Action = "dynamic_if" - action.Parameters = prefix.. "v0 == 1\n" - end - - return action - - end - - if actionType == "bot_init" then - function indent(s) - s = "\t" .. string.gsub(s, "\n", "\n\t") - return s - end - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - - assert(type(arg[3]) == "string") - assert(type(arg[4]) == "number") - assert(type(arg[5]) == "number") - assert(type(arg[6]) == "number") - - local category = tostring(arg[3]) - local aggroDist = tonumber(arg[4]) - local botAttackable = tonumber(arg[5]) - local playerAttackable = tonumber(arg[6]) - - - local action = r2.Translator.createAction("faction_init", rtGrpId, category, aggroDist, botAttackable, playerAttackable) - local code = action.Parameters - code = indent(code) - action.Parameters = "if ("..prefix.."factInit != 1)\n{\n"..code..prefix.."factInit = 1;\n}\n" - - return action - - end - if actionType == "faction_init" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - - assert(type(arg[3]) == "string") - assert(type(arg[4]) == "number") - assert(type(arg[5]) == "number") - assert(type(arg[6]) == "number") - - local category = tostring(arg[3]) - local aggroDist = tonumber(arg[4]) - local botAttackable = tonumber(arg[5]) - local playerAttackable = tonumber(arg[6]) - - - local code ="" - - code = code.."()"..prefix.."setActivity(\"faction\");\n" - - if category == "Civil" then - if botAttackable == 1 then - code = code.."()"..prefix.."setFactionProp(\"faction\", \"guard\");\n" -- don't assist - else - code = code.."()"..prefix.."setFactionProp(\"faction\", \"civil\");\n" -- don't assist - end - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"\");\n" - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"\");\n" - - elseif category == "Guard" then - if botAttackable == 0 then - code = code.."()"..prefix.."setFactionProp(\"faction\", \"civil\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"Player\");\n" - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"\");\n" - - else - code = code.."()"..prefix.."setFactionProp(\"faction\", \"guard\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"Player|guard\");\n" - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"bandit|carnivore|kitin\");\n" - - end - - elseif category =="Karavan" then - if botAttackable == 0 then - code = code.."()"..prefix.."setFactionProp(\"faction\", \"civil\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"Player\");\n" - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"\");\n" - - else - code = code.."()"..prefix.."setFactionProp(\"faction\", \"karavan\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"Player|karavan\");\n" - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"bandit|carnivore|kitin|plant|kitinWorker\");\n" - end - elseif category =="Kami" then - if botAttackable == 0 then - code = code.."()"..prefix.."setFactionProp(\"faction\", \"civil\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"Player\");\n" - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"\");\n" - - else - code = code.."()"..prefix.."setFactionProp(\"faction\", \"kami\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"Player|kami\");\n" - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"bandit|kitin|kitinWorker\");\n" - end - elseif category == "Bandit" then - if botAttackable == 0 then - code = code.."()setFactionProp(\"faction\", \"civil\");\n" - if playerAttackable == 1 then - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"Player\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"\");\n" - else - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"\");\n" - end - - else - code = code.."()"..prefix.."setFactionProp(\"faction\", \"bandit\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"bandit\");\n" - if playerAttackable == 1 then - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"Player|guard|karavan|kami\");\n" - else - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"guard|karavan|kami\");\n" - end - end - elseif category == "Carnivore" then - if botAttackable == 0 then - code = code.."()"..prefix.."setFactionProp(\"faction\", \"civil\");\n" - if playerAttackable == 1 then - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"Player\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"\");\n" - else - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"\");\n" - - end - else - code = code.."()"..prefix.."setFactionProp(\"faction\", \"carnivore\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"\");\n" - if playerAttackable == 1 then - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"Player|guard|bandit|herbivore|karavan\");\n" - else - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"guard|bandit|herbivore|karavan\");\n" - end - end - elseif category == "Herbivore" then - if botAttackable == 0 then - code = code.."()"..prefix.."setFactionProp(\"faction\", \"civil\");\n" - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"\");\n" - - else - code = code.."()"..prefix.."setFactionProp(\"faction\", \"herbivore\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"\");\n" - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"\");\n" - - end - elseif category == "Plant" then - if botAttackable == 0 then - code = code.."()"..prefix.."setFactionProp(\"faction\", \"civil\");\n" - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"\");\n" - else - code = code.."()"..prefix.."setFactionProp(\"faction\", \"plant\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"plant\");\n" - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"\");\n" - - end - elseif category == "Degen" then - if botAttackable == 0 then - code = code.."()"..prefix.."setFactionProp(\"faction\", \"civil\");\n" - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"\");\n" - - else - code = code.."()"..prefix.."setFactionProp(\"faction\", \"degen\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"degen\");\n" - if playerAttackable == 1 then - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"Player|guard|bandit|plant|herbivore|carnivore|kitin|kitinWorker|kami|karavan\");\n" - else - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"guard|bandit|plant|herbivore|carnivore|kitin|kitinWorker|kami|karavan\");\n" - end - end - - elseif category =="WorkerKitin" then - if botAttackable == 0 then - code = code.."()"..prefix.."setFactionProp(\"faction\", \"civil\");\n" - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"\");\n" - - else - code = code.."()"..prefix.."setFactionProp(\"faction\", \"kitinWorker\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"kitin|kitinWorker\");\n" - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"\");\n" - - end - elseif category =="SoldierKitin" then - if botAttackable == 0 then - code = code.."()"..prefix.."setFactionProp(\"faction\", \"civil\");\n" - if playerAttackable == 1 then - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"Player\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"\");\n" - else - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"\");\n" - - end - else - code = code.."()"..prefix.."setFactionProp(\"faction\", \"kitin\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"kitin|kitinWorker\");\n" - if playerAttackable == 1 then - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"Player|guard|bandit|karavan|kami\");\n" - else - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"guard|bandit|karavan|kami\");\n" - end - end - else - code = code.."()"..prefix.."setFactionProp(\"faction\", \"civil\");\n" -- don't assist - code = code.."()"..prefix.."setFactionProp(\"ennemyFaction\", \"\");\n" - code = code.."()"..prefix.."setFactionProp(\"friendFaction\", \"\");\n" - end - code = code .. "()"..prefix.."setAggro("..tostring(aggroDist)..", 20);\n" - action.Parameters = code - action.Action = "code" - return action - end - - --set player_attackable - if actionType == "set_player_attackable" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() ..rtGrpId.."." - end - - assert(type(arg[3]) == "number") - - local playerAttackable = arg[3] - action.Parameters = "()"..prefix.."setPlayerAttackable("..playerAttackable..");" - action.Action = "code" - return action - end - - --set bot_attackable - if actionType == "set_bot_attackable" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() ..rtGrpId.."." - end - - assert(type(arg[3]) == "number") - - local botAttackable = arg[3] - action.Parameters = "()"..prefix.."setBotAttackable("..botAttackable..");" - action.Action = "code" - return action - end - - --make a npc run - if actionType == "set_running_speed" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() ..rtGrpId.. "." - end - - action.Parameters = "()"..prefix.."addPersistentProfileParameter(\"running\");" - action.Action = "code" - return action - end - - --make a npc walk - if actionType == "set_walking_speed" then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() ..rtGrpId.. "." - end - - action.Parameters = "()"..prefix.."removePersistentProfileParameter(\"running\");" - action.Action = "code" - return action - end - - if actionType == "generic_event_trigger" - then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - local eventId = tonumber(arg[3]) - assert(eventId and 0 <= eventId and eventId <= 9) - - action.Parameters = prefix.."e="..eventId..";\n" .. - "()"..prefix.."setEvent(0);\n" - - action.Action = "code" - return action - end - - if actionType == "user_event_trigger" - then - local rtGrpId = arg[2] - local prefix = "" - if rtGrpId and rtGrpId ~= "" then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - local eventId = tonumber(arg[3]) - assert(eventId and 0 <= eventId and eventId <= 9) - - action.Parameters = "()"..prefix.."setEvent(".. eventId..");\n" - - action.Action = "code" - return action - end - - - --- generci_event --- - - if actionType == "dssStartAct" then - local actId = tonumber(arg[2]) - assert(actId) - local sessionId = r2:getScenarioId() - assert(sessionId) - action.Action = "code" - action.Parameters = "()dssStartAct(" .. sessionId .. ", " .. actId .. ");\n" - return action, action - end - ---trigger_event action - if string.find(actionType, "trigger_event_%d") ~= nil - then - action.Parameters = arg[2] - return action - end - ---spawn/despawn action - if (actionType == "null_action") - then - return action - end - - if actionType == "spawn" then - local rtNpcGrpId = arg[2] - action.Action = "code" - local prefix = "" - if rtNpcGrpId then - prefix = r2:getNamespace() .. rtNpcGrpId.."." - end - action.Parameters = "()"..prefix.. actionType.."();" - return action - end - - - if actionType == "despawn" then - local rtNpcGrpId = arg[2] - action.Action = "code" - local prefix = "" - if rtNpcGrpId then - prefix = r2:getNamespace() .. rtNpcGrpId.."." - end - action.Parameters = "()"..prefix.. actionType.."(0);" - return action - end - - - if (actionType == "sit_down") or (actionType == "stand_up") then - local rtGrpId = arg[2] - action.Action = "code" - - local prefix = "" - if rtGrpId then - prefix = r2:getNamespace() .. rtGrpId.."." - end - - local sitting = 0 - if actionType=="sit_down" then - sitting = 1 - end - if sitting == 1 then - action.Parameters = - "()"..prefix.."sitDown();\n" .. - "()"..prefix.."setTimer(40,1);\n" -- wait 4 second - .. prefix.."isSitting = ".. tostring( sitting) .. ";" - else - action.Parameters = - "()"..prefix.."standUp();\n" .. - "()"..prefix.."setTimer(40,1);\n" -- wait 4 second - .. prefix.."isSitting = ".. tostring( sitting) .. ";" - - end - end - ---multi actions - if actionType == "multi_actions" then - local actions = arg[2] - if actions ~= nil then - local max = table.getn(actions) - for i=1, max do - assert(actions[i]) - table.insert(action.Children, actions[i]) - end - end - return action - end - ---say action - if actionType == "say" - then - action.Parameters = "say: "..arg[2] - return action - end - - if actionType == "switch_actions" - then - action.Parameters = arg[2] - return action - end - ---npc_say action - if actionType == "npc_say" - then - action.Parameters = "" - - local str = arg[2] - - if str == nil then str = "\n" end - if (string.find(str, "\n") == nil) then - str = str .. "\n" - end - - if (table.getn(arg)==3) - then - assert(arg[3]) - assert( tostring(arg[3]) ) - action.Parameters = tostring(arg[3]).."\n" - end - action.Parameters = action.Parameters..str - return action - end ---emot action - if actionType == "emot" - then - local max = table.getn(arg) - debugInfo(colorTag(255,0,0,255).."action emot") - local parameters ="" - for i=2, max do - parameters = parameters .. arg[i] - parameters = parameters .. "\n" - end - action.Parameters = parameters - return action - end - ---if action ---arg2: expression ---arg3: action if expression is true ---arg4(optional): action if expression false - if (actionType == "condition_if")or(actionType == "condition_if_else") or (actionType == "dynamic_if") - then - local max = table.getn(arg) - if max == 4 then - -- action.Action="dynamic_if_else" - action.Action="dynamic_if" - table.insert(action.Children, arg[3]) - table.insert(action.Children, arg[4]) - elseif max ==3 then - action.Action="dynamic_if" - table.insert(action.Children, arg[3]) - elseif max ==2 then - action.Action="dynamic_if" - else - return nil - end - - action.Parameters = arg[2] - return action - end - --- waraning - if actionType == "code" - then - action.Parameters = arg[2] - return action - end - ---random action - if actionType == "random_select" - then - local max = table.getn(arg) - for i=2, max do - table.insert(action.Children, arg[i]) - end - return action - end - ---set timer action - if string.find(actionType, "set_timer_t") ~= nil - then - local max = table.getn(arg) - parameters="" - for i=2, max do - parameters = parameters .. arg[i] - end - action.Parameters = parameters - return action - end - ---modify variable action - if actionType == "modify_variable" or actionType == "begin_state" - then - action.Parameters = arg[2] - return action - end - - if actionType == "punctual_state" - then - action.Parameters = arg[2] - return action - end - - if (actionType == "stand_up")or(actionType == "sit_down")or(actionType == "punctual_state_end") - then - return action - end - printWarning("Unhandled action " .. actionType) - return nil -end - - ---first param : event type ---second param: StatesByName ---third param : GroupsByName ---then, parameters -Translator.createEvent = function(...) - local arg = {...} - local event = r2.newComponent("RtNpcEventHandler") - local eventType = arg[1] - event.Event = eventType - event.StatesByName = arg[2] - event.GroupsByName = arg[3] - assert(arg[1]) - assert(arg[2]) - assert(arg[3]) - - if eventType == nil then - debugInfo("Error invalid eventType") - assert(nil) - return nil - end - - if string.find(eventType, "timer_t%d_triggered") ~=nil or string.find(eventType, "user_event_%d") - then - return event - end - - if (eventType == "end_of_state") or (eventType == "start_of_state") - or (eventType == "group_under_attack") or (eventType == "destination_reached_all") - or (eventType == "bot_killed") or (eventType == "group_eliminated") or (eventType == "group_under_attack") - or (eventType == "destination_reached") or (eventType == "variable_changed") - or (eventType == "group_despawned") or (eventType == "group_spawned") or (eventType == "bot_target_killed") - or (eventType == "player_target_npc") - - or string.find(eventType, "variable_v%d_changed") ~= nil - then - return event - end - - if (eventType == "on_player_arrived") then - event.Event = "player_arrived_trigger_zone" - event.IsTriggerZone = 1 - return event - end - - if (eventType == "on_player_left") then - event.Event = "player_left_trigger_zone" - event.IsTriggerZone = 1 - return event - end - - - printWarning("Error invalid event ".. eventType) - - return nil -end - --- it adds a new simple activity in zone within the given context -Translator.createSimpleActivityInZone = function(context, zoneName, groupsByName, mode, static, aiScriptDebug) - local action - local event - local code - - -- init when the group arrives in the zone - code = '()setMode("' .. mode .. '");\n' - if static then - code = code .. '()stopMoving();\n'; - end - if aiScriptDebug then - code = 'log("destination_reached_all: zone=' .. zoneName .. ', group=' .. groupsByName .. '");\n' .. code - end - event = Translator.createEvent("destination_reached_all", zoneName, groupsByName) - table.insert(context.RtAct.Events, event) - action = Translator.createAction("code", code) - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) - - -- restore things when the group quits the zone - code = '()setMode("Normal");' - if aiScriptDebug then - code = 'log("end_of_state: zone=' .. zoneName .. ', group=' .. groupsByName .. '");\n' .. code - end - event = Translator.createEvent("end_of_state", zoneName, groupsByName) - table.insert(context.RtAct.Events, event) - action = Translator.createAction("code", code) - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) -end - --- it adds a new activity in zone within the given context -Translator.createActivityInZone = function(context, zoneName, groupsByName, mode, timerId, wanderTime, activityTime, aiScriptDebug) - assert(wanderTime > 0) - assert(activityTime > 0) - - local action - local event - local code - local timerEventName = "timer_t" .. timerId .. "_triggered" - - -- init start of state - code = 'nextState = 0;\n' - if aiScriptDebug then - code = 'log("start_of_state: zone=' .. zoneName .. ', group=' .. groupsByName .. '");\n' .. code - end - event = Translator.createEvent("start_of_state", zoneName, groupsByName) - table.insert(context.RtAct.Events, event) - action = Translator.createAction("code", code) - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) - - -- init when the group arrives in the zone - code = - 'if (nextState == 0)\n' .. - '{\n' - if aiScriptDebug then - code = code .. - ' log("destination_reached_all: zone=' .. zoneName .. ', group=' .. groupsByName .. '");\n' - end - code = code .. - ' nextState = 1;\n' .. - ' ()setTimer(1, ' .. timerId .. ');\n' .. - '}\n' - event = Translator.createEvent("destination_reached_all", zoneName, groupsByName) - table.insert(context.RtAct.Events, event) - action = Translator.createAction("code", code) - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) - - -- activity states - code = - 'if (nextState == 1) {\n' .. - ' nextState = 2;\n' .. - ' ()stopMoving();\n' .. - ' ()setMode("' .. mode .. '");\n' .. - ' ()setTimer(' .. activityTime .. ', ' .. timerId .. ');\n' .. - '} else if (nextState == 2) {\n' .. - ' nextState = 1;\n' .. - ' ()setMode("Normal");\n' .. - ' ()wander();\n' .. - ' ()setTimer(' .. wanderTime .. ', ' .. timerId .. ');\n' .. - '} else {\n' .. - ' log("unknown state=", nextState, ", zone=' .. zoneName .. ', group=' .. groupsByName .. '");\n' .. - ' ()break();\n' .. - '}\n' - if aiScriptDebug then - code = 'log("' .. timerEventName .. ': state=", nextState, ", zone=' .. zoneName .. ', group=' .. groupsByName .. '");\n' .. code - end - event = Translator.createEvent(timerEventName, zoneName, groupsByName) - table.insert(context.RtAct.Events, event) - action = Translator.createAction("code", code) - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) - - -- restore things when the group quits the zone - code = - '()timerDisable(' .. timerId .. ');\n' .. - '()setMode("Normal");\n' - if aiScriptDebug then - code = 'log("end_of_state: zone=' .. zoneName .. ', group=' .. groupsByName .. '");\n' .. code - end - event = Translator.createEvent("end_of_state", zoneName, groupsByName) - table.insert(context.RtAct.Events, event) - action = Translator.createAction("code", code) - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) -end - --- it adds a new hunt activity in zone within the given context -Translator.createHuntActivityInZone = function(context, zoneName, groupsByName, timerId, wanderTime, alertTime, eatTime, aiScriptDebug) - assert(wanderTime > 0) - assert(alertTime > 0) - assert(eatTime > 0) - - local action - local event - local code - local timerEventName = "timer_t" .. timerId .. "_triggered" - - -- init start of state - code = 'nextState = 0;\n' - if aiScriptDebug then - code = 'log("start_of_state: zone=' .. zoneName .. ', group=' .. groupsByName .. '");\n' .. code - end - event = Translator.createEvent("start_of_state", zoneName, groupsByName) - table.insert(context.RtAct.Events, event) - action = Translator.createAction("code", code) - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) - - -- init when the group arrives in the zone - code = - 'if (nextState == 0)\n' .. - '{\n' - if aiScriptDebug then - code = code .. - ' log("destination_reached_all: zone=' .. zoneName .. ', group=' .. groupsByName .. '");\n' - end - code = code .. - ' nextState = 1;\n' .. ---- ' ()setFactionProp("ennemyFaction", "' .. Translator.PredatorEnemyFaction .. '");\n' .. - ' ()setTimer(1, ' .. timerId .. ');\n' .. - '}\n' - event = Translator.createEvent("destination_reached_all", zoneName, groupsByName) - table.insert(context.RtAct.Events, event) - action = Translator.createAction("code", code) - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) - - -- activity states - code = - 'if (nextState == 1) {\n' .. - ' nextState = 2;\n' .. - ' ()stopMoving();\n' .. - ' ()setMode("Alert");\n' .. - ' ()setTimer(' .. alertTime .. ', ' .. timerId .. ');\n' .. - '} else if (nextState == 2) {\n' .. - ' nextState = 1;\n' .. - ' ()setMode("Normal");\n' .. - ' ()wander();\n' .. - ' ()setTimer(' .. wanderTime .. ', ' .. timerId .. ');\n' .. - '} else if (nextState == 3) {\n' .. - ' nextState = 1;\n' .. --- ' ()setFactionProp("ennemyFaction", "'.. Translator.PredatorEnemyFaction .. '");\n' .. - ' ()setMode("Normal");\n' .. - ' ()wander();\n' .. - ' ()setTimer(' .. wanderTime .. ', ' .. timerId .. ');\n' .. - '} else {\n' .. - ' log("unknown state=", nextState, ", zone=' .. zoneName .. ', group=' .. groupsByName .. '");\n' .. - ' ()break();\n' .. - '}\n' - if aiScriptDebug then - code = 'log("' .. timerEventName .. ': state=", nextState, ", zone=' .. zoneName .. ', group=' .. groupsByName .. '");\n' .. code - end - event = Translator.createEvent(timerEventName, zoneName, groupsByName) - table.insert(context.RtAct.Events, event) - action = Translator.createAction("code", code) - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) - - -- eat the corpse when the target is killed - code = - 'nextState = 3;\n' .. ---. '()setFactionProp("ennemyFaction", "");\n' .. - '()stopMoving();\n' .. - '()setMode("Eat");\n' .. - '()setTimer(' .. eatTime .. ', ' .. timerId .. ');\n' - if aiScriptDebug then - code = 'log("bot_target_killed: zone=' .. zoneName .. ', group=' .. groupsByName .. '");\n' .. code - end - event = Translator.createEvent("bot_target_killed", zoneName, groupsByName) - table.insert(context.RtAct.Events, event) - action = Translator.createAction("code", code) - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) - - -- restore things when the group quits the zone - code = - '()timerDisable(' .. timerId .. ');\n' .. - '()setMode("Normal");\n' --- .. '()setFactionProp("ennemyFaction", "Player");\n' - if aiScriptDebug then - code = 'log("end_of_state: zone=' .. zoneName .. ', group=' .. groupsByName .. '");\n' .. code - end - event = Translator.createEvent("end_of_state", zoneName, groupsByName) - table.insert(context.RtAct.Events, event) - action = Translator.createAction("code", code) - table.insert(context.RtAct.Actions, action) - table.insert(event.ActionsId, action.Id) -end - --- set GroupParameters of a rt Group by readin a hl Np --- eg set BotAttackable, aggro_range .. -Translator.setGroupParameters = function(hlNpc, rtNpcGrp) - assert(hlNpc and type(hlNpc) == "userdata") - rtNpcGrp.GrpParameters = "ring\n" .. rtNpcGrp.GrpParameters - rtNpcGrp.AiProfilParams = "" - - local botAttackable = hlNpc.BotAttackable - if botAttackable == 1 - then - rtNpcGrp.GrpParameters = rtNpcGrp.GrpParameters.."bot_attackable".. "\n" - end - - local playerAttackable = hlNpc.PlayerAttackable - if playerAttackable == 1 - then - rtNpcGrp.GrpParameters = rtNpcGrp.GrpParameters.."player_attackable".. "\n" - end - - local aggroRange = hlNpc.Aggro - if aggroRange ~= nil and aggroRange >= 0 - then - if (aggroRange > 120) then aggroRange = 120 end - rtNpcGrp.GrpParameters = rtNpcGrp.GrpParameters.."aggro range: "..aggroRange.."\n" - - end - - -- if hlNpc.UseFame and hlNpc.UseFame == 1 and hlNpc.Fame then - -- rtNpcGrp.AiProfilParams = rtNpcGrp.AiProfilParams - -- .. "faction:" .. hlNpc.Fame .. "\n" - -- .. "fame_for_guard_attack:-300000\n" - -- end - - - local speed = hlNpc.Speed - if speed ~= nil and type(speed) == "number" and speed == 1 then - rtNpcGrp.AiProfilParams = rtNpcGrp.AiProfilParams .. "running\n" - end - - local autoSpawn = hlNpc.AutoSpawn - if autoSpawn ~= nil and autoSpawn == 0 then - rtNpcGrp.AutoSpawn = 0 - end - - local noRespawn = hlNpc.NoRespawn - if noRespawn ~= nil and noRespawn == 1 then - rtNpcGrp.GrpParameters = rtNpcGrp.GrpParameters.. "respawn time:-1\n" - end - - local isFauna = hlNpc.IsFauna - if isFauna ~= nil and isFauna == 1 then - rtNpcGrp.GrpParameters = rtNpcGrp.GrpParameters.. "denied_astar_flags:WaterAndNoGo\n" - end - -end - - --- TODO doc - - - ----- EventHandlers - --- Components ---- Condition -Translator.getComponentGenericEvent =function(rtNpcGrp, id) - assert(rtNpcGrp) - assert(id) - - local prefix = "" - - if rtNpcGrp.Id and rtNpcGrp.Id ~= "" then - prefix = r2:getNamespace() .. rtNpcGrp.Id.."." - end - - local eventHandler = Translator.createEvent("user_event_0", "", rtNpcGrp.Id) - - local condition = prefix.. "e == " .. tostring(id) - - local firstCondition = Translator.createAction("dynamic_if", condition) - - return eventHandler, firstCondition, firstCondition -end - -Translator.getComponentUserEvent =function(rtNpcGrp, id) - assert(rtNpcGrp) - assert(rtNpcGrp.Id) - assert(id) - - local eventHandler = Translator.createEvent("user_event_".. id, "", rtNpcGrp.Id) - --- local condition = "1 == 1" - --- local firstCondition = Translator.createAction("dynamic_if", condition) - - return eventHandler, nil, nil ---, firstCondition, firstCondition -end - - - --- NPC --- Selecter - -Translator.getNpcLogicCondition = function(entity, context, condition ) - assert( condition.Class == "ConditionStep") - local rtNpcGrp = Translator.getRtGroup(context, condition.Entity) - assert(rtNpcGrp) - local funs ={} - funs["is in activity sequence"] =Translator.getNpcLogicConditionIsInActivitySequence - funs["is in activity step"] = Translator.getNpcLogicConditionIsInActivityStep - funs["is in chat sequence"] = Translator.getNpcLogicConditionIsInChatSequence - funs["is in chat step"] = Translator.getNpcLogicConditionIsInChatStep - funs["is dead"] = Translator.getNpcLogicConditionIsDead - funs["is alive"] = Translator.getNpcLogicConditionIsAlive - - - local fun = funs[ condition.Condition.Type ] - if fun then - return fun(entity, context, condition, rtNpcGrp) - end - - local firstAction, lastAction = nil,nil - - return firstAction, lastAction -end - - -Translator.getNpcLogicAction = function(entity, context, action) - assert( action.Class == "ActionStep") - local rtNpcGrp = Translator.getRtGroup(context, action.Entity) - assert(rtNpcGrp) - local funs ={} - funs["Deactivate"] =Translator.getNpcLogicActionDeactivate - funs["Activate"] =Translator.getNpcLogicActionActivate - funs["Kill"] = Translator.getNpcLogicActionKill - funs["begin activity sequence"] = Translator.getNpcLogicActionBeginActivitySequence - funs["begin chat sequence"] = Translator.getNpcLogicActionBeginChatSequence - funs["Stand Up"] = Translator.getNpcLogicActionStandUp - funs["Sit Down"] = Translator.getNpcLogicActionSitDown - funs["Fight with player"] = Translator.getNpcLogicActionFightPlayer - funs["Fight with Npcs"] = Translator.getNpcLogicActionFightNpcs - funs["Dont fight with player"] = Translator.getNpcLogicActionDontFightPlayer - funs["Dont fight with Npcs"] = Translator.getNpcLogicActionDontFightNpcs - funs["Run"] = Translator.getNpcLogicActionRun - funs["Dont run"] = Translator.getNpcLogicActionDontRun - funs["emits user event"] = Translator.getNpcLogicActionEmitsUserEvent - - - local fun = funs[ action.Action.Type ] - if fun then - return fun(entity, context, action, rtNpcGrp) - end - - - local firstAction, lastAction = nil,nil - - return firstAction, lastAction -end - - - - -Translator.getNpcLogicEvent = function(entity, context, event) - assert( event.Class == "LogicEntityAction") - local rtNpcGrp = Translator.getRtGroup(context, entity.InstanceId) - assert(rtNpcGrp) - - local funs ={} - funs["activation"] = Translator.getNpcLogicEventActivation - funs["desactivation"] = Translator.getNpcLogicEventDesactivation - funs["death"] = Translator.getNpcLogicEventDeath - - funs["end of activity step"] = Translator.getNpcLogicEventEndOfActivityStep - funs["begin of activity step"] = Translator.getNpcLogicEventBeginOfActivityStep - - funs["end of activity sequence"] = Translator.getNpcLogicEventEndOfActivitySequence - funs["begin of activity sequence"] = Translator.getNpcLogicEventBeginOfActivitySequence - - funs["end of chat step"] = Translator.getNpcLogicEventEndOfChatStep - funs["end of chat sequence"] = Translator.getNpcLogicEventEndOfChatSequence - funs["user event emitted"] = Translator.getNpcLogicEventUserEventEmitted - - - - -- There is also group specific functions - - local eventHandler, firsCondition, lastCondition = nil, nil, nil - local value = event.Event.Type - local fun = funs[value ] - if fun then - return fun(entity, context, event, rtNpcGrp) - end - - if value == "member death" then - local eventHandler = Translator.createEvent("bot_killed", "", rtNpcGrp.Id) - return eventHandler, nil, nil - elseif value == "group death" then - local eventHandler = Translator.createEvent("group_eliminated", "", rtNpcGrp.Id) - return eventHandler, nil, nil - elseif value == "targeted by player" then - local eventHandler = Translator.createEvent("player_target_npc", "", rtNpcGrp.Id) - return eventHandler, nil, nil - end - - return eventHandler, firsCondition, lastCondition -end ---- Event - -Translator.getGenericLogicEventDesactivation = function (rtNpcGrp) - local eventHandler, firsCondition, lastCondition = nil, nil, nil - eventHandler = Translator.createEvent("group_despawned", "", rtNpcGrp.Id) - return eventHandler, firsCondition, lastCondition -end - - - -Translator.getNpcLogicEventDesactivation = function (hlComponent, context, event, rtNpcGrp) - return Translator.getGenericLogicEventDesactivation(rtNpcGrp) -end - -Translator.getNpcLogicEventUserEventEmitted = function (hlComponent, context, event, rtNpcGrp) - local eventHandler, firsCondition, lastCondition = nil, nil, nil - value = event.Event.ValueString - if value then value = tonumber(value) end - if not value then return end - return Translator.getComponentGenericEvent(rtNpcGrp, value) -end - - -Translator.getNpcLogicEventActivation = function (hlComponent, context, event, rtNpcGrp) - local eventHandler, firsCondition, lastCondition = nil, nil, nil - eventHandler = Translator.createEvent("group_spawned", "", rtNpcGrp.Id) - return eventHandler, firsCondition, lastCondition -end - - -Translator.getGenericLogicEventDeath= function(rtNpcGrp) - local eventHandler, firsCondition, lastCondition = nil, nil, nil - eventHandler = Translator.createEvent("bot_killed", "", rtNpcGrp.Id) - return eventHandler, firsCondition, lastCondition -end - - -Translator.getNpcLogicEventDeath= function(hlComponent, context, event, rtNpcGrp) - return Translator.getGenericLogicEventDeath(rtNpcGrp) -end - - -Translator.getGenericLogicEventEndOfActivitySequence = function(hlComponent, value, rtNpcGrp) - local sequenceInstanceId = tostring(value) - local sequence = r2:getInstanceFromId(sequenceInstanceId) - assert(sequence) - - local n = table.getn(sequence.Components) - - if n > 0 then - - local firstStep = sequence.Components[ n-1 ].InstanceId - eventHandler = Translator.createEvent("timer_t0_triggered", "", rtNpcGrp.Id) - local value = tostring(firstStep) - local tab=Logic.findActivityStepIdByInstanceId(sequence.Parent.Parent.Parent, value) - local id, id2 = tab[1], tab[2] - - if (id == -1 or id2 == -1) then - printWarning("error in translation: the event '"..event.Name .. "' in component '" .. hlComponent.Name .. - "': the selected activity step can not be found"); - return nil, nil, nil - - end - - local prefix = "" - local condition1 = prefix .. "oldActivityStepVar2 == ".. tostring(id + 1) -- in theory it must be (id-1) +1 - local condition2 = prefix .. "currentActivitySequenceVar == ".. tostring(id2-1) - local firstCondition = Translator.createAction("dynamic_if", condition1) - local lastCondition = Translator.createAction("dynamic_if", condition2) - table.insert(firstCondition.Children, lastCondition) - - return eventHandler, firstCondition, lastCondition - - else - - local eventHandler, firsCondition, lastCondition = nil, nil, nil - eventHandler = Translator.createEvent("timer_t0_triggered", "", rtNpcGrp.Id) - - local prefix = "" - local tab=Logic.findActivitySequenceIdByInstanceId(sequence.Parent.Parent.Parent, value) - local id = tab[1] - local condition = prefix .. "currentActivitySequenceVar == ".. tostring(id-1) - local firstCondition = Translator.createAction("dynamic_if", condition) - return eventHandler, firstCondition, firstCondition - end - -end - - -Translator.getGenericLogicEventStartOfActivitySequence = function(value, rtNpcGrp) - local sequenceInstanceId = tostring(value) - local sequence = r2:getInstanceFromId(sequenceInstanceId) - assert(sequence) - - local n = table.getn(sequence.Components) - - if n > 0 then - local firstStep = sequence.Components[0].InstanceId - - local eventHandler, firsCondition, lastCondition = nil, nil, nil - - eventHandler = Translator.createEvent("timer_t0_triggered", "", rtNpcGrp.Id) - local value = tostring(firstStep) - local tab=Logic.findActivityStepIdByInstanceId(sequence.Parent.Parent.Parent, value) - local id, id2 = tab[1], tab[2] - - if (id == -1 or id2 == -1) then - printWarning("error in translation: the event '"..event.Name .. "' in component '" .. hlComponent.Name .. - "': the selected activity step can not be found"); - return nil, nil, nil - - end - - local prefix = "" - local condition1 = prefix .. "oldActivityStepVar2 == ".. tostring(id ) -- in theory it must be (id-1) +1 - local condition2 = prefix .. "currentActivitySequenceVar == ".. tostring(id2-1) - local firstCondition = Translator.createAction("dynamic_if", condition1) - local lastCondition = Translator.createAction("dynamic_if", condition2) - table.insert(firstCondition.Children, lastCondition) - return eventHandler, firstCondition, lastCondition - else - - local eventHandler, firsCondition, lastCondition = nil, nil, nil - eventHandler = Translator.createEvent("timer_t0_triggered", "", rtNpcGrp.Id) - - local prefix = "" - local tab=Logic.findActivitySequenceIdByInstanceId(sequence.Parent.Parent.Parent, value) - local id = tab[1] - local condition = prefix .. "currentActivitySequenceVar == ".. tostring(id-1) - local firstCondition = Translator.createAction("dynamic_if", condition) - return eventHandler, firstCondition, firstCondition - end -end - -Translator.getNpcLogicEventBeginOfActivitySequence = function(hlComponent, context, event, rtNpcGrp) - local value = tostring(event.Event.Value) - return Translator.getGenericLogicEventStartOfActivitySequence(value, rtNpcGrp) -end - - -Translator.getNpcLogicEventEndOfActivitySequence = function(hlComponent, context, event, rtNpcGrp) - local value = tostring(event.Event.Value) - return Translator.getGenericLogicEventEndOfActivitySequence(hlComponent, value, rtNpcGrp) -end - - - -Translator.getNpcLogicEventEndOfActivityStepImpl = function(value, rtNpcGrp) - local eventHandler, firsCondition, lastCondition = nil, nil, nil - - eventHandler = Translator.createEvent("timer_t0_triggered", "", rtNpcGrp.Id) - - local step = r2:getInstanceFromId(value) - assert(step) - local sequence = step.Parent.Parent - assert(sequence) - local hlComponent = sequence.Parent.Parent.Parent - assert(hlComponent) - - local tab=Logic.findActivityStepIdByInstanceId(hlComponent, value) - local id, id2 = tab[1], tab[2] - - if (id == -1 or id2 == -1) then - printWarning("error in translation: the event '"..event.Name .. "' in component '" .. hlComponent.Name .. - "': the selected activity step can not be found"); - return nil, nil, nil - - end - - local prefix = "" - local condition1 = prefix .. "oldActivityStepVar2 == ".. tostring(id+1) -- in theory it must be (id-1) +1 - local condition2 = prefix .. "currentActivitySequenceVar == ".. tostring(id2-1) - local firstCondition = Translator.createAction("dynamic_if", condition1) - local lastCondition = Translator.createAction("dynamic_if", condition2) - table.insert(firstCondition.Children, lastCondition) - return eventHandler, firstCondition, lastCondition -end - -Translator.getNpcLogicEventEndOfActivityStep = function(hlComponent, context, event, rtNpcGrp) - local value = tostring(event.Event.Value) - return Translator.getNpcLogicEventEndOfActivityStepImpl( value, rtNpcGrp) -end - - -Translator.getNpcLogicEventBeginOfActivityStepImpl = function(value, rtNpcGrp) - local eventHandler, firsCondition, lastCondition = nil, nil, nil - - assert(rtNpcGrp) - local step = r2:getInstanceFromId(value) - assert(step) - local sequence = step.Parent.Parent - assert(sequence) - local hlComponent = sequence.Parent.Parent.Parent - assert(hlComponent) - - eventHandler = Translator.createEvent("timer_t0_triggered", "", rtNpcGrp.Id) - - local tab=Logic.findActivityStepIdByInstanceId(hlComponent, value) - local id, id2 = tab[1], tab[2] - - if (id == -1 or id2 == -1) then - printWarning("error in translation: the event '"..event.Name .. "' in component '" .. hlComponent.Name .. - "': the selected activity step can not be found"); - return nil, nil, nil - - end - - local prefix = "" - local condition1 = prefix .. "oldActivityStepVar2 == ".. tostring(id ) -- in theory it must be (id-1) +1 - local condition2 = prefix .. "currentActivitySequenceVar == ".. tostring(id2-1) - local firstCondition = Translator.createAction("dynamic_if", condition1) - local lastCondition = Translator.createAction("dynamic_if", condition2) - table.insert(firstCondition.Children, lastCondition) - return eventHandler, firstCondition, lastCondition -end - - -Translator.getNpcLogicEventBeginOfActivityStep = function(hlComponent, context, event, rtNpcGrp) - local value = tostring(event.Event.Value) - return Translator.getNpcLogicEventBeginOfActivityStepImpl( value, rtNpcGrp) -end - - - - -Translator.getNpcLogicEventEndOfChatStepImpl = function(hlComponent, context, event, rtNpcGrp) - local eventHandler, firsCondition, lastCondition = nil, nil, nil - - eventHandler = Translator.createEvent("timer_t1_triggered", "", rtNpcGrp.Id) - local value = tostring(event.Event.Value) - - local tab=Logic.findChatStepIdByInstanceId(hlComponent, value) - local id, id2 = tab[1], tab[2] - - - - if (id ==-1 or id2 == -1) then - printWarning("error in translation: the event '"..event.Name .. "' in component '" .. hlComponent.Name .. - "': the selected chat step can not be found"); - return nil, nil, nil - - end - local prefix = "" - local condition1 = prefix.."oldChatStepVar == ".. tostring(id-1) - local condition2 = prefix.."v0 == ".. tostring(id2-1) - local firstCondition = Translator.createAction("dynamic_if", condition1) - local lastCondition = Translator.createAction("dynamic_if", condition2) - table.insert(firstCondition.Children, lastCondition) - return eventHandler, firstCondition, lastCondition -end - - -Translator.getNpcLogicEventEndOfChatStep = function(hlComponent, context, event, rtNpcGrp) - local value = tostring(event.Event.Value) - return Translator.getNpcLogicEventEndOfChatStepImpl(hlComponent, value, rtNpcGrp) -end ---- Conditions - - -Translator.getGenericLogicConditionIsInActivitySequence = function(entity, conditionValue, rtNpcGrp) - local prefix = "" - if rtNpcGrp then prefix = r2.getNamespace() ..rtNpcGrp.Id.."." end - - local theValue = conditionValue - local tab=Logic.findActivitySequenceIdByInstanceId(entity, theValue) - local id, id2 = tab[1], tab[2] - - assert(id ~= -1) - - local condition1 = prefix.."oldActivitySequenceVar == ".. tostring(id-1) - local firstCondition = Translator.createAction("dynamic_if", condition1) - local lastCondition = firstCondition - return firstCondition, lastCondition - -end - -Translator.getNpcLogicConditionIsInActivitySequence = function(entity, context, condition, rtNpcGrp) - local theValue = condition.Condition.Value - return Translator.getGenericLogicConditionIsInActivitySequence(entity, theValue, rtNpcGrp) -end - -Translator.getGenericLogicConditionIsInActivityStep = function(entity, conditionValue, rtNpcGrp) - assert(entity and type(entity) == "userdata") - assert(conditionValue and type(conditionValue) == "string") - assert(rtNpcGrp and type(rtNpcGrp) == "table") - - local prefix = "" - if rtNpcGrp then prefix = r2.getNamespace() ..rtNpcGrp.Id.."." end - - - local theValue = conditionValue - local tab=Logic.findActivityStepIdByInstanceId(entity, theValue) - local id, id2 = tab[1], tab[2] - - assert(id ~= -1 and id2 ~= -2); - - local condition1 = prefix.."oldActivityStepVar2 == ".. tostring(id) - local condition2 = prefix.."currentActivitySequenceVar == ".. tostring(id2-1) - local firstCondition = Translator.createAction("dynamic_if", condition1) - local lastCondition = Translator.createAction("dynamic_if", condition2) - table.insert(firstCondition.Children, lastCondition) - return firstCondition, lastCondition -end - -Translator.getNpcLogicConditionIsInActivityStep = function(entity, context, condition, rtNpcGrp) - assert(entity and type(entity) == "userdata") - assert(context and type(context) == "table") - assert(condition and type(condition) == "userdata" and condition.Class == "ConditionStep") - assert(rtNpcGrp and type(rtNpcGrp) == "table") - - local conditionValue = condition.Condition.Value - return Translator.getGenericLogicConditionIsInActivityStep(entity, conditionValue, rtNpcGrp) -end - -Translator.getNpcLogicConditionIsDeadOrAlive = function(entity, context, condition, rtNpcGrp, isAlive) - assert(entity and type(entity) == "userdata") - assert(context and type(context) == "table") - assert(condition and type(condition) == "userdata" and condition.Class == "ConditionStep") - assert(rtNpcGrp and type(rtNpcGrp) == "table") - - local prefix = "" - if rtNpcGrp then prefix = r2.getNamespace() ..rtNpcGrp.Id.."." end - - local lastCondition = Translator.createAction("dynamic_if", prefix.."alive == "..tonumber(isAlive) ) - local firstCondition = Translator.createAction("multi_actions", - { - Translator.createAction("code","("..prefix.."alive)"..prefix.."isAlived();" ), - lastCondition - }) - return firstCondition, lastCondition - -end - -Translator.getNpcLogicConditionIsDead = function(entity, context, condition, rtNpcGrp) - return Translator.getNpcLogicConditionIsDeadOrAlive(entity, context, condition, rtNpcGrp, 0) -end - -Translator.getNpcLogicConditionIsAlive = function(entity, context, condition, rtNpcGrp) - return Translator.getNpcLogicConditionIsDeadOrAlive(entity, context, condition, rtNpcGrp, 1) -end - - --- Action - -Translator.getNpcLogicActionDeactivate = function(entity, context, action, rtNpcGrp) - - if (not entity or not rtNpcGrp) then - return nil - end - - local prefix = "" - if rtNpcGrp then prefix = r2.getNamespace() ..rtNpcGrp.Id.."." end - - local retAction = Translator.createAction("code", "()"..prefix.."despawn(0);", "") - assert(retAction) - retAction.Name = "desactivate" - return retAction, retAction -end - - - - -Translator.getNpcLogicActionActivate = function(entity, context, action, rtNpcGrp) - - if (not entity or not rtNpcGrp) then - return nil - end - - local prefix = "" - if rtNpcGrp then prefix = r2.getNamespace() ..rtNpcGrp.Id.."." end ---()setAutoSpawn(1); - local retAction = Translator.createAction("code", "()"..prefix.."spawn();", "") - assert(retAction) - retAction.Name = "activate" - return retAction, retAction -end - - -Translator.getNpcLogicActionKill = function(entity, context, action, rtNpcGrp) - local prefix = "" - if rtNpcGrp then prefix = r2.getNamespace() ..rtNpcGrp.Id.."." end - - local retAction = Translator.createAction("code", "()"..prefix.."setHPScale(0);") - assert(retAction) - retAction.Name = "kill" - return retAction, retAction -end - -Translator.getGenericLogicActionBeginActivitySequence = function(sequenceInstanceId, rtNpcGrp) - - local activityStates = Logic.ActivitiesStates[sequenceInstanceId] - assert(activityStates) - local activityStatesId = activityStates[sequenceInstanceId][1].Id - - local retAction = Translator.createAction("code", "()"..r2:getNamespace() .. rtNpcGrp.Id .. "." .. "postNextState(\""..r2:getNamespace()..activityStatesId.."\");", rtNpcGrp.Id) - return retAction, retAction - -end -Translator.getNpcLogicActionBeginActivitySequence = function(entity, context, action, rtNpcGrp) - local sequenceInstanceId = action.Action.Value - return Translator.getGenericLogicActionBeginActivitySequence(sequenceInstanceId, rtNpcGrp) -end - - -Translator.getNpcLogicActionSitDown = function(entity, context, action, rtNpcGrp) - local retAction = Translator.createAction("sit_down", rtNpcGrp.Id) - assert(retAction) - retAction.Name = "sitDown" - return retAction, retAction -end - - -Translator.getNpcLogicActionStandUp = function(entity, context, action, rtNpcGrp) - local retAction =Translator.createAction("stand_up", rtNpcGrp.Id) - retAction.Name = "standUp" - return retAction, retAction -end - - -Translator.getNpcLogicActionFightPlayer = function(entity, context, action, rtNpcGrp) - local leader = entity - if entity:isKindOf("NpcGrpFeature") then - if table.getn(entity.Components) >= 0 then - leader = entity.Components[0] - else - leader = nil - end - end - assert(leader) - local category = leader.SubCategory - local aggro = leader.Aggro - if not category then - category = leader.Category - end - - local action1 = Translator.createAction("set_player_attackable", rtNpcGrp.Id, 1) - local action2 = r2.Translator.createAction("faction_init", rtNpcGrp.Id, category, aggro, leader.BotAttackable, 1) - local retAction = r2.Translator.createAction("multi_actions", {action1, action2}) - retAction.Name = "Fight with player" - return retAction ,retAction -end - -Translator.getNpcLogicActionDontFightPlayer = function(entity, context, action, rtNpcGrp) - local leader = entity - if entity:isKindOf("NpcGrpFeature") then - if table.getn(entity.Components) >= 0 then - leader = entity.Components[0] - else - leader = nil - end - end - assert(leader) - local category = leader.SubCategory - local aggro = leader.Aggro - if not category then - category = leader.Category - end - - local action1 = Translator.createAction("set_player_attackable", rtNpcGrp.Id, 0) - local action2 = r2.Translator.createAction("faction_init", rtNpcGrp.Id, category, aggro, leader.BotAttackable, 0) - local retAction = r2.Translator.createAction("multi_actions", {action1, action2}) - retAction.Name = "Dont fight with player" - return retAction ,retAction -end - - -Translator.getNpcLogicActionFightNpcs = function(entity, context, action, rtNpcGrp) - local leader = entity - if entity:isKindOf("NpcGrpFeature") then - if table.getn(entity.Components) >= 0 then - leader = entity.Components[0] - else - leader = nil - end - end - assert(leader) - local category = leader.SubCategory - local aggro = leader.Aggro - if not category then - category = leader.Category - end - - local action1 = Translator.createAction("set_bot_attackable", rtNpcGrp.Id, 1) - local action2 = Translator.createAction("faction_init", rtNpcGrp.Id, category, aggro, 1, leader.PlayerAttackable) - local retAction = r2.Translator.createAction("multi_actions", {action1, action2}) - retAction.Name = "Fight with Npcs" - --inspect(action2) - return retAction ,retAction -end - -Translator.getNpcLogicActionDontFightNpcs = function(entity, context, action, rtNpcGrp) - local leader = entity - if entity:isKindOf("NpcGrpFeature") then - if table.getn(entity.Components) >= 0 then - leader = entity.Components[0] - else - leader = nil - end - end - assert(leader) - local category = leader.SubCategory - local aggro = leader.Aggro - if not category then - category = leader.Category - end - - local action1 = Translator.createAction("set_bot_attackable", rtNpcGrp.Id, 0) - local action2 = r2.Translator.createAction("faction_init", rtNpcGrp.Id, category, aggro, 0, leader.PlayerAttackable) - - local retAction = r2.Translator.createAction("multi_actions", {action1, action2}) - retAction.Name = "Dont fight with Npcs" - return retAction ,retAction -end - - -Translator.getNpcLogicActionRun = function(entity, context, action, rtNpcGrp) - local action1 = Translator.createAction("set_running_speed", rtNpcGrp.Id) - action1.Name = "Run" - return action1, action1 -end - - -Translator.getNpcLogicActionDontRun = function(entity, context, action, rtNpcGrp) - local action1 = Translator.createAction("set_walking_speed", rtNpcGrp.Id) - action1.Name = "Dont run" - return action1, action1 -end - -Translator.getNpcLogicActionEmitsUserEvent = function(entity, context, action, rtNpcGrp) - if not action.Action.ValueString then return end - local value = tostring(action.Action.ValueString) - - local action1 = Translator.createAction("generic_event_trigger", rtNpcGrp.Id, value) - action1.Name = "Trigger User Event" - return action1, action1 -end --- TODO to up --- Register an RtNpcGrp to a specific instanceId -Translator.registerManager = function(context, comp) - local rtNpcGrp = r2.newComponent("RtNpcGrp") - table.insert(context.RtAct.NpcGrps, rtNpcGrp) - context.RtGroups[tostring(comp.InstanceId)] = rtNpcGrp - rtNpcGrp.Name = rtNpcGrp.Id -end - - -function Translator.createAiGroup(entity, context) - local rtNpcGrp = Translator.getRtGroup(context, entity.InstanceId) - rtNpcGrp.GrpParameters = "ring\n".. rtNpcGrp.GrpParameters - - rtNpcGrp.AutoSpawn = 0 - - local aiState = r2.newComponent("RtAiState") - - aiState.AiActivity = "normal" - table.insert(context.RtAct.AiStates, aiState) - table.insert(aiState.Children, rtNpcGrp.Id) - context.GroupStatesName[rtNpcGrp.Id] = aiState.Id - - return rtNpcGrp, aiState -end - -function Translator.translateAiGroup(entity, context) - local rtNpcGrp = Translator.getRtGroup(context, entity.InstanceId) - if entity.Behavior.Actions then - Translator.translateEventHandlers( context, entity, entity.Behavior.Actions, rtNpcGrp) - end -end - - - -function Translator.translateAiGroupEvent(eventName, entity, context, rtAction) - assert(rtAction) - --inspect(context) - local rtNpcGrp = Translator.getRtGroup(context, entity.InstanceId) - local states = Translator.getRtStatesNames(context, entity.InstanceId) --- local rtAct = context.RtAct - - local act = entity:getParentAct() - local rtAct2 = context.ActIdToRtAct[act.InstanceId] - local entityAct = context.Act - - local entityIndex = context.Scenario:getActIndex(act.InstanceId) - local componentIndex = context.Scenario:getActIndex(context.Act.InstanceId) - - -- entity on act2, component on act1 (they can not interact) - if entityIndex ~= componentIndex and entityIndex ~= 0 and componentIndex ~= 0 then - return - end - - local rtAct = context.RtAct - if rtAct2 ~= rtAct then - local baseAct = context.Scenario:getBaseAct() - local index = context.Scenario:getActIndex(context.Act.InstanceId) - if index == -1 then - printWarning("Invalid Scenario") - end - -- Permanent content is known by everyone - if index ~= 0 then - local rtNpcGrpBase = r2.Translator.getRtGroup(context, baseAct.InstanceId) - - local action = Translator.createAction("test_act", rtNpcGrpBase.Id , index) - table.insert(action.Children, rtAction) - rtAction = action - end - end - - local rtEvent = Translator.createEvent(eventName, states, rtNpcGrp.Id) - table.insert(rtEvent.ActionsId, rtAction.Id) - table.insert(rtAct2.Events, rtEvent) - table.insert(rtAct2.Actions, rtAction) -end - -function Translator.translateAiGroupInitialState(entity, context, rtAction) - return Translator.translateAiGroupEvent("start_of_state", entity, context, rtAction) -end - -function Translator.translateAiGroupPlayerTargetNpc(entity, context, rtAction) - return Translator.translateAiGroupEvent("player_target_npc", entity, context, rtAction) -end - ---Group -Translator.getNpcGroupLogicGroupDeath= function(this, context, eventrtNpcGrp, rtNpcGrp) - local eventHandler, firsCondition, lastCondition = nil, nil, nil - eventHandler = Translator.createEvent("group_eliminated", "", rtNpcGrp.Id) - return eventHandler, firsCondition, lastCondition -end - - -function Translator.translateDialog(entity, context) - local rtNpcGrp = Translator.getRtGroup(context, entity.InstanceId) - - local beforeWait = 0 - - if (table.getn(entity.Components) > 0) then - local i = 0 - while i < table.getn(entity.Components) and not entity.Components[i]:isKindOf("ChatStep") do - i = i + 1 - end - if i < table.getn(entity.Components) and entity.Components[i]:isKindOf("ChatStep") then - beforeWait = entity.Components[i].Time - end - end - - local rtEventStart = Translator.createEvent("timer_t1_triggered", "", rtNpcGrp.Id) -- Start Of Chat Step - - - - local rtDialogOk = Translator.createAction("switch_actions", Logic.chatStepVar) - local rtAction = nil - local rtAction2 = nil - - rtAction = Translator.createAction("chat_step_first", rtNpcGrp.Id, beforeWait) - table.insert(rtDialogOk.Children, rtAction) - local chatStepIndex = 0 - local componentIndex, component = next(entity.Components) - - local endParam = { Grps={}, Whos={}, Emotes={}, Indexs={}, Says={}, WhoNoEntitys={}} - - while componentIndex do - - if component and component:isKindOf("ChatStep") then - chatStepIndex = chatStepIndex + 1 - local param = {} - - - local who = r2:getInstanceFromId(component.Actions[0].Who) - local facing = r2:getInstanceFromId(component.Actions[0].Facing) - - - - local whoGrp = nil - local whoName = nil - local facingGrp = nil - local facingName = nil - - if who then - whoGrp = Translator.getRtGroup(context, who.InstanceId) - whoGrp = whoGrp.Id - whoName = who.Name - end - - if facing then - facingGrp = Translator.getRtGroup(context, facing.InstanceId) - facingGrp = facingGrp.Id - facingName = facing.Name - end - - param.WhoGrp = whoGrp - param.Who = whoName - param.FacingGrp = facingGrp - param.Facing = facingName - if not param.Facing then param.Facing = "" end - param.Says = r2.Features.TextManager.getRtId(context, component.Actions[0].Says) - if not param.Says then param.Says = "" end - param.Emote = component.Actions[0].Emote - if not param.Emote then param.Emote = "" end - param.Index = chatStepIndex - - param.WhoNoEntity = component.Actions[0].WhoNoEntity - if not param.WhoNoEntity then param.WhoNoEntity = "" end - - param.Break = 0 - if component.BreakAtEnd then - param.Break = component.BreakAtEnd - end - - componentIndex, component = next(entity.Components, componentIndex) - - if component then - param.Time = component.Time - else - param.Time = 3 - end - - rtAction = Translator.createAction("chat_step", rtNpcGrp.Id, param) - table.insert(rtDialogOk.Children, rtAction) - - table.insert(endParam.Indexs, param.Index) - table.insert(endParam.Grps, param.WhoGrp) - table.insert(endParam.Whos, param.Who) - table.insert(endParam.Emotes, param.Emote) - table.insert(endParam.Says, param.Says) - table.insert(endParam.WhoNoEntitys, param.WhoNoEntity) - - - else -- !if isKindOf("ChatStep") - componentIndex, component = next(entity.Components, componentIndex) - end - end - - rtAction = Translator.createAction("chat_step_last", rtNpcGrp.Id, chatStepIndex+1) - table.insert(rtDialogOk.Children, rtAction) - - - - local rtDialogStart = Translator.createAction("dynamic_if", "start == 1" , rtDialogOk ) - - - - table.insert(rtEventStart.ActionsId, rtDialogStart.Id) - table.insert(context.RtAct.Events, rtEventStart) - table.insert(context.RtAct.Actions, rtDialogStart) - - - local baseAct = context.Scenario:getBaseAct() - local rtNpcGrpBase = r2.Translator.getRtGroup(context, baseAct.InstanceId) - - - local rtActionEnd = Translator.createAction("chat_step_end", rtNpcGrp.Id, endParam, rtNpcGrpBase.Id) - if (rtActionEnd) then - local rtEvenEnd = Translator.createEvent("timer_t0_triggered", "", rtNpcGrp.Id) -- Endo Of Chat Step - table.insert(rtEvenEnd.ActionsId, rtActionEnd.Id) - table.insert(context.RtAct.Events, rtEvenEnd) - table.insert(context.RtAct.Actions, rtActionEnd) - end - - - - do - local rtInitialState= Translator.createAction("dialog_init", rtNpcGrp.Id , entity.Repeating, entity.AutoStart ) - Translator.translateAiGroupInitialState(entity, context, rtInitialState) - end - - if (entity.AutoStart == 1) then - local rtInitialState = r2.Translator.createAction("dynamic_if", r2:getNamespace()..rtNpcGrp.Id..".Active == 1", - Translator.createAction("dialog_starts", rtNpcGrp.Id ) - ) - Translator.translateAiGroupInitialState(entity, context, rtInitialState) - end - - - Translator.translateAiGroup(entity, context) -end - - -Translator.getNpcGroupLogicGroupAMemberDeath = Translator.getNpcLogicEventDeath - --- user Event 0 --- start = 1 - - --- --- TODO: dיmךler les events (tmp: on utilise les events 7 et 8 pour respectivement activate et deactivate) --- -function Translator.getDialogLogicAction(entity, context, action) - assert( action.Class == "ActionStep") - - local firstAction, lastAction = nil, nil - - assert( action.Class == "ActionStep") - local component = r2:getInstanceFromId(action.Entity) - assert(component) - local rtNpcGrp = Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - if action.Action.Type == 'activate' then - local action1 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Active", 1) - local action2 = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 7) - local action3 = r2.Translator.createAction("dynamic_if", r2:getNamespace()..rtNpcGrp.Id..".AutoStart == 1", - Translator.createAction("dialog_starts", rtNpcGrp.Id) - ) - local actionActivate = r2.Translator.createAction("multi_actions", {action1, action2, action3}) - - local retAction = r2.Translator.createAction("dynamic_if", r2:getNamespace()..rtNpcGrp.Id..".Active == 0", actionActivate) - return retAction, retAction - elseif action.Action.Type == 'deactivate' then - --local action1 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Active", 0) - local action1 = r2.Translator.createAction("dialog_deactivate", rtNpcGrp.Id) - local action2 = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 8) - --local action3 = r2.Translator.createAction("dialog_stops", rtNpcGrp.Id) - local retAction = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1, - r2.Translator.createAction("multi_actions", {action1, action2})) - return retAction, retAction - elseif action.Action.Type == 'starts dialog' then - local retAction = r2.Translator.createAction("dynamic_if", r2:getNamespace()..rtNpcGrp.Id..".Active == 1", - Translator.createAction("dialog_starts", rtNpcGrp.Id) - ) - return retAction, retAction - elseif action.Action.Type == 'continues dialog' then - local retAction = r2.Translator.createAction("dynamic_if", r2:getNamespace()..rtNpcGrp.Id..".Active == 1", - Translator.createAction("dialog_continues", rtNpcGrp.Id) - ) - return retAction, retAction - elseif action.Action.Type == 'starts chat' then - local index = Translator.getChatPositionFromDialog(component, action.Action.Value) - if index == -1 then return nil end - local retAction = r2.Translator.createAction("dynamic_if", r2:getNamespace()..rtNpcGrp.Id..".Active == 1", - Translator.createAction("chat_starts", rtNpcGrp.Id, index) - ) - return retAction, retAction - elseif action.Action.Type == 'stops dialog' then - --add condition if Active == 1 ? - local retAction = Translator.createAction("dialog_stops", rtNpcGrp.Id) - return retAction, retAction - - end - - printWarning('Action not implemented yet :'.. action.Action.Type) - assert(nil) - return nil, nil -end - - - - -function Translator.getChatPositionFromDialog(dialog, chatInstanceId) - assert(dialog) - assert(dialog.Class == 'ChatSequence' or dialog.Class == "ProximityDialog") - assert(chatInstanceId ~= nil and chatInstanceId ~= "") - local index = -1 - local componentIndex, component = next(dialog.Components) - while componentIndex do - if component.Class == 'ChatStep' then - index = index + 1 - if tostring(component.InstanceId) == tostring(chatInstanceId) then - return index - end - end - componentIndex, component = next(dialog.Components, componentIndex) - end - return -1 - -end - --- --- TODO: dיmךler les events (tmp: on utilise les events 7 et 8 pour respectivement activate et deactivate) --- -function Translator.getDialogLogicEvent(entity, context, event) - assert(entity) - assert( event.Class == "LogicEntityAction") - - - local component = entity -- r2:getInstanceFromId(event.Entity) - assert(component) - local rtNpcGrp = Translator.getRtGroup(context, component.InstanceId) - assert(rtNpcGrp) - - local states = Translator.getRtStatesNames(context, entity.InstanceId) - - - - local eventType = tostring(event.Event.Type) - - if eventType == 'activation' then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 7) - - elseif eventType == 'deactivation' then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 8) - - elseif eventType == 'end of chat' then - local action = Translator.createEvent("timer_t2_triggered", states, rtNpcGrp.Id) - local index = Translator.getChatPositionFromDialog(component, event.Event.Value) - if index == -1 then return nil end - local firstCondition = Translator.createAction("if_value_equal", rtNpcGrp.Id, "v1", index + 2, firstCondition) - return action, firstCondition, firstCondition - - elseif eventType == 'end of dialog' then - return Translator.getComponentUserEvent(rtNpcGrp, 2) - - elseif eventType == 'start of chat' then - local action = Translator.createEvent("user_event_4", states, rtNpcGrp.Id) - local index = Translator.getChatPositionFromDialog(component, event.Event.Value) - if index == -1 then return nil end - local firstCondition = Translator.createAction("if_value_equal", rtNpcGrp.Id, "v1", index+2, firstCondition) - return action, firstCondition, firstCondition - - elseif eventType == 'start of dialog' then - return Translator.getComponentUserEvent(rtNpcGrp, 1) - end - - printWarning('Event not implemented yet :'.. event.Event.Type) - assert(nil) -end - - -Translator.getDialogLogicCondition = function(entity, context, condition ) - assert( condition.Class == "ConditionStep") - local rtNpcGrp = Translator.getRtGroup(context, condition.Entity) - assert(rtNpcGrp) - local funs ={} - - if condition.Condition.Type == "is in dialog" then - local firstCondition = Translator.createAction("if_value_equal", rtNpcGrp.Id, "start", 1) - return firstCondition, firstCondition - end - - if condition.Condition.Type == "is not in dialog" then - local firstCondition = Translator.createAction("if_value_equal", rtNpcGrp.Id, "start", 0) - return firstCondition, firstCondition - end - - - if condition.Condition.Type == "is in chat" then - local index = Translator.getChatPositionFromDialog(entity, condition.Condition.Value) - assert(index ~= -1) - local lastCondition = Translator.createAction("if_value_equal", rtNpcGrp.Id, "v1", index+2) - local firstCondition = Translator.createAction("if_value_equal", rtNpcGrp.Id, "start", 1, lastCondition) - return firstCondition, lastCondition - end - - printWarning('Condition not implemented yet :'.. condition.Condition.Type) - return nil, nil -end - - -function Translator.translateDefaultFeature(entity, context, translateActivity) - local components = entity.Components - --luaObject(context.Feature) - local key,comp = next(components,nil) - while(key ~= nil) - do - -- Npc case (npc alone not object) - if (comp.isKindOf and comp:isKindOf("Npc")) then - local hlNpc = comp - context.Feature = hlNpc - - -- create and set rtNpc - - local rtNpc = r2.Translator.translateNpc(hlNpc, context) - table.insert(context.RtAct.Npcs, rtNpc) - - -- create or get rtGrp - -- set rtGrp.GroupParameter by reading hlNpc (Aggro, Player attackable..) - local rtNpcGrp = r2.Translator.getRtGroup(context,hlNpc.InstanceId) - r2.Translator.setGroupParameters (hlNpc, rtNpcGrp) - table.insert(rtNpcGrp.Children, rtNpc.Id) - - -- set activity - -- when translating a usercomponentholder (container which has aiActivities), we must translate the AiActivities - if translateActivity and translateActivity == true - then - local aiActivity = r2.Translator.getAiActivity(hlNpc) - r2.Translator.translateActivities(context, hlNpc, hlNpc:getBehavior(), rtNpcGrp, aiActivity) - end - - -- set eventHandlers - r2.Translator.translateEventHandlers(context, hlNpc, hlNpc:getBehavior().Actions, rtNpcGrp) - end - key,comp = next(components,key) - end -end - -function Translator.pretranslateDefaultFeature(this, context) - local components = this.Components - - local key, comp = next(components, nil) - while (key ~= nil) do - if (comp.isKindOf and comp:isKindOf("Npc")) then - local rtNpcGrp = r2.Translator.getRtGroup(context,comp.InstanceId) - end - key, comp = next(components, key) - end -end - -function Translator.pretranslateDefaultFeature2(this, context) - local components = this.Components - - local key, comp = next(components, nil) - while (key ~= nil) do - if (comp.isKindOf and comp:isKindOf("Npc")) then - local rtNpcGrp = r2.Translator.getRtGroup(context,comp.InstanceId) - -- set activity - local hlNpc = comp - context.Feature = hlNpc - local aiActivity = r2.Translator.getAiActivity(hlNpc) - r2.Translator.translateActivities(context, hlNpc, hlNpc:getBehavior(), rtNpcGrp, aiActivity) - - end - key, comp = next(components, key) - end -end - - - - -function Translator.getDefaultFeatureActivitiesIds(this) - - local activitiesIds = {} - - local function getActivitiesIdsFrom(entity) - local components = entity.Components - local key,comp = next(components,nil) - while(key ~= nil) - do - -- Npc case (npc alone not object) - if (comp.isKindOf and comp:isKindOf("Npc")) then - local behavior = comp:getBehavior() - local k, v = next(behavior.Activities, nil) - while k do - table.insert(activitiesIds, v.InstanceId) - k, v = next(behavior.Activities, k) - end - else - if comp.Components then - getActivitiesIdsFrom(comp) - end - end - key,comp = next(components, key) - end - end - - getActivitiesIdsFrom(this) - - return activitiesIds - -end - - ---function Translator.getTopParentTreeNode(instance) --- local tmpInstance = instance --- if tmpInstance.ParentInstance.Class ~= "LogicEntity" and tmpInstance.ParentInstance.Class ~= "DefaultFeature" --- and tmpInstance.ParentInstance.Class ~= "Act" then --- return tmpInstance:getFeatureParentTreeNode()--tmpInstance:getParentTreeNode() --- else --- return tmpInstance:getFeatureParentTreeNode() --- end ---end - -function Translator.getDebugBase(base) - if dataDevMode then - return "palette.entities.botobjects.milestone" - else - return base - end -end - -function Translator.getDebugCreature(creature) - if dataDevMode then - return "object_milestone.creature" - else - return creature - end -end - - --- feature generic activate & deactivate -function Translator.getFeatureActivationLogicAction(rtNpcGrp, action) - if (action.Action.Type == "activate") then - local action1 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Active", 1) - local action2 = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 4) - local retAction = r2.Translator.createAction("multi_actions", {action1, action2}) - assert(retAction) - return retAction, retAction - elseif (action.Action.Type == "deactivate") then - local action1 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Active", 0) - local action2 = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 5) - local retAction = r2.Translator.createAction("multi_actions", {action1, action2}) - assert(retAction) - return retAction, retAction - end - return nil, nil -end - -function Translator.getFeatureActivationLogicEvent(rtNpcGrp, event) - - local eventType = event.Event.Type - if eventType == "activation" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 4) - elseif eventType == "deactivation" then - return r2.Translator.getComponentUserEvent(rtNpcGrp, 5) - end - return nil, nil, nil -end - -function Translator.getFeatureActivationCondition(condition, rtNpcGrp) - if condition.Condition.Type == "is active" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 1); - return action1, action1 - elseif condition.Condition.Type == "is inactive" then - local action1 = r2.Translator.createAction("if_value_equal", rtNpcGrp.Id, "Active", 0); - return action1, action1 - end - return nil, nil -end - - -function Translator.translateFeatureActivation(instance, context) - local rtNpcGrp = r2.Translator.getRtGroup(context, instance.InstanceId) - assert(rtNpcGrp) - if instance.Active and instance.Active == 1 then - local action1 = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Active", 1) - local action2 = r2.Translator.createAction("user_event_trigger", rtNpcGrp.Id, 4) - local retAction = r2.Translator.createAction("multi_actions", {action1, action2}) - r2.Translator.translateAiGroupEvent("start_of_state" , instance, context, retAction) - else - local retAction = r2.Translator.createAction("set_value", rtNpcGrp.Id, "Active", 0) - r2.Translator.translateAiGroupEvent("start_of_state" , instance, context, retAction) - end -end - - -function Translator.addActivationToTranslations(logicTranslations) - if logicTranslations.ApplicableActions == nil then logicTranslations.ApplicableActions = {} end - --logicTranslations.ApplicableActions.activate = {menu=i18n.get("uiR2EdActivate"):toUtf8(), text="activates"} - --logicTranslations.ApplicableActions.deactivate = {menu=i18n.get("uiR2EdDesactivate"):toUtf8(), text="deactivates"} - --logicTranslations.ApplicableActions.trigger = {menu=i18n.get("uiR2EdTrigger"):toUtf8(), text="triggers"} - - if logicTranslations.Events == nil then logicTranslations.Events = {} end - --logicTranslations.Events.activation = {menu=i18n.get("uiR2EdActivation"):toUtf8(), text=r2:lowerTranslate("uiR2EdActivation")} - --logicTranslations.Events.deactivation = {menu=i18n.get("uiR2EdDesactivation"):toUtf8(), text=r2:lowerTranslate("uiR2EdDesactivation")} - --logicTranslations.Events.trigger = {menu=i18n.get("uiR2EdTrigger"):toUtf8(), text=r2:lowerTranslate("uiR2EdTrigger")} - - if logicTranslations.Conditions == nil then logicTranslations.Conditions = {} end - --logicTranslations.Conditions["is active"] = {menu=i18n.get("uiR2EdIsActive"):toUtf8(), text=r2:lowerTranslate("uiR2EdIsActive")} - --logicTranslations.Conditions["is inactive"] = {menu=i18n.get("uiR2EdIsInactive"):toUtf8(), text=r2:lowerTranslate("uiR2EdIsInactive")} - return logicTranslations -end - - -function Translator.CreateUserComponent(featureName) - if not featureName or featureName == "" then - debugInfo("Translator: calling createUserComponent on nil or empty featureName") - return - end - - local function posOk(x, y, z) - debugInfo(string.format("Validate creation of '"..featureName.."' at pos (%d, %d, %d)", x, y, z)) - local component = r2.Features[featureName].createUserComponent( x, y) - component.Texts = nil - r2.requestInsertNode(r2:getCurrentAct().InstanceId, "Features", -1, "", component) - end - - local function posCancel() - debugInfo("Cancel choice '"..featureName.."' position") - end - - r2:choosePos("object_component_user_event.creature", posOk, posCancel, "") -end - -function Translator.CheckPickedEntity(component, prop) - local k, v = next(prop, nil) - while k do - local property = v - - if property.Type and property.Type == "RefId" then - local this = r2:getInstanceFromId(component.InstanceId) - - local targetId = this[property.Name] - - if targetId ~= r2.RefId("") then - debugInfo("targetId:" ..targetId) - local filterFunc = "return " ..property.PickFunction .."('"..targetId.."')" - debugInfo("filterfunc: " ..filterFunc) - local ok = loadstring(filterFunc)() - if ok == false then - debugInfo("name: " ..property.Name) - r2.requestSetNode(this.InstanceId, property.Name, r2.RefId("")) - end - - end - end - k, v = next(prop, k) - end - -end - - - -function Translator.checkActForPicking(componentId, entityId) - local component = r2:getInstanceFromId(componentId) - assert(component) - --debugInfo("CheckActForPicking: EntityId =" ..entityId) - --inspect(component) - local entity = r2:getInstanceFromId(entityId) - assert(entity) - - return entity:getParentAct().InstanceId == r2.Scenario.Acts[0].InstanceId - or entity:getParentAct().InstanceId == component:getParentAct().InstanceId -end - - -function Translator.getEventFromType(instance, context, eventType) - if not context or not instance or not instance.getLogicEvent then return nil end - local fakeEvent = {} - fakeEvent.Class = "LogicEntityAction" - fakeEvent.Event = {} - fakeEvent.Event.Type = eventType - return instance:getLogicEvent(context, fakeEvent) -end - ----------------------------------------- ---- TASK MODULE ------------------------ ----------------------------------------- - -Translator.Tasks = {} - ---Start of state (init) = event 7 -function Translator.Tasks.startOfStateLogic(component, context, rtGrp) - do - local action = r2.Translator.createAction("user_event_trigger", rtGrp.Id, 7) - r2.Translator.translateAiGroupEvent("start_of_state" , component, context, action) - end - - do - local repeatable = component.Repeatable - if not repeatable then repeatable = 0 end - - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", component.Active) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v3", 0) -- Success - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3, } ) - r2.Translator.translateAiGroupEvent("user_event_7", component, context, rtAction) - end -end - ---Activation = event 4 -function Translator.Tasks.activationLogic(component, context, rtGrp) - do - local repeatable = component.Repeatable - if not repeatable then repeatable = 0 end - - local rtAction1 = r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1) - local rtAction2 = r2.Translator.createAction("set_value", rtGrp.Id, "v1", repeatable) - local rtAction3 = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0) -- Success - local rtAction = r2.Translator.createAction("multi_actions", { rtAction1, rtAction2, rtAction3, } ) - r2.Translator.translateAiGroupEvent("user_event_4", component, context, rtAction) - end -end - ---Deactivation = event 5 -function Translator.Tasks.deactivationLogic(component, context, rtGrp) - do - local rtAction = r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0 ), - }) - r2.Translator.translateAiGroupEvent("user_event_5", component, context, rtAction) - end -end - ---When using talkTo, giveItem or requestItem actions, event 3 is emitted when the player took the missin (contextual validation) -function Translator.Tasks.setStatusLogic(component, context, rtGrp) - do - local action = r2.Translator.createAction("set_value", rtGrp.Id, "v2", 1 ) - r2.Translator.translateAiGroupEvent("user_event_3", component, context, action) - end -end - ---Success = event 9 ---No broadcast means the broadcast action is done elsewhere in the translate (not on success) -function Translator.Tasks.successNoBroadcastLogic(component, context, rtGrp) - do - --if repeatable - local action1 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 1, - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1 ), - }) - ); - --if not repeatable - local action2 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 0, - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0 ) , - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 2 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1 ), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 5), - }) - ); - - local actions = r2.Translator.createAction("multi_actions", {action1, action2}) - - local action = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 2, - r2.Translator.createAction("condition_if", r2:getNamespace()..rtGrp.Id..".Active == 1", actions)) - r2.Translator.translateAiGroupEvent("user_event_9", component, context, action) - end -end - ---Success with broadcast : for components using event 8 as an intermediate step. -function Translator.Tasks.successBroadcastLogic(component, context, rtGrp) - local validationNeeded = component.ValidationNeeded - - local action2 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 1, --if Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 1 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 0 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1 ), - }) - ); - local action3 = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v1", 0, -- if not Repeatable - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("set_value", rtGrp.Id, "Active", 0 ) , - r2.Translator.createAction("set_value", rtGrp.Id, "v2", 2 ), - r2.Translator.createAction("set_value", rtGrp.Id, "v3", 1 ), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 5) - }) - ); - - local actions = {} - if validationNeeded == 1 then - actions = {action2, action3} - else - local baseAct = r2.Scenario:getBaseAct() - local baseActRtGrp = r2.Translator.getRtGroup(context, baseAct.InstanceId) - local actionBroadcast = r2.Translator.createAction("broadcast_msg",baseActRtGrp.Id, component:textAdapter(component.BroadcastText) ) - - actions = {action2, action3, actionBroadcast} - end - local multiActions = r2.Translator.createAction("multi_actions", actions) - - local action = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 2, - r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, multiActions)) - r2.Translator.translateAiGroupEvent("user_event_9", component, context, action) -end - ---When validation is needed, emit success event when targeting mission giver -function Translator.Tasks.validationByMissionGiver(component, giver, context, rtGrp) - local rtGiverGrp = r2.Translator.getRtGroup(context, giver.InstanceId) - assert(rtGiverGrp) - do - local actionEvent = r2.Translator.createAction("user_event_trigger", rtGrp.Id, 9) - - local action1 = r2.Translator.createAction("npc_say", component:textAdapter(component.MissionSucceedText), rtGiverGrp.Id ..":"..giver.Name) - - local action = r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 2, - r2.Translator.createAction("condition_if", r2:getNamespace()..rtGrp.Id..".Active == 1", - r2.Translator.createAction("multi_actions", {actionEvent, action1}))) - - r2.Translator.translateAiGroupEvent("player_target_npc", giver, context, action) - end -end - --- when receiving event 8, just broadcast a msg indicating that the mission is successful but that the player has --- to go back to the giver to complete it. -function Translator.Tasks.broadcastOnEvent8(component, context) - local baseAct = r2.Scenario:getBaseAct() - local baseActRtGrp = r2.Translator.getRtGroup(context, baseAct.InstanceId) - local actionBroadcast = r2.Translator.createAction("broadcast_msg",baseActRtGrp.Id, component:textAdapter(component.BroadcastText) ) - - r2.Translator.translateAiGroupEvent("user_event_8", component, context, actionBroadcast) -end - -function Translator.Tasks.giverLogic(component, giver, context, rtGrp) - local rtGiverGrp = r2.Translator.getRtGroup(context, giver.InstanceId) - assert(rtGiverGrp) - - local actionWaitValidation = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, -- Active - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 1, -- giver has been spoken to - r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("npc_say", component:textAdapter(component.WaitValidationText), rtGiverGrp.Id ..":"..giver.Name), - r2.Translator.createAction("user_event_trigger", rtGrp.Id, 2) - }))) - - --say mission text + contextual text (talk to) - local multiActions = r2.Translator.createAction("multi_actions", { - r2.Translator.createAction("npc_say", component:textAdapter(component.MissionText), rtGiverGrp.Id ..":"..giver.Name), - r2.Translator.createAction("talk_to", rtGrp.Id, component:textAdapter(component.ContextualText)), - }) - - local actionTalkTo = r2.Translator.createAction("if_value_equal", rtGrp.Id, "Active", 1, -- Active - r2.Translator.createAction("if_value_equal", rtGrp.Id, "v2", 0, multiActions)) - - local rtAction = r2.Translator.createAction("multi_actions", {actionWaitValidation, actionTalkTo}) - - r2.Translator.translateAiGroupEvent("player_target_npc", giver, context, rtAction) -end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_ui.lua b/code/ryzom/common/data_common/r2/r2_ui.lua deleted file mode 100644 index a9d4547cf..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui.lua +++ /dev/null @@ -1,97 +0,0 @@ --- In this file we define functions that serves as an interface between the framework of the --- editor (C++ code), and the ui. Ideally the C++ should never manipulate the ui directly. --- It should rather call functions in this interface to do the job. --- This allow for easy customisation, because users can replace any function with their --- own lua code (possibly forwarding to the previous function). --- This file works in close relation with the r2.xml file with contains the actual ui - - - -------------- -------------- --- GLOBALS -- -------------- -------------- - --- The following table is intended to contain ui related classes & functions --- For now the ui stuffs are being migrated into this table --- TODO nico : move ui stuff here to 'depolute' the r2 table - -r2.ui = {} - - ------------------ ------------------ --- GLOBAL INIT -- ------------------ ------------------ - -function r2:initUI() - self:buildPaletteUI() - r2.FeatureTree.buildFeatureTreeUI() - r2:refreshWindowButtons() - --updateAllLocalisedElements() - -- init all forms - for k, form in pairs(r2.Forms) do - form.NameToProp = {} - for l, prop in pairs(form.Prop) do - form.NameToProp[prop.Name] = prop - end - end - -- make the admin window point on the main page (obsolete, replaced by Session Browser) - -- if browseRingWindowHomePage ~= nil then - -- browseRingWindowHomePage() - -- else - -- debugInfo("---> ERROR: what is browseRingWindowHomePage?") - -- end - r2.SelectBar:init() - local paletteWnd = getUI("ui:interface:r2ed_palette") - local debugPanel = paletteWnd:find("debug_panel").button_enclosing - local extDbg = (config.R2EDExtendedDebug == 1) - - local chooseLocationWnd = getUI("ui:interface:r2ed_acts") - local ringLevelDebug = chooseLocationWnd:find("ring_level") - - if debugPanel then - debugPanel.reset_ed.active = extDbg - debugPanel.reset_ed_and_reload_ui.active = extDbg - debugPanel.reload_core.active = extDbg - debugPanel.inspect_r2.active = extDbg - debugPanel.reset_display.active = extDbg - ringLevelDebug.active = extDbg - -- debugPanel.test.active = extDbg - -- debugPanel.create_scenario.active = extDbg - -- debugPanel.create_act.active = extDbg - -- debugPanel.connect_scenario.active = extDbg - -- debugPanel.reconnect_scenario.active = extDbg - -- debugPanel.list_adventures.active = extDbg - end - paletteWnd:find("tab2").active = true - paletteWnd:find("tab2_bm").active = true - paletteWnd:find("tab4").active = extDbg - paletteWnd:find("tab4_bm").active = extDbg -end - - ------------ ------------ --- TESTS -- ------------ ------------ -function testTree() - local headNode = SNode() - local rootNode = SNode() - headNode:addChild(rootNode) - rootNode.Text = "Root" - rootNode.Opened = true - rootNode.Bitmap = "ICO_Atys.tga" - local tree = getUI(r2.instanceTree); - for i = 1,3 do - local son = SNode() - son.Text = "Node " .. tostring(i) - rootNode:addChild(son) - end - tree:setRootNode(headNode) - tree:forceRebuild() -end - diff --git a/code/ryzom/common/data_common/r2/r2_ui_acts.lua b/code/ryzom/common/data_common/r2/r2_ui_acts.lua deleted file mode 100644 index 51b7675df..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_acts.lua +++ /dev/null @@ -1,1336 +0,0 @@ -r2.acts = { - - newLocation = "new location", - enlargingFactor = 2, - islands = {}, - ecoSystemName = "r2_desert", - islandButtonColors = - { - ["r2_desert"] = "157 110 74 255", - ["r2_jungle"] = "47 110 54 255", - ["r2_forest"] = "74 52 0 255", - ["r2_lakes"] = "95 93 67 255", - ["r2_roots"] = "66 52 41 255", - }, - - islandSelectedButtonColors = - { - ["r2_desert"] = "152 60 39", - ["r2_jungle"] = "18 156 51", - ["r2_forest"] = "133 36 13", - ["r2_lakes"] = "109 149 106", - ["r2_roots"] = "73 148 122", - }, - - islandOverButtonColors = - { - ["r2_desert"] = "127 48 33", - ["r2_jungle"] = "0 51 20", - ["r2_forest"] = "90 28 0", - ["r2_lakes"] = "55 53 37", - ["r2_roots"] = "36 22 11", - }, - - ecosystemNames = - { - ["r2_desert"] = i18n.get("uiR2EDEcosystemDesert"):toUtf8(), - ["r2_jungle"] = i18n.get("uiR2EDEcosystemJungle"):toUtf8(), - ["r2_forest"] = i18n.get("uiR2EDEcosystemForest"):toUtf8(), - ["r2_lakes"] = i18n.get("uiR2EDEcosystemLacustre"):toUtf8(), - ["r2_roots"] = i18n.get("uiR2EDEcosystemPrimeRoots"):toUtf8(), - }, - - selectedIslandButtonId = nil, - selectedIslandName = nil, - - createNewScenario = true, - deleteOldScenario = false, - createNewLocation = true, - - currentScenario = - { - name="", - level = 0, - rules = "strict", - notes = "" - }, - - currentAct = - { - name="", - weather = 0, - manualWeather = true, - notes = "", - }, - - currentLocation = - { - name="", - islandName = "", - instanceId = "", - season = "spring", - manualSeason = true, - notes = "", - entryPoint = "", - }, -} - --------------------------- to sort islands in function of their translated name ----------- -function r2.acts:getIslandNb(islandName) - - local islandTrans = i18n.get(islandName):toUtf8() - local islandNb = string.sub(islandTrans, -5) - local endLen = 6 - if string.sub(islandNb, 1, 1) ~= " " then - islandNb = string.sub(islandNb, 3) - endLen = endLen-1 - else - islandNb = string.sub(islandNb, 2) - end - - -- outland test - local outland = string.sub(islandTrans, 1, -endLen) - outland = string.sub(outland, -7) - if outland=="Outland" then return nil end - - islandNb = string.sub(islandNb, 1, -2) - return tonumber(islandNb) -end - --------------------------------------------------------------------------------------- ---------------------------- init location editor ------------------------------------- -function r2.acts:initActsEditor() - - -- create scenario/act window - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - self.islands = {} - local islands = getCompleteIslands() - - for islandName, islandAtts in pairs(islands) do - local ecoSystemName = islandAtts.continent - if self.islands[ecoSystemName] == nil then - self.islands[ecoSystemName] = {} - end - - local islandNb = self:getIslandNb(islandName) - if islandNb then - self.islands[ecoSystemName][islandNb] = {["name"] =islandName, ["table"] = islandAtts} - end - end - - local ecoList = actsUI:find("ecosystem_list_2") - assert(ecoList) - ecoList:clear() - - local ecoButtonsGr = actsUI:find("choose_ecosystem") - assert(ecoButtonsGr) - - local buttonDim = 78 - local maxWLine = actsUI:find("choose_island_2"):find("back_gr").w_real - 1 - local nbButtonsInLine = math.floor(maxWLine/(buttonDim+2)) - local addW = math.floor((maxWLine - buttonDim*nbButtonsInLine)/nbButtonsInLine) - - -- for each ecosystem group, create all islands buttons - for ecoSysName, ecoSysTable in pairs(self.islands) do - - local ecoGr = createGroupInstance("template_lines", ecoList.id, {id=ecoSysName}) - assert(ecoGr) - ecoList:addChild(ecoGr) - ecoGr.active = false - - local maxPackage = 0 - local islandsNb = 0 - for k, v in pairs(ecoSysTable) do - local package = r2.getIslandRingAccess(v.name) - if r2.RingAccess.testAccess(package) then - local package = tonumber(string.sub(package, 2, 2)) - if package>maxPackage then maxPackage = package end - islandsNb=islandsNb+1 - end - end - local nbLines = math.ceil(islandsNb/nbButtonsInLine) - - local ecoButton = ecoButtonsGr:find(ecoSysName):find("eco_button") - assert(ecoButton) - - local uc_package = ucstring() - uc_package:fromUtf8(i18n.get("uiR2EDEcosystemPackage"):toUtf8().." : "..maxPackage) - ecoButton.tooltip = uc_package - - for i=0, nbLines-1 do - local lineGr = createGroupInstance("template_line", ecoGr.id, {id="line"..i, h=buttonDim}) - assert(lineGr) - ecoGr:addChild(lineGr) - end - - if ecoGr.childrenNb >0 then - local currentLine = ecoGr:getChild(0) - assert(currentLine) - - local currentEltInLine = 0 - local currentLineNb = 0 - - for islandNb, islandAttrs in pairs(ecoSysTable) do - - local islandName = islandAttrs.name - local islandTable = islandAttrs.table - - local textureName = islandName.."_sp_little.tga" - local ringAccess = r2.RingAccess.testAccess( r2.getIslandRingAccess(islandName) ) - if fileExists(textureName) and ringAccess then - - local tooltip = islandName - - local islandW = islandTable.xmax - islandTable.xmin - local islandH = islandTable.ymax - islandTable.ymin - local maxDim = math.max(islandW, islandH) - local ratio = 64/maxDim - local width = math.floor(islandW*ratio) - local height = math.floor(islandH*ratio) - - local maxDim = buttonDim - 20 -- buttonDim - 2*(8+2) - local w_button_texture - local h_button_texture - local x_button_texture - local y_button_texture - local scale = "false" - - scale, w_button_texture, h_button_texture, width, height = - self:textureRedimension(textureName, maxDim, maxDim, width, height) - - scale = tostring(scale) - - -- center button island - x_button_texture =((maxDim-width)/2 + 10) -- (8 + (maxDim-width)/2 + 2) - y_button_texture =-((maxDim-height)/2 + 10) -- (-((maxDim-height)/2 + 8 + 2)) - - local tmplParams = - { - id=islandName, - posparent="parent", - posref="TL TL", - sizeref= "", - h = buttonDim+2, - w = buttonDim+addW, - - x_button="0", - y_button="0", - w_button = -addW, - h_button = "-2", - - icon = textureName, - tooltip = tooltip, - w_button_texture = w_button_texture, - h_button_texture = h_button_texture, - x_button_texture = x_button_texture, - y_button_texture = y_button_texture, - scale = scale, - color= self.islandButtonColors[ecoSysName], - back_color= self.islandButtonColors[ecoSysName], - selected_color = self.islandSelectedButtonColors[ecoSysName].." 255", - col_over = self.islandOverButtonColors[ecoSysName].." 80", - group_params_l="r2.acts:openIslandCardFromButton('"..ecoSysName.."', '" ..islandName.."')", - params_l="r2.acts:openIslandCardFromButton('"..ecoSysName.."', '" ..islandName.."')", - } - local buttonIsland = createGroupInstance("act_button_template", currentLine.id, tmplParams) - - if buttonIsland then - currentLine:addChild(buttonIsland) - buttonIsland.Env.Name = islandName - end - - currentEltInLine = currentEltInLine+1 - if currentEltInLine==nbButtonsInLine then - currentLineNb = currentLineNb+1 - if currentLineNb < ecoGr.childrenNb then - currentLine = ecoGr:getChild(currentLineNb) - end - currentEltInLine = 0 - end - end - end - end - end - - local newLocationMode = actsUI:find("new_location_mode_2") - assert(newLocationMode) - newLocationMode.Env.Name = self.newLocation - - local ringLevel = actsUI:find("ring_level") - ringLevel.hardtext = "Ring level : " .. r2.getCharacterRingAccess() -end - --------------------------------------------------------------------------------------- ---------------------------- open scenario editor ------------------------------------- -function r2.acts:openScenarioActEditor(newScenario, noCancelOption, rebuildFirstAct) - - setKeyboardContext("r2ed_scenario_creation") - - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - local locationEditor = actsUI:find("location") - assert(locationEditor) - - local prevLocationEditor = actsUI:find("previous_location") - assert(prevLocationEditor) - - actsUI.active = true - setTopWindow(actsUI) - - self.createNewScenario = newScenario - locationEditor.active = (newScenario==true or rebuildFirstAct==true) - prevLocationEditor.active = not locationEditor.active - self.createNewLocation = true - - local islandCancel = actsUI:find("island_cancel") - assert(islandCancel) - islandCancel.active = (noCancelOption~=true) - - local islandPrecedent = actsUI:find("island_precedent") - assert(islandPrecedent) - islandPrecedent.active = (self.createNewScenario~=true and rebuildFirstAct~=true) - - ----------------------------------------- - -- init scenario/act/location properties - self.currentScenario.level = 0 - self.currentScenario.rules = "strict" - - self.currentAct.weather = math.random(0,1022) - self.currentAct.manualWeather = true - self.currentLocation.manualSeason = true - - local seasonNb = math.random(1,4) - local seasons = {[1]="Spring", [2]="Summer", [3]="Autumn", [4]="Winter"} - self.currentLocation.season = seasons[seasonNb] - - -- location season - local seasonGr = actsUI:find("island_season") - assert(seasonGr) - local seasonButton = seasonGr:find(self.currentLocation.season) - assert(seasonButton) - self:selectButtonTemplate(seasonButton) - - local seasonManual = seasonGr:find("manual_season_2") - assert(seasonManual) - seasonManual:find("toggle_butt").pushed = not self.currentLocation.manualSeason - - -- act and scenario names - if self.createNewScenario or rebuildFirstAct then - self.currentAct.name = i18n.get("uiR2EDDefaultActTitle"):toUtf8() .. " 1" - else - local actNb = r2.Scenario.Acts.Size - self.currentAct.name = i18n.get("uiR2EDDefaultActTitle"):toUtf8() .. " " .. actNb - end - - if self.createNewScenario == true then - self.currentScenario.name = i18n.get("uiR2EDNewScenario"):toUtf8() - else - r2.ScenarioWindow:setActNotes() - - -- select "new island" mode - local newLocationMode = actsUI:find("new_location_mode_2") - assert(newLocationMode) - newLocationMode:find("button").active = false - newLocationMode:find("selected_button").active = true - self.currentLocation.islandName = "" - self.currentLocation.instanceId = "" - - -- clean list of old previous locations - local locationList = actsUI:find("location_list") - assert(locationList) - locationList:clear() - - self:openPreviousIslandsActs() - - local scrollPreviousLoc = actsUI:find("scroll_previous_islands") - assert(scrollPreviousLoc) - scrollPreviousLoc.trackPos = scrollPreviousLoc.h_real - end - - self:openEcosystemIslands("r2_desert") -end - -function r2.acts:backPreviousLocations() - - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - local newLocationMode = actsUI:find("new_location_mode_2") - assert(newLocationMode) - - self:locationIsland(newLocationMode:find("button")) - - local locationEditor = actsUI:find("location") - assert(locationEditor) - - local prevLocationEditor = actsUI:find("previous_location") - assert(prevLocationEditor) - - locationEditor.active = false - prevLocationEditor.active = true -end - -------------------------------------------------------------------------------------------------------- -function r2.acts:openPreviousIslandsActs() - - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - local locationList = actsUI:find("location_list") - assert(locationList) - - local enlargingFactor = self.enlargingFactor - - local locationActs = {} - for key, act in specPairs(r2.Scenario.Acts) do - local locationId = act.LocationId - if locationActs[locationId]==nil then locationActs[locationId]={} end - table.insert(locationActs[locationId], act.InstanceId) - end - - for key, location in specPairs(r2.Scenario.Locations) do - - local islandName = location.IslandName - - local textureName = islandName .. "_sp.tga" - - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - local islandTable - local ecoSysName = nil - for ecoSystem, ecoSysTable in pairs(self.islands) do - local islandNb = self:getIslandNb(islandName) - if ecoSysTable[islandNb] and ecoSysTable[islandNb].name == islandName then - ecoSysName = ecoSystem - islandTable = ecoSysTable[islandNb].table - break - end - end - - if ecoSysName then - - local backTexture = ecoSysName .. "_back.tga" - - local islandW, islandH = (islandTable.xmax - islandTable.xmin)*enlargingFactor, (islandTable.ymax - islandTable.ymin)*enlargingFactor - - -- resize island button to see all island whitout deformation - local totalDim = 200 - local maxDim = totalDim-2*8 - local w_button_texture - local h_button_texture - local x_button_texture - local y_button_texture - local scale = "false" - - local initW, initH = islandW, islandH - - scale, w_button_texture, h_button_texture, islandW, islandH = - self:textureRedimension(textureName, maxDim, maxDim, islandW, islandH) - - scale = tostring(scale) - - -- center button island - x_button_texture = (maxDim-islandW)/2 + 8 -- 8 + (maxDim-width)/2 + 2 - y_button_texture = -((maxDim-islandH)/2 + 8) -- -((maxDim-height)/2 + 8 + 2) - - local h, h_button, y_button, h_text, y_text - local marge=15 - if locationList.childrenNb == 0 then - h=totalDim - h_button="0" - y_button="0" - h_text="0" - y_text="0" - else - h=totalDim+marge - h_button=-marge - y_button=-marge - h_text=-marge - y_text=-marge - end - - local tmplParams = - { - id=islandName, - posparent="parent", - posref="BR TR", - sizeref="w", - w="0", - h=h, - x="0", - y="0", - - sizeref_act="h", - w_act = totalDim, - h_act="0", - x_act="0", - y_act="0", - y_button=y_button, - h_button=h_button, - - icon = textureName, - w_button_texture = w_button_texture, - h_button_texture = h_button_texture, - x_button_texture = x_button_texture, - y_button_texture = y_button_texture, - scale = scale, - color= self.islandButtonColors[ecoSysName], - back_color= "255 255 255 255", - selected_color = self.islandSelectedButtonColors[ecoSysName].." 255", - col_over = self.islandSelectedButtonColors[ecoSysName].." 80", - group_params_l="r2.acts:locationIsland(getUICaller())", - params_l="r2.acts:locationIsland()", - back_texture=backTexture, - - x_text=marge, - w_text= -(totalDim + marge + 15), - h_text=h_text, - y_text=y_text, - } - local buttonIsland = createGroupInstance("previous_loc_template", locationList.id, tmplParams) - - if buttonIsland then - locationList:addChild(buttonIsland) - buttonIsland.Env.InstanceId = location.InstanceId - - local uc_island = ucstring() - uc_island:fromUtf8(location.Name) - buttonIsland:find("button"):find("center_button").tooltip = uc_island - buttonIsland:find("selected_button"):find("center_button").tooltip = uc_island - - -- init text - local textList = buttonIsland:find("text_list") - assert(textList) - - local prevText = textList:find("previous_text") - assert(prevText) - - local text = "'" .. location.Name .. "' Location used in acts :\n" - prevText:addColoredTextChild(text, 200, 0, 0, 255) - - local acts = locationActs[location.InstanceId] - for k, actId in pairs(acts) do - local act = r2:getInstanceFromId(actId) - local act_text = act.Name - if act.ShortDescription~="" then - act_text = act_text .. " : " - end - - prevText:addColoredTextChild(act_text, 200, 120, 0, 255) - - if act.ShortDescription~="" then - act_text = act.ShortDescription - local uc_act = ucstring() - uc_act:fromUtf8(act_text) - prevText:addTextChild(uc_act) - end - end - - -- init scroll target - local scroll = textList:find("scroll_previous") - assert(scroll) - local list = textList:find("list") - assert(list) - scroll:setTarget(list.id) - end - - end - end -end - --------------------------------------------------------------------------------------- ---------------------------- texture button redimension ------------------------------- -function r2.acts:textureRedimension(textureName, maxW, maxH, islandW, islandH) - - local scale = false - local w, h - - if maxW 0) then - - -- color - local ecoColor = self.islandSelectedButtonColors[self.ecoSystemName].." 255" - local ecoColorBack = self.islandSelectedButtonColors[self.ecoSystemName].." 100" - - islandCard.active = true - - islandCard:find("bl").color = ecoColor - islandCard:find("tl").color = ecoColor - islandCard:find("tr").color = ecoColor - islandCard:find("br").color = ecoColor - islandCard:find("bottom").color = ecoColor - islandCard:find("top").color = ecoColor - islandCard:find("left").color = ecoColor - islandCard:find("right").color = ecoColor - islandCard:find("bg").color = ecoColorBack - - islandOk.active = true - - local firstIsland = selectedIslandsList:getChild(0) - assert(firstIsland) - self:openIslandCardFromButton(self.ecoSystemName, firstIsland.Env.Name) - else - local islandBitmap = actsUI:find("island_bitmap") - assert(islandBitmap) - - islandBitmap.texture = "" - - islandCard.active = false - - islandOk.active = false - end - - local scrollIslands = actsUI:find("scroll_islands_2") - assert(scrollIslands) - scrollIslands.trackPos = scrollIslands.h_real - - -- "choose island" title - local title = actsUI:find("choose_island"):find("choose_island_title") - assert(title) - -- doesn't work in all language local titleText = " " .. i18n.get("uiR2EDChooseIsland"):toUtf8() .." " .. self.ecosystemNames[self.ecoSystemName] .. " " .. i18n.get("uiR2EDEcosystem"):toUtf8() .. " " - local titleText = " " .. i18n.get("uiR2EDChooseIsland"):toUtf8() .. self.ecosystemNames[self.ecoSystemName] .. " " - local uc_title = ucstring() - uc_title:fromUtf8(titleText) - title.uc_hardtext = uc_title -end - --------------------------------------------------------------------------------------- ---------------------------- open island card and images ------------------------------ -function r2.acts:openIslandCardFromButton(ecosystem, islandName) - - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - local ecosystemList = actsUI:find("ecosystem_list_2") - assert(ecosystemList) - - local ecosystemGr = ecosystemList:find(ecosystem) - assert(ecosystemGr) - - local islandButton = ecosystemGr:find(islandName) - assert(islandButton) - - -- unselect last selection - if self.selectedIslandButtonId~=nil then - local lastSelectedIsland = getUI(self.selectedIslandButtonId) - if lastSelectedIsland ~= nil then - lastSelectedIsland:find("button").active = true - lastSelectedIsland:find("selected_button").active = false - end - end - - -- select button - islandButton:find("button").active = false - islandButton:find("selected_button").active = true - - self.selectedIslandButtonId = islandButton.id - - self.selectedIslandName = islandButton.Env.Name - - self.currentLocation.islandName = self.selectedIslandName - - self:openIslandCard(self.selectedIslandName) -end - --------------------------------------------------------------------------------------- ---------------------------- open island card ----------------------------------------- -function r2.acts:openIslandCard(islandName) - - local enlargingFactor = self.enlargingFactor - - local textureName = islandName .. "_sp.tga" - - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - local islandBitmap = actsUI:find("island_bitmap") - assert(islandBitmap) - - -- load texture - islandBitmap.texture = textureName - - -- card title - local title = actsUI:find("island_images"):find("card_title") - assert(title) - -- doesn't work in all language local titleText = " " .. i18n.get("uiR2EDZoomOn"):toUtf8() .." '" .. i18n.get(islandName):toUtf8() .. "' " .. i18n.get("uiR2EDIsland"):toUtf8() .. " " - local titleText = " " .. i18n.get("uiR2EDZoomOn"):toUtf8() .. i18n.get(islandName):toUtf8() .. " " - local uc_title = ucstring() - uc_title:fromUtf8(titleText) - title.uc_hardtext = uc_title - - local islandTable = self.islands[self.ecoSystemName][self:getIslandNb(islandName)].table - local islandW, islandH = (islandTable.xmax - islandTable.xmin)*enlargingFactor, (islandTable.ymax - islandTable.ymin)*enlargingFactor - local islandCard = actsUI:find("island_current_image") - assert(islandCard) - - -- resize island button to see all island whitout deformation - local maxW, maxH = islandCard.w_real-12, islandCard.h_real-12 - - local initW, initH = islandW, islandH - islandBitmap.scale, islandBitmap.w, islandBitmap.h, islandW, islandH = - self:textureRedimension(textureName, maxW, maxH, islandW, islandH) - - local cardButton = islandCard:find("selected_button") - assert(cardButton) - - cardButton.w = - (maxW - islandW) - cardButton.h = - (maxH - islandH) - cardButton.x = (maxW - islandW)/2 - cardButton.y = - (maxH - islandH)/2 - - -- center button island - islandBitmap.x = 6 - islandBitmap.y = -6 - - -- entry points - local entryNb = 0 - for location, entry in pairs(islandTable.entrypoints) do - - local entryPoinButton = actsUI:find("entrypoint"..entryNb):find("flag") - entryPoinButton.active = true - entryPoinButton.x = (enlargingFactor*(entry.x - islandTable.xmin)/initW)*islandW - entryPoinButton.y = (enlargingFactor*(entry.y - islandTable.ymax)/initH)*islandH - - entryPoinButton.tooltip = i18n.get(location) - entryPoinButton.parent.Env.Name = location - if entryNb == 0 then - entryPoinButton.texture = "r2ed_entry_point_pushed.tga" - self.currentLocation.entryPoint = location - else - entryPoinButton.texture = "r2ed_entry_point.tga" - end - - entryNb = entryNb+1 - if entryNb==9 then break end - end - - if entryNb < 9 then - for i=entryNb, 9 do - local entryPointGr = actsUI:find("entrypoint"..i) - assert(entryPointGr) - local entryPoinButton = entryPointGr:find("flag") - entryPoinButton.active = false - end - end - - -- enlarge selected ecosystem button - local ecoButton = actsUI:find(self.ecoSystemName) - assert(ecoButton) - - local ecoList = ecoButton.parent - assert(ecoList) - - for i=0, ecoList.childrenNb-1 do - local button = ecoList:getChild(i) - if button == ecoButton then - button:find("eco_button").wmin = 164 - else - button:find("eco_button").wmin = 160 - end - end - - actsUI:invalidateCoords() - actsUI:updateCoords() -end - --------------------------------------------------------------------------------------- ---------------------------- select an entry point --------------------------------------- -function r2.acts:selectEntryPoint() - - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - for i=0, 9 do - local entryPoinButton = actsUI:find("entrypoint"..i):find("flag") - assert(entryPoinButton) - - if entryPoinButton == getUICaller() then - getUICaller().texture = "r2ed_entry_point_pushed.tga" - self.currentLocation.entryPoint = getUICaller().parent.Env.Name - else - entryPoinButton.texture = "r2ed_entry_point.tga" - end - end -end - --------------------------------------------------------------------------------------- ---------------------------- choose a name for location ------------------------------- -function r2.acts:chooseLocationName() - - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - local chooseNamePopup = getUI("ui:interface:r2ed_choose_location_name") - assert(chooseNamePopup) - - local editText = chooseNamePopup:find("edit_box_group") - assert(editText) - - local name = editText.uc_input_string:toUtf8() - - -- check location name duplication - if not self.createNewScenario then - for i=0, r2.Scenario.Locations.Size-1 do - local location = r2.Scenario.Locations[i] - if location.Name == name then - messageBox(i18n.get("uiR2EDLocationNameDuplicated")) - return - end - end - end - - if name~="" then - - self.currentLocation.name = name - - chooseNamePopup.active = false - actsUI.active = false - - disableModalWindow() - setKeyboardContext("r2ed") - - if self.createNewScenario==true then - self:createScenario() - else - self:createAct() - end - else - editText:setFocusOnText() - end -end - --------------------------------------------------------------------------------------- ---------------------------- choose a name for scenario/act --------------------------- -function r2.acts:chooseScenarioActName() - - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - local chooseNamePopup = getUI("ui:interface:r2ed_choose_scenario_act_name") - assert(chooseNamePopup) - - -- act name - local actGr = chooseNamePopup:find("act_name") - assert(actGr) - local actEditText = actGr:find("edit_box_group") - assert(actEditText) - local actName = actEditText.uc_input_string:toUtf8() - local scenarioName = "" - - local scenarioEditText - if self.createNewScenario == true then - -- scenario name - local scenarioGr = chooseNamePopup:find("scenario_name") - assert(scenarioGr) - - scenarioEditText = scenarioGr:find("edit_box_group") - assert(scenarioEditText) - - scenarioName = scenarioEditText.uc_input_string:toUtf8() - end - - if (self.createNewScenario and scenarioName~="" and actName~="") or (not self.createNewScenario and actName~="") then - chooseNamePopup.active = false - disableModalWindow() - - self.currentScenario.name = scenarioName - self.currentAct.name = actName - - if self.createNewLocation == true then - local locationGr = actsUI:find("location") - assert(locationGr) - - local scenarioActGr = actsUI:find("scenario_act") - assert(scenarioActGr) - - scenarioActGr.active = false - locationGr.active = true - - self:openEcosystemIslands("r2_desert") - else - actsUI.active = false - if self.createNewScenario==true then - self:createScenario() - else - self:createAct() - end - setKeyboardContext("r2ed") - end - - elseif self.createNewScenario and scenarioName==""then - scenarioEditText:setFocusOnText() - - elseif actName=="" then - actEditText:setFocusOnText() - end -end - --------------------------------------------------------------------------------------- ---------------------------------- createScenario ------------------------------------- -function r2.acts:createScenario() - - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - -- scenario/act/location notes - local scenarioNotes, actNotes - scenarioNotes = "" - actNotes = "" - - r2.resetNameGiver() - -- create scenario component - local scenario= r2.newComponent("Scenario") - scenario.Ghost_Name = self.currentScenario.name - scenario.Description.ShortDescription = scenarioNotes - if r2.Scenario and r2.Scenario.Language then - scenario.Language = r2.Scenario.Language - end - scenario.AccessRules = self.currentScenario.rules - scenario.Description.LevelId = self.currentScenario.level - scenario.Description.CreationDate = os.date() - scenario.Description.Creator = r2:getUserEntityName() - scenario.Description.CreatorMD5 = r2.getCharIdMd5() - - - - -- create permanent act component - local act =r2.newComponent("Act") - local features = act.Features - local tmpDefault = r2.newComponent("DefaultFeature") - act.Name = i18n.get("uiR2EDBaseAct"):toUtf8() - table.insert(features, tmpDefault) - table.insert(scenario.Acts, act) - - -- create act 1 component - act = r2.newComponent("Act") - local features = act.Features - local tmpDefault = r2.newComponent("DefaultFeature") - r2.ActUIDisplayer.LastSelfCreatedActInstanceId = act.InstanceId - --act.Name = i18n.get("uiR2EDAct1"):toUtf8() .. ":" .. r2.currentAct.name - act.Name = self.currentAct.name - act.WeatherValue = self.currentAct.weather - local manualWeather = 0 - if self.currentAct.manualWeather == true then manualWeather = 1 end - act.ManualWeather = manualWeather - act.ShortDescription = actNotes - table.insert(features, tmpDefault) - table.insert(scenario.Acts, act) - - -- create location - local location = r2.newComponent("Location") - location.Season = self.currentLocation.season - location.IslandName = self.currentLocation.islandName - location.Name = self.currentLocation.name - location.EntryPoint = self.currentLocation.entryPoint - local manualSeason = 0 - if self.currentLocation.manualSeason == true then manualSeason = 1 end - location.ManualSeason = manualSeason - table.insert(scenario.Locations, location) - act.LocationId = location.InstanceId - - r2.requestCreateScenario(scenario) - r2:waitScenarioScreen() - - self.deleteOldScenario = true -end - -function r2.acts:createAct() - - r2.requestNewAction(i18n.get("uiR2EDNewActAction")) - - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - -- act/location notes - local actNotes = "" - - -- create act component - local act =r2.newComponent("Act") - local features = act.Features - local tmpDefault = r2.newComponent("DefaultFeature") - if (tmpDefault == nil) then - debugWarning("Failed to create default feature"); - return - end - r2.ActUIDisplayer.LastSelfCreatedActInstanceId = act.InstanceId - local actNb = r2.Scenario.Acts.Size - --act.Name = i18n.get("uiR2EDDefaultActTitle"):toUtf8() .. actNb .. ":" .. r2.currentAct.name - act.Name = self.currentAct.name - act.WeatherValue = self.currentAct.weather - local manualWeather = 0 - if self.currentAct.manualWeather == true then manualWeather = 1 end - act.ManualWeather = manualWeather - act.ShortDescription = actNotes - table.insert(features, tmpDefault) - if (act == nil) then - debugWarning("Failed to create additionnal 'Act'"); - return - end - - -- create location - local location - if self.createNewLocation then - - location = r2.newComponent("Location") - location.Season = self.currentLocation.season - location.IslandName = self.currentLocation.islandName - location.Name = self.currentLocation.name - location.EntryPoint = self.currentLocation.entryPoint - local manualSeason = 0 - if self.currentLocation.manualSeason == true then manualSeason = 1 end - location.ManualSeason = manualSeason - act.LocationId = location.InstanceId - - r2.requestInsertNode(r2.Scenario.InstanceId, "Locations", -1, "", location) - else - act.LocationId = self.currentLocation.instanceId - end - - r2.requestInsertNode(r2.Scenario.InstanceId, "Acts", -1, "", act) -end - --------------------------------------------------------------------------------------- ---------------------------- choose location name popup ------------------------------- -function r2.acts:openLocationName() - - local chooseNamePopup = getUI("ui:interface:r2ed_choose_location_name") - assert(chooseNamePopup) - - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - if not actsUI.active then return end - - local okButton = actsUI:find("island_ok") - assert(okButton) - - enableModalWindow(okButton, chooseNamePopup.id) - - local editText = chooseNamePopup:find("edit_box_group") - assert(editText) - editText.uc_input_string = i18n.get(self.currentLocation.islandName) - editText:setFocusOnText() -end - ------------------------- SELECT BUTTON IN LIST -------------------------------- --- only one button can be selected -------------------------------------------- -function r2.acts:selectButtonTemplate(buttonTemplate) - - local list = buttonTemplate.parent - assert(list) - - for i=0,list.childrenNb-1 do - local child = list:getChild(i) - assert(child) - child:find("button").active = true - child:find("selected_button").active = false - end - - buttonTemplate:find("button").active = false - buttonTemplate:find("selected_button").active = true -end - -function r2.acts:selectButton(button) - - local list = button.parent - assert(list) - - for i=0,list.childrenNb-1 do - local child = list:getChild(i) - assert(child) - child:find("button").pushed = false - end - - button:find("button").pushed = true -end - ---------------------------- CHOOSE LOCATION SEASON --------------------------------------- -function r2.acts:locationSeason(caller) - - local buttonTemplate - if caller == nil then - caller = getUICaller() - buttonTemplate = caller.parent.parent - else - buttonTemplate = caller.parent - end - - self:selectButtonTemplate(buttonTemplate) - - local list = buttonTemplate.parent - local seasons = {[0]="Spring", [1]="Summer", [2]="Autumn", [3]="Winter"} - local seasonNb = list:getElementIndex(buttonTemplate) - self.currentLocation.season = seasons[seasonNb] -end - ------ MANUAL SEASON ACTIVATION ------------------------------------------------------- -function r2.acts:manualSeason() - - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - local manualButton = actsUI:find("manual_season_2"):find("toggle_butt") - assert(manualButton) - - self.currentLocation.manualSeason = (manualButton.pushed==false) - - local seasonList = actsUI:find("season_list_2") - assert(seasonList) - - seasonList.active = self.currentLocation.manualSeason -end - ---- OPEN POPUP NAME FOR ACT/SCENARIO OR LOCATION ----------------------------------------- -function r2.acts:openPopupName() - - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - local createLocationGr = actsUI:find("location") - assert(createLocationGr) - local prevLocationGr = actsUI:find("previous_location") - assert(prevLocationGr) - - if prevLocationGr.active then - self:createLocationOrCreateAct() - else - self:openLocationName() - end -end - - ---- CANCEL ACT/SCENARIO CREATION -------------------------------------------------------- -function r2.acts:cancelActCreation() - - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - actsUI.active =false - - setKeyboardContext("r2ed") -end - - ---------------------- update palette UI when change act ------------------------------ -function r2.acts:updatePaletteFromEcosystem() - - local ecosystemTrees = - { - ["r2_desert"] = "fytrees", - ["r2_forest"] = "fotrees", - ["r2_jungle"] = "jutrees", - ["r2_lakes"] = "trtrees", - ["r2_roots"] = "prtrees", - } - - local currentAct = r2:getCurrentAct() - assert(currentAct) - - local botObjectsPalette = {} - if not r2.Palette.BotEntries then - return -- special case for the 'light' palette - end - - botObjectsPalette = r2.Palette.BotEntries - - if not currentAct:isBaseAct() then - local currentLocation = r2:getInstanceFromId(currentAct.LocationId) - if currentLocation==nil then return end - - -- search for ecosystem of current location - local islandEcosystem - for ecoName, v in pairs(self.islands) do - if self.islands[ecoName][self:getIslandNb(currentLocation.IslandName)].name==currentLocation.IslandName then - islandEcosystem = ecoName - break - end - end - - -- flag to display only vegetation of current ecosystem - if islandEcosystem and ecosystemTrees[islandEcosystem] then - for ecoName, v in pairs(ecosystemTrees) do - botObjectsPalette[ecosystemTrees[ecoName]].Display = (ecoName==islandEcosystem) - end - end - else - for ecoName, v in pairs(ecosystemTrees) do - botObjectsPalette[ecosystemTrees[ecoName]].Display = false - end - end - - r2:buildPaletteUI() -end - ----------------------------------------------------------------------------------------------- -function r2.acts:locationIsland(caller) - - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - local buttonTemplate - if caller == nil then - caller = getUICaller() - buttonTemplate = caller.parent.parent - else - buttonTemplate = caller.parent - end - - if buttonTemplate.Env.Name == self.newLocation then - - -- select "create new location" mode - buttonTemplate:find("button").active = false - buttonTemplate:find("selected_button").active = true - self.createNewLocation = true - - -- deselect all previous locations - local prevLocationList = actsUI:find("location_list") - assert(prevLocationList) - for i=0,prevLocationList.childrenNb-1 do - local child = prevLocationList:getChild(i) - assert(child) - child:find("button").active = true - child:find("selected_button").active = false - end - self.currentLocation.islandName = "" - self.currentLocation.intanceId = "" - else - -- select this previous location - self:selectButtonTemplate(buttonTemplate.parent) - self.currentLocation.instanceId = buttonTemplate.parent.Env.InstanceId - - -- deselect "create new location" mode - local newLocationMode = actsUI:find("new_location_mode_2") - assert(newLocationMode) - newLocationMode:find("button").active = true - newLocationMode:find("selected_button").active = false - self.createNewLocation = false - end -end - --------------------------------------------------------------------------------------- ---------------------------- choose a name for scenario/act --------------------------- -function r2.acts:createLocationOrCreateAct() - - local actsUI = getUI("ui:interface:r2ed_acts") - assert(actsUI) - - if self.createNewLocation then - - local createLocationGr = actsUI:find("location") - assert(createLocationGr) - local prevLocationGr = actsUI:find("previous_location") - assert(prevLocationGr) - - createLocationGr.active = true - prevLocationGr.active = false - - self:openEcosystemIslands("r2_desert") - else - actsUI.active = false - - disableModalWindow() - setKeyboardContext("r2ed") - - self:createAct() - end -end diff --git a/code/ryzom/common/data_common/r2/r2_ui_anim_acts.lua b/code/ryzom/common/data_common/r2/r2_ui_anim_acts.lua deleted file mode 100644 index 8e83d0398..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_anim_acts.lua +++ /dev/null @@ -1,120 +0,0 @@ ---------------------------------------------------------------------------------------------- --- UI for act management by the DM (animation mode) - - - --- class for runtime acts ui -r2.ui.AnimActs = -{ - ChosenActIndex = -1, -- the last act that was chosen in the act popup menu -} - ------------- --- PUBLIC -- ------------- - ----------------------------------------------------------------------------------------------- --- Called by the ui when the user clicks on the 'acts' button in animation mode --- This will pop a menu to choose between available acts -function r2.ui.AnimActs:popMenu() - local menuName = "ui:interface:r2ed_anim_acts_menu" - local menu = getUI(menuName) - local rootMenu = menu:getRootMenu() - rootMenu:reset() - local acts = self:getActTable() - -- - if not acts then return end - for k = 2, table.getn(acts) do - if acts[k].Name == "" then - r2.ScratchUCStr = i18n.get("uiR2EDUnamedAct") - else - r2.ScratchUCStr:fromUtf8(acts[k].Name) - end - rootMenu:addLine(r2.ScratchUCStr, "lua", "r2.ui.AnimActs:chooseAct(" .. tostring(k) .. ")", "") - end - launchContextMenuInGame(menuName) - local but = getUI("ui:interface:r2ed_testbar"):find("r2ed_anim_acts") - but:updateCoords() - menu.x = but.x_real - menu.y = but.y_real + but.w_real - rootMenu.x = 0 - rootMenu.y = 0 - menu:updateCoords() -end - ----------------------------------------------------------------------------------------------- --- called by the acts context menu when one act has been chosen -function r2.ui.AnimActs:chooseAct(index) - - -- see if current act differs in location or season - - -- acts[1] <==> permanent content - if index == 1 then return end - self.ChosenActIndex = index - 1 - - local acts = self:getActTable() - - - local currentActIndex = r2.getCurrentActIndex() + 1 - - if acts[index].LocationId ~= acts[currentActIndex].LocationId then - validMessageBox(i18n.get("uiR2EDActChangeWarning"), "lua", "r2.ui.AnimActs:validateActChange()", "", "", "ui:interface") - return - end - - self:validateActChange() --- debugInfo(tostring(acts[index].Island)) --- debugInfo(tostring(r2:getCurrentIslandName())) --- debugInfo(tostring(acts[index].Season)) --- debugInfo(tostring(getServerSeason())) --- local targetSeason --- if acts[index].Season == 0 then --- targetSeason = getAutoSeason() --- else --- targetSeason = acts[index].Season --- end --- --- if acts[index].Island ~= r2:getCurrentIslandName() or --- targetSeason ~= computeCurrSeason() then --- -- warn the user that changing to this act will cause a teleport --- validMessageBox(i18n.get("uiR2EDActChangeWarning"), "lua", "r2.ui.AnimActs:validateActChange()", "", "", "ui:interface") --- return --- end --- self:validateActChange() -end - ----------------------------------------------------------------------------------------------- -function r2.ui.AnimActs:validateActChange() - r2.requestStartAct(self.ChosenActIndex) -end - -------------- --- PRIVATE -- -------------- - --- private : Place holder for local mode : list of acts --- ----- Season enum is as follow : --- 0 -> auto, computed locally from the current day (or not received from server yet) --- 1 -> server force spring --- 2 -> server force summer --- 3 -> server force autumn --- 4 -> server force winter -local dummyActsList = -{ - { Name = "Act 1", Island = "uiR2_Lakes01", Season=0 }, - { Name = "Act 2", Island = "uiR2_Desert01", Season=1 }, - { Name = "Act 3", Island = "uiR2_Lakes10", Season=2 }, - { Name = "Act 4", Island = "uiR2_Lakes11", Season=3 }, - { Name = "Act 5", Island = "uiR2_Lakes12", Season=4 } -} - ----------------------------------------------------------------------------------------------- -function r2.ui.AnimActs:getActTable() --- if false then -- config.Local == 1 then --- return dummyActsList --- else --- return r2.AnimGlobals.Acts --- end - return r2.AnimGlobals.Acts -end diff --git a/code/ryzom/common/data_common/r2/r2_ui_anim_bar.lua b/code/ryzom/common/data_common/r2/r2_ui_anim_bar.lua deleted file mode 100644 index 8aa13d7a5..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_anim_bar.lua +++ /dev/null @@ -1,185 +0,0 @@ --- Update of the anim bar found in animation mode - - -r2.ui.AnimBar = {} -- the anim bar class - --------------- --- PUBLIC -- --------------- - - ----------------------------------------------------------------------------------------------------------- --- Update the anim bar content, except for the contextual actions (those that apply on the current selected entity) -function r2.ui.AnimBar:update() - local testModeAvailable = false - local isDm = false - if r2.Mode == "DM" or r2.Mode == "AnimationModeDm" then isDm = true end - if r2.Mode == "DM" or r2.Mode == "AnimationModeDm" then -- Not in animation - testModeAvailable = (r2.AccessMode == "Editor" or r2.AccessMode == "OutlandOwner") - end - self:getButton("r2ed_anim_test_mode").active = testModeAvailable - self:getButton("r2ed_anim_dm_mode").active = (r2.Mode == "Test") - local actReceived = (isDm and (r2.AnimGlobals.Acts ~= nil or config.Local == 1)) - debugInfo(tostring(actReceived)) - self:getButton("r2ed_anim_acts").active = actReceived - local triggerReceived = (isDm and (r2.AnimGlobals.UserTriggers ~= nil or config.Local == 1)) - debugInfo(tostring(triggerReceived)) - self:getButton("r2ed_anim_triggers").active = triggerReceived - self:getButton("r2ed_anim_weather").active = (isDm) - self:getButton("r2ed_anim_dm_gift").active = r2:isCurrentSelectionPlayer() - self:updateButtonsPos() -end - - -function r2.ui.AnimBar:activateTable(tbl) - if (type(tbl) ~= "table") - then - local button = self:getButton(tbl) - if button then button.active = true end - return - end - - local i, j = next(tbl, nil) - while i do - if i ~= 'n' then - self:activateTable(j) - -- r2.ui.AnimBar:activateTable(j) - end - i, j = next(tbl, i) - end -end - - ----------------------------------------------------------------------------------------------------------- --- Update the anim bar from a list of accessibles options (passed as a list of strings) -function r2.ui.AnimBar:updateActions(args) - self:clearActions() - getUI("ui:interface:r2ed_testbar:r2ed_anim_dm_gift").active = r2:isCurrentSelectionPlayer() - self:activateTable(args) - self:update() - self:updateButtonsPos() -end - - ----------------------------------------------------------------------------------------------------------- --- clear all accessible actions in the action bar -function r2.ui.AnimBar:clearActions() - self:getButton("r2ed_anim_speak_as").active = false - self:getButton("r2ed_anim_stop_speak").active = false - self:getButton("r2ed_anim_control").active = false - self:getButton("r2ed_anim_stop_control").active = false - self:getButton("r2ed_anim_add_hp").active = false - self:getButton("r2ed_anim_grp_heal").active = false - self:getButton("r2ed_anim_kill").active = false - self:getButton("r2ed_anim_grp_kill").active = false - self:getButton("r2ed_anim_despawn").active = false - self:getButton("r2ed_anim_dm_gift").active = false -end - ----------------------------------------------------------------------------------------------------------- --- update the window of dm controlled entities -function r2.ui.AnimBar:updateDMControlledEntitiesWindow() - local wnd = getUI("ui:interface:dm_controlled_entities") - local index = 0 - local maxNumPossessedEntities = tonumber(getDefine("r2_max_num_dm_controlled_entities")) - -- - local talkingList = r2.getTalkingAsList() - local numTalker = table.getn(talkingList) - local incarnatingList = r2.getIncarnatingList() - local numIncarnated = table.getn(incarnatingList) - if numTalker == 0 and numIncarnated == 0 then - wnd.active = false - return - end - -- - wnd.active = r2.Mode ~= "Edit" - wnd = wnd.inside - for i = 0, (numTalker / 2) - 1 do - local button = wnd["b" .. index] - button.active = true - button.b.texture="r2_icon_speak_as_small.tga" - button.b.texture_pushed="r2_icon_speak_as_small_pushed.tga" - button.b.texture_over="r2_icon_speak_as_small_over.tga" - button.b.params_l="r2.ui.AnimBar:stopTalk(" .. talkingList[i * 2 + 1] .. ")" - button.b.tooltip = i18n.get("uiR2EDStopDMSpeakAs") - setDbProp("UI:VARIABLES:R2_DM_CONTROLLED:" .. index .. ":TEXT_ID", talkingList[i * 2 + 1]) - index = index + 1 - end - for i = 0, (numIncarnated / 2) - 1 do - local button = wnd["b" .. index] - button.active = true - button.b.texture="r2_icon_possess_small.tga" - button.b.texture_pushed="r2_icon_possess_small_pushed.tga" - button.b.texture_over="r2_icon_possess_small_over.tga" - button.b.tooltip = i18n.get("uiR2EDStopDMControl") - button.b.params_l="r2.ui.AnimBar:stopIncarnate(" .. incarnatingList[i * 2 + 1] .. ")" - setDbProp("UI:VARIABLES:R2_DM_CONTROLLED:" .. index .. ":TEXT_ID", incarnatingList[i * 2 + 1]) - index = index + 1 - end - while index < maxNumPossessedEntities do - wnd["b" .. index].active = false - index = index + 1 - end -end - ----------------------------------------------------------------------------------------------------------- --- stop talk on an entity -function r2.ui.AnimBar:stopTalk(entityId) - r2:dssTarget('STOP_TALK ' .. entityId) -end - ----------------------------------------------------------------------------------------------------------- --- stop incarnate on an entity -function r2.ui.AnimBar:stopIncarnate(entityId) - r2:dssTarget('STOP_CONTROL ' .. entityId) -end - ---------------- --- PRIVATE -- ---------------- - ----------------------------------------------------------------------------------------------------------- --- get reference on a button in the select bar by its name -function r2.ui.AnimBar:getButton(name) - assert(name) - return getUI("ui:interface:r2ed_testbar:" .. name) -end - ------------------------------------------------------------------------------------- --- Update pos of all buttons, so that x of first visible button will be 0 -function r2.ui.AnimBar:updateButtonsPos() - local currX = 0 - local firstButton = true - local function updateX(name, gap) - local but = self:getButton(name) - if but.active then - if not firstButton then - currX = currX + gap - else - firstButton = false - end - but.x = currX - currX = currX + 44 - else - but.x = 0 - end - end - - updateX("r2ed_anim_test_mode", 0) - updateX("r2ed_anim_dm_mode", 4) - updateX("r2ed_anim_acts", 4) - updateX("r2ed_anim_triggers", 4) - updateX("r2ed_anim_speak_as", 12) - updateX("r2ed_anim_stop_speak", 4) - updateX("r2ed_anim_control", 4) - updateX("r2ed_anim_stop_control", 4) - updateX("r2ed_anim_add_hp", 4) - updateX("r2ed_anim_grp_heal", 4) - updateX("r2ed_anim_kill", 4) - updateX("r2ed_anim_grp_kill", 4) - updateX("r2ed_anim_despawn", 4) - updateX("r2ed_anim_weather", 12) - updateX("r2ed_anim_dm_gift", 12) -end - - diff --git a/code/ryzom/common/data_common/r2/r2_ui_anim_user_triggers.lua b/code/ryzom/common/data_common/r2/r2_ui_anim_user_triggers.lua deleted file mode 100644 index 25d0b8a5b..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_anim_user_triggers.lua +++ /dev/null @@ -1,84 +0,0 @@ --------------------------------------------------------------------------------------- --- Managment of the user trigger menu in anim mode - - --- the anim triggers class -r2.ui.AnimUserTriggers = -{ -} - ------------- --- PUBLIC -- ------------- - --------------------------------------------------------------------------------------- --- Called when the user click on the triggers icon -> pop the menu with the trigger list -function r2.ui.AnimUserTriggers:popMenu() - local menuName = "ui:interface:r2ed_anim_triggers_menu" - local menu = getUI(menuName) - local rootMenu = menu:getRootMenu() - rootMenu:reset() - local triggers = self:getTriggerTable() - if not triggers then return end - for k = 1, table.getn(triggers) do - if triggers[k].Act == 0 or triggers[k].Act == r2.getCurrentActIndex() then - r2.ScratchUCStr:fromUtf8(triggers[k].Name) - rootMenu:addLine(r2.ScratchUCStr, "lua", - string.format("r2.ui.AnimUserTriggers:fireTrigger(%d, %d)", triggers[k].Act, triggers[k].Id), "") - end - end - if rootMenu:getNumLine() == 0 then - rootMenu:addLine(i18n.get("uiR2EDNoTriggersDefined"), "", "", "") - end - launchContextMenuInGame(menuName) - local but = getUI("ui:interface:r2ed_testbar"):find("r2ed_anim_triggers") - but:updateCoords() - menu.x = but.x_real - menu.y = but.y_real + but.w_real - rootMenu.x = 0 - rootMenu.y = 0 - menu:updateCoords() -end - --------------------------------------------------------------------------------------- --- Called by the ui when the user has chosen a trigger in the menu -function r2.ui.AnimUserTriggers:fireTrigger(triggerAct, triggerId) - r2.triggerUserTrigger(triggerAct, triggerId) - local trig = self:findTrigger(triggerAct, triggerId) - if trig then - r2.ScratchUCStr:fromUtf8(trig.Name) - displaySystemInfo(concatUCString(i18n.get("uiR2EDTriggering"), r2.ScratchUCStr), "BC") - end -end - -------------- --- PRIVATE -- -------------- - --- private : dummy list of triggers -> for local client mode -local dummyUserTriggerList = -{ - { Name="Trigger1", Act=1, Id=1 }, - { Name="Trigger2", Act=1, Id=2 }, - { Name="Trigger3", Act=1, Id=3 } -} - - --------------------------------------------------------------------------------------- --- Get the table describing all the user triggers -function r2.ui.AnimUserTriggers:getTriggerTable() - if config.Local == 1 then - return dummyUserTriggerList - else - return r2.AnimGlobals.UserTriggers - end -end - --------------------------------------------------------------------------------------- --- Find a trigger from an act / id pair, returns it definition as a table -function r2.ui.AnimUserTriggers:findTrigger(act, id) - local triggerTable = self:getTriggerTable() - for k, v in pairs(triggerTable) do - if v.Act == act and v.Id == id then return v end - end -end diff --git a/code/ryzom/common/data_common/r2/r2_ui_char_tracking.lua b/code/ryzom/common/data_common/r2/r2_ui_char_tracking.lua deleted file mode 100644 index aa92ed669..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_char_tracking.lua +++ /dev/null @@ -1,664 +0,0 @@ --- chars tracking window - -CharTracking = -{ - CurrList = {}, - CurrActiveList = {}, - SortDir = {}, - SelectedCharId = nil, - TextCache = {}, -- cache for text widgets - CenteredTextCache = {}, - NumberCache = {}, -- cache for number widgets - BitmapCache = {}, -- cache for bitmap widgets - - -- Map scenario flags to the bitmaps displayed in the first column - FlagsToTex = - { - [0] = { Bitmap = "blank.tga", Color = "0 0 0 0 " }, - [1] = { Bitmap = "r2ed_connected_char.tga", Color = "255 255 255 255" }, - [2] = { Bitmap = "r2ed_kicked_char.tga", Color = "255 255 255 255" }, - }, - - WaitingList = false, - FirstShow = true, - RefreshPeriod = 10, - WaitingPeriod = 15, - MinRefreshPeriod = 4, - LastRefreshTime = 0, - LastRefreshQuerryTime = 0, - PendingRefresh = false, - ListReceived = false, - - -- - RaceTypeToUtf8 = {}, - ReligionTypeToUtf8 = {}, - LevelTypeToUtf8 = {}, -} - -local sampleList1 = -{ -} -table.insert(sampleList1, { Id=0, Char = "plop", Guild="Guild1", Race=0, Religion=0, Shard="aniro", Level=0, Flags=0}) -table.insert(sampleList1, { Id=1, Char = "titi", Guild="Guild1", Race=1, Religion=1, Shard="leanon", Level=1, Flags=1}) -table.insert(sampleList1, { Id=2, Char = "bob", Guild="", Race=0, Religion=2, Shard="aniro", Level=0, Flags=1}) -table.insert(sampleList1, { Id=3, Char = "bobette", Guild="Guild2", Race=0, Religion=1, Shard="aniro", Level=2, Flags=1}) -table.insert(sampleList1, { Id=4, Char = "nico", Guild="Super guild", Race=3, Religion=0, Shard="aniro", Level=2, Flags=0}) -table.insert(sampleList1, { Id=5, Char = "toto2", Guild="GG", Race=2, Religion=1, Shard="aniro", Level=2, Flags=1}) -table.insert(sampleList1, { Id=6, Char = "titi2", Guild="Plop guild", Race=3, Religion=1, Shard="aniro", Level=2, Flags=1}) -table.insert(sampleList1, { Id=7, Char = "bob2", Guild="Plop guild", Race=3, Religion=1, Shard="leanon", Level=3, Flags=0}) -table.insert(sampleList1, { Id=8, Char = "bobette2", Guild="Guild1", Race=1, Religion=2, Shard="leanon", Level=3, Flags=0}) -table.insert(sampleList1, { Id=9, Char = "nico2", Guild="Super guild", Race=3, Religion=1, Shard="leanon", Level=4, Flags=0}) -table.insert(sampleList1, { Id=10, Char = "toto3", Guild="Guild2", Race=2, Religion=2, Shard="leanon", Level=4, Flags=1}) -table.insert(sampleList1, { Id=11, Char = "titi3", Guild="GG", Race=0, Religion=0, Shard="leanon", Level=5, Flags=1}) -table.insert(sampleList1, { Id=12, Char = "bob3", Guild="Plop guild", Race=3, Religion=1, Shard="leanon", Level=5, Flags=1}) -table.insert(sampleList1, { Id=13, Char = "bobette3",Guild="GG", Race=3, Religion=2, Shard="aniro", Level=5, Flags=0}) -table.insert(sampleList1, { Id=14, Char = "nico3", Guild="GG", Race=3, Religion=1, Shard="aniro", Level=2, Flags=1}) -table.insert(sampleList1, { Id=15, Char = "toto4", Guild="", Race=2, Religion=0, Shard="aniro", Level=3, Flags=0}) -table.insert(sampleList1, { Id=16, Char = "titi'", Guild="TSuper guild", Race=1, Religion=0, Shard="aniro", Level=1, Flags=1}) -table.insert(sampleList1, { Id=17, Char = "bob4", Guild="GG", Race=1, Religion=2, Shard="aniro", Level=3, Flags=0}) -table.insert(sampleList1, { Id=18, Char = "bobette4",Guild="Guild2", Race=2, Religion=1, Shard="leanon", Level=0, Flags=1}) -table.insert(sampleList1, { Id=19, Char = "nico4", Guild="", Race=0, Religion=0, Shard="leanon", Level=1, Flags=1}) - - -local boolToInt = -{ -} -boolToInt[false] = 0 -boolToInt[true] = 1 - - ---********************************* --- standard comparison -local function less(lhs, rhs) - if type(lhs) == "boolean" then - return boolToInt[lhs] < boolToInt[rhs] - else - return lhs < rhs - end -end - ---********************************* --- reversed comparison -local function more(lhs, rhs) - return not less(lhs,rhs) -end - ---********************************* --- sorting by race type -local function lessRaceType(lhs, rhs) - return CharTracking.RaceTypeToUtf8[lhs] < CharTracking.RaceTypeToUtf8[rhs] -end - ---********************************* --- sorting by religion type -local function lessReligionType(lhs, rhs) - return CharTracking.ReligionTypeToUtf8[lhs] < CharTracking.ReligionTypeToUtf8[rhs] -end - - --- init sort dir -table.insert(CharTracking.SortDir, { Var="Flags", Up=false, Cmp = more }) -table.insert(CharTracking.SortDir, { Var="Char", Up=false, Cmp = less}) -table.insert(CharTracking.SortDir, { Var="Guild", Up=false, Cmp = less }) -table.insert(CharTracking.SortDir, { Var="Race", Up=false, Cmp = lessRaceType }) -table.insert(CharTracking.SortDir, { Var="Religion", Up=false, Cmp = lessReligionType }) -table.insert(CharTracking.SortDir, { Var="Shard", Up=false, Cmp = less }) -table.insert(CharTracking.SortDir, { Var="Level", Up=false, Cmp = less }) - ---*********************************************************************** -function CharTracking:getWindow() - return getUI("ui:interface:ring_chars_tracking") -end - ---*********************************************************************** -function CharTracking:initRaceTypes() - for k = 0, 3 do - self.RaceTypeToUtf8[k] = i18n.get("uiRAP_CharRace_" .. tostring(k)):toUtf8() - end -end - ---*********************************************************************** -function CharTracking:initReligionTypes() - for k = 0, 2 do - self.ReligionTypeToUtf8[k] = i18n.get("uiRAP_CharReligion_" .. tostring(k)):toUtf8() - end -end - ---*********************************************************************** -function CharTracking:initLevelTypes() - for k = 0, 5 do - self.LevelTypeToUtf8[k] = i18n.get("uiRAP_CharLevel_" .. tostring(k)):toUtf8() - end -end - - ---*********************************************************************** -function CharTracking:isConnected(flags) - return flags == 1 -end - ---*********************************************************************** -function CharTracking:isKicked(flags) - return flags == 2 -end - ---*********************************************************************** -function CharTracking:getColumn(name) - return getUI("ui:interface:ring_chars_tracking:content:main:enclosing:columns:getw:column_group:" .. name .. ":values") -end - - ---*********************************************************************** -function CharTracking:getSelectList() - return getUI("ui:interface:ring_chars_tracking:content:main:enclosing:columns:getw:select") -end - - -local scratchUCStr = ucstring() - ---*********************************************************************** -function CharTracking:newTemplate(name, cache) - local group - if table.getn(cache) ~= 0 then - group = cache[table.getn(cache)] - table.remove(cache, table.getn(cache)) - else - group = createGroupInstance(name, "", {}) - end - return group -end - ---*********************************************************************** --- build a new text group from utf8 text -function CharTracking:newTextLabel(value) - local group = self:newTemplate("rap_text", self.TextCache) - scratchUCStr:fromUtf8(value) - group:find("t").uc_hardtext_single_line_format = scratchUCStr - return group -end - ---*********************************************************************** --- build a new text group from utf8 text -function CharTracking:newCenteredTextLabel(value) - local group = self:newTemplate("rap_text_centered", self.CenteredTextCache) - scratchUCStr:fromUtf8(value) - group:find("t").uc_hardtext_single_line_format = scratchUCStr - return group -end - ---*********************************************************************** -function CharTracking:newNumberLabel(value) - local group = self:newTemplate("rap_number", self.NumberCache) - group:find("t").uc_hardtext_single_line_format = tostring(value) - return group -end - ---*********************************************************************** -function CharTracking:newBitmap(texName, color) - if color == nil then color = "255 255 255 255" end - local group = self:newTemplate("rap_bitmap", self.BitmapCache) - group.f.texture = texName - group.f.color = color - return group -end - - ---*********************************************************************** -function CharTracking:newBooleanLabel(value) - local group = self:newTemplate("rap_bitmap", self.BitmapCache) - if value == true then - group.f.texture="patch_on.tga" - group.f.color="255 255 255 255" - else - group.f.texture="blank.tga" - group.f.color="0 0 0 0" - end - return group -end - ---*********************************************************************** -function CharTracking:addLine(line) - self:getColumn("char"):addChild(self:newTextLabel(line.Char)) - self:getColumn("guild"):addChild(self:newTextLabel(line.Guild)) - self:getColumn("race"):addChild(self:newTextLabel(self.RaceTypeToUtf8[line.Race])) - self:getColumn("religion"):addChild(self:newTextLabel(self.ReligionTypeToUtf8[line.Religion])) - self:getColumn("shard"):addChild(self:newTextLabel(line.Shard)) - self:getColumn("level"):addChild(self:newNumberLabel(self.LevelTypeToUtf8[line.Level])) - self:getColumn("flags"):addChild(self:newBitmap(self.FlagsToTex[line.Flags].Bitmap, self.FlagsToTex[line.Flags].Color)) -end - ---*********************************************************************** -function CharTracking:putColumnInCache(column, cache) - local childrenCount = column.childrenNb - for i = 0, childrenCount - 1 do - local child = column:getChild(column.childrenNb - 1) - table.insert(cache, child) - column:detachChild(child) - end -end - - ---*********************************************************************** -function CharTracking:putMixedColumnInCache(column, textCache, bitmapCache) - local childrenCount = column.childrenNb - for i = 0, childrenCount - 1 do - local child = column:getChild(column.childrenNb - 1) - if child:find("t") then - table.insert(textCache, child) - else - table.insert(bitmapCache, child) - end - column:detachChild(child) - end -end - ---*********************************************************************** -function CharTracking:putInCache() - self.TextCache = {} - self.CenteredTextCache = {} - self.NumberCache = {} - self.BitmapCache = {} - self:putColumnInCache(self:getColumn("char"), self.TextCache) - self:putColumnInCache(self:getColumn("guild"), self.TextCache) - self:putColumnInCache(self:getColumn("race"), self.TextCache) - self:putColumnInCache(self:getColumn("shard"), self.TextCache) - self:putColumnInCache(self:getColumn("religion"), self.TextCache) - -- - self:putColumnInCache(self:getColumn("level"), self.NumberCache) - -- - self:putColumnInCache(self:getColumn("flags"), self.BitmapCache) -end - ---*********************************************************************** -function CharTracking:clear() - self:getColumn("flags"):clear() - self:getColumn("char"):clear() - self:getColumn("guild"):clear() - self:getColumn("race"):clear() - self:getColumn("religion"):clear() - self:getColumn("shard"):clear() - self:getColumn("level"):clear() - - self.TextCache = {} - self.CenteredTextCache = {} - self.NumberCache = {} - self.BitmapCache = {} - self:getSelectList():clear() - self:getSelectList().active = false - self.CurrList = {} - self.CurrActiveList = {} - self.ListReceived = false -end - ---*********************************************************************** -function CharTracking:testFill1() - self:onCharsListReceived(sampleList1) -end - ---*********************************************************************** -function CharTracking:onCharsListReceived(list) - self.WaitingList = false - self.LastRefreshTime = nltime.getLocalTime() / 1000 - self.ListReceived = true - self:fill(list) -end - ---*********************************************************************** -function CharTracking:fill(list) - - -- if the window is not active, then maybe an old msg -> ignore - if not self:getWindow().active then return end - self:enableButtons(true) - -- - local startTime = nltime.getPreciseLocalTime() - -- - self:getWindow():find("teleport").frozen = true - self:getWindow():find("kick").frozen = true - self:getWindow():find("unkick").frozen = true - self:getWindow():find("tell").frozen = true - -- - self:putInCache() - -- - self.CurrList = list - self.CurrActiveList = {} - self:sort() - local selectList = self:getSelectList() - selectList:clear() - local count = 0 - local displayedCount = 0 - local lastCharFound = false - for k, v in pairs(self.CurrList) do - count = count + 1 - local active - - self:addLine(v) - local newGroup = createGroupInstance("rap_select_line", selectList.id, { id=tostring(v.Id), - params_l="CharTracking:onLineLeftClick()", params_r="CharTracking:onLineRightClick()", - params_dblclick_l="CharTracking:onLineLeftDblClick()", - on_tooltip_params="CharTracking:onLineCharacterTooltip()", - tooltip="uiRAP_InvitedAndConnected"}) - - selectList:addChild(newGroup) - newGroup:find("but").pushed = (v.Id == self.SelectedCharId) - if v.Id == self.SelectedCharId then - lastCharFound = true - end - table.insert(self.CurrActiveList, v) - displayedCount = displayedCount + 1 - end - - if not lastCharFound then - self.SelectedCharId = nil - end - - if displayedCount == 0 then - if count == 0 then - self:setErrorMessage(i18n.get("uiRAP_NoCharFound")) - self:enableButtons(false) - end - else - self:clearMessage() - end - local endTime = nltime.getPreciseLocalTime() - self:updateJoinAndTellButtons() -end - ---*********************************************************************** -function CharTracking:onLineCharacterTooltip() - - if self:isConnected(self.CurrActiveList[self:getSelectList():getElementIndex(getUICaller().parent) + 1].Flags) then - setContextHelpText(i18n.get("uiRAP_InvitedAndConnected")) - else - setContextHelpText(i18n.get("uiRAP_InvitedAndNotConnected")) - end -end - ---*********************************************************************** -function CharTracking:setMessage(msg, color) - -- display the error msg at the bottom of the window - local errorTxt = self:getWindow():find("refreshText") - - -- The version below set the msg in the middle of the window - --local errorTxt = self:getWindow():find("errorMsg") - - errorTxt.uc_hardtext = msg - errorTxt.color = color - errorTxt.active=true - --self:getWindow():invalidateCoords() -end - ---*********************************************************************** -function CharTracking:clearMessage() - --local errorTxt = self:getWindow():find("errorMsg") - local errorTxt = self:getWindow():find("refreshText") - errorTxt.active = false -end - ---*********************************************************************** -function CharTracking:setErrorMessage(msg) - self:setMessage(msg, "192 64 0 255") -end - ---*********************************************************************** -function CharTracking:setInfoMessage(msg) - self:setMessage(msg, "255 255 255 255") -end - - ---*********************************************************************** -function CharTracking:sort(list) - local sortDir = self.SortDir - local function sorter(lhs, rhs) - for k = 1, table.getn(sortDir) do - if lhs[sortDir[k].Var] ~= rhs[sortDir[k].Var] then - if sortDir[k].Up then - return not sortDir[k].Cmp(lhs[sortDir[k].Var], rhs[sortDir[k].Var]) - else - return sortDir[k].Cmp(lhs[sortDir[k].Var], rhs[sortDir[k].Var]) - end - end - end - return false - end - table.sort(self.CurrList, sorter) -end - ---*********************************************************************** -function CharTracking:headerLeftClick(down, criterion) - -- change column sort order - local parent = getUICaller().parent - parent.tdown.active = down - parent.tup.active = not down - -- insert - local sortDir = self.SortDir - for k = 1, table.getn(sortDir) do - if sortDir[k].Var == criterion then - sortDir[k].Up = not sortDir[k].Up - table.insert(sortDir, 1, sortDir[k]) - table.remove(sortDir, k + 1) - if self.ListReceived then - self:fill(self.CurrList) -- update only if list has been received - end - return - end - end -end - ---*********************************************************************** -function CharTracking:getCharFromId(id) - for k, v in pairs(self.CurrList) do - if v.Id == id then return v end - end - return nil -end - ---*********************************************************************** -function CharTracking:onLineLeftClick() - self.SelectedCharId = self.CurrActiveList[self:getSelectList():getElementIndex(getUICaller().parent) + 1].Id - local selectList = self:getSelectList() - for k = 0, selectList.childrenNb - 1 do - local but = selectList:getChild(k):find("but") - if but == getUICaller() then - but.pushed = true - else - but.pushed = false - end - end - --self:getWindow():find("kick").frozen = not self:isConnected(self:getCharFromId(self.SelectedCharId).Flags) - --self:getWindow():find("unkick").frozen = not self:isKicked(self:getCharFromId(self.SelectedCharId).Flags) - --self:getWindow():find("teleport").frozen = not self:isConnected(self:getCharFromId(self.SelectedCharId).Flags) - --self:getWindow():find("tell").frozen = false - - self:updateJoinAndTellButtons() -end - ---*********************************************************************** -function CharTracking:updateJoinAndTellButtons() - if self.SelectedCharId then - self:getWindow():find("kick").frozen = not self:isConnected(self:getCharFromId(self.SelectedCharId).Flags) - self:getWindow():find("unkick").frozen = not self:isKicked(self:getCharFromId(self.SelectedCharId).Flags) - self:getWindow():find("teleport").frozen = not self:isConnected(self:getCharFromId(self.SelectedCharId).Flags) or (r2.Mode=="r2ed_anim_test") - self:getWindow():find("tell").frozen = false - else - self:getWindow():find("kick").frozen = true - self:getWindow():find("unkick").frozen = true - self:getWindow():find("teleport").frozen = true - self:getWindow():find("tell").frozen = true - end -end - - ---*********************************************************************** -function CharTracking:onLineRightClick() - self:onLineLeftClick() - local menu = getUI("ui:interface:ring_char_menu") - - menu:find("tell").uc_hardtext = ucstring(i18n.get("uiRAP_MenuCharTell"):toUtf8() .. "'" .. self:getCharFromId(self.SelectedCharId).Char .."'") - menu:find("teleport").uc_hardtext = ucstring(i18n.get("uiRAP_MenuTeleportTo"):toUtf8() .. "'" .. self:getCharFromId(self.SelectedCharId).Char.."'") - menu:find("kick").uc_hardtext = ucstring(i18n.get("uiRAP_MenuKick"):toUtf8() .. "'" .. self:getCharFromId(self.SelectedCharId).Char.."'") - menu:find("unkick").uc_hardtext = ucstring(i18n.get("uiRAP_MenuUnkick"):toUtf8() .. "'" .. self:getCharFromId(self.SelectedCharId).Char.."'") - - menu:find("unkick").grayed = not self:isKicked(self:getCharFromId(self.SelectedCharId).Flags) - menu:find("kick").grayed = not self:isConnected(self:getCharFromId(self.SelectedCharId).Flags) - menu:find("teleport").grayed = not self:isConnected(self:getCharFromId(self.SelectedCharId).Flags) or (r2.Mode=="r2ed_anim_test") - launchContextMenuInGame("ui:interface:ring_char_menu") -end - ---*********************************************************************** -function CharTracking:onTell() - debugInfo("tell to owner of session" .. self.SelectedCharId) - char = ucstring() - char:fromUtf8(self:getCharFromId(self.SelectedCharId).Char) - tell(char, i18n.get("uiRAP_AskForTall")) -end - ---*********************************************************************** -function CharTracking:onKick() - r2:kickCharacter(self.SelectedCharId) -end - ---*********************************************************************** -function CharTracking:onUnkick() - r2:unkickCharacter(self.SelectedCharId) -end - ---*********************************************************************** -function CharTracking:onTeleportTo() - r2:teleportToCharacter(self.SelectedCharId) -end - ---*********************************************************************** -function CharTracking:onLineLeftDblClick() - local char = self:getCharFromId(self.SelectedCharId) - if self:isConnected(char.Flags) then - onTell() - end -end - ---*********************************************************************** -function CharTracking:refresh() - - self.PendingRefresh = true - self.LastRefreshTime = nltime.getLocalTime() / 1000 - self.WaitingList = true - --debugInfo("*refresh*") -end - ---*********************************************************************** --- called by C++ when someone is invited -function CharTracking:forceRefresh() - self:refresh() - self.LastRefreshQuerryTime = 0 -- make believe last refresh was *quite* long ago... -end - - ---*********************************************************************** -function CharTracking:updatePendingRefresh() - - if self.PendingRefresh then - local currTime = nltime.getLocalTime() / 1000 - if currTime - self.LastRefreshQuerryTime > self.MinRefreshPeriod and game.getRingCharList then - self.LastRefreshQuerryTime = currTime - self.PendingRefresh = false - -- when you load an animation, lua state isn't initialized for a short time - game.getRingCharList() - end - end -end - ---*********************************************************************** -function CharTracking:onShow() - self:initRaceTypes() - self:initReligionTypes() - self:initLevelTypes() - setOnDraw(self:getWindow(), "CharTracking:onDraw()") - self:clear() - self:enableButtons(false) - self:refresh() -end - -local waitTextColor = CRGBA(255, 255, 255, 255) - - ---*********************************************************************** -function CharTracking:enableButtons(enabled) - local win = self:getWindow() - local alpha - if enabled then alpha = 255 else alpha = 128 end - self:getSelectList().active = enabled -end - ---*********************************************************************** -function CharTracking:show() - -- update msg - local win = self:getWindow() - win.active = true - if self.FirstShow then - local w, h = getWindowSize() - win.w = w * 5 / 6 - win.h = h * 5 / 6 - win:invalidateCoords() - win:updateCoords() - win:center() - win:invalidateCoords() - win:updateCoords() - self.FirstShow = false - end - win:blink(1) -end - ---*********************************************************************** -function CharTracking:enlargeColumns() - self:getWindow():find("header_line"):enlargeColumns(10) - local enlargeButton = self:getWindow():find("enlarge") - enlargeButton.frozen = true -end - ---*********************************************************************** -function CharTracking:onResize() - local enlargeButton = self:getWindow():find("enlarge") - enlargeButton.frozen = false -end - ---*********************************************************************** -function CharTracking:resizeColumnsAndContainer() - self:getWindow():find("header_line"):resizeColumnsAndContainer(5) -end - ---*********************************************************************** -function CharTracking:onDraw() - - local timeInSec = nltime.getLocalTime() / 1000 - if self.WaitingList then - if timeInSec - self.LastRefreshTime > self.WaitingPeriod then - self.WaitingList = false - self.LastRefreshTime = nltime.getLocalTime() / 1000 - --self:getWindow():find("refreshText").active = false - else - local waitText = i18n.get("uiRAP_WaitChars" .. math.fmod(os.time(), 3)) - self:setInfoMessage(waitText) - --local refreshText = self:getWindow():find("refreshText") - --if not self.ListReceived then - -- self:setInfoMessage(waitText) - -- waitTextColor.A = 127 + 127 * (0.5 + 0.5 * math.cos(6 * timeInSec)) - -- local errorTxt = self:getWindow():find("errorMsg") - -- errorTxt.color_rgba = waitTextColor - -- refreshText.active = false - --else - -- refreshText.active = true - -- refreshText.uc_hardtext = waitText - --end - end - else - if timeInSec - self.LastRefreshTime > self.RefreshPeriod then - self:refresh() - else - --debugInfo("pas de refresh") - end - end - self:updatePendingRefresh() -end - - - - diff --git a/code/ryzom/common/data_common/r2/r2_ui_contextual_commands.lua b/code/ryzom/common/data_common/r2/r2_ui_contextual_commands.lua deleted file mode 100644 index f68530c49..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_contextual_commands.lua +++ /dev/null @@ -1,162 +0,0 @@ ----------------------------- --- CONTEXTUAL COMMANDS UI -- ----------------------------- --- Code in this file manage the update of the contextual toolbar & --- contextual menu for the current selected instance, depending on the vailable options - -r2.ContextualCommands = -{ - --ButtonCache = -- list of buttons already created in the toolbar - -- each entry has the form : - -- { Id="id_of_button_in_the_ui", CommandDesc={ }, } - -- 'CommandDesc' is one of the command description returned - -- by the selected instance when calling 'getAvailableCommands' - -- } - --{ - - --} - - -- description of each command - CurrentCommands={}, - -- map index of each command to the matching toolbar button - IndexToButton = {}, - -- Current instance for which this contextual toolbar is displayed - CurrentInstance = nil, - -- Index of last triggered command - LastTriggeredCommandIndex = nil, - -- Cache of buttons (to avoid costrly template instanciation). Key is the command, Value if a pointer to the button - ButtonCache = {} -} - ------------- --- PUBLIC -- ------------- - ----------------------------------------------------------------------------- --- Setup the contextual toolbar for the given instance --- passing nil just hides the toolbar -function r2.ContextualCommands:setupToolbar(instance) - self.CurrentInstance = instance - table.clear(self.CurrentCommands) - table.clear(self.IndexToButton) - table.clear(self.LastTriggeredCommandIndex) - local toolbar = self:getToolbar() - local buttonList = toolbar:find("buttons") - if not instance then - toolbar.active = false - -- put all buttons in the cache for futur reuse - --for index, button in IndexToButton do - -- detach button from its parent - --if buttonlist.detachChild(button) then - -- ButtonCache[CurrentCommands[index]] = button - - --end - --end - return - end - table.clear(self.CurrentCommands) - if not instance.Ghost then - instance:getAvailableCommands(self.CurrentCommands) - end - assert(self.CurrentCommands) - toolbar.active = true - buttonList:clear() - for index, commandDesc in pairs(self.CurrentCommands) do - self:addToolbarCommand(buttonList, commandDesc, index) - end -end - - -local newCommands = {} - ----------------------------------------------------------------------------- --- Update the toolbar content -function r2.ContextualCommands:update() - if self.CurrentInstance then - table.clear(newCommands) - if not self.CurrentInstance.Ghost then - self.CurrentInstance:getAvailableCommands(newCommands) - end - if isEqual(newCommands, self.CurrentCommands) then - return -- commands remains unchanged, no need to update the ui - end - end - -- if one of the command is highlighted, let it highlighted after the toolbar has been rebuilt - --local highlightedCommand - --for index, button in pairs(self.IndexToButton) do - -- if button == r2.ToolUI:getActiveToolUI() then - -- debugInfo("highlighted command found") - -- highlightedCommand = self.CurrentCommands[index] - -- break - -- end - --end - self:setupToolbar(self.CurrentInstance) - -- if one command was highlighted, highlight it again in new toolbar - -end - ----------------------------------------------------------------------------- --- Hightlight the button of the last triggered command -function r2.ContextualCommands:highlightCurrentCommandButton() - debugInfo("***") - if self.LastTriggeredCommandIndex then - r2.ToolUI:setActiveToolUI(self.IndexToButton[self.LastTriggeredCommandIndex]) - end -end - -------------- --- PRIVATE -- -------------- - ----------------------------------------------------------------------------- --- Private : Get reference to the contextual toolBar -function r2.ContextualCommands:getToolbar(instance) - return getUI("ui:interface:r2ed_contextual_toolbar") -end - ----------------------------------------------------------------------------- --- Private : add a new button in the toolbar -function r2.ContextualCommands:addToolbarCommand(buttonList, commandDesc, index) - if not commandDesc.ButtonBitmap or commandDesc.ButtonBitmap == "" then - return -- no button wanted for this command - end - -- buld filenames for the 'normal', 'over' & 'pushed" textures - local icon = commandDesc.ButtonBitmap - local iconOver = nlfile.getFilenameWithoutExtension(icon) .. - "_over." .. nlfile.getExtension(icon) - local iconPushed = nlfile.getFilenameWithoutExtension(icon) .. - "_pushed." .. nlfile.getExtension(icon) - local tmplParams = - { - tooltip = commandDesc.TextId, - id = tostring(index), - icon = icon, - icon_over = iconOver, - icon_pushed = iconPushed, - onclick_l = "lua", - params_l = "r2.ContextualCommands:runCommand(" .. tostring(index) .. ")", - w = "32", - h = "32", - offset_x = select(commandDesc.Separator == true, 8, 0) - } - - local newButton = createGroupInstance("r2ed_tool", buttonList.id, tmplParams) - if newButton then - buttonList:addChild(newButton) - self.IndexToButton[index] = newButton - end -end - ----------------------------------------------------------------------------- --- Private : execute a command triggered by a toolbar button -function r2.ContextualCommands:runCommand(index) - assert(self.CurrentInstance) - assert(self.CurrentCommands[index] ~= nil) - self.LastTriggeredCommandIndex = index - -- do actual call - self.CurrentCommands[index].DoCommand(self.CurrentInstance) -end - - - - diff --git a/code/ryzom/common/data_common/r2/r2_ui_contextual_commands_new.lua b/code/ryzom/common/data_common/r2/r2_ui_contextual_commands_new.lua deleted file mode 100644 index 1b87fcd85..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_contextual_commands_new.lua +++ /dev/null @@ -1,307 +0,0 @@ ----------------------------- --- CONTEXTUAL COMMANDS UI -- ----------------------------- --- Code in this file manage the update of the contextual toolbar & --- contextual menu for the current selected instance, depending on the vailable options - -r2.ContextualCommands = r2.newToolbar() - - -r2.ContextualCommands.MenuCommands={} -r2.ContextualCommands.CurrentMenuInstance = nil -- for now, will always be equal to CurrentInstance, or nil if menu hasn't been displayed yet -r2.ContextualCommands.CurrentMenu = nil - - - ------------- --- PUBLIC -- ------------- - - -local newCommands = {} - - ----------------------------------------------------------------------------- --- Update the toolbar content, avoiding to resetup it if there where no changes -function r2.ContextualCommands:update() - -- TODO nico : report this behavior in the base class - if self.CurrentInstance then - table.clear(newCommands) - if not self.CurrentInstance.Ghost then - self.CurrentInstance:getAvailableCommands(newCommands) - end - if isEqual(newCommands, self.CurrentCommands) then - return -- commands remains unchanged, no need to update the ui - end - end - -- if one of the command is highlighted, let it highlighted after the toolbar has been rebuilt - local highlightedCommand - for index, button in pairs(self.IndexToButton) do - if button == r2.ToolUI:getActiveToolUI() then - debugInfo("highlighted command found") - highlightedCommand = self.CurrentCommands[index] - break - end - end - self:setupToolbar(self.CurrentInstance) - -- if one command was highlighted, highlight it again in new toolbar - if highlightedCommand then - for index, command in pairs(self.CurrentCommands) do - if command == highlightedCommand then - debugInfo("re-highlighting command") - r2.ToolUI:setActiveToolUI(self.IndexToButton[index]) - break - end - end - end - -- for now, if menu is displayed then toolbar must be, too - if self.CurrentMenuInstance then - -- update menu - if self.CurrentMenu.active then - self:setupMenu(self.CurrentMenuInstance, self.CurrentMenu) - end - end - -- remove current context help -> - disableContextHelp() -end - - ----------------------------------------------------------------------------- --- Special function called by the framework when the "r2ed_context_command" action is triggered --- Like other action (defined in actions.xml), this action can have been triggered by a key assigned to it in the 'keys' window -function r2:execContextCommand(commandId) - if not r2.ContextualCommands.CurrentInstance then return end - -- see in list of current commands if there is a command with the good id - for key, command in pairs(r2.ContextualCommands.CurrentCommands) do - if command.Id == commandId then - command.DoCommand(r2.ContextualCommands.CurrentInstance) - return - end - end -end - ----------------------------------------------------------------------------- --- called by the ui when it wants to display the tooltip for one of the contextual commands -function r2:updateContextualCommandTooltip(index) - local command = r2.ContextualCommands.ToolbarCommands[index + 1] - assert(command) - local keyName = ucstring(runExpr(string.format("getKey('r2ed_context_command', 'commandId=%s')", command.Id))) - if keyName == i18n.get("uiNotAssigned") then - -- no associated key - setContextHelpText(i18n.get(command.TextId)) - else - setContextHelpText(concatUCString(i18n.get(command.TextId), " (", keyName, ")")) - end -end - - -local commands = {} -- to avoid reallocs - ----------------------------------------------------------------------------- --- Setup a contextual menu for the given instance --- passing nil just hides the toolbar -function r2.ContextualCommands:setupMenu(instance, menu) - -- TMP (test of menu exported methods) - --if menu then - -- local rm = menu:getRootMenu() - -- debugInfo("****************************") - -- debugInfo("Num line " .. tostring(rm:getNumLine())) - -- for i = 0, rm:getNumLine() -1 do - -- debugInfo("Id for line " .. tostring(i) .. " is " .. tostring(rm:getLineId(i))) - -- end - -- debugInfo("Line with id 'dynamic_content_start' has index " .. tostring(rm:getLineFromId('dynamic_content_start'))) - -- debugInfo("Line 6 is separator = " .. tostring(rm:isSeparator(6))) - -- rm:addLine(ucstring("toto"), "lua", "debugInfo('pouet')", "toto") - -- rm:addSeparator() - -- rm:addLine(ucstring("tutu"), "lua", "debugInfo('pouet')", "tutu") - -- rm:addLine(ucstring("titi"), "lua", "debugInfo('pouet')", "titi") - -- local titiIndex = rm:getLineFromId('titi') - -- rm:addSeparatorAtIndex(titiIndex) - -- rm:addLine(ucstring("bidon"), "lua", "debugInfo('pouet')", "titi") - -- debugInfo("################################") - -- end - - - self.CurrentMenuInstance = instance - self.CurrentMenu = menu - table.clear(self.MenuCommands) - if not instance then return end - -- delete entries for dynamic content - local menuRoot = menu:getRootMenu() - local startLine = menuRoot:getLineFromId("dynamic_content_start") - local endLine = menuRoot:getLineFromId("dynamic_content_end") - assert(startLine ~= -1 and endLine ~= -1) - for lineToDel = endLine - 1, startLine + 1, -1 do - menuRoot:removeLine(lineToDel) - end - -- retrieve dynamic commands - table.clear(commands) - if not instance.Ghost then - instance:getAvailableCommands(commands) - end - local currentLine = startLine + 1 - local currentActivityLine = 0 - local commandIndex = 1 - local activityAdded = false - local activityMenuIndex = menuRoot:getLineFromId("activities") - local activityMenu - if activityMenuIndex ~= -1 then - activityMenu = menuRoot:getSubMenu(activityMenuIndex) - end - if activityMenu then - activityMenu:reset() - end - for commandIndex, command in pairs(commands) do - if command.ShowInMenu then - local destNode - local line - if command.IsActivity then - destNode = activityMenu - line = currentActivityLine - activityAdded = true - else - line = currentLine - destNode = menuRoot - end - destNode:addLineAtIndex(line, i18n.get(command.TextId), "lua", - "r2.ContextualCommands:runMenuCommand(" .. tostring(table.getn(self.MenuCommands) + 1) .. ")", "dyn_command_" .. tostring(commandIndex)) - -- if there's a bitmap, build a group with the buitmap in it, and add to menu - if command.ButtonBitmap and command.ButtonBitmap ~= "" then - local smallIcon = nlfile.getFilenameWithoutExtension(command.ButtonBitmap) .. - "_small." .. nlfile.getExtension(command.ButtonBitmap) - local menuButton = createGroupInstance("r2_menu_button", "", { bitmap = smallIcon, }) - if menuButton then - destNode:setUserGroupLeft(line, menuButton) - assert(destNode:getUserGroupLeft(line) == menuButton) - -- TMP (test for menu exported lua methods) - -- menuButton = createGroupInstance("r2_menu_button", "", { bitmap = smallIcon, }) - -- menuRoot:setUserGroupRight(currentLine, menuButton) - -- assert(menuRoot:getUserGroupRight(currentLine) == menuButton) - end - end - local keyNameGroup = createGroupInstance("r2_keyname", "", { id = command.Id }) - if keyNameGroup then - local keyName = ucstring(runExpr(string.format("getKey('r2ed_context_command', 'commandId=%s')", command.Id))) - if keyName == i18n.get("uiNotAssigned") then - -- no associated key - keyNameGroup:find("t").uc_hardtext = keyName - else - keyNameGroup:find("t").uc_hardtext = concatUCString(ucstring("(") , keyName, ucstring(")")) - end - destNode:setUserGroupRight(line, keyNameGroup) - end - table.insert(self.MenuCommands, command) - if command.IsActivity then - currentActivityLine = currentActivityLine + 1 - else - currentLine = currentLine + 1 - end - end - end -end - ----------------------------------------------------------------------------- -function r2.ContextualCommands:runMenuCommand(index) - assert(self.CurrentMenuInstance) - assert(self.MenuCommands[index] ~= nil) - -- do actual call - self.MenuCommands[index].DoCommand(self.CurrentInstance) -end - - ----------------------------------------------------------------------------- --- Hightlight the button of the last triggered command -function r2.ContextualCommands:highlightCurrentCommandButton() - if self.LastTriggeredCommandIndex then - r2.ToolUI:setActiveToolUI(self:getButton(self.LastTriggeredCommandIndex - 1)) - end -end - ----------------------------------------------------------------------------- --- Hightlight the button of the last triggered command -function r2.ContextualCommands:highlightCommandButton(commandId) - r2.ToolUI:setActiveToolUI(self.IndexToButton[self.CommandIdToIndex[commandId]]) -end - - - - -------------------------------------------------------------------- --- PRIVATE :IMPLEMENT METHODS REQUIRED BY r2_ui_toolbar_base.lua -- -------------------------------------------------------------------- - --- return a reference on the toolbar -function r2.ContextualCommands:getToolbar() - return getUI("ui:interface:r2ed_contextual_toolbar_new") -end - --- return the max number of command that the toolbar may contains -function r2.ContextualCommands:getMaxNumCommands() - return tonumber(getDefine("r2ed_max_num_contextual_buttons")) -end - --- get a button from its index in the toolbar -function r2.ContextualCommands:getButton(buttonIndex) - if self.ButtonList == nil then - self.ButtonList = self:getToolbar():find("buttons") - end - return self.ButtonList["b" .. tostring(buttonIndex)] -end - --- setup a button from a command in the toolbar -function r2.ContextualCommands:setupButton(button, commandDesc, buttonIndex) - assert(button) - button.active = true - -- buld filenames for the 'normal', 'over' & 'pushed" textures - local icon = commandDesc.ButtonBitmap - local iconOver = nlfile.getFilenameWithoutExtension(icon) .. - "_over." .. nlfile.getExtension(icon) - local iconPushed = nlfile.getFilenameWithoutExtension(icon) .. - "_pushed." .. nlfile.getExtension(icon) - - local selectedGroup = button:find("selected") - local unselectedGroup = button:find("unselected") - local selectedButton = selectedGroup:find("button") - local unselectedButton = unselectedGroup:find("button") - - selectedGroup.active = false - unselectedGroup.active = true - - - - selectedButton.texture = icon - selectedButton.texture_over = iconOver - selectedButton.texture_pushed = iconPushed - selectedButton.parent.Env.Toolbar = self - - unselectedButton.texture = icon - unselectedButton.texture_over = iconOver - unselectedButton.texture_pushed = iconPushed - unselectedButton.parent.Env.Toolbar = self - - - selectedButton.onclick_l = "lua" - selectedButton.params_l = "r2.runBaseToolbarCommand(getUICaller().parent.Env.Toolbar, " .. tostring(buttonIndex) .. ")" - unselectedButton.onclick_l = "lua" - unselectedButton.params_l = selectedButton.params_l - - button.child_resize_wmargin = select(commandDesc.Separator == true, 8, 0) - -end - --- retrieve a command list for the given instance -function r2.ContextualCommands:getAvailableCommands(instance, dest) - --inspect(instance) - table.clear(dest) - if not instance.Ghost then - instance:getAvailableCommands(dest) - end -end - - - - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_ui_custom_boxes_data.lua b/code/ryzom/common/data_common/r2/r2_ui_custom_boxes_data.lua deleted file mode 100644 index 740b9cb76..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_custom_boxes_data.lua +++ /dev/null @@ -1,5 +0,0 @@ ---***************************************************************-- --- this file was generated by the r2 editor, do not edit !!!!!! -- ---***************************************************************-- - -r2.CustomBBox.Boxes['object_campfire.creature'] = { Enabled = true, XMin = -1.001000, XMax = 0.999600, YMin = -1.001000, YMax = 0.999600, ZMin = -0.197400, ZMax = 2.069200 } \ No newline at end of file diff --git a/code/ryzom/common/data_common/r2/r2_ui_custom_selection_bbox.lua b/code/ryzom/common/data_common/r2/r2_ui_custom_selection_bbox.lua deleted file mode 100644 index df92fa10c..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_custom_selection_bbox.lua +++ /dev/null @@ -1,157 +0,0 @@ --- ui for customisation of selection bbox - -r2.CustomBBox = -{ - UIPath = "ui:interface:r2ed_bbox_edit", - FirstDisplay = true, - -- tmp, hardcoded stuff here - SavePath = "data_common\\r2\\r2_ui_custom_boxes_data.lua", - Boxes = {}, -- boxes, sorted by sheet ids - SliderMaxRange = 7; -} - - - --- convert coordinate to slider unit -function r2.CustomBBox:coordToSliderValue(coord) - return (coord / self.SliderMaxRange) * 5000 + 5000 -end - --- convert slider value to coordinates -function r2.CustomBBox:sliderValueToCoord(sliderValue) - return self.SliderMaxRange * ((sliderValue - 5000) / 5000) -end - - -function r2.CustomBBox:getWindow() - return getUI(self.UIPath) -end - --- update custom bbox dialog from the current selection -function r2.CustomBBox:updateUI() - local ui = self:getWindow() - if ui.active == false then return end - local selectedInstance = r2:getSelectedInstance() - -- show one of the 3 states of the window (no selection, no custom bbox for the selection, or the bbox itself) - local function setActive(noSelection, noBBox, bbox) - ui:find("no_selected_bbox").active = noSelection - ui:find("no_custom_bbox").active = noBBox - ui:find("custom_bbox").active = bbox - end - -- - if selectedInstance == nil then - setActive(true, false, false) - return - end - local sheet = selectedInstance.SheetClient - debugInfo("sheet = " .. tostring(sheet)) - if sheet == nil then - setActive(false, true, false) - return - end - setActive(false, false, true) - -- - local function setCustomBBoxEnabledInUI(active) - debugInfo("setCustomBBoxEnabledInUI : " .. tostring(active)) - ui:find("x_min").slider.active = active - ui:find("x_max").slider.active = active - ui:find("y_min").slider.active = active - ui:find("y_max").slider.active = active - ui:find("z_min").slider.active = active - ui:find("z_max").slider.active = active - ui:find("custom_bbox_enabled").pushed = active - local textColor = select(active, CRGBA(255, 255, 255), CRGBA(127, 127, 127, 127)) - ui:find("x_min_text").color_rgba = textColor - ui:find("x_max_text").color_rgba = textColor - ui:find("y_min_text").color_rgba = textColor - ui:find("y_max_text").color_rgba = textColor - ui:find("z_min_text").color_rgba = textColor - ui:find("z_max_text").color_rgba = textColor - end - -- - local currBBox = self.Boxes[sheet] - if currBBox == nil then - -- no custom bbox defined - setCustomBBoxEnabledInUI(false) - return - end - if not currBBox.Enabled then - setCustomBBoxEnabledInUI(false) - return - end - setCustomBBoxEnabledInUI(true) - debugInfo('*' .. tostring(sheet)) - ui:find("x_min").slider.value = self:coordToSliderValue(currBBox.XMin) - ui:find("x_max").slider.value = self:coordToSliderValue(currBBox.XMax) - ui:find("y_min").slider.value = self:coordToSliderValue(currBBox.YMin) - ui:find("y_max").slider.value = self:coordToSliderValue(currBBox.YMax) - ui:find("z_min").slider.value = self:coordToSliderValue(currBBox.ZMin) - ui:find("z_max").slider.value = self:coordToSliderValue(currBBox.ZMax) -end - --- update current bbox parameters for the selection from the ui -function r2.CustomBBox:updateFromUI() - local selectedInstance = r2:getSelectedInstance() - if selectedInstance == nil then - return - end - local sheet = selectedInstance.SheetClient - if sheet == nil then - return - end - local ui = self:getWindow() - local box = {} - box.XMin = self:sliderValueToCoord(ui:find("x_min").slider.value) - box.XMax = self:sliderValueToCoord(ui:find("x_max").slider.value) - box.XMin = math.min(box.XMin, box.XMax) - box.YMin = self:sliderValueToCoord(ui:find("y_min").slider.value) - box.YMax = self:sliderValueToCoord(ui:find("y_max").slider.value) - box.YMin = math.min(box.YMin, box.YMax) - box.ZMin = self:sliderValueToCoord(ui:find("z_min").slider.value) - box.ZMax = self:sliderValueToCoord(ui:find("z_max").slider.value) - box.ZMin = math.min(box.ZMin, box.ZMax) - box.Enabled = ui:find("custom_bbox_enabled").pushed - if not box.Enabled and self.Boxes[sheet] == nil then - return -- no custom bbox set yet - end - if box.Enabled then - if self.Boxes[sheet] == nil then - debugInfo('assigning new custom bbox') - box.XMin = -0.5 - box.XMax = 0.5 - box.YMin = -0.5 - box.YMax = 0.5 - box.ZMin = 0 - box.ZMax = 2 - end - end - self.Boxes[sheet] = box - r2:setEntityCustomSelectBox(sheet, box) - self:updateUI() -end - --- save all bbox -function r2.CustomBBox:save() --- tmp : hardcoded path here for now ... - local stream = io.open(self.SavePath, "w") - assert(stream) - stream:write("--***************************************************************--\r\n") - stream:write("-- this file was generated by the r2 editor, do not edit !!!!!! --\r\n") - stream:write("--***************************************************************--\r\n") - for k, box in pairs(self.Boxes) do - if box.Enabled then - stream:write(string.format("\r\nr2.CustomBBox.Boxes['%s'] = { Enabled = true, XMin = %f, XMax = %f, YMin = %f, YMax = %f, ZMin = %f, ZMax = %f }", - k, box.XMin, box.XMax, box.YMin, box.YMax, box.ZMin, box.ZMax)) - end - end - stream:close() - debugInfo("Custom bbox save successful") -end - -function r2.CustomBBox:load() - r2.doFile(self.SavePath) - for sheet, box in pairs(self.Boxes) do - r2:setEntityCustomSelectBox(sheet, box) - end -end - \ No newline at end of file diff --git a/code/ryzom/common/data_common/r2/r2_ui_displayer_npc.lua b/code/ryzom/common/data_common/r2/r2_ui_displayer_npc.lua deleted file mode 100644 index 0f625e24e..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_displayer_npc.lua +++ /dev/null @@ -1,3093 +0,0 @@ - --- SEX ----------------------------------------------------------------------------------- -r2.male = "male" -r2.female = "female" -r2.sexSelection = "male" - --- RACE ---------------------------------------------------------------------------------- -r2.raceSelection = "Fyros" -r2.fyros = "Fyros" -r2.matis = "Matis" -r2.tryker = "Tryker" -r2.zorai = "Zorai" - -r2.NPCNames = {} -- All available names -r2.NPCAllNames = {} -- All Names (even those who are not available) - --- CHANGE VIEW --------------------------------------------------------------------------- -r2.faceView = false -r2.camPosY = -16.4 -r2.camZoomPosY = -3.9 -r2.camTgtZ = -0.79 -r2.camTgtZZorai = -0.75 -r2.camPosYZorai = -18.3 -r2.distlimitmin = 9.0 -r2.distlimitmax = -r2.camPosY -r2.distlimitminZoom = 2.5 - --- FACE MORPH EDIT TEXT ------------------------------------------------------------------ -r2.raceMorphEditText = {} -r2.raceMorphEditText[r2.fyros] = { [1]="Mouth level", [2]="Eyes", - [3]="Nose level", [4]="Mouth width", - [5]="Nose length", [6]="Nose width", - [7]="Brown width", [8]="Chin"} - -r2.raceMorphEditText[r2.matis] = { [1]="Eyes level", [2]="Nose level", - [3]="Nose length", [4]="Nose width", - [5]="Mouth width", [6]="Mouth level", - [7]="Ear size", [8]="Chin"} - -r2.raceMorphEditText[r2.tryker] = { [1]="Eyes level", [2]="Nose level", - [3]="Nose length", [4]="Nose width", - [5]="Mouth width", [6]="Mouth level", - [7]="Ear size", [8]="Chin"} - -r2.raceMorphEditText[r2.zorai] = { [1]="Eyes size", [2]="bottom horn 1", - [3]="bottom horn 2",[4]="middle horn 1", - [5]="middle horn 2",[6]="top horn 1", - [7]="top horn 2", [8]=""} - -r2.tableBodySets = {} -r2.tableFaceSets = {} -r2.tableFaceMorph = {} - -r2.raceSheetNameMatch = -{ - ["basic_fyros_male.creature"] = "Fyros", - ["basic_fyros_female.creature"] = "Fyros", - ["basic_matis_male.creature"] = "Matis", - ["basic_matis_female.creature"] = "Matis", - ["basic_tryker_male.creature"] = "Tryker", - ["basic_tryker_female.creature"] = "Tryker", - ["basic_zorai_male.creature"] = "Zorai", - ["basic_zorai_female.creature"] = "Zorai" -} - -r2.raceSheetClient = -{ - male = {Fyros="basic_fyros_male.creature", - Matis="basic_matis_male.creature", - Tryker="basic_tryker_male.creature", - Zorai="basic_zorai_male.creature"}, - - female= {Fyros="basic_fyros_female.creature", - Matis="basic_matis_female.creature", - Tryker="basic_tryker_female.creature", - Zorai="basic_zorai_female.creature"} -} - - --- ITEM INDEX / SLIDER VALUE FACES SETS -------------------------------------------------- -r2.sliderValueToItemIndex = {} -r2.sliderValueToItemIndex[r2.fyros] = {[0] = "fy_cheveux_shave01.sitem", [1] = "fy_cheveux_short01.sitem", - [2] = "fy_cheveux_short02.sitem", [3] = "fy_cheveux_medium01.sitem", - [4] = "fy_cheveux_medium02.sitem", [5] = "fy_cheveux_medium03.sitem", - [6] = "fy_cheveux_long01.sitem"} - -r2.sliderValueToItemIndex[r2.matis] = {[0] = "ma_cheveux_shave01.sitem", [1] = "ma_cheveux_short01.sitem", - [2] = "ma_cheveux_short02.sitem", [3] = "ma_cheveux_medium01.sitem", - [4] = "ma_cheveux_medium02.sitem", [5] = "ma_cheveux_long01.sitem", - [6] = "ma_cheveux_long02.sitem"} - -r2.sliderValueToItemIndex[r2.tryker] = {[0] = "tr_cheveux_shave01.sitem", [1] = "tr_cheveux_short01.sitem", - [2] = "tr_cheveux_short02.sitem", [3] = "tr_cheveux_short03.sitem", - [4] = "tr_cheveux_medium01.sitem", [5] = "tr_cheveux_medium02.sitem", - [6] = "tr_cheveux_long01.sitem"} - -r2.sliderValueToItemIndex[r2.zorai] = {[0] = "zo_cheveux_shave01.sitem", [1] = "zo_cheveux_short01.sitem", - [2] = "zo_cheveux_medium01.sitem", [3] = "zo_cheveux_medium02.sitem", - [4] = "zo_cheveux_medium03.sitem", [5] = "zo_cheveux_long01.sitem", - [6] = "zo_cheveux_long02.sitem"} - -r2.itemIndexToSliderValue = {} - -r2.hasHelmet = false - -r2.hairType = {} - -r2.selectEquipmentSet = false - ------------------------------------------------------------------------ --- Current fonction to change an attribute in a npc --- default is to do a 'requestSetNode' -function r2:setNpcAttribute(instanceId, propName, propValue) - r2.requestSetNode(instanceId, propName, propValue) -end - - - --- INIT ITEM INDEX TO SLIDER VALUE TABLE ------------------------------------------------- -function r2:initItemIndexToSliderValueTable() - - r2.itemIndexToSliderValue={} - local races = {r2.fyros, r2.matis, r2.tryker, r2.zorai} - - for key1, value1 in pairs(races) do - r2.itemIndexToSliderValue[value1] = {} - - for key2, value2 in pairs(r2.sliderValueToItemIndex[value1]) do - local itemIndex = getSheetId(value2) - r2.itemIndexToSliderValue[value1][itemIndex] = key2 - end - end -end - - -local body_sliders = {GabaritHeight ="slider_height", - GabaritTorsoWidth ="slider_torso", - GabaritArmsWidth ="slider_arms", - GabaritLegsWidth ="slider_legs", - GabaritBreastSize ="slider_breast", - - HairType ="slider_haircut", - HairColor ="slider_hair_color", - Tattoo ="slider_tattoos", - EyesColor ="slider_eye_color", - - MorphTarget1 ="slider_morph_target1", - MorphTarget2 ="slider_morph_target2", - MorphTarget3 ="slider_morph_target3", - MorphTarget4 ="slider_morph_target4", - MorphTarget5 ="slider_morph_target5", - MorphTarget6 ="slider_morph_target6", - MorphTarget7 ="slider_morph_target7", - MorphTarget8 ="slider_morph_target8"} - -r2.sheetTypeCB = {} - - --- share npc displayer between all instances -local npcCustomPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - -local oldCustomNPCOnAttrModified = npcCustomPropertySheetDisplayerTable.onAttrModified - - ------------------------------------------------- -function npcCustomPropertySheetDisplayerTable:onPostCreate(instance) -end ------------------------------------------------- -function npcCustomPropertySheetDisplayerTable:onErase(instance) -end ------------------------------------------------- -function npcCustomPropertySheetDisplayerTable:onPreHrcMove(instance) - r2:npcPropertySheetDisplayer():onPreHrcMove(instance) -end ------------------------------------------------- -function npcCustomPropertySheetDisplayerTable:onPostHrcMove(instance) - r2:npcPropertySheetDisplayer():onPostHrcMove(instance) -end ------------------------------------------------- -function npcCustomPropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -r2.customizationOpen = false -function npcCustomPropertySheetDisplayerTable:onSelect(instance, isSelected) - r2:npcPropertySheetDisplayer():onSelect(instance, isSelected) - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - if not isSelected then - r2.customizationOpen = npcUI.active - npcUI.active = false - else - r2.raceSelection = getR2PlayerRace(instance.SheetClient) - - if r2.customizationOpen == true then - r2.customizationOpen = false - npcCustomPropertySheetDisplayerTable:updateAll(instance) - end - end -end - ------------------------------------------------- -function npcCustomPropertySheetDisplayerTable:updateAll(instance) - -- nico patch : - -- replace the r2:setNpcProperty function, so that it does call 'requestSetNode', but rather forward call - -- to the displayer directly... - local function bypassRequestNode(this, instanceId, propName, propValue) - local instance = r2:getInstanceFromId(instanceId) - instance.DisplayerProperties:onAttrModified(instance, propName) - end - local oldSetNpcAttribute = r2.setNpcAttribute - r2.setNpcAttribute = bypassRequestNode - local ok, msg = pcall(self.updateAllPrivate, self, instance) - if not ok then - debugInfo(msg) - end - r2.setNpcAttribute = oldSetNpcAttribute -end - ------------------------------------------------- -function npcCustomPropertySheetDisplayerTable:updateAllPrivate(instance) - - -- if attribute is visible in the generic property sheet, then update it - local propDesc = instance:getPropDesc(attributeName) - if propDesc and propDesc.Visible ~= false then -- NB : "visible" may be nil, which default to 'true'... - -- property visible in the generic property sheet so update it - --debugInfo("Updating in generic property sheet : " .. attributeName) - oldCustomNPCOnAttrModified(self, instance, attributeName) - end - - assert(instance) - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - local propWnd = r2:getPropertySheet(instance) - if propWnd.active then - local nameEBox = propWnd:find("Name"):find("eb") - local name = nameEBox.uc_input_string:toUtf8() - r2:setNpcAttribute(instance.InstanceId, "Name", name) - end - - npcUI.active = true - - r2:updateNPCView(instance) - r2.hairType = {} - - -- update sex - local sexCB = npcUI:find("sex").combo_box - assert(sexCB) - - if isR2PlayerMale(instance.SheetClient) then - r2.sexSelection = r2.male - else - r2.sexSelection = r2.female - end - sexCB.Env.locked = true - sexCB.selection_text = r2.sexSelection - sexCB.Env.locked = false - - -- update race in combo box - local raceCB = npcUI:find("race").combo_box - assert(raceCB) - r2.raceSelection = getR2PlayerRace(instance.SheetClient) - local sliderHairType = r2.itemIndexToSliderValue[r2.raceSelection][instance.HairType] - r2.hasHelmet = (sliderHairType == nil) - - if not r2.hasHelmet then - r2.hairType.hairCut = sliderHairType - r2.hairType.hairColor = instance.HairColor - else - r2.hairType.hairCut = 0 - r2.hairType.hairColor = 0 - end - raceCB.Env.locked = true - raceCB.selection_text = r2.raceSelection - raceCB.Env.locked = false - - -- update name - local editName = npcUI:find("name").edit_box_group - assert(editName) - editName.uc_input_string = instance:getDisplayName() - npcUI.uc_title = concatUCString(i18n.get("uiRE2DPropertiesOf"), instance:getDisplayName()) - - -- update notes - local editNotes = npcUI:find("small_description") - assert(editNotes) - if instance.Notes ~= nil then - editNotes.input_string = instance.Notes - else - editNotes.input_string = "" - end - - -- update avoidable equipment - r2:updateEquipment(instance, false) - - -- update link color - local toggleB = npcUI:find("color_link").toggle_butt - assert(toggleB) - local link = false - if instance.LinkColor==1 then link=true end - toggleB.pushed = not link - - -- update weapons - comboBox = npcUI:find("hands"):find("combo_box") - - local handsLevel = r2:getHandsLevel(instance.SheetModel, instance.Sheet) - local rightHandIndex = instance.WeaponRightHand - local leftHandIndex = instance.WeaponLeftHand - - local handsKey = rightHandIndex..":"..leftHandIndex..":"..handsLevel - local weaponsName = r2.itemIndexEquipmentToSelectionText[instance.Equipment][comboBox.Env.nameComboBox][handsKey] - comboBox.Env.locked = true - comboBox.selection_text = weaponsName - comboBox.Env.locked = false - - -- camera target is out of 3D character - r2:updateRaceView() - r2.faceView = false - - -- update body sliders - for key, value in pairs(body_sliders) do - local slider = npcUI:find(value):find("slider") - assert(slider) - if value == "slider_haircut" and not r2.hasHelmet then - slider.value = r2.itemIndexToSliderValue[r2.raceSelection][instance["HairType"] ] - else - slider.value = instance[key] - end - end - - -- empty body/face/morph sets - local bodyCB = npcUI:find("body_sets").combo_box - assert(bodyCB) - bodyCB.view_text = r2.emptyComboLine - - local faceCB = npcUI:find("face_sets").combo_box - assert(faceCB) - faceCB.view_text = r2.emptyComboLine - - local morphCB = npcUI:find("face_morph").combo_box - assert(morphCB) - morphCB.view_text = r2.emptyComboLine - - r2:updateRaceUI() -end - ------------------------------------------------- -function r2:initTypeUI(instance) - - local propertiesUI = getUI(r2:getDefaultPropertySheetUIPath(instance.Class)) - assert(propertiesUI) - - -- update avoidable types - local typeCB = propertiesUI:find("TypeNPC") - assert(typeCB) - - typeCB:resetTexts() - - local currentType = "" - - -- search for current ecosystem et level selected in palette UI - local levelMin, levelMax, ecosystem = r2:getPaletteAccessibilityFactors() - - local place = 0 - if ecosystem and levelMin and levelMax then - - -- parent palette element in palette UI (type node) - local typePalette = r2.PaletteIdToType[instance.Base] - r2.sheetTypeCB = {} - - -- for each element of this type, check if must be added in combo box (only if also showed in palette UI) - -- then the same test is used than in r2:setupPaletteAccessibleContent - for typeKey, typeValue in pairs(typePalette) do - - local typeTranslation = typeValue.Translation - local typeElement = r2.getPaletteElement(typeValue.Id) - - local show = false - local levelElt = defaulting(typeElement.Level, 1) - local ecosystemElt = defaulting(typeElement.Ecosystem, "") - if string.match(typeElement.SheetClient, "object.*") then - show = true - elseif levelElt >= levelMin and levelElt <= levelMax and (ecosystemElt == "" or string.match(ecosystemElt, ecosystem)) then - show = true - end - - if show then - - r2.sheetTypeCB[typeCB:getNumTexts()] = typeValue - - typeCB:addText(i18n.get(typeTranslation)) - - if instance.Base==typeValue.Id then - currentType = typeValue.Translation - end - - if currentType=="" then place = place+1 end - end - end - - if tostring(instance.TypeNPC)=="-1" then - -- TypeNPC - r2:setNpcAttribute(instance.InstanceId, "TypeNPC", place) - end - end -end - ------------------------------------------------- - -r2.bodyAttributesCB = { - ["GabaritHeight"] = {comboBox="body_sets", updateComboBox="r2ed_add_body_sets", tableSets="tableBodySets"}, - ["GabaritTorsoWidth"] = {comboBox="body_sets", updateComboBox="r2ed_add_body_sets", tableSets="tableBodySets"}, - ["GabaritArmsWidth"] = {comboBox="body_sets", updateComboBox="r2ed_add_body_sets", tableSets="tableBodySets"}, - ["GabaritLegsWidth"] = {comboBox="body_sets", updateComboBox="r2ed_add_body_sets", tableSets="tableBodySets"}, - ["GabaritBreastSize"] = {comboBox="body_sets", updateComboBox="r2ed_add_body_sets", tableSets="tableBodySets"}, - ["EyesColor"] = {comboBox="face_sets", updateComboBox="r2ed_add_face_sets", tableSets="tableFaceSets"}, - ["Tattoo"] = {comboBox="face_sets", updateComboBox="r2ed_add_face_sets", tableSets="tableFaceSets"}, - ["HairType"] = {comboBox="face_sets", updateComboBox="r2ed_add_face_sets", tableSets="tableFaceSets"}, - ["HairColor"] = {comboBox="face_sets", updateComboBox="r2ed_add_face_sets", tableSets="tableFaceSets"}, - ["MorphTarget1"] = {comboBox="face_morph", updateComboBox="r2ed_add_face_morph", tableSets="tableFaceMorph"}, - ["MorphTarget2"] = {comboBox="face_morph", updateComboBox="r2ed_add_face_morph", tableSets="tableFaceMorph"}, - ["MorphTarget3"] = {comboBox="face_morph", updateComboBox="r2ed_add_face_morph", tableSets="tableFaceMorph"}, - ["MorphTarget4"] = {comboBox="face_morph", updateComboBox="r2ed_add_face_morph", tableSets="tableFaceMorph"}, - ["MorphTarget5"] = {comboBox="face_morph", updateComboBox="r2ed_add_face_morph", tableSets="tableFaceMorph"}, - ["MorphTarget6"] = {comboBox="face_morph", updateComboBox="r2ed_add_face_morph", tableSets="tableFaceMorph"}, - ["MorphTarget7"] = {comboBox="face_morph", updateComboBox="r2ed_add_face_morph", tableSets="tableFaceMorph"}, - ["MorphTarget8"] = {comboBox="face_morph", updateComboBox="r2ed_add_face_morph", tableSets="tableFaceMorph"}, - } - - - -function npcCustomPropertySheetDisplayerTable:onAttrModified(instance, attributeName) - - - r2:npcPropertySheetDisplayer():onAttrModified(instance, attributeName) - - if r2:getSelectedInstance()==nil or r2:getSelectedInstance().InstanceId ~= instance.InstanceId then - return - end - - r2:updateNPCView(instance) - - local npcUI = getUI("ui:interface:r2ed_npc") - - local comboBox - - if attributeName == "HairType" then - local sliderHairType = r2.itemIndexToSliderValue[r2.raceSelection][instance.HairType] - r2.hasHelmet = (sliderHairType == nil) - end - - -- SEX AND RACE - if attributeName == "SheetClient" then - - -- sex - comboBox = npcUI:find("sex").combo_box - - local isFemale = string.find(instance[attributeName], "female") - if isFemale ~= nil then - r2.sexSelection = r2.female - else - r2.sexSelection = r2.male - end - comboBox.Env.locked = true - comboBox.selection_text = r2.sexSelection - comboBox.Env.locked = false - - -- race - local comboBox = npcUI:find("race").combo_box - r2.raceSelection = r2.raceSheetNameMatch[instance[attributeName]] - comboBox.Env.locked = true - comboBox.selection_text = r2.raceSelection - comboBox.Env.locked = false - - r2:updateRaceView() - r2:updateFaceView() - - r2:updateRaceUI() - - return - end - - - -- NAME - if attributeName == "Name" then - local editName = npcUI:find("name").edit_box_group - assert(editName) - editName.uc_input_string = instance:getDisplayName() - npcUI.uc_title = concatUCString(i18n.get("uiRE2DPropertiesOf"), instance:getDisplayName()) - editName:cancelFocusOnText() - return - end - - -- NOTES - if attributeName == "Notes" then - local editNotes= npcUI:find("small_description") - assert(editNotes) - editNotes.input_string = instance[attributeName] - editNotes:cancelFocusOnText() - return - end - - - -- EQUIPMENT PIECE - local slider - for cbbName, v in pairs(r2.equipmentEnv) do - if v.propName == attributeName then - - comboBox = npcUI:find(cbbName):find("combo_box") - assert(comboBox) - - local CBText = r2.itemIndexEquipmentToSelectionText[instance.Equipment][cbbName][instance[attributeName]] - if CBText==nil then CBText= r2.noPiece end - if attributeName == "HairType" then - slider = npcUI:find("slider_haircut") - assert(slider) - slider.active = (CBText == r2.noPiece) - if slider.active then - local value = r2.itemIndexToSliderValue[r2.raceSelection][instance["HairType"] ] - if value then - slider:find("slider").value = value - end - end - - slider = npcUI:find("slider_hair_color") - assert(slider) - slider.active = (CBText == r2.noPiece) - if slider.active then - slider:find("slider").value = instance.HairColor - end - end - - comboBox.Env.locked = true - comboBox.selection_text = CBText - comboBox.Env.locked = false - - -- if equipment is 'no one', color slider must be hidden - slider = npcUI:find(cbbName):find("slider") - assert(slider) - local line = npcUI:find(cbbName):find("line_slider") - assert(line) - slider.active = (CBText ~= r2.noPiece) - line.active = (CBText ~= r2.noPiece) - if slider.active then - slider.value = instance[v.propColorName] - end - - return - end - - if v.propColorName == attributeName then - if attributeName == "HairColor" then - if not r2.hasHelmet then - slider = npcUI:find("slider_hair_color"):find("slider") - assert(slider) - slider.value = instance[attributeName] - end - else - slider = npcUI:find(cbbName):find("slider") - assert(slider) - slider.value = instance[attributeName] - end - - for k, v1 in pairs(r2.equipementComboB) do - slider = npcUI:find(v1):find("slider") - local comboBox = npcUI:find(cbbName):find("combo_box") - local propName = r2.equipmentEnv[v1].propName - local comboText - if propName=="HairType" then - if r2.hasHelmet then - comboText = r2.itemIndexEquipmentToSelectionText[instance.Equipment][v1][instance[propName]] - else - comboText = r2.noPiece - end - else - comboText = r2.itemIndexEquipmentToSelectionText[instance.Equipment][v1][instance[propName]] - end - end - return - end - end - - -- EQUIPMENT - if attributeName == "Equipment" then - r2:updateEquipment(instance, false) - end - - -- LINK COLOR - if attributeName == "LinkColor" then - local toggleB = npcUI:find("color_link").toggle_butt - assert(toggleB) - local link = false - if instance.LinkColor==1 then link=true end - toggleB.pushed = not link - end - - -- BODY SETS / FACE SETS/ FACE MORPH - local sliderUIPath = body_sliders[attributeName] - if sliderUIPath then - r2:updateBodyAttribute(attributeName, instance[attributeName]) - return - end - - -- FUNCTION - if attributeName == "Function" then - local functionCB = npcUI:find("fonction").combo_box - assert(functionCB) - functionCB.Env.locked = true - functionCB.selection_text = instance[attributeName] - functionCB.Env.locked = false - return - end - - -- SHEET - if attributeName == "Sheet" then - - -- update weapons - local weaponsCB = npcUI:find("hands"):find("combo_box") - assert(weaponsCB) - - local handsLevel = r2:getHandsLevel(instance.SheetModel, instance.Sheet) - local rightHandIndex = instance.WeaponRightHand - local leftHandIndex = instance.WeaponLeftHand - - local handsKey = rightHandIndex..":"..leftHandIndex..":"..handsLevel - local weaponsName = r2.itemIndexEquipmentToSelectionText[instance.Equipment][weaponsCB.Env.nameComboBox][handsKey] - if weaponsName then - weaponsCB.Env.locked = true - weaponsCB.selection_text = weaponsName - weaponsCB.Env.locked = false - end - - return - end - - -- PROFILE - if attributeName == "Profile" then - local profileCB = npcUI:find("speed_aggro").profile.combo_box - assert(profileCB) - profileCB.Env.locked = true - profileCB.selection_text = r2.profileCB[instance[attributeName]] - profileCB.Env.locked = false - return - end -end - -------------------------------------------------------------------------------------------- -function r2:npcCustomPropertySheetDisplayer() - return npcCustomPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - --- share npc displayer between all instances -local npcPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - -local oldNPCOnAttrModified = npcPropertySheetDisplayerTable.onAttrModified - ------------------------------------------------- -function npcPropertySheetDisplayerTable:onPostCreate(instance) -end ------------------------------------------------- -function npcPropertySheetDisplayerTable:onErase(instance) -end ------------------------------------------------- -function npcPropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function npcPropertySheetDisplayerTable:onPostHrcMove(instance) - - local selectedInstance = r2:getSelectedInstance() - if selectedInstance and selectedInstance==instance then - - r2.miniActivities:openEditor() - - if r2.activities.isInitialized then - r2.activities.isInitialized = false - r2.activities:initEditorAfterFirstCall() - end - end - - instance:updatePermanentStatutIcon() - r2.events:updateElementsUI() -end ------------------------------------------------- -function npcPropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function npcPropertySheetDisplayerTable:onSelect(instance, isSelected) - - r2:activeLogicEntityPropertySheetDisplayer():onSelect(instance, isSelected) - - r2:initTypeUI(instance) -end - ------------------------------------------------- -function npcPropertySheetDisplayerTable:onAttrModified(instance, attributeName) - - -- if attribute is visible in the generic property sheet, then update it - local propDesc = instance:getPropDesc(attributeName) - if propDesc and propDesc.Visible ~= false then -- NB : "visible" may be nil, which default to 'true'... - -- property visible in the generic property sheet so update it - oldNPCOnAttrModified(self, instance, attributeName) - end - - r2:activeLogicEntityPropertySheetDisplayer():onAttrModified(instance, attributeName) -end - -------------------------------------------------------------------------------------------- -function r2:npcPropertySheetDisplayer() - return npcPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - ------------------- UPDATE NPC EDITOR ------------------------------------------------------- -function r2:updateNPCView(instance) - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - local char3D = npcUI:find("char3d").char - assert(char3D) - - local slotEntity = instance.DisplayerVisual.slotEntity - assert(slotEntity) - - if slotEntity > -1 then - char3D:setupCharacter3D(slotEntity) - end - - -- disable char LOD interpolation - char3D:enableLOD(false) -end - ------------------- BODY -------------------------------------------------------------------- - -r2.bodyAttNb = 5 -r2.bodyAttributes = {[1] = "GabaritHeight", [2] = "GabaritTorsoWidth", - [3] = "GabaritArmsWidth", [4] = "GabaritLegsWidth", - [5] = "GabaritBreastSize"} - -r2.bodySliders = {[1] = "slider_height", [2] = "slider_torso", - [3] = "slider_arms", [4] = "slider_legs", - [5] = "slider_breast"} - - -r2.bodyKeys = {[1] = "GabaritHeight", [2] = "GabaritTorsoWidth", - [3] = "GabaritArmsWidth", [4] = "GabaritLegsWidth", - [5] = "GabaritBreastSize"} - - ------------------- FACE --------------------------------------------------------------------- - -r2.faceAttNb = 4 -r2.faceAttributes = {[1] = "HairType", [2] = "HairColor", - [3] = "Tattoo", [4] = "EyesColor"} - -r2.faceSliders = {[1] = "slider_haircut", [2] = "slider_hair_color", - [3] = "slider_tattoos", [4] = "slider_eye_color"} - -r2.faceKeys = {[1] = "HairType", [2] = "HairColor", - [3] = "Tattoo", [4] = "EyesColor"} - - ------------------- MORPH -------------------------------------------------------------------- - -r2.morphAttNb = 8 -r2.morphAttributes = {[1] = "MorphTarget1", [2] = "MorphTarget2", - [3] = "MorphTarget3", [4] = "MorphTarget4", - [5] = "MorphTarget5", [6] = "MorphTarget6", - [7] = "MorphTarget7", [8] = "MorphTarget8"} - -r2.morphSliders = {[1] = "slider_morph_target1", [2] = "slider_morph_target2", - [3] = "slider_morph_target3", [4] = "slider_morph_target4", - [5] = "slider_morph_target5", [6] = "slider_morph_target6", - [7] = "slider_morph_target7", [8] = "slider_morph_target8"} - -r2.morphKeys = {[1] = "MorphTarget1", [2] = "MorphTarget2", - [3] = "MorphTarget3", [4] = "MorphTarget4", - [5] = "MorphTarget5", [6] = "MorphTarget6", - [7] = "MorphTarget7", [8] = "MorphTarget8"} - -r2.emptyComboLine = "" - - --- INIT NPC EDITOR --------------------------------------------------------------------------- - -function r2:initNpcEditor() - - local npcUI = getUI("ui:interface:r2ed_npc") - - -- equipment color sliders - local levelDesignEnabled = getClientCfgVar("LevelDesignEnabled") - local maxVal = 5 - if tonumber(levelDesignEnabled)==1 then maxVal = 7 end - - for i=1, r2.equipmentAttNb do - local slider = npcUI:find(r2.equipementComboB[i]):find("slider") - assert(slider) - slider.max = maxVal - end - - -- race - local raceCB = npcUI:find("race").combo_box - assert(raceCB) - raceCB:resetTexts() - raceCB:addText(ucstring("Fyros")) - raceCB:addText(ucstring("Matis")) - raceCB:addText(ucstring("Tryker")) - raceCB:addText(ucstring("Zorai")) - - -- sex - local sexCB = npcUI:find("sex").combo_box - assert(sexCB) - sexCB:resetTexts() - sexCB:addText(ucstring(r2.female)) - sexCB:addText(ucstring(r2.male)) - - -- Equipment - r2:initEquipmentEnv() - - r2:loadTables() - - -- body sets - local bodySetsCB = npcUI:find("body_sets").combo_box - assert(bodySetsCB) - local updateBodySetsCB = getUI("ui:interface:r2ed_add_body_sets"):find("update_sets").combo_box - assert(updateBodySetsCB) - bodySetsCB:resetTexts() - updateBodySetsCB:resetTexts() - - for k, v in pairs(r2.tableBodySets) do - bodySetsCB:addText(ucstring(k)) - updateBodySetsCB:addText(ucstring(k)) - end - - -- face sets - local faceSetsCB = npcUI:find("face_sets").combo_box - assert(faceSetsCB) - local updateFaceSetsCB = getUI("ui:interface:r2ed_add_face_sets"):find("update_sets").combo_box - assert(updateFaceSetsCB) - faceSetsCB:resetTexts() - updateFaceSetsCB:resetTexts() - - for k, v in pairs(r2.tableFaceSets) do - faceSetsCB:addText(ucstring(k)) - updateFaceSetsCB:addText(ucstring(k)) - end - - -- face morph - local faceMorphCB = npcUI:find("face_morph").combo_box - assert(faceMorphCB) - local updateFaceMorphCB = getUI("ui:interface:r2ed_add_face_morph"):find("update_sets").combo_box - assert(updateFaceMorphCB) - faceMorphCB:resetTexts() - updateFaceMorphCB:resetTexts() - - for k, v in pairs(r2.tableFaceMorph) do - faceMorphCB:addText(ucstring(k)) - updateFaceMorphCB:addText(ucstring(k)) - end - - bodySetsCB.view_text = r2.emptyComboLine - updateBodySetsCB.view_text = r2.emptyComboLine - faceSetsCB.view_text = r2.emptyComboLine - updateFaceSetsCB.view_text = r2.emptyComboLine - faceMorphCB.view_text = r2.emptyComboLine - updateFaceMorphCB.view_text = r2.emptyComboLine - - r2:initItemIndexToSliderValueTable() -end - --- SAVE TABLE ------------------------------------------------------------------------------ - -function r2:saveTable(fileName, t) - io.output(io.open(fileName,"w")) - r2:serialize(t) - io.close() -end - -function r2:serialize(o) - - if type(o) == "number" then - io.write(o) - elseif type(o) == "string" then - --io.write(string.format('%q', o)) - io.write("["..o.."]") - elseif type(o) == "table" then - io.write("{\n") - for k,v in pairs(o) do - r2:serialize(k) - io.write(" = ") - r2:serialize(v) - io.write("\n") - end - io.write("}") - end -end - --- LOAD TABLE ------------------------------------------------------------------------------ - -function r2:loadTables() - - r2.equipmentSets = r2:loadTable("save\\equipmentSets.txt") - r2.tableBodySets = r2:loadTable("save\\tableBodySets.txt") - r2.tableFaceSets = r2:loadTable("save\\tableFaceSets.txt") - r2.tableFaceMorph = r2:loadTable("save\\tableFaceMorph.txt") - - r2:loadRaceSexNames(r2.fyros, r2.male) - r2:loadRaceSexNames(r2.fyros, r2.female) - r2:loadRaceSexNames(r2.matis, r2.male) - r2:loadRaceSexNames(r2.matis, r2.female) - r2:loadRaceSexNames(r2.tryker, r2.male) - r2:loadRaceSexNames(r2.tryker, r2.female) - r2:loadRaceSexNames(r2.zorai, r2.male) - r2:loadRaceSexNames(r2.zorai, r2.female) -end - -function r2:loadTable(fileName) - - function loadTableR(file) - - local resultT = {} - local s, e, l, line, key, value - local line = file:read("*l") - - while line ~= "}" do - - s, e = string.find(line, " = ") - - key = string.sub(line, 1, s-1) - value = string.sub(line, e+1) - - -- KEY - -- string key - if string.sub(key, 1, 1) == "[" then - l = string.len(key) - key= string.sub(key, 2, l-1) - -- number key - else - key = tonumber(key) - end - - -- VALUE - -- string value - if string.sub(value, 1, 1) == "[" then - l = string.len(value) - value= string.sub(value, 2, l-1) - -- number value - elseif value == "{" then - value = loadTableR(file) - else - value = tonumber(value) - end - - resultT[key] = value - line = file:read("*l") - end - return resultT - end - - local file = io.open(fileName, "r") - - if file == nil then return {} end - - if file:read("*l") ~= "{" then - io.close(file) - return {} - end - - local resultT = loadTableR(file) - io.close(file) - return resultT -end - - -function r2:loadRaceSexNamesImpl(race, sex) - local fileName = fileLookup(race.."_" .. sex .. ".txt") - if fileName == "" then return end - local resultT = {} - local count = 1 - for line in io.lines(fileName) do - resultT[count] = line - count = count + 1 - end - return resultT -end - -function r2:loadRaceSexNames(race, sex) - local resultT = r2:loadRaceSexNamesImpl(race, sex) - r2.NPCNames[race .. "_" .. sex] = resultT -end - -function r2:loadAllRaceSexNames(race, sex) - local resultT = r2:loadRaceSexNamesImpl(race, sex) - r2.NPCAllNames[race .. "_" .. sex] = resultT -end - -function r2:getAllNames() - if (table.getn(r2.NPCAllNames) == 0) then - r2:loadAllRaceSexNames(r2.fyros, r2.male) - r2:loadAllRaceSexNames(r2.fyros, r2.female) - r2:loadAllRaceSexNames(r2.matis, r2.male) - r2:loadAllRaceSexNames(r2.matis, r2.female) - r2:loadAllRaceSexNames(r2.tryker, r2.male) - r2:loadAllRaceSexNames(r2.tryker, r2.female) - r2:loadAllRaceSexNames(r2.zorai, r2.male) - r2:loadAllRaceSexNames(r2.zorai, r2.female) - end - - return r2.NPCAllNames -end - - --- UPDATE RACE VIEW --------------------------------------------------------------------------- - -function r2:updateRaceView() - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - local scene3D = npcUI:find("char3d") - assert(scene3D) - - -- camera target is out of 3D character - local camera = scene3D.cam - assert(camera) - if r2.raceSelection == r2.zorai then - camera.tgtz = r2.camTgtZZorai - camera.posy = r2.camPosYZorai - r2.distlimitmax = -r2.camPosYZorai - scene3D.distlimitmax = r2.distlimitmax - else - camera.tgtz = r2.camTgtZ - camera.posy = r2.camPosY - r2.distlimitmax = -r2.camPosY - end -end - --- CHANGE VIEW -------------------------------------------------------------------------------- - -function r2:changeView() - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - local scene3D = npcUI:find("char3d") - assert(scene3D) - - local camera = scene3D.cam - assert(camera) - - if r2.faceView then - scene3D.distlimitmin = r2.distlimitmin - scene3D.distlimitmax = r2.distlimitmax - if r2.raceSelection == r2.zorai then - camera.tgtz = r2.camTgtZZorai - camera.posy = r2.camPosYZorai - else - camera.tgtz = r2.camTgtZ - camera.posy = r2.camPosY - end - r2.faceView = false - else - scene3D.distlimitmin = r2.distlimitminZoom - scene3D.distlimitmax = -r2.camZoomPosY - local char3D = scene3D.char - assert(char3D) - local headZ = char3D.headz - camera.tgtz = headZ + 0.07 - camera.posy = r2.camZoomPosY - r2.faceView = true - end -end - - ------------------------------------------------------------------------------------------------ --- PROFILE ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ - --- UPDATE NAME -------------------------------------------------------------------------------- -function r2:updateName() - - local selection = r2:getSelectedInstance() - if selection == nil then return end - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - local editName = npcUI:find("name").edit_box_group - assert(editName) - - local newString = editName.uc_input_string:toUtf8() - local oldString = defaulting(selection.Name, "") - if newString ~= oldString then - r2.requestNewAction(i18n.get("uiR2EDUpdateNpcNameAction")) - r2:setNpcAttribute(selection.InstanceId, "Name", newString) - end - - return editName.uc_input_string:toUtf8() -end - --- UPDATE NOTES -------------------------------------------------------------------------------- -function r2:updateNotes() - - local selection = r2:getSelectedInstance() - if selection == nil then return end - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - local editNotes = npcUI:find("small_description") - assert(editNotes) - - local newString = editNotes.uc_input_string:toUtf8() - local oldString = defaulting(selection.Notes, "") - if newString ~= oldString then - r2.requestNewAction(i18n.get("uiR2EDUpdateNpcNotesAction")) - r2:setNpcAttribute(selection.InstanceId, "Notes", newString) - end -end - --- UPDATE RACE -------------------------------------------------------------------------------- -function r2:updateRace(race) - - local selection = r2:getSelectedInstance() - if selection == nil then - debugInfo("No selection") - return - end - - local name = selection.Name - if not race and not getUICaller().Env.locked then - r2:updateNotes() - name = r2:updateName() - end - - r2.requestNewAction(i18n.get("uiR2EDUpdateNpcRaceAction")) - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - local sliderValue - if r2.hasHelmet then - sliderValue = r2.hairType.hairCut - else - sliderValue = r2.itemIndexToSliderValue[r2.raceSelection][selection.HairType] - end - - local oldRaceSelection = r2.raceSelection - if race==nil then - race = getUICaller().selection_text - end - r2.raceSelection = race - - -- requestSetNode - local sheetClientName = r2.raceSheetClient[r2.sexSelection][r2.raceSelection] - if not getUICaller().Env.locked then - - r2:setNpcAttribute(selection.InstanceId, "SheetClient", sheetClientName) - - -- hairType item index of new race - if not r2.hasHelmet then - local itemIndex = getSheetId(r2.sliderValueToItemIndex[r2.raceSelection][sliderValue]) - r2:setNpcAttribute(selection.InstanceId, "HairType", itemIndex) - end - - if r2:isRandomizedNPCName(name, oldRaceSelection, r2.sexSelection) then - local name = r2:randomNPCName(r2.raceSelection, r2.sexSelection) - r2:setNpcAttribute(selection.InstanceId, "Name", name) - end - end - - r2.requestEndAction() -end - -function r2:updateRaceUI() - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - -- no eyes color and morph8 for Zorai - local eyesColor = npcUI:find("slider_eye_color") - assert(eyesColor) - local sliderMorph8 = npcUI:find("slider_morph_target8") - assert(sliderMorph8) - if r2.raceSelection == r2.zorai then - eyesColor.active = false - sliderMorph8.active = false - else - eyesColor.active = true - sliderMorph8.active = true - end - - -- update morph sliders labels - for key, value in pairs(r2.morphSliders) do - local sliderMorph = npcUI:find(value) - assert(sliderMorph) - sliderMorph:find("slider_text_place"):find("slider_text").hardtext = r2.raceMorphEditText[r2.raceSelection][key] - end -end - --- UPDATE SEX --------------------------------------------------------------------------------- -function r2:updateSex() - - local selection = r2:getSelectedInstance() - if selection == nil then - debugInfo("No selection") - return - end - - local name = selection.Name - if not getUICaller().Env.locked then - r2:updateNotes() - name = r2:updateName() - end - - r2.requestNewAction(i18n.get("uiR2EDUpdateNpcSexAction")) - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - local oldSexSelection = r2.sexSelection - r2.sexSelection = getUICaller().selection_text - - -- update sex - local breastGroup = npcUI:find("slider_breast") - assert(breastGroup) - if r2.sexSelection == r2.male then - breastGroup.active = false - else - breastGroup.active = true - end - - if not getUICaller().Env.locked then - -- requestSetNode - local sheetClientName = r2.raceSheetClient[r2.sexSelection][r2.raceSelection] - r2:setNpcAttribute(selection.InstanceId, "SheetClient", sheetClientName) - - if r2:isRandomizedNPCName(name, r2.raceSelection, oldSexSelection) then - local name = r2:randomNPCName(r2.raceSelection, r2.sexSelection) - r2:setNpcAttribute(selection.InstanceId, "Name", name) - end - end - - r2.requestEndAction() -end - --- UPDATE SEX --------------------------------------------------------------------------------- -function r2:updateType() - - local selection = r2:getSelectedInstance() - if selection == nil then return end - - local oldTypeNPC = selection.TypeNPC - - local typeNPC = getUICaller().selection - local base = r2.sheetTypeCB[typeNPC].Id - local typeElement = r2.getPaletteElement(base) - - r2.requestNewAction(i18n.get("uiR2EDUpdateNpcTypeAction")) - - -- TypeNPC - r2:setNpcAttribute(selection.InstanceId, "TypeNPC", typeNPC) - - -- RingAccess - r2:setNpcAttribute(selection.InstanceId, "RingAccess", typeElement.RingAccess) - - if selection:isKindOf("NpcCustom") then - -- SheetModel - r2:setNpcAttribute(selection.InstanceId, "SheetModel", typeElement.SheetModel) - - -- Sheet - local level = r2:getLevel(selection)+1 - local sheet = typeElement.Sheet - - local s,e = string.find(sheet, ".creature") - local firstPart = string.sub(sheet, 1, s-2) - local newSheet = firstPart .. level .. ".creature" - - r2:setNpcAttribute(selection.InstanceId, "Sheet", newSheet) - - -- Base - r2:setNpcAttribute(selection.InstanceId, "Base", base) - - -- Type - r2:setNpcAttribute(selection.InstanceId, "Type", typeElement.Type) - - -- Equipment - local tableEquipment = r2.equipmentPalette[selection.Equipment] - local newTableEquipment = r2.equipmentPalette[typeElement.Equipment] - - local chestNb = r2:getPieceEquipmentNumber(tableEquipment.chest_plate, selection.JacketModel) - local jacketModel = r2:getPieceEquipmentFromNumber(newTableEquipment.chest_plate, chestNb) - - local legsNb = r2:getPieceEquipmentNumber(tableEquipment.legs, selection.TrouserModel) - local trouserModel = r2:getPieceEquipmentFromNumber(newTableEquipment.legs, legsNb) - - local bootsNb = r2:getPieceEquipmentNumber(tableEquipment.boots, selection.FeetModel) - local feetModel = r2:getPieceEquipmentFromNumber(newTableEquipment.boots, bootsNb) - - local glovesNb = r2:getPieceEquipmentNumber(tableEquipment.gloves, selection.HandsModel) - local handsModel = r2:getPieceEquipmentFromNumber(newTableEquipment.gloves, glovesNb) - - local armsNb = r2:getPieceEquipmentNumber(tableEquipment.arms_guard, selection.ArmModel) - local armModel = r2:getPieceEquipmentFromNumber(newTableEquipment.arms_guard, armsNb) - - local weaponRHNb = r2:getPieceEquipmentNumber(tableEquipment.hands, selection.WeaponRightHand) - local weaponRightHand = r2:getPieceEquipmentFromNumber(newTableEquipment.hands, weaponRHNb, "right") - - local weaponLHNb = r2:getPieceEquipmentNumber(tableEquipment.hands, selection.WeaponLeftHand) - local weaponLeftHand = r2:getPieceEquipmentFromNumber(newTableEquipment.hands, weaponLHNb, "left") - - local helmetNb = r2:getPieceEquipmentNumber(tableEquipment.helmet, selection.HairType) - - r2:setNpcAttribute(selection.InstanceId, "Equipment", typeElement.Equipment) - r2:setNpcAttribute(selection.InstanceId, "JacketModel", jacketModel) - r2:setNpcAttribute(selection.InstanceId, "TrouserModel", trouserModel) - r2:setNpcAttribute(selection.InstanceId, "FeetModel", feetModel) - r2:setNpcAttribute(selection.InstanceId, "HandsModel", handsModel) - r2:setNpcAttribute(selection.InstanceId, "ArmModel", armModel) - r2:setNpcAttribute(selection.InstanceId, "WeaponRightHand", weaponRightHand) - r2:setNpcAttribute(selection.InstanceId, "WeaponLeftHand", weaponLeftHand) - - if helmetNb>=0 then - local helmetType = r2:getPieceEquipmentFromNumber(newTableEquipment.helmet, helmetNb) - if helmetType>0 then - r2:setNpcAttribute(selection.InstanceId, "HairType", helmetType) - elseif helmetType==0 then - local itemIndex = getSheetId(r2.sliderValueToItemIndex[r2.raceSelection][0]) - r2:setNpcAttribute(selection.InstanceId, "HairType", itemIndex) - --r2:setNpcAttribute(selection.InstanceId, "HairColor", r2.hairType.hairColor) - end - end - - else - -- Base - r2:setNpcAttribute(selection.InstanceId, "Base", base) - - -- SheetClient - r2:setNpcAttribute(selection.InstanceId, "SheetClient", typeElement.SheetClient) - - -- Name - local oldName = i18n.get(r2.sheetTypeCB[oldTypeNPC].Translation):toUtf8() - if selection.Class == "Npc" and string.find(selection.Name, oldName) then - local ucNewName = getUICaller():getText(typeNPC) - local newName = r2:genInstanceName(ucNewName):toUtf8() - r2:setNpcAttribute(selection.InstanceId, "Name", newName) - - elseif selection.Name == oldName then - r2:setNpcAttribute(selection.InstanceId, "Name", getUICaller().selection_text) - end - end - - r2.requestEndAction() -end - --- UPDATE FUCNTION ---------------------------------------------------------------------------- -function r2:updateFunction() - - if getUICaller().Env.locked then - return - end - - local selection = r2:getSelectedInstance() - assert(selection) - - r2.requestNewAction(i18n.get("uiR2EDUpdateNpcFunctionAction")) - r2:setNpcAttribute(selection.InstanceId, "Function", getUICaller().selection_text) -end - --- UPDATE LEVEL ------------------------------------------------------------------------------ -r2.updateLevel = function(value) - - local selection = r2:getSelectedInstance() - assert(selection) - - local level = tonumber(value)+1 - local sheet = selection.Sheet - - local s,e = string.find(sheet, ".creature") - local firstPart = string.sub(sheet, 1, s-2) - local newSheet = firstPart .. level .. ".creature" - - r2.requestNewAction(i18n.get("uiR2EDUpdateNpcLevelAction")) - r2:setNpcAttribute(selection.InstanceId, "Sheet", newSheet) -end - -function r2:getHandsLevel(sheetModel, sheet) - - local s,e = string.find(sheetModel, "$hands") - local base = string.sub(sheetModel, 1, s-1) - local endSheetModel = string.sub(sheetModel, e+1) - s,e = string.find(endSheetModel, "$level") - local titi = string.sub(endSheetModel, 1, s-1) - - s,e = string.find(sheet, base) - local startHands = string.sub(sheet, e+1) - s,e = string.find(startHands, titi) - - return string.sub(startHands, 1, s-1) -end - -function r2:getLevel(instance) - - local sheet = instance.Sheet - local s,e = string.find(sheet, ".creature") - - return tonumber(string.sub(sheet, s-1, s-1))-1 -end - ------------------------------------------------------------------------------------------------ --- BODY --------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------ - --- UPDATE FACE VIEW --------------------------------------------------------------------------- - -function r2:updateFaceView() - - if r2.faceView then - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - local camera = npcUI:find("char3d").cam - assert(camera) - local char3D = npcUI:find("char3d").char - assert(char3D) - local headZ = char3D.headz - camera.tgtz = headZ + 0.07 - camera.posy = r2.camZoomPosY - end -end - - --- UPDATE BODY ATTRIBUTE ---------------------------------------------------------------------- -function r2:changeBodyAttribute(attributeName, requestType) - - local value = getUICaller().value - local sliderValue = nil - if attributeName == "HairType" then - r2.hairType.hairCut = value - sliderValue = getSheetId(r2.sliderValueToItemIndex[r2.raceSelection][value]) - elseif attributeName == "HairColor" then - r2.hairType.hairColor = value - end - - local selection = r2:getSelectedInstance() - if selection == nil then - debugInfo("No selection") - return - end - - r2.requestNewAction(i18n.get("uiR2EDChangeNpcBodyAttributeAction")) - - if sliderValue == nil then - sliderValue = value - end - - if requestType == 'local' then - r2.requestSetLocalNode(selection.InstanceId, attributeName, sliderValue) - elseif requestType == 'commit' then - r2.requestCommitLocalNode(selection.InstanceId, attributeName) - elseif requestType == 'cancel' then - r2.requestRollbackLocalNode(selection.InstanceId, attributeName) - end - - r2.requestEndAction() -end - --- UPDATE BODY ATTRIBUTE FROM ON ATTRIBUTE MODIFIED ----------------------------------------------- -function r2:updateBodyAttribute(attributeName, value) - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - if attributeName == "HairType" then - value = r2.itemIndexToSliderValue[r2.raceSelection][value] - end - - local slider = npcUI:find(body_sliders[attributeName]):find("slider") - assert(slider) - slider.value = value - - if attributeName == "GabaritHeight" then r2:updateFaceView() end - - if not r2:matchWithBodyAttributesSet(attributeName, value) then - local comboBox = npcUI:find(r2.bodyAttributesCB[attributeName].comboBox).combo_box - assert(comboBox) - comboBox.view_text = r2.emptyComboLine - - local updateComboBox = "ui:interface:"..r2.bodyAttributesCB[attributeName].updateComboBox - local updateCB = getUI(updateComboBox):find("update_sets").combo_box - assert(updateCB) - updateCB.view_text = r2.emptyComboLine - end -end - -function r2:matchWithBodyAttributesSet(attributeName, value) - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - local comboBox = npcUI:find(r2.bodyAttributesCB[attributeName].comboBox).combo_box - assert(comboBox) - - local tableSets = r2[r2.bodyAttributesCB[attributeName].tableSets] - if tableSets == nil then return false end - - local setValues = tableSets[tostring(comboBox.selection_text)] - if setValues == nil then return false end - - return (setValues[attributeName] == value) -end - --- RANDOM BODY ------------------------------------------------------------------------------ -function r2:randomBody() - - local selection = r2:getSelectedInstance() - if selection == nil then - debugInfo("No selection") - return - end - - r2.requestNewAction(i18n.get("uiR2EDRandomNpcBodyAction")) - - local randomValue - for i = 1,r2.bodyAttNb do - randomValue = math.random(0,14) - r2:setNpcAttribute(selection.InstanceId, r2.bodyAttributes[i], randomValue) - end - - r2.requestEndAction() -end - - --- RANDOM BODY SETS --------------------------------------------------------------------------- -function r2:randomSets(sets) - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - local setsCombo = getUI("ui:interface:r2ed_npc"):find(sets).combo_box - assert(setsCombo) - - if setsCombo.selectionNb > 0 then - local randomSelection = math.random(1, setsCombo.selectionNb) - if setsCombo.selectionNb > 1 then - while randomSelection == (setsCombo.selection+1) do - randomSelection = math.random(1, setsCombo.selectionNb) - end - end - setsCombo.selection = randomSelection-1 - end -end - --- ADD BODY SETS ----------------------------------------------------------------------------- - - - -function r2:addBodySets() - - local addBodySets = getUI("ui:interface:r2ed_add_body_sets") - assert(addBodySets) - local editText = addBodySets:find("new_sets").edit_box_group - assert(editText) - if editText.input_string~="" then - local updateBodySetsCombo = addBodySets:find("update_sets").combo_box - assert(updateBodySetsCombo) - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - local bodySetsCombo = npcUI:find("body_sets").combo_box - assert(bodySetsCombo) - - bodySetsCombo:addText(editText.uc_input_string) - updateBodySetsCombo:addText(editText.uc_input_string) - - -- add new sets in table - local bodySets = npcUI:find("body_sets_scroll_target") - assert(bodySets) - r2.tableBodySets[editText.input_string] = {} - - local sliderValue - for i = 1,r2.bodyAttNb do - sliderValue = bodySets:find(r2.bodySliders[i]):find("slider").value - r2.tableBodySets[editText.input_string][r2.bodyKeys[i]] = sliderValue - end - r2:saveTable("save\\tableBodySets.txt", r2.tableBodySets) - - -- update set of main window combo box - bodySetsCombo.selection_text = editText.input_string - updateBodySetsCombo.selection_text = editText.input_string - - editText.input_string = "" - end -end - --- UPDATE BODY SETS -------------------------------------------------------------------------- -function r2:updateBodySets() - - local updateBodySetsCombo = getUI("ui:interface:r2ed_add_body_sets"):find("update_sets").combo_box - assert(updateBodySetsCombo) - local bodySetsName = updateBodySetsCombo.selection_text - - -- update sets in table - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - local bodySets = npcUI:find("body_sets_scroll_target") - assert(bodySets) - - local sliderValue - for i = 1,r2.bodyAttNb do - sliderValue = bodySets:find(r2.bodySliders[i]):find("slider").value - r2.tableBodySets[bodySetsName][r2.bodyKeys[i]] = sliderValue - end - r2:saveTable("save\\tableBodySets.txt", r2.tableBodySets) - - -- update set of main window combo box - local bodySetsCombo = npcUI:find("body_sets").combo_box - assert(bodySetsCombo) - bodySetsCombo.selection_text = bodySetsName -end - --- REMOVE BODY SETS --------------------------------------------------------------------------- -function r2:removeBodySets() - - local updateBodySetsCombo = getUI("ui:interface:r2ed_add_body_sets"):find("update_sets").combo_box - assert(updateBodySetsCombo) - local bodySetsName = updateBodySetsCombo.selection_text - - -- delete sets in table - r2.tableBodySets[bodySetsName] = nil - r2:saveTable("save\\tableBodySets.txt", r2.tableBodySets) - - -- delete sets in combo box - updateBodySetsCombo:removeSelection(updateBodySetsCombo.selection) - updateBodySetsCombo.view_text = r2.emptyComboLine - - local bodySetsCombo = getUI("ui:interface:r2ed_npc"):find("body_sets").combo_box - assert(bodySetsCombo) - bodySetsCombo:removeText(bodySetsName) - bodySetsCombo.view_text = r2.emptyComboLine -end - --- SELECT BODY SETS --------------------------------------------------------------------------- -function r2:selectBodySets() - - local bodySetsCombo = getUI("ui:interface:r2ed_npc"):find("body_sets").combo_box - assert(bodySetsCombo) - - local selection = r2:getSelectedInstance() - - if bodySetsCombo.view_text == r2.emptyComboLine then - return - else - r2.requestNewAction(i18n.get("uiR2EDSelectNpcBodySetsAction")) - - local bodySetsValue = r2.tableBodySets[bodySetsCombo.selection_text] - if bodySetsValue == nil then return end - - -- update sliders values - for i = 1,r2.bodyAttNb do - r2:setNpcAttribute(selection.InstanceId, r2.bodyAttributes[i], bodySetsValue[r2.bodyKeys[i]]) - end - - r2.requestEndAction() - end - - local bodySetsPopup = getUI("ui:interface:r2ed_add_body_sets"):find("update_sets").combo_box - assert(bodySetsPopup) - bodySetsPopup.selection_text = bodySetsCombo.selection_text -end - - ----------------------------------------------------------------------------------------------- --- RANDOM FACE ------------------------------------------------------------------------------ -function r2:randomFace() - - local selection = r2:getSelectedInstance() - if selection == nil then - debugInfo("No selection") - return - end - - r2.requestNewAction(i18n.get("uiR2EDRandomNpcFaceAction")) - - local randomValue - for i = 1,r2.faceAttNb do - - if r2.faceAttributes[i] == "HairColor" then - randomValue = math.random(0,5) - elseif r2.faceAttributes[i] == "Tattoo" then - randomValue = math.random(0,31) - elseif r2.faceAttributes[i] == "HairType" then - randomValue = math.random(0,6) - else - randomValue = math.random(0,7) - end - - if r2.faceAttributes[i] == "HairType" then - if not r2.hasHelmet then - local itemIndex = getSheetId(r2.sliderValueToItemIndex[r2.raceSelection][randomValue]) - r2:setNpcAttribute(selection.InstanceId, r2.faceAttributes[i], itemIndex) - end - elseif not (r2.faceAttributes[i] == "HairColor" and r2.hasHelmet) then - r2:setNpcAttribute(selection.InstanceId, r2.faceAttributes[i], randomValue) - end - end - - r2.requestEndAction() -end - --- ADD FACE SETS ----------------------------------------------------------------------------- - -function r2:addFaceSets() - - local addFaceSets = getUI("ui:interface:r2ed_add_face_sets") - assert(addFaceSets) - local editText = addFaceSets:find("new_sets").edit_box_group - assert(editText) - if editText.input_string~="" then - local updateFaceSetsCombo = addFaceSets:find("update_sets").combo_box - assert(updateFaceSetsCombo) - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - local faceSetsCombo = npcUI:find("face_sets").combo_box - assert(faceSetsCombo) - - faceSetsCombo:addText(editText.uc_input_string) - updateFaceSetsCombo:addText(editText.uc_input_string) - - -- add new sets in table - local faceSets = npcUI:find("face_sets_scroll_target") - assert(faceSets) - r2.tableFaceSets[editText.input_string] = {} - - local sliderValue - for i = 1,r2.faceAttNb do - sliderValue = faceSets:find(r2.faceSliders[i]):find("slider").value - r2.tableFaceSets[editText.input_string][r2.faceKeys[i] ] = sliderValue - end - r2:saveTable("save\\tableFaceSets.txt", r2.tableFaceSets) - - -- update set of main window combo box - faceSetsCombo.selection_text = editText.input_string - updateFaceSetsCombo.selection_text = editText.input_string - - editText.input_string = "" - end -end - --- UPDATE FACE SETS -------------------------------------------------------------------------- -function r2:updateFaceSets() - - local updateFaceSetsCombo = getUI("ui:interface:r2ed_add_face_sets"):find("update_sets").combo_box - assert(updateFaceSetsCombo) - local faceSetsName = updateFaceSetsCombo.selection_text - - -- update sets in table - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - local faceSets = npcUI:find("face_sets_scroll_target") - assert(faceSets) - - local sliderValue - for i = 1,r2.faceAttNb do - sliderValue = faceSets:find(r2.faceSliders[i]):find("slider").value - r2.tableFaceSets[faceSetsName][r2.faceKeys[i] ] = sliderValue - end - r2:saveTable("save\\tableFaceSets.txt", r2.tableFaceSets) - - -- update set of main window combo box - local faceSetsCombo = npcUI:find("face_sets").combo_box - assert(faceSetsCombo) - faceSetsCombo.selection_text = faceSetsName -end - --- REMOVE FACE SETS --------------------------------------------------------------------------- -function r2:removeFaceSets() - - local updateFaceSetsCombo = getUI("ui:interface:r2ed_add_face_sets"):find("update_sets").combo_box - assert(updateFaceSetsCombo) - local faceSetsName = updateFaceSetsCombo.selection_text - - -- delete sets in table - r2.tableFaceSets[faceSetsName] = nil - r2:saveTable("save\\tableFaceSets.txt", r2.tableFaceSets) - - -- delete sets in combo box - updateFaceSetsCombo:removeSelection(updateFaceSetsCombo.selection) - - local faceSetsCombo = getUI("ui:interface:r2ed_npc"):find("face_sets").combo_box - assert(faceSetsCombo) - faceSetsCombo:removeText(faceSetsName) - faceSetsCombo.view_text = r2.emptyComboLine -end - --- SELECT FACE SETS --------------------------------------------------------------------------- -function r2:selectFaceSets() - - local faceSetsCombo = getUI("ui:interface:r2ed_npc"):find("face_sets").combo_box - assert(faceSetsCombo) - - local selection = r2:getSelectedInstance() - - if faceSetsCombo.view_text == r2.emptyComboLine then - return - else - r2.requestNewAction(i18n.get("uiR2EDSelectNpcFaceSetsAction")) - - local faceSetsValue = r2.tableFaceSets[faceSetsCombo.selection_text] - if faceSetsValue == nil then return end - - -- update sliders values - for i = 1,r2.faceAttNb do - local requestSetNode = true - local requestValue = faceSetsValue[r2.faceKeys[i] ] - - if r2.faceAttributes[i] == "HairType" then - if not r2.hasHelmet then - requestValue = getSheetId(r2.sliderValueToItemIndex[r2.raceSelection][faceSetsValue[r2.faceKeys[i]]]) - else - r2.hairType.hairCut = faceSetsValue[r2.faceKeys[i] ] - requestSetNode = false - end - elseif r2.faceAttributes[i] == "HairColor" and r2.hasHelmet then - r2.hairType.hairColor = faceSetsValue[r2.faceKeys[i] ] - requestSetNode = false - end - - if requestSetNode then - r2:setNpcAttribute(selection.InstanceId, r2.faceAttributes[i], requestValue) - end - end - - r2.requestEndAction() - end - - local faceSetsPopup = getUI("ui:interface:r2ed_add_face_sets"):find("update_sets").combo_box - assert(faceSetsPopup) - faceSetsPopup.selection_text = faceSetsCombo.selection_text -end - ----------------------------------------------------------------------------------------------- --- RANDOM FACE MORPH ------------------------------------------------------------------------- -function r2:randomFaceMorph() - - local selection = r2:getSelectedInstance() - if selection == nil then - debugInfo("No selection") - return - end - - r2.requestNewAction(i18n.get("uiR2EDRandomNPCFaceMorphAction")) - - local randomValue - for i = 1,r2.morphAttNb do - - randomValue = math.random(0,7) - r2:setNpcAttribute(selection.InstanceId, r2.morphAttributes[i], randomValue) - end - - r2.requestEndAction() -end - --- ADD FACE MORPH --------------------------------------------------------------------------- - -function r2:addFaceMorph() - - local addFaceMorph = getUI("ui:interface:r2ed_add_face_morph") - assert(addFaceMorph) - local editText = addFaceMorph:find("new_sets").edit_box_group - assert(editText) - if editText.input_string~="" then - local updateFaceMorphCombo = addFaceMorph:find("update_sets").combo_box - assert(updateFaceMorphCombo) - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - local faceMorphCombo = npcUI:find("face_morph").combo_box - assert(faceMorphCombo) - - faceMorphCombo:addText(editText.uc_input_string) - updateFaceMorphCombo:addText(editText.uc_input_string) - - -- add new sets in table - local faceMorph = npcUI:find("face_morph_scroll_target") - assert(faceMorph) - r2.tableFaceMorph[editText.input_string] = {} - - local sliderValue - for i = 1,r2.morphAttNb do - sliderValue = faceMorph:find(r2.morphSliders[i]):find("slider").value - r2.tableFaceMorph[editText.input_string][r2.morphKeys[i] ] = sliderValue - end - r2:saveTable("save\\tableFaceMorph.txt", r2.tableFaceMorph) - - -- update set of main window combo box - faceMorphCombo.selection_text = editText.input_string - updateFaceMorphCombo.selection_text = editText.input_string - - editText.input_string = "" - end -end - --- UPDATE FACE MORPH ------------------------------------------------------------------------ -function r2:updateFaceMorph() - - local updateFaceMorphCombo = getUI("ui:interface:r2ed_add_face_morph"):find("update_sets").combo_box - assert(updateFaceMorphCombo) - local faceMorphName = updateFaceMorphCombo.selection_text - - -- update sets in table - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - local faceMorph = npcUI:find("face_morph_scroll_target") - assert(faceMorph) - - local sliderValue - for i = 1,r2.morphAttNb do - sliderValue = faceMorph:find(r2.morphSliders[i]):find("slider").value - r2.tableFaceMorph[faceMorphName][r2.morphKeys[i] ] = sliderValue - end - r2:saveTable("save\\tableFaceMorph.txt", r2.tableFaceMorph) - - -- update set of main window combo box - local faceMorphCombo = npcUI:find("face_morph").combo_box - assert(faceMorphCombo) - faceMorphCombo.selection_text = faceMorphName -end - --- REMOVE FACE MORPH --------------------------------------------------------------------------- -function r2:removeFaceMorph() - - local updateFaceMorphCombo = getUI("ui:interface:r2ed_add_face_morph"):find("update_sets").combo_box - assert(updateFaceMorphCombo) - local faceMorphName = updateFaceMorphCombo.selection_text - - -- delete sets in table - r2.tableFaceMorph[faceMorphName] = nil - r2:saveTable("save\\tableFaceMorph.txt", r2.tableFaceMorph) - - -- delete sets in combo box - updateFaceMorphCombo:removeSelection(updateFaceMorphCombo.selection) - updateFaceMorphCombo.view_text = r2.emptyComboLine - - local faceMorphCombo = getUI("ui:interface:r2ed_npc"):find("face_morph").combo_box - assert(faceMorphCombo) - faceMorphCombo:removeText(faceMorphName) - faceMorphCombo.view_text = r2.emptyComboLine -end - --- SELECT FACE MORPH --------------------------------------------------------------------------- -function r2:selectMorphSets() - - local faceMorphCombo = getUI("ui:interface:r2ed_npc"):find("face_morph").combo_box - assert(faceMorphCombo) - - local selection = r2:getSelectedInstance() - - if faceMorphCombo.view_text == r2.emptyComboLine then - return - else - r2.requestNewAction(i18n.get("uiR2EDSelectNPCMorphSetsAction")) - - local faceMorphValue = r2.tableFaceMorph[faceMorphCombo.selection_text] - if faceMorphValue == nil then return end - - -- update sliders values - for i = 1,r2.morphAttNb do - r2:setNpcAttribute(selection.InstanceId, r2.morphAttributes[i], faceMorphValue[r2.morphKeys[i]]) - end - - r2.requestEndAction() - end - - local faceMorphPopup = getUI("ui:interface:r2ed_add_face_morph"):find("update_sets").combo_box - assert(faceMorphPopup) - faceMorphPopup.selection_text = faceMorphCombo.selection_text -end - - --- CLOSE MODAL SETS WINDOW ---------------------------------------------------------------------- - -function r2:closeModalBodySets() - r2:closeModal("ui:interface:r2ed_add_body_sets") -end - -function r2:closeModalFaceSets() - r2:closeModal("ui:interface:r2ed_add_face_sets") -end - -function r2:closeModalFaceMorph() - r2:closeModal("ui:interface:r2ed_add_face_morph") -end - -function r2:closeModal(window) - - local modalWindow = getUI(window) - assert(modalWindow) - - local editText = modalWindow:find("new_sets").edit_box_group - assert(editText) - editText.input_string = "" - - modalWindow.active = false -end - - ------------------------------------------------------------------------------------------------ --- GROUP -------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------ - -r2.profile = {Civil="normal", Bandit="bandit", Guard = "guard"} -r2.profileCB = {normal="Civil", bandit="Bandit", guard="Guard"} - --- UPDATE PROFILE ----------------------------------------------------------------------------- -function r2:updateProfile() - - if getUICaller().Env.locked then - return - end - - local selection = r2:getSelectedInstance() - assert(selection) - - r2.requestNewAction(i18n.get("uiR2EDUpdateNPCProfileAction")) - r2:setNpcAttribute(selection.InstanceId, "Profile", r2.profile[getUICaller().selection_text]) -end - ------------------------------------------------------------------------------------------------ --- EQUIPMENT ---------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------ - -r2.equipmentPalette = {} -r2.itemIndexEquipmentToSelectionText = {} -r2.equipmentEnv = {} -r2.noPiece = i18n.get("uiR2EdNoPiece"):toUtf8() - -r2.equipmentAttNb = 6 - -r2.colorAttributes = {[1] = "JacketColor", [2] = "TrouserColor", - [3] = "FeetColor", [4] = "HandsColor", - [5] = "ArmColor"} - -r2.equipementComboB = {[1] = "chest_plate", [2] = "legs", - [3] = "boots", [4] = "gloves", - [5] = "arms_guard", [6] = "helmet", - } - -r2.equipmentKeys = r2.equipementComboB - -r2.equipmentSets = {} - -r2.linkColorB = false -r2.linkedColor = 0 - -function r2:initEquipmentEnv() - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - local nameComboBox = "helmet" - local comboBox = npcUI:find(nameComboBox).label_combo_box.combo_box - local slider = npcUI:find(nameComboBox):find("slider") - comboBox.Env.nameComboBox = nameComboBox - slider.name = nameComboBox - r2.equipmentEnv[nameComboBox] = {propName = "HairType", propColorName = "HairColor"} - - nameComboBox = "chest_plate" - comboBox = npcUI:find(nameComboBox).label_combo_box.combo_box - slider = npcUI:find(nameComboBox):find("slider") - comboBox.Env.nameComboBox = nameComboBox - slider.name = nameComboBox - r2.equipmentEnv[nameComboBox] = {propName = "JacketModel", propColorName = "JacketColor"} - - nameComboBox = "legs" - comboBox = npcUI:find(nameComboBox).label_combo_box.combo_box - slider = npcUI:find(nameComboBox):find("slider") - comboBox.Env.nameComboBox = nameComboBox - slider.name = nameComboBox - r2.equipmentEnv[nameComboBox] = {propName = "TrouserModel", propColorName = "TrouserColor"} - - nameComboBox = "boots" - comboBox = npcUI:find(nameComboBox).label_combo_box.combo_box - slider = npcUI:find(nameComboBox):find("slider") - comboBox.Env.nameComboBox = nameComboBox - slider.name = nameComboBox - r2.equipmentEnv[nameComboBox] = {propName = "FeetModel", propColorName = "FeetColor"} - - nameComboBox = "gloves" - comboBox = npcUI:find(nameComboBox).label_combo_box.combo_box - slider = npcUI:find(nameComboBox):find("slider") - comboBox.Env.nameComboBox = nameComboBox - slider.name = nameComboBox - r2.equipmentEnv[nameComboBox] = {propName = "HandsModel", propColorName = "HandsColor"} - - nameComboBox = "arms_guard" - comboBox = npcUI:find(nameComboBox).label_combo_box.combo_box - slider = npcUI:find(nameComboBox):find("slider") - comboBox.Env.nameComboBox = nameComboBox - slider.name= nameComboBox - r2.equipmentEnv[nameComboBox] = {propName = "ArmModel", propColorName = "ArmColor"} - - nameComboBox = "hands" - comboBox = npcUI:find(nameComboBox).combo_box - comboBox.Env.nameComboBox = nameComboBox - - for equId, equTable in pairs(r2.equipmentPalette) do - r2.itemIndexEquipmentToSelectionText[equId] = {} - for comboName, comboList in pairs(equTable) do - r2.itemIndexEquipmentToSelectionText[equId][comboName] = {} - if tostring(comboName) ~= "hands" then - for k, v in pairs(comboList) do - local itemIndex = getSheetId(v.itemFile) - r2.itemIndexEquipmentToSelectionText[equId][comboName][itemIndex] = v.trad - end - else - for k, v in pairs(comboList) do - local rightHandIndex = getSheetId(v.rightHand) - local leftHandIndex = getSheetId(v.leftHand) - local handsLevel = v.handsLevel - local handsKey = rightHandIndex..":"..leftHandIndex..":"..handsLevel - r2.itemIndexEquipmentToSelectionText[equId][comboName][handsKey] = v.trad - - end - end - r2.itemIndexEquipmentToSelectionText[equId][comboName][0] = r2.noPiece - end - end -end - ------------------------------------------------------------------------------------------------ - -function r2.addR2PlayerEquipment(paletteElt, equipmentTable) - - local tempTable = {} - - for equType, v in pairs(equipmentTable) do - - tempTable[equType] = {} - for equName, equFile in pairs(v) do - local tradEquName = i18n.get(equName):toUtf8() - if tostring(equType) ~= "hands" then - if equName == "uiR2EDequipment_none" then - table.insert(tempTable[equType], 1, {["trad"]=tradEquName, ["itemFile"]=equFile}) - else - table.insert(tempTable[equType], {["trad"]=tradEquName, ["itemFile"]=equFile}) - end - else - local s, e = string.find(equFile, ":") - if s==nil or e==nil then - debugInfo("Palette problem with equipment : "..paletteElt.Equipment) - end - local rightHand = string.sub(equFile, 1, e-1) - - equFile = string.sub(equFile, e+1) - s, e = string.find(equFile, ":") - if s==nil or e==nil then - debugInfo("Palette probleme with equipment : "..paletteElt.Equipment) - end - local leftHand = string.sub(equFile, 1, e-1) - - equFile = string.sub(equFile, e+1) - local handsLevel = equFile - table.insert(tempTable[equType], { - ["trad"]=tradEquName, - ["rightHand"]=rightHand, - ["leftHand"]=leftHand, - ["handsLevel"]=handsLevel - }) - end - end - end - - r2.equipmentPalette[paletteElt.Equipment] = tempTable -end - ------------------------------------------------------------------------------------------------ - -function r2:updateEquipment(instance, init) - - local equipmentId = instance.Equipment - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - local comboBox - - -- update current equipment - if r2.equipmentPalette[equipmentId] then - - for k, v in pairs(r2.equipmentPalette[equipmentId]) do - comboBox = npcUI:find(k):find("combo_box") - assert(comboBox) - - comboBox:resetTexts() - - for k1, v1 in pairs(v) do - comboBox:addText(ucstring(v1.trad)) - end - end - - if init then r2.hasHelmet = false end - end - - -- update equipment sets - comboBox = npcUI:find("equipment_sets").combo_box - assert(comboBox) - - local comboBoxPopup = getUI("ui:interface:r2ed_add_equipment_set"):find("update_sets").combo_box - assert(comboBoxPopup) - - comboBox:resetTexts() - comboBoxPopup:resetTexts() - - if r2.equipmentSets[equipmentId] then - for k1, v1 in pairs(r2.equipmentSets[equipmentId]) do - comboBox:addText(ucstring(k1)) - comboBoxPopup:addText(ucstring(k1)) - end - end - comboBox.view_text = r2.emptyComboLine - comboBoxPopup.view_text = r2.emptyComboLine - - local toggleB = npcUI:find("color_link").toggle_butt - assert(toggleB) - toggleB.pushed = true - r2:linkColor() - - -- update selection texts - local comboBox, slider - local helmetB = true - for k, v in pairs(r2.equipmentEnv) do - comboBox = npcUI:find(k):find("combo_box") - assert(comboBox) - slider = npcUI:find(k):find("slider") - local line = npcUI:find(k):find("line_slider") - - local CBText = r2.itemIndexEquipmentToSelectionText[instance.Equipment][comboBox.Env.nameComboBox][instance[v.propName] ] - if CBText==nil then CBText=r2.noPiece end - comboBox.Env.locked = true - comboBox.selection_text = CBText - comboBox.Env.locked = false - - line.active = (CBText~=r2.noPiece) - slider.active = (CBText~=r2.noPiece) - if slider.active then - slider.value = instance[v.propColorName] - end - - if v.propName == "HairType" then - slider = npcUI:find("slider_haircut") - assert(slider) - slider.active = (CBText == r2.noPiece) - if slider.active then - local value = r2.itemIndexToSliderValue[r2.raceSelection][instance.HairType] - if value then - slider:find("slider").value = value - end - end - - slider = npcUI:find("slider_hair_color") - assert(slider) - slider.active = (CBText == r2.noPiece) - if slider.active then - slider:find("slider").value = instance.HairColor - end - end - end -end - ------------------------------------------------------------------------------------------------ - -function r2:updatePieceEquipment() - - if not r2.selectEquipmentSet then - r2.requestNewAction(i18n.get("uiR2EDUpdateEquipmentPieceAction")) - end - - local selection = r2:getSelectedInstance() - if selection == nil then - debugInfo("No selection") - return - end - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - local equipmentType = getUICaller().selection_text - local nameComboBox = getUICaller().Env.nameComboBox - local itemIndex - - if equipmentType == r2.noPiece then - if r2.equipmentEnv[nameComboBox].propName == "HairType" then - local sliderHair = npcUI:find("slider_haircut") - assert(sliderHair) - local sliderHairColor = npcUI:find("slider_hair_color") - assert(sliderHairColor) - - if not getUICaller().Env.locked and r2.hasHelmet then - - itemIndex = getSheetId(r2.sliderValueToItemIndex[r2.raceSelection][r2.hairType.hairCut]) - r2:setNpcAttribute(selection.InstanceId, r2.equipmentEnv[nameComboBox].propName, itemIndex) - r2:setNpcAttribute(selection.InstanceId, r2.equipmentEnv[nameComboBox].propColorName, r2.hairType.hairColor) - end - - else - if not getUICaller().Env.locked then - r2:setNpcAttribute(selection.InstanceId, r2.equipmentEnv[nameComboBox].propName, 0) - end - end - else - if r2.equipmentEnv[nameComboBox].propName == "HairType" then - local sliderHair = npcUI:find("slider_haircut") - assert(sliderHair) - local sliderHairColor = npcUI:find("slider_hair_color") - assert(sliderHairColor) - end - local itemFile = "" - for k, v in pairs(r2.equipmentPalette[selection.Equipment][nameComboBox]) do - if v.trad == equipmentType then itemFile = v.itemFile break end - end - - itemIndex = getSheetId(itemFile) - if not getUICaller().Env.locked then - r2:setNpcAttribute(selection.InstanceId, r2.equipmentEnv[nameComboBox].propName, itemIndex) - end - - if r2.linkColorB then - r2:updateColor(npcUI:find(nameComboBox):find("slider")) - end - end - - if not r2.saveEquipmentSet and not r2:matchWithEquipmentSet(nameComboBox, equipmentType) then - local updateEquSetCombo = getUI("ui:interface:r2ed_add_equipment_set"):find("update_sets").combo_box - assert(updateEquSetCombo) - updateEquSetCombo.view_text = r2.emptyComboLine - - local equSetCombo = npcUI:find("equipment_sets").combo_box - assert(equSetCombo) - equSetCombo.view_text = r2.emptyComboLine - end -end - -function r2:matchWithEquipmentSet(nameComboBox, equipmentType) - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - local equSetCombo = npcUI:find("equipment_sets").combo_box - assert(equSetCombo) - - local setName = equSetCombo.selection_text - if setName==r2.emptyComboLine then return false end - - local selection = r2:getSelectedInstance() - - if r2.equipmentSets[selection.Equipment] == nil then return false end - local equSetsValue = r2.equipmentSets[selection.Equipment][setName] - if equSetsValue == nil then return false end - - return (equSetsValue[nameComboBox].comboSelection == equipmentType) -end - -function r2:updateWeapons() - - local selection = r2:getSelectedInstance() - local hands = getUICaller() - if hands.Env.locked == true then return end - - r2.requestNewAction(i18n.get("uiR2EDUpdateNPCWeaponsAction")) - - local equipmentType = hands.selection_text - - local handsTable - for k, v in pairs(r2.equipmentPalette[selection.Equipment][hands.Env.nameComboBox]) do - if v.trad == equipmentType then handsTable = v break end - end - assert(handsTable) - - local rightHandFile = handsTable.rightHand - local rightHandIndex = getSheetId(rightHandFile) - local leftHandFile = handsTable.leftHand - local leftHandIndex = getSheetId(leftHandFile) - local handsLevel = handsTable.handsLevel - - local sheet = selection.Sheet - local s, e = string.find(sheet, ".creature") - local level = string.sub(sheet, s-1, s-1) - - local newSheet = selection.SheetModel - - newSheet = string.gsub(newSheet, "$hands", handsLevel) - newSheet = string.gsub(newSheet, "$level", level) - - r2:setNpcAttribute(selection.InstanceId, "WeaponRightHand", rightHandIndex) - r2:setNpcAttribute(selection.InstanceId, "WeaponLeftHand", leftHandIndex) - r2:setNpcAttribute(selection.InstanceId, "Sheet", newSheet) - - r2.requestEndAction() -end - ------------------------------------------------------------------------------------------------ - -function r2:closeModalEquipment() - r2:closeModal("ui:interface:r2ed_add_equipment_set") -end - ------------------------------------------------------------------------------------------------ - -function r2:addEquipmentSet() - - local selection = r2:getSelectedInstance() - assert(selection) - - local addEquSet = getUI("ui:interface:r2ed_add_equipment_set") - assert(addEquSet) - local editText = addEquSet:find("new_sets").edit_box_group - assert(editText) - if editText.input_string~="" then - local updateEquSetCombo = addEquSet:find("update_sets").combo_box - assert(updateEquSetCombo) - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - local equSetCombo = npcUI:find("equipment_sets").combo_box - assert(equSetCombo) - - updateEquSetCombo:addText(editText.uc_input_string) - equSetCombo:addText(editText.uc_input_string) - - if r2.equipmentSets[selection.Equipment] == nil then - r2.equipmentSets[selection.Equipment] = {} - end - r2.equipmentSets[selection.Equipment][editText.input_string] = {} - - for i=1, r2.equipmentAttNb do - local comboBox = npcUI:find(r2.equipementComboB[i]):find("combo_box") - local slider = npcUI:find(r2.equipementComboB[i]):find("slider") - - r2.equipmentSets[selection.Equipment][editText.input_string][r2.equipmentKeys[i] ] = { - comboSelection = comboBox.selection_text, color = slider.value} - end - - r2:saveTable("save\\equipmentSets.txt", r2.equipmentSets) - - equSetCombo.selection_text = editText.input_string - - editText.input_string="" - end -end - --- SELECT EQUIPMENT SETS --------------------------------------------------------------------------- - -r2.saveEquipmentSet = false - -function r2:selectEquipmentSets() - - r2.selectEquipmentSet = true - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - local equSetCombo = npcUI:find("equipment_sets").combo_box - assert(equSetCombo) - - local selection = r2:getSelectedInstance() - - if equSetCombo.view_text == r2.emptyComboLine then - return - else - if r2.equipmentSets[selection.Equipment] == nil then return end - local equSetsValue = r2.equipmentSets[selection.Equipment][equSetCombo.selection_text] - if equSetsValue == nil then return end - - r2.requestNewAction(i18n.get("uiR2EDSelectNPCEquipmentSetsAction")) - r2.saveEquipmentSet = true - - -- update comboBoxes and sliders values - for i = 1,r2.equipmentAttNb do - - local comboItemText = equSetsValue[r2.equipementComboB[i]].comboSelection - local colorPiece = equSetsValue[r2.equipementComboB[i]].color - - local comboBox = npcUI:find(r2.equipementComboB[i]).label_combo_box.combo_box - assert(comboBox) - - if comboItemText == r2.noPiece then - local propName = r2.equipmentEnv[r2.equipementComboB[i]].propName - if not (propName == "HairType" and not r2.hasHelmet) then - - comboBox.selection_text = r2.noPiece - - if r2.equipmentEnv[r2.equipementComboB[i] ].propColorName ~= "HairColor" then - r2:setNpcAttribute(selection.InstanceId, r2.equipmentEnv[r2.equipementComboB[i]].propColorName, 0) - npcUI:find(r2.equipementComboB[i]):find("slider").value = 0 - end - end - else - comboBox.selection_text = equSetsValue[r2.equipmentKeys[i]].comboSelection - - r2:setNpcAttribute(selection.InstanceId, r2.equipmentEnv[r2.equipementComboB[i]].propColorName, colorPiece) - npcUI:find(r2.equipementComboB[i]):find("slider").value = colorPiece - end - end - - local updateEquSetsCombo = getUI("ui:interface:r2ed_add_equipment_set"):find("update_sets").combo_box - assert(updateEquSetsCombo) - - updateEquSetsCombo.selection_text = equSetCombo.selection_text - - r2.saveEquipmentSet = false - r2.requestEndAction(i18n.get("uiR2EDSelectNPCEquipmentSetsAction")) - end - - r2.selectEquipmentSet = false -end - ------------------------------------------------------------------------------------------------ - -function r2:updateEquipmentSet() - - if r2.saveEquipmentSet then return end - - local selection = r2:getSelectedInstance() - - local updateEquSetsCombo = getUI("ui:interface:r2ed_add_equipment_set"):find("update_sets").combo_box - assert(updateEquSetsCombo) - local equSetsName = updateEquSetsCombo.selection_text - - -- update sets in table - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - local comboBSelection, slider - for i = 1,r2.equipmentAttNb do - comboBSelection = npcUI:find(r2.equipementComboB[i]):find("combo_box").selection_text - r2.equipmentSets[selection.Equipment][equSetsName][r2.equipementComboB[i] ].comboSelection = comboBSelection - slider = npcUI:find(r2.equipementComboB[i]):find("slider") - - r2.equipmentSets[selection.Equipment][equSetsName][r2.equipementComboB[i] ].color = slider.value - end - - r2:saveTable("save\\equipmentSets.txt", r2.equipmentSets) - - local equSetCombo = npcUI:find("equipment_sets").combo_box - assert(equSetCombo) - equSetCombo.selection_text = updateEquSetsCombo.selection_text -end - ------------------------------------------------------------------------------------------------ - -function r2:removeEquipment() - - local selection = r2:getSelectedInstance() - - local updateEquSetsCombo = getUI("ui:interface:r2ed_add_equipment_set"):find("update_sets").combo_box - assert(updateEquSetsCombo) - local equSetsName = updateEquSetsCombo.selection_text - - -- delete sets in table - r2.equipmentSets[selection.Equipment][equSetsName] = nil - r2:saveTable("save\\equipmentSets.txt", r2.equipmentSets) - - -- delete sets in combo box - updateEquSetsCombo:removeSelection(updateEquSetsCombo.selection) - - local equSetsCombo = getUI("ui:interface:r2ed_npc"):find("equipment_sets").combo_box - assert(equSetsCombo) - equSetsCombo:removeText(equSetsName) - equSetsCombo.view_text = r2.emptyComboLine - - updateEquSetsCombo.view_text = r2.emptyComboLine -end - ------------------------------------------------------------------------------------------------ - -function r2:randomEquipment() - r2.requestNewAction(i18n.get("uiR2EDRandomNpcEquipmentAction")) - r2.selectEquipmentSet = true - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - for i=1, r2.equipmentAttNb do -- no right or left hand - local comboBox = npcUI:find(r2.equipementComboB[i]):find("combo_box") - if comboBox.selectionNb > 0 then - comboBox.selection = math.random(1, comboBox.selectionNb) - 1 - end - end - - r2.selectEquipmentSet = false - r2.requestEndAction() -end - ------------------------------------------------------------------------------------------------ - -function r2:randomColor() - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - local levelDesignEnabled = getClientCfgVar("LevelDesignEnabled") - local maxVal = 5 - if tonumber(levelDesignEnabled)==1 then maxVal = 7 end - - if r2.linkColorB then - local randomColor = math.random(0, maxVal) - while r2.linkedColor == randomColor do - randomColor = math.random(0, maxVal) - end - r2.linkedColor = randomColor - end - - for i=1, r2.equipmentAttNb do -- no right or left hand - local slider = npcUI:find(r2.equipementComboB[i]):find("slider") - - if not r2.linkColorB then - slider.value = math.random(0, maxVal) - end - end - r2:updateLinkColor() -end - ----------RANDOM ALL NPC PROPERTIES ------------------------------------------------------------- - -function r2:randomNPCSex(sheetClient) - - local race - local s = string.find(sheetClient, "fyros") - if s ~= nil then race = "Fyros" end - - s = string.find(sheetClient, "matis") - if s ~= nil then race = "Matis" end - - s = string.find(sheetClient, "tryker") - if s ~= nil then race = "Tryker" end - - s = string.find(sheetClient, "zorai") - if s ~= nil then race = "Zorai" end - - local sex = (math.random(0,10)>5) - if sex == true then - sex = r2.male - else - sex = r2.female - end - - return r2.raceSheetClient[sex][race] -end - -function r2:randomNPCProperties(equipmentId, race) - - local result = {} - - -- random body - result["GabaritHeight"] = math.random(0,14) - result["GabaritTorsoWidth"] = math.random(0,14) - result["GabaritArmsWidth"] = math.random(0,14) - result["GabaritLegsWidth"] = math.random(0,14) - result["GabaritBreastSize"] = math.random(0,14) - - -- random face - result["HairColor"] = math.random(0,5) - result["Tattoo"] = math.random(0,31) - result["HairType"] = getSheetId(r2.sliderValueToItemIndex[race][math.random(0,6)]) - result["EyesColor"] = math.random(0,7) - - -- random face morph - result["MorphTarget1"] = math.random(0,7) - result["MorphTarget2"] = math.random(0,7) - result["MorphTarget3"] = math.random(0,7) - result["MorphTarget4"] = math.random(0,7) - result["MorphTarget5"] = math.random(0,7) - result["MorphTarget6"] = math.random(0,7) - result["MorphTarget7"] = math.random(0,7) - result["MorphTarget8"] = math.random(0,7) - - -- random equipment - r2:randomNPCEquipment(equipmentId, result) - - return result -end - -function r2:randomNPCEquipment(equipmentId, result) - - if result == nil then - result = {} - end - - local tableEquipment = r2.equipmentPalette[equipmentId] - assert(tableEquipment) - local hasHelmet = false - local size = 0 - local hasNudeOption = false - for k, v in pairs(tableEquipment.helmet) do - size = size+1 - if k == r2.noPiece then - hasNudeOption = true - end - end - if size > 0 and (not hasNudeOption or (math.random(0,10) > 5)) then - local helmetType = r2:randomPieceEquipment(tableEquipment.helmet, false) - if helmetType ~= 0 then - result["HairType"] = helmetType - hasHelmet = true - end - end - result["JacketModel"] = r2:randomPieceEquipment(tableEquipment.chest_plate, false) - result["TrouserModel"] = r2:randomPieceEquipment(tableEquipment.legs, false) - result["FeetModel"] = r2:randomPieceEquipment(tableEquipment.boots, false) - result["HandsModel"] = r2:randomPieceEquipment(tableEquipment.gloves, false) - result["ArmModel"] = r2:randomPieceEquipment(tableEquipment.arms_guard, false) - - local weaponRH, weaponLH = r2:randomPieceEquipment(tableEquipment.hands, true) - result["WeaponRightHand"] = weaponRH - result["WeaponLeftHand"] = weaponLH - - -- random equipment color - local levelDesignEnabled = getClientCfgVar("LevelDesignEnabled") - local maxVal = 5 - if tonumber(levelDesignEnabled)==1 then maxVal = 7 end - result["JacketColor"] = math.random(0, maxVal) - result["ArmColor"] = math.random(0, maxVal) - result["HandsColor"] = math.random(0, maxVal) - result["TrouserColor"] = math.random(0, maxVal) - result["FeetColor"] = math.random(0, maxVal) - if hasHelmet then - result["HairColor"] = math.random(0,maxVal) - end - - return result -end - --- Same as randomNPCName but can return 2 times the same name -function r2:randomNPCName2(race, sex) - local allNames = r2:getAllNames() - local tableNames = allNames[race .."_" .. sex] - if not tableNames or table.getn(tableNames) == 0 then return "" end - local indexName = math.random(1, table.getn(tableNames)) - return tableNames[indexName] -end - -function r2:randomNPCName(race, sex) - - -- random name - local tableNames = r2.NPCNames[race .."_" .. sex] - - local name = "" - if table.getn(tableNames) == 0 then - r2:loadRaceSexNames(race, sex) - tableNames = r2.NPCNames[race .."_" .. sex] - end - - if table.getn(tableNames) > 0 then - local indexName = math.random(1, table.getn(tableNames)) - name = tableNames[indexName] - tableNames[indexName] = tableNames[table.getn(tableNames)] - tableNames[table.getn(tableNames)] = nil - end - - return name -end - -function r2:isRandomizedNPCName(name, race, sex) - - local tableNames = r2:loadRaceSexNamesImpl(race, sex) - - for k, vName in pairs(tableNames) do - if vName==name then return true end - end - - return false -end - -function r2:searchSheet(equipmentId, weaponRH, weaponLH, sheet, sheetModel) - - local tableEquipment = r2.equipmentPalette[equipmentId] - assert(tableEquipment) - - local hands = tableEquipment.hands - - for k, v in pairs(hands) do - local rightHand = v.rightHand - local leftHand = v.leftHand - if weaponRH==getSheetId(rightHand) and weaponLH==getSheetId(leftHand) then - local handsLevel = v.handsLevel - - local s, e = string.find(sheet, ".creature") - local level = string.sub(sheet, s-1, s-1) - - local newSheet = sheetModel - newSheet = string.gsub(newSheet, "$hands", handsLevel) - newSheet = string.gsub(newSheet, "$level", level) - return newSheet - end - end - - return "" -end - - --- Return a random NPC (Warning names can be duplicates) -function r2:randomNPC(base) - assert(base) - - local npc = r2.newComponent("NpcCustom") - - npc.Base = base - - -- random equipment and random sex - local sheetClient = r2.getPropertyValue(npc, "SheetClient") - - local sexSheetClient = r2:randomNPCSex(sheetClient) - npc.SheetClient = sexSheetClient - - local raceSelection = getR2PlayerRace(npc.SheetClient) - local sexSelection = nil - if isR2PlayerMale(npc.SheetClient) then - sexSelection = r2.male - else - sexSelection = r2.female - end - - local equipment = r2.getPropertyValue(npc, "Equipment") - - local results = r2:randomNPCProperties(equipment, raceSelection) - local k,v = next(results, nil) - while v do - npc[k] = v - k,v = next(results, k) - end - npc.Name = r2:randomNPCName2(raceSelection, sexSelection) - - return npc -end - -function r2:randomPieceEquipment(pieces, isHands) - - local keyPlace = 1 - assert(pieces ~= nil) - local size = 0 - -- why table.getn(pieces) doesn't work??? - for k, v in pairs(pieces) do - size = size + 1 - end - - if size > 1 then - keyPlace = math.random(1,size) - end - - local key, itemFileName - local count = 1 - for k, v in pairs(pieces) do - if count == keyPlace then - key = k - tempTable = v - break - end - count = count + 1 - end - if key == r2.noPiece or tempTable == nil then - return 0 - elseif isHands==true then - local rightHand = getSheetId(tempTable.rightHand) - local leftHand = getSheetId(tempTable.leftHand) - return rightHand, leftHand - else - return getSheetId(tempTable.itemFile) - end -end - -function r2:getPieceEquipmentNumber(pieces, piece) - - - local pieceNb = 0 - for k, v in pairs(pieces) do - - if v.rightHand and v.leftHand then - - if getSheetId(v.rightHand) == piece then - return pieceNb - elseif getSheetId(v.leftHand) == piece then - return pieceNb - end - - elseif getSheetId(v.itemFile) == piece then - return pieceNb - end - pieceNb = pieceNb + 1 - end - - return -1 -end - -function r2:getPieceEquipmentFromNumber(pieces, number, handSide) - - - local pieceNb = 0 - for k, v in pairs(pieces) do - - if pieceNb == number then - if v.rightHand and v.leftHand then - if handSide == "right" then - return getSheetId(v.rightHand) - elseif handSide == "left" then - return getSheetId(v.leftHand) - end - else - return getSheetId(v.itemFile) - end - end - pieceNb = pieceNb + 1 - end - - return -1 -end - ------------------------------------------------------------------------------------------------ - -function r2:updatePieceEquipmentColor(requestType) - - if not r2.linkColorB then - r2:updateColor(getUICaller(), requestType) - else - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - r2.linkedColor = getUICaller().value - r2:updateLinkColor(requestType) - end -end - ------------------------------------------------------------------------------------------------ -r2.updateLinkColors = false -function r2:updateLinkColor(requestType) - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - if not r2.linkColorAction then - r2.requestNewAction(i18n.get("uiR2EDUpdateLinkedNPCColorAction")) - end - - r2.updateLinkColors = true - - for i=1, r2.equipmentAttNb do - r2:updateColor(npcUI:find(r2.equipementComboB[i]):find("slider"), requestType) - end - - r2.updateLinkColors = false - - if not r2.linkColorAction then - r2.requestEndAction() - end -end - -function r2:updateColor(slider, requestType) - - local selection = r2:getSelectedInstance() - if selection == nil then - debugInfo("No selection") - return - end - - if not r2.updateLinkColors then - r2.requestNewAction(i18n.get("uiR2EDUpdateNPCColorAction")) - end - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - local nameComboBox = slider.name - local equipmentType = npcUI:find(nameComboBox):find("combo_box").selection_text - - if equipmentType == r2.noPiece then - slider.value = 0 - else - if r2.linkColorB then - slider.value = r2.linkedColor - end - - local propColor = r2.equipmentEnv[nameComboBox].propColorName - if requestType == nil then - r2:setNpcAttribute(selection.InstanceId, propColor, slider.value) - elseif requestType == 'local' then - r2.requestSetLocalNode(selection.InstanceId, propColor, slider.value) - elseif requestType == 'commit' then - r2.requestCommitLocalNode(selection.InstanceId, propColor) - elseif requestType == 'cancel' then - r2.requestRollbackLocalNode(selection.InstanceId, propColor) - else - debugInfo("r2:updateColor : unknown request type") - end - end - r2.requestEndAction() -end - ------------------------------------------------------------------------------------------------ -r2.linkColorAction=false -function r2:linkColor() - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - local toggleB = npcUI:find("color_link").toggle_butt - assert(toggleB) - r2.linkColorB = not toggleB.pushed - - -- update LinkColor property - local selection = r2:getSelectedInstance() - if selection == nil then return end - - r2.linkColorAction = true - r2.requestNewAction(i18n.get("uiR2EDLinkColorEquipment")) - local link = 0 - if r2.linkColorB then link=1 end - r2:setNpcAttribute(selection.InstanceId, "LinkColor", link) - - -- update colors - if not r2.linkColorB then - r2.linkedColor = 0 - else - local colors = {} - local slider - - for i=r2.equipmentAttNb, 1, -1 do -- no right or left hand - - slider = npcUI:find(r2.equipementComboB[i]):find("slider") - - local nameComboBox = slider.name - local equipmentType = npcUI:find(nameComboBox):find("combo_box").selection_text - - if equipmentType ~= r2.noPiece then - local value = slider.value - if colors[value] == nil then colors[value] = 0 end - colors[value] = colors[value] + 1 - end - end - - local colorMax = -1 - local colorMaxCount = 0 - - for k, v in pairs(colors) do - if v > colorMaxCount then - colorMaxCount = v - colorMax = k - end - end - - if colorMax~=-1 then - if colorMaxCount==1 then colorMax = slider.value end - - r2.linkedColor = colorMax - - r2:updateLinkColor() - end - end - - r2.requestEndAction() - r2.linkColorAction = false -end - ----------PREVIEW ----------------------------------------------------------------------------- - -function r2:preview() - - local npcUI = getUI("ui:interface:r2ed_npc") - assert(npcUI) - - local npcView = npcUI:find("npc_view") - assert(npcView) - - local sep = npcUI:find("v_sep") - assert(sep) - - if npcView.active then - npcUI.pop_min_w = npcUI.pop_min_w - 300 - npcUI.pop_max_w = npcUI.pop_max_w - 300 - npcUI.x = npcUI.x + 300 - else - npcUI.pop_min_w = npcUI.pop_min_w + 300 - npcUI.pop_max_w = npcUI.pop_max_w + 300 - npcUI.x = npcUI.x - 300 - end - - npcView.active = not npcView.active - sep.active = not sep.active -end - -function r2:isNPCPlant(sheetClient) - return string.match(sheetClient, "cp[%w_]*%.creature") -end - - - diff --git a/code/ryzom/common/data_common/r2/r2_ui_displayers.lua b/code/ryzom/common/data_common/r2/r2_ui_displayers.lua deleted file mode 100644 index 45fd1d14e..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_displayers.lua +++ /dev/null @@ -1,744 +0,0 @@ ------------------ ------------------ --- DISPLAYERS -- ------------------ ------------------ - --- Displayer are objects attached to instance in the scenario --- They react to modification events (creations of new objects such as nps, groups ...) --- and update their display accordingly --- There is zero or one displayer attached per category of display for each instance in the map --- For now this include : --- UI displayers : - They update the scenario window to display new things added to the map --- Property displayers : - They update the property sheet for an instance when one is displayed --- Visual displayers : - For now they are only implemented in C++. Their fonction is to update the display of a instance --- - in the 3D scene --- --- Displayer at attached at creation time by the C++ code --- The displayers to add to a specific object are given its the class definition --- (see r2_base_class.lua for details) - --- helper : update the context toolbar for the given instance if it is the current selected instance -local function updateContextToolbar(instance) - if r2:getSelectedInstance() == instance then - r2.ContextualCommands:update() - end -end - - - - ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ - --- The following code describes how to create a basic displayer that just --- output the events it handles in the log --- Mots of the time, when creating a new displayer, one will --- just construct an existing displayer, and redefine methods of interest, --- possibly calling the parent one - -function r2:exampleUIDisplayer() - local handler = {} - local ct = colorTag(0, 0, 255) - ------------------------------------------------ - -- Called by C++ at creation - function handler:onCreate(instance) - debugInfo(ct .. "Instance " .. instance.InstanceId .." was created") - end - ------------------------------------------------ - -- Called by C++ just before object is removed (so properties are still readable) - function handler:onErase(instance) - debugInfo(ct .. "Instance " .. instance.InstanceId .." was erased") - end - ------------------------------------------------ - -- Called by C++ just before object is moved in the object hierarchy - function handler:onPreHrcMove(instance) - updateContextToolbar(instance) - debugInfo(ct .. "Instance " .. instance.InstanceId .." is about to move") - end - ------------------------------------------------ - -- Called by C++ just after object is move in the object hierarchy - function handler:onPostHrcMove(instance) - updateContextToolbar(instance) - debugInfo(ct .. "Instance " .. instance.InstanceId .." has moved") - end - ------------------------------------------------ - -- Called by C++ just after object is highlighted by mouse - function handler:onFocus(instance, hasFocus) - if (instance.User.HasFocus ~= hasFocus) then - if hasFocus == true then - debugInfo(ct .. "Instance " .. instance.InstanceId .." has gained focus") - else - debugInfo(ct .. "Instance " .. instance.InstanceId .." has lost focus") - end - instance.User.HasFocus = hasFocus - end - end - ------------------------------------------------ - -- Called by C++ just after object has been selected - function handler:onSelect(instance, isSelected) - if (isSelected == true) then - debugInfo(ct .. "Instance " .. instance.InstanceId .." is selected") - else - debugInfo(ct .. "Instance " .. instance.InstanceId .." is unselected") - end - end - ------------------------------------------------ - -- Called by C++ when an attribute of this object has been modified - -- An attribute inside this object has been modified - -- attributeName :Name of the attribute inside this object, as given by its class definition. If the attribute - -- is an array, then an additionnal parameter gives the index of the element being modified in the array (or -1 if the whole array is set) - function handler:onAttrModified(instance, attributeName, indexInArray) - updateContextToolbar(instance) - debugInfo(ct .. "Instance " .. instance.InstanceId .." has an attribute modified : " .. attributeName) - end -end - - -function r2:onInstanceSelectedInTree(id) - -- is there's an active pick tool then - local currTool = r2:getCurrentTool() - if currTool and currTool:isPickTool() then - local tree = getUICaller() - tree:cancelNextSelectLine() -- don't want real selection, actually ... - if currTool:canPick() then - currTool:pick() - end - -- no-op else ... - return - end - --debugInfo("Seleting instance with id = " .. tostring(id) ) - r2:setSelectedInstanceId(id) -end - -function r2:onInstanceRightClickInTree(id) - r2:setSelectedInstanceId(id) - r2:displayContextMenu() -end - - -r2.VerboseEvents = false; - --- before to go to "test mode", store opened/closed nodes in scenario window tree --- to correctly initialize tree when go back in edition mode -r2.storedClosedTreeNodes = {} - ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ - --- displayer that update the tree control (scenario window) -function r2:defaultUIDisplayer() - local function eventDebugInfo(msg) - if r2.VerboseEvents == true then - debugInfo(msg) - end - end - - local handler = {} - local ct = colorTag(255, 0, 255) - ------------------------------------------------ - -- helper function : notify current act ui displayer that its quota has been modified - function handler:updateCurrentActQuota() - -- defer update to the next frame (many element can be added at once) - r2.UIMainLoop.LeftQuotaModified = true - end - ------------------------------------------------ - function handler:onCut(instance, cutted) - -- NOT IMPLEMENTED - -- debugInfo("On cut " .. tostring(cutted)) - -- local tree = getUI(r2.InstanceTreePath) - -- debugInfo(tostring(select(cutted, 127, 255))) - -- instance.User.TreeNode.Color.G = select(cutted, 0, 255) - -- tree:forceRebuild() - end - ------------------------------------------------ - function handler:onCreate(instance) - --eventDebugInfo(ct .. "Instance " .. instance.InstanceId .." was created") - self:addTreeNode(instance) - -- if my quota is not 0, then we should update - -- the current act quota .. - --if instance:getUsedQuota() ~= 0 then - -- self:updateCurrentActQuota() - --end - if instance:hasScenarioCost() ~= false then - self:updateCurrentActQuota() - end - - end - ------------------------------------------------ - function handler:onPostCreate(instance) - - -- Special : if the cookie 'AskName' is set (by C++ or lua), then show property and ask name - -- to user for that object - if instance.User.AskName then - if instance.User.ShowProps then - r2:showProperties(instance) - instance.User.ShowProps = nil - end - if instance.User.Select then - r2:setSelectedInstanceId(instance.InstanceId) - end - local propWindow = r2.CurrentPropertyWindow - - -- tmp : quick & dirty access to the widget ... - if propWindow and propWindow.active then - local editBox = propWindow:find("Name"):find("eb") - if editBox then - setCaptureKeyboard(editBox) - editBox:setSelectionAll() - end - end - instance.User.AskName = nil -- get rid of cookie - end - -- Special : if the cookie 'Select' is set (by C++ or lua), then the object should be selected after creation - if instance.User.Select then - r2:setSelectedInstanceId(instance.InstanceId) - end - if type(instance.User.CreateFunc) == "function" then - instance.User.CreateFunc(instance) - end - end - ------------------------------------------------ - function handler:onErase(instance) - --eventDebugInfo(ct .. "Instance " .. instance.InstanceId .." was erased") - self:removeTreeNode(instance) - -- if my quota is not 0, then we should update - -- the current act quota .. - if instance:hasScenarioCost() ~= false then - self:updateCurrentActQuota() - end - end - ------------------------------------------------ - function handler:onPreHrcMove(instance) - updateContextToolbar(instance) - --eventDebugInfo(ct .. "Instance " .. instance.InstanceId .." is about to move") - self:removeTreeNode(instance) - end - ------------------------------------------------ - function handler:onPostHrcMove(instance) - - -- if parent is a group, for its creation you don't know category of children : people or creature - -- you check it for first child - local parent = instance.ParentInstance - if instance:isGrouped() and parent.Components.Size==1 then - self:onErase(parent) - self:onCreate(parent) - self:onPostCreate(parent) - end - - updateContextToolbar(instance) - --eventDebugInfo(ct .. "Instance " .. instance.InstanceId .." has moved") - --eventDebugInfo(ct .. "New parent is " .. instance.ParentInstance.InstanceId) - local nodes = self:addTreeNode(instance) - if (r2:getSelectedInstance() == instance) and nodes then - for k, node in pairs(nodes) do - assert(node) - assert(node:getParentTree()) - assert(node:getParentTree().selectNodeById) - node:getParentTree():selectNodeById(node.Id, false) - end - end - -- if my quota is not 0, then we should update - -- the current act quota .. - if instance:hasScenarioCost() ~= false then - self:updateCurrentActQuota() - end - - -- if instance has Components, its children's nodes have been deleted at onPreHrcMove call - if instance.Components then - for i=0, instance.Components.Size-1 do - local child = instance.Components[i] - self:onCreate(child) - end - - self:onPostCreate(instance) - end - end - ------------------------------------------------ - function handler:onFocus(instance, hasFocus) - if (instance.User.HasFocus ~= hasFocus) then - if hasFocus == true then - --eventDebugInfo(ct .. "Instance " .. instance.InstanceId .." has gained focus") - else - --eventDebugInfo(ct .. "Instance " .. instance.InstanceId .." has lost focus") - end - instance.User.HasFocus = hasFocus - end - end - ------------------------------------------------ - function handler:onSelect(instance, isSelected) - if not instance.User.TreeNodes then - return - end - for k, treeNode in pairs(instance.User.TreeNodes) do - - if not (treeNode == nil or treeNode.isNil == true) then - - local tree = treeNode:getParentTree() - if (isSelected == true) then - --eventDebugInfo(ct .. "Instance " .. instance.InstanceId .." is selected") - tree:selectNodeById(instance.InstanceId, false) - else - --eventDebugInfo(ct .. "Instance " .. instance.InstanceId .." is unselected") - tree:unselect() - end - end - end - end - ------------------------------------------------ - function handler:onAttrModified(instance, attributeName, indexInArray) - if attributeName == "Position" or attributeName == "Angle" then - return - end - if attributeName == "Selectable" then - self:removeTreeNode(instance) - self:addTreeNode(instance) - end - - updateContextToolbar(instance) - if not instance.User.TreeNodes then - return - end - local nodes = instance.User.TreeNodes - for k, node in pairs(nodes) do - local tree = node:getParentTree() - if attributeName == 'Name' then - setupNodeName(instance) - if node:getFather() then - node:getFather():sortByBitmap() - end - tree:forceRebuild() - tree:selectNodeById(node.Id, false) -- reforce the selection - end - end - - if attr == "Ghost" then - if instance.Ghost then - self:removeTreeNode(instance) - end - end - --eventDebugInfo(ct .. "Instance " .. instance.InstanceId .." has an attribute modified : " .. attributeName) - end - - function setupNodeName(instance) - local treeNodes = instance.User.TreeNodes - if not treeNodes then return end - - for k, treeNode in pairs(treeNodes) do - if not (treeNode == nil or treeNode.isNil == true) then - local tree = treeNode:getParentTree() - - treeNode.Text = instance:getDisplayName() - if tree then -- nb : tree may be nil if node is setupped before being attached to its parent tree - tree:forceRebuild() - end - end - end - end - - function handler:storeClosedTreeNodes() - - function downInTree(node, nodeTable) - - for i=0, node:getNumChildren()-1 do - local child = node:getChild(i) - assert(child) - - nodeTable[child.Id] = child.Opened - - if child:getNumChildren()>0 then - downInTree(child, nodeTable) - end - end - end - - r2.storedClosedTreeNodes = {} - - -- scenary objects - r2.storedClosedTreeNodes[r2.Scenario:getBaseAct().InstanceId] = {} - local objectNodes = r2.storedClosedTreeNodes[r2.Scenario:getBaseAct().InstanceId] - - local container = getUI("ui:interface:r2ed_scenario") - --local objectsRoot = container:find("content_tree_list"):getRootNode():getNodeFromId("scenery_objects") - local objectsRoot = container:find("content_tree_list"):getRootNode() - assert(objectsRoot) - downInTree(objectsRoot, objectNodes) - - -- entities and components - if r2.Scenario.Acts.Size>1 then - for i=1, r2.Scenario.Acts.Size-1 do - local act = r2.Scenario.Acts[i] - local peopleRoot = act:getContentTree():getRootNode():getNodeFromId("people") - assert(peopleRoot) - local creatureRoot = act:getContentTree():getRootNode():getNodeFromId("creatures") - assert(creatureRoot) - --local componentRoot = act:getMacroContentTree():getRootNode():getNodeFromId("macro_components") - local componentRoot = act:getMacroContentTree():getRootNode() - assert(componentRoot) - - r2.storedClosedTreeNodes[act.InstanceId] = {} - local actNodes = r2.storedClosedTreeNodes[act.InstanceId] - - downInTree(peopleRoot, actNodes) - downInTree(creatureRoot, actNodes) - downInTree(componentRoot, actNodes) - end - end - end - - function handler:addPermanentNodes() - - if r2.ScenarioInstanceId then - local scenario = r2:getInstanceFromId(r2.ScenarioInstanceId) - if scenario and scenario.Acts.Size>0 then - local addToTreesTable = {} - scenario:getBaseAct():appendInstancesByType(addToTreesTable, "LogicEntity") - for k, instance in pairs(addToTreesTable) do - self:addTreeNode(instance) - end - end - end - end - - -- private - function handler:addTreeNode(instance) - - if instance.Ghost then return nil end - - local parentNodes = instance:getParentTreeNode() - - if parentNodes==nil then return nil end - - if instance.User.TreeNodes==nil then instance.User.TreeNodes = {} end - - for actId,parentNode in pairs(parentNodes) do - - local alreadyAdded = false - - for k2, treeNode in pairs(instance.User.TreeNodes) do - if not (treeNode==nil or treeNode.isNil==true) then - - local father = treeNode:getFather() - if father==parentNode then - alreadyAdded=true - break - end - end - end - - if not alreadyAdded then - - if parentNode == nil then - return nil -- one of the ancestors may be unselectable - end - if not instance.SelectableFromRoot then - return nil - end - local tree = parentNode:getParentTree() - local treeNode = SNode() - - -- store reference in object - table.insert(instance.User.TreeNodes, treeNode) - - treeNode.Bitmap = instance:getPermanentStatutIcon() - local openTree = true - if r2.storedClosedTreeNodes[actId] then - openTree = (r2.storedClosedTreeNodes[actId][instance.InstanceId]==true) - end - treeNode.Opened = openTree - - treeNode.Id = instance.InstanceId - treeNode.AHName = "lua" - local ahParams = "r2:onInstanceSelectedInTree('" .. instance.InstanceId .. "')" - --eventDebugInfo(ahParams) - treeNode.AHParams = ahParams - treeNode.AHNameRight = "lua" - treeNode.AHParamsRight = "r2:onInstanceRightClickInTree('" .. instance.InstanceId .. "')" - treeNode.AHNameClose = "lua" - treeNode.AHParamsClose = "r2.storedClosedTreeNodes = {}" - - setupNodeName(instance) - - assert(parentNode) - parentNode:addChildSortedByBitmap(treeNode) - parentNode.Show = (parentNode:getNumChildren() ~= 0) - - tree:forceRebuild() - end - end - - return instance.User.TreeNodes - end - function handler:removeTreeNode(instance) - - local nodes = instance.User.TreeNodes - if nodes == nil or nodes.isNil then - return - end - for k, node in pairs(nodes) do - if not (node == nil or node.isNil == true) then - local tree = node:getParentTree() - if node:getFather().isNil then - if (node == node:getParentTree():getRootNode()) then - --debugInfo("ROOT NODE") - node:getParentTree():setRootNode(nil) - else - --debugInfo("ISOLATED NODE") - deleteReflectable(node) -- isolated node (the tree was never built ?) - end - else - -- update parent node visibility only if a direct son of the root node - if node:getFather() then - if (node:getFather():getFather() == tree:getRootNode()) then - node:getFather().Show = (node:getFather():getNumChildren() > 1) - end - node:getFather():deleteChild(node) - end - - end - tree:forceRebuild() - end - end - instance.User.TreeNodes = nil - end - - return handler - -end - ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ - --- special display for groups in scenario window -function r2:groupUIDisplayer() - local handler = self:defaultUIDisplayer() - function handler:updateLeaderColor(instance) - if not instance.User.TreeNodes then - return - end - for k, node in pairs(instance.User.TreeNodes) do - local tree = node:getParentTree() - for i = 0, instance.Components.Size - 1 do - --debugInfo("I = " .. tostring(i)) - local treeNodes = instance.Components[i].User.TreeNodes - if treeNodes then - for k2, treeNode in pairs(treeNodes) do - if i == 0 then - treeNode.Color = CRGBA(255, 0, 0) -- mark leader in red - else - treeNode.Color = CRGBA(255, 255, 255) - end - end - end - end - tree:forceRebuild() - end - end - -- - local oldOnAttrModified = handler.onAttrModified - function handler:onAttrModified(instance, attrName, indexInArray) - if attrName == "Components" then - self:updateLeaderColor(instance) - end - oldOnAttrModified(self, instance, attrName, indexInArray) - end - -- - -- local oldOnCreate = handler.onCreate - -- function handler:onCreate(instance) - -- debugInfo("On create group") - -- oldOnCreate(self, instance) - -- end - -- - local oldOnPostCreate = handler.onPostCreate - function handler:onPostCreate(instance) - oldOnPostCreate(self, instance) - self:updateLeaderColor(instance) - end - -- - return handler -end - - - ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ - --- Displayer for ACTS. In the ui, acts are added into the act combo box -- --- in the environment of the container we store a table that gives the act Instance id, --- and the index of the tree control for each line in the combo box --- Table has the following look --- ActTable = { { Act = ..., TreeIndex = ... }, -- combo box line 1 --- { Act = ..., TreeIndex = ... }, -- combo box line 2 --- { Act = ..., TreeIndex = ... }, -- combo box line 3 etc. --- } - - -r2.ActUIDisplayer = {} -r2.ActUIDisplayer.ActTable = {} -- table that map each line of the combo box to an act -r2.ActUIDisplayer.LastSelfCreatedActInstanceId = nil -- id of the last act created by the pionner (not by another pionner) - -- When created, an act change will automatically occur - - ------------------------------------------------ - -- helper function : notify current act ui displayer that its quota has been modified - function r2.ActUIDisplayer:updateCurrentActQuota() - -- defer update to the next frame (many element can be added at once) - r2.UIMainLoop.LeftQuotaModified = true - end - - ------------------------------------------------ - function r2.ActUIDisplayer:updateActName(act) - - if act and not act:isBaseAct() then - - local actTable = self:getActTable() - for index, entry in pairs(actTable) do - if entry.Act == act then - local comboBox = self:getActComboBox() - - local actTitle = act:getName() - if act==r2.Scenario:getCurrentAct() then - actTitle = actTitle .. " [" .. i18n.get("uiR2EDCurrentActComboBox"):toUtf8() .."]" - end - local text = ucstring() - text:fromUtf8(actTitle) - comboBox:setText(index - 1, text) - return - end - end - end - end - - ------------------------------------------------ - function r2.ActUIDisplayer:onAttrModified(instance, attributeName, indexInArray) - - -- if title is modified, then must update names of all entities in the scene - if attributeName == "Name" then - local npcs = {} - r2:getCurrentAct():appendInstancesByType(npcs, "Npc") - for k, npc in pairs(npcs) do - npc.DisplayerVisual:updateName() - end - - self:updateActName(instance) - end - end - - - - ------------------------------------------------ - function r2.ActUIDisplayer:onCreate(act) - - local container = self:getContainer() - local comboBox = self:getActComboBox() - - local tree, macroTree - if not act:isBaseAct() then - local text = ucstring() - local index = r2.logicComponents:searchElementIndex(act)-2 - local actTitle = act:getName() - if type(actTitle) ~= "string" then - text:fromUtf8("bad type for title : " .. type(actTitle)) - comboBox:insertText(index, text) - else - text:fromUtf8(actTitle) - comboBox:insertText(index, text) - end - - tree = self:findFreeTreeCtrl() - macroTree = self:findFreeTreeCtrl(true) - local actTable = self:getActTable() - table.insert(actTable, index+1, { Act = act, Tree = tree , MacroTree = macroTree}) - end - - -- store tree in the act for future insertion of items - act.User.ContentTree = tree - act.User.MacroContentTree = macroTree - self:updateCurrentActQuota() - - -- add permanent nodes to act node - r2:defaultUIDisplayer():addPermanentNodes() - end - - ------------------------------------------------ - function r2.ActUIDisplayer:onPostCreate(act) - -- when a new act is created, select this act as the default - if act.InstanceId == self.LastSelfCreatedActInstanceId then - -- the act was just created by pionner on that computer, so change right now - r2.ScenarioWindow:setAct(act) - self.LastSelfCreatedActInstanceId = nil - end - r2.ScenarioWindow:updateUIFromCurrentAct() - self:updateCurrentActQuota() - end - - ------------------------------------------------ - function r2.ActUIDisplayer:onErase(erasedAct) - -- clean tree content - local tree = erasedAct.User.ContentTree - local macroTree = erasedAct.User.MacroContentTree - if tree then - r2:cleanTreeNode(tree, "people") - r2:cleanTreeNode(tree, "creatures") - end - if macroTree then - --r2:cleanTreeNode(macroTree, "macro_components") - r2:cleanTreeRootNode(macroTree) - end - local actTable = self:getActTable() - for index, entry in pairs(actTable) do - if entry.Act == erasedAct then - self:getActComboBox():removeTextByIndex(index - 1) - table.remove(actTable, index) - return - end - end - - self:updateCurrentActQuota() - end - ------------------------------------------------ - function r2.ActUIDisplayer:getActTable() - return self.ActTable - end - - ------------------------------------------------ - function r2.ActUIDisplayer:getContainer() - return getUI("ui:interface:r2ed_scenario") - end - - ------------------------------------------------ - function r2.ActUIDisplayer:getActComboBox() - return self:getContainer():find("act_combo_box") - end - - ----------------------------------------------- - function r2.ActUIDisplayer:findFreeTreeCtrl(macroTree) - - local treeName = "act_tree_" - if macroTree==true then treeName="macro_act_tree_" end - for i = 0, r2:getMaxNumberOfAdditionnalActs() - 1 do - local tree = self:getContainer():find(treeName .. tostring(i)) - local used = false - for index, entry in pairs(self:getActTable()) do - local entryTree = entry.Tree - if macroTree==true then entryTree = entry.MacroTree end - if entryTree == tree then - used = true - break - end - end - if not used then - return tree - end - end - return nil - end - - -function r2:createActUIDisplayer() - return r2.ActUIDisplayer -end - diff --git a/code/ryzom/common/data_common/r2/r2_ui_dm_gift.lua b/code/ryzom/common/data_common/r2/r2_ui_dm_gift.lua deleted file mode 100644 index cdc8aec1d..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_dm_gift.lua +++ /dev/null @@ -1,128 +0,0 @@ --- Handlers for dm gift interface - - -r2.DMGift = -{ - ChosenSlotIndex = 0, -- index of the slot on which the user clicked to choose a plot item -} - - - -local noItemModalUIPath = "ui:interface:r2ed_dm_gift_no_plot_items" -- item browser with msg 'no available items' -local chooseItemModalUIPath = "ui:interface:r2ed_dm_gift_choose_plot_item" -- item browser -local chooseItemQuantityModalUIPath = "ui:interface:r2ed_choose_plot_item_quantity" -- quantity modal -local dmGiftUIPath = "ui:interface:r2ed_dm_gift" -- dm gift window - --------------------------------------------------------------------------------- --- The DM has clicked on a slot, prompt the interface to choose a plot item (is some are availables) -function r2.DMGift:onSlotClicked(index) - -- if not plot item are avilable, prompt a special interface to tell how to add them - if getDbProp("LOCAL:R2:PLOT_ITEMS:0:SHEET") == 0 then - enableModalWindow(getUICaller(), noItemModalUIPath) - return - end - enableModalWindow(getUICaller(), chooseItemModalUIPath) - self.ChosenSlotIndex = index -end - --------------------------------------------------------------------------------- --- an item has been chosen in the plot item list -function r2.DMGift:setDMGiftItem(slot, sheetId, quantity) - setDbProp("LOCAL:R2:DM_GIFT:" .. tostring(slot) .. ":SHEET", sheetId) - setDbProp("LOCAL:R2:DM_GIFT:" .. tostring(slot) .. ":QUANTITY", quantity) -end - - --------------------------------------------------------------------------------- --- an item has been chosen in the plot item list -function r2.DMGift:onItemChosen(sheetName) - if sheetName ~= "UI:EMPTY" then - local sheetId = getDbProp(sheetName..":SHEET") - -- prompt the quantity dialog unless 'ctrl' is down, in which case - -- a single item is added - if not isCtrlKeyDown() then - setDbProp("LOCAL:R2:CURR_PLOT_ITEM:SHEET", sheetId) - enableModalWindow(getUICaller(), chooseItemQuantityModalUIPath) - local editBox = getUI(chooseItemQuantityModalUIPath):find("eb") - editBox.input_string = "1" - setCaptureKeyboard(editBox) - editBox:setSelectionAll() - else - self:setDMGiftItem(self.ChosenSlotIndex, sheetId, 1) - end - else - -- directly send message to clear the slot - self:setDMGiftItem(self.ChosenSlotIndex, 0, 0) - end -end - --------------------------------------------------------------------------------- --- an item has been chosen in the plot item list -function r2.DMGift:onValidateQuantity() - disableModalWindow() - local sheetId = getDbProp("LOCAL:R2:CURR_PLOT_ITEM:SHEET") - local editBox = getUI(chooseItemQuantityModalUIPath):find("eb") - local quantity = tonumber(editBox.input_string) - if quantity == 0 then sheetId = 0 end - if quantity > 99 then quantity = 99 end - self:setDMGiftItem(self.ChosenSlotIndex, sheetId, quantity) -end - --------------------------------------------------------------------------------- --- the server has required that the dm gift window be shown -function r2.DMGift:cancelModals() - if getUI(noItemModalUIPath).active or - getUI(chooseItemModalUIPath).active or - getUI(chooseItemQuantityModalUIPath).active - then - disableModalWindow() - end -end - - --------------------------------------------------------------------------------- --- the server has required that the dm gift window be shown -function r2.DMGift:begin() - local wnd = getUI(dmGiftUIPath) - if wnd.active then - -- just hide the window - self:cancel() - return - end - -- show the window - self:cancelModals() - wnd.active = true - wnd:center() - wnd:blink(1) - -- clear all slots - for k = 0, 7 do - self:setDMGiftItem(k, 0, 0) - end - runAH(nil, "r2ed_dm_gift_begin", "") -end - --------------------------------------------------------------------------------- --- the server has required that the dm gift window be stopped -function r2.DMGift:validate() - -- hide the windows - self:cancelModals() - getUI(dmGiftUIPath).active = false - -- send server msg - runAH(nil, "r2ed_dm_gift_validate", "") -end - --------------------------------------------------------------------------------- --- force to cancel the current dm gift -function r2.DMGift:cancel() - -- hide the window - self:cancelModals() - getUI(dmGiftUIPath).active = false -end - - - - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_ui_event_handlers.lua b/code/ryzom/common/data_common/r2/r2_ui_event_handlers.lua deleted file mode 100644 index f043db5d9..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_event_handlers.lua +++ /dev/null @@ -1,1394 +0,0 @@ --------------- --------------- --- GROUPING -- --------------- --------------- - - - --- TODO nico : find a better file organisation for ui & logic handling --- TODO nico : most of these global function should be made class members --- TODO nico : some other part are API to the C++ : these would better fit in a separate, dedicated file. - -r2.MaxGroupRadius = 20 - -function r2.checkGroupDistance(instanceId, targetId) - assert(instanceId) - if not targetId then targetId = instanceId end - assert(targetId) - local target = r2:getInstanceFromId(targetId) - local npc = r2:getInstanceFromId(instanceId) - local group = target.ParentInstance - assert(group) - -- The two npc are not grouped - if not group:isKindOf("NpcGrpFeature") then - local leader = target - local npcPosX = npc.Position.x - local npcPosY = npc.Position.y - - local leaderPosX = leader.Position.x - local leaderPosY = leader.Position.y - - local x = (npcPosX - leaderPosX)^2 --* (npcPosX - leaderPosX) - local y = (npcPosY - leaderPosY)^2 --* (npcPosY - leaderPosY) - - - local dist = math.sqrt(x + y) - if dist > r2.MaxGroupRadius then return false end - - - - - - - return true - end - - local size = table.getn(group.Components) - local i = 0 - for i = 0, size-1 do - local leader = group.Components[i] - if npc and leader and npc.Position and leader.Position then - local npcPosX = npc.Position.x - local npcPosY = npc.Position.y - local leaderPosX = leader.Position.x - local leaderPosY = leader.Position.y - - local x = (npcPosX - leaderPosX)^2 --* (npcPosX - leaderPosX) - local y = (npcPosY - leaderPosY)^2 --* (npcPosY - leaderPosY) - - local dist = math.sqrt(x + y) - if dist > r2.MaxGroupRadius then return false end - end - end - return true -end - - - -function r2.checkLeaderDistAndUngroup(instanceId) - local ok = r2.checkGroupDistance(instanceId) - if not ok then r2:ungroup(movedNpc) end -end ------------------------------------------------------------------------------------- --- test if an object can be grouped with 'target' --- 'src' must be a an entity --- 'target' may be another entity or a group -function r2:testCanGroup(src, target) - if target:isSameObjectThan(src) then return false end -- can't group itself - - if src:getCategory() ~= target:getCategory() or - src:getSubCategory() ~= target:getSubCategory() - then - return false - end - if target:isKindOf("Npc") then - if target:isBotObject() or target:isPlant() then return false end -- can't group bot objects together - -- if instance is in a group, then can't goup with an instance of the same group - if not src:isInDefaultFeature() then - return target.ParentInstance ~= src.ParentInstance - end - if r2.checkGroupDistance(src.InstanceId, target.InstanceId) == false then return false end - return true - elseif target:isKindOf("NpcGrpFeature") then - -- can group if src is not already in the same group - if not src:isInDefaultFeature() then - return target ~= src.ParentInstance - end - local leader = r2:getInstanceFromId(target.Components[0].InstanceId) - assert(leader) - if r2.checkGroupDistance(src.InstanceId, leader.InstanceId) == false then return false end - return true - end -end - -function r2:testCanGroupSelectedInstance(targetInstanceId) - return r2:testCanGroup(r2:getSelectedInstance(), r2:getInstanceFromId(targetInstanceId)) -end - - ------------------------------------------------------------------------------------- --- group an entity with another entity or group --- 'src' must be a an entity --- 'target' may be another entity or a group -function r2:group(src, target) - - r2.requestNewAction(i18n.get("uiR2EDGroupAction")) - - if target:getParentAct() ~= src:getParentAct() then - src:togglePermanentCurrentAct(false) - end - - --debugInfo(colorTag(0, 255, 255) .. "Grouping instance " .. src.InstanceId .. " with instance or group " .. target.InstanceId) - -- remove previous behavior (when grouped, only the group has a behavior, not his members) - -- if target has no group then create a new group - local targetGroup - if target:isKindOf("NpcGrpFeature") then - targetGroup = target - -- recompute relative position - src:requestMakePosRelativeTo(targetGroup) - elseif target:isInDefaultFeature() then - assert(target:isKindOf("Npc")) - --r2.requestSetNode(target.Behavior.InstanceId, "Type", "") - -- create a new group - -- debugInfo(colorTag(255, 255, 0) .. "Creating new group") - local newGroup = r2.newComponent("NpcGrpFeature") - local uc_groupName = ucstring() - uc_groupName:fromUtf8(r2.PaletteIdToGroupTranslation[src.Base].. " " .. i18n.get("uiR2EDNameGroup"):toUtf8()) - local groupName = r2:genInstanceName(uc_groupName):toUtf8() - newGroup.Name = groupName - - --r2.requestSetNode(target.Behavior.InstanceId, "Type", "") - --newGroup.Behavior.Type = src.Behavior.Type - --newGroup.Behavior.ZoneId = src.Behavior.ZoneId - __tmpNewGroup = newGroup - --runCommand("luaObject", "__tmpNewGroup", maxDepth) - __tmpNewGroup = nil - -- create new group - --r2.requestInsertNode(src:getParentAct().InstanceId, "Features", -1, "", newGroup) - r2.requestInsertNode(target:getParentAct().InstanceId, "Features", -1, "", newGroup) - -- move the target instance into that group - r2.requestMoveNode(target.InstanceId, "", -1, newGroup.InstanceId, "Components", -1) - targetGroup = newGroup - else - --debugInfo(colorTag(255, 0, 255) .. "Group already created") - targetGroup = target.ParentInstance - -- recompute relative position - src:requestMakePosRelativeTo(targetGroup) - end - -- is src is in a group then ungroup before doing the move - if not src:isInDefaultFeature() then - r2:ungroup(src) - end - -- nico patch : locaaly mark the entity so that it can't be grouped again before net msg is received - src.User.Grouped = true - -- force update of the available options - if src == r2:getSelectedInstance() then - r2.ContextualCommands:update() - end - -- move the selected instance into the target group - r2.requestMoveNode(src.InstanceId, "", -1, targetGroup.InstanceId, "Components", -1) - --r2.requestSetNode(src.Behavior.InstanceId, "Type", "") -end - ------------------------------------------------------------------------------------- --- group the selected instance with the given instance -function r2:groupSelectedInstance(instanceId) - r2:group(r2:getSelectedInstance(), r2:getInstanceFromId(instanceId)) -end - ------------------------------------------------------------------------------------- --- ungroup a npc -function r2:ungroup(instance) - - r2.requestNewAction(i18n.get("uiR2EDUngroupAction")) - if instance == nil then - debugInfo(colorTag(255, 255, 0) .. "No selected instance") - return - end - - local target = instance:getParentAct():getDefaultFeature() - --debugInfo(colorTag(255, 255, 0) .. "Parent group size is " .. tostring(instance.Parent.Size)) - if instance.Parent.Size <= 2 then - -- debugInfo(colorTag(255, 255, 0) .. "Empty group left, removing it") - -- this was the last object of the group, so remove the group - local groupId = instance.ParentInstance.InstanceId - local parentTable = instance.Parent -- must keep pointer on parent because parent will be changed - -- a son is moved - for i = parentTable.Size - 1, 0, -1 do - parentTable[i]:requestMakePosRelativeTo(target) - r2.requestMoveNode(parentTable[i].InstanceId, "", -1, instance:getParentAct():getDefaultFeature().InstanceId, "Components", -1) - end - --debugInfo(colorTag(255, 255, 0) .. "request erase node") - r2.requestEraseNode(groupId, "", -1) - else - -- make pos relative to the new target - instance:requestMakePosRelativeTo(target) - r2.requestMoveNode(instance.InstanceId, "", -1, target.InstanceId, "Components", -1) - --give a new Behavior to the degrouped member - --r2.requestSetNode(instance.InstanceId,"Behavior",r2.newComponent("Behavior")) - end -end - - ------------------------------------------------------------------------------------- --- set instance as the new leader of its group -function r2:setAsGroupLeader(instance) - r2.requestNewAction(i18n.get("uiR2EDSetAsLeaderAction")) - if instance:isInDefaultFeature() then - debugInfo("Instance is not in a group, can't set as leader") - return - end - --local oldLeader = instance.ParentInstance.Components[0] - --if (oldLeader:isSameObjectThan(instance)) then return end - -- copy behaviour from the entity (becomes the group behavior) - --r2:setActivityType(instance.Behavior, oldLeader.Behavior.Type, oldLeader.Behavior.ZoneId) - --r2:setActivityType(oldLeader.Behavior, "", "") - -- put leader in first position of the group - r2.requestMoveNode(instance.InstanceId, "", -1, instance.ParentInstance.InstanceId, "Components", 0) -end - - -------------------- -------------------- --- NPC BEHAVIOR -- -------------------- -------------------- - ------------------------------------------------------------------------------------- -function r2:testCanPickZoneForNPC(instanceId) - local targetInstance = r2:getInstanceFromId(instanceId) - --if targetInstance:isKindOf("WayPoint") or targetInstance:isKindOf("RegionVertex") or - -- targetInstance:isKindOf("Region") or targetInstance:isKindOf("Road") - if targetInstance:isKindOf("RegionVertex") or targetInstance:isKindOf("Region") then - return true - end - return false -end - ------------------------------------------------------------------------------------- -function r2:testCanPickRoadForNPC(instanceId) - - local targetInstance = r2:getInstanceFromId(instanceId) - if targetInstance:isKindOf("WayPoint") or targetInstance:isKindOf("Road") - then - return true - end - return false -end - - ------------------------------------------------------------------------------------- ---if instance is a grouped npc, return the leader's behavior ---else, return the npc's behavior -function r2:getBehavior(instance) - return r2:getLeader(instance).Behavior -end - ------------------------------------------------------------------------------------- -function r2:getLeader (instance) - --local grouped = not instance:isInDefaultFeature() - local grouped = instance:isGrouped() - if grouped == true then - local group = instance.ParentInstance - assert(group ~=nil) - instance = group.Components[0] - elseif instance:isKindOf("NpcGrpFeature") then - instance = instance.Components[0] - end - return instance -end - ------------------------------------------------------------------------------------- ---the arguments must be verified before calling this function ---function r2:setActivityType(behaviorObject, activity, zoneInstanceId) --- r2.requestSetNode(behaviorObject.InstanceId, "Type", activity) --- r2.requestSetNode(behaviorObject.InstanceId, "ZoneId", zoneInstanceId) ---end - - ------------------------------------------------------------------------------------- ---function r2:affectZoneToNPC(npcInstanceId, zoneInstanceId) --- local npcInstance = r2:getInstanceFromId(npcInstanceId) --- if npcInstance == nil then --- debugInfo("No target npc") --- return --- end --- local behavior = r2:getBehavior(npcInstance) --- local activity --- local targetInstance = r2:getInstanceFromId(zoneInstanceId) --- if targetInstance:isKindOf("WayPoint") or targetInstance:isKindOf("RegionVertex") then --- debugInfo(colorTag(255, 255, 0) .. "Selecting parent from WayPoint of RegionVertex") --- targetInstance = targetInstance.ParentInstance --- end --- r2:blink(targetInstance) --- if targetInstance:isKindOf("Road") then --- activity = "follow_route" --- else --- activity = "wander" --- end --- local act = npcInstance:getParentAct() --- if act~= nil --- then - --debugInfo(colorTag(255,0,0).."act class: "..act.Class) --- else --- debugInfo(colorTag(255,0,0).."act niiil!! ") --- end --- r2:setActivityType(behavior,activity,targetInstance.InstanceId) ---end - - - -function r2:affectZoneToSelectedNPC(zoneInstanceId) - local npcInstanceId = r2:getLeader(r2:getSelectedInstance()).InstanceId - --r2:affectZoneToNPC(npcInstanceId, zoneInstanceId) - r2:setBehaviorToNPC(npcInstanceId, zoneInstanceId, "Wander") -end - -function r2:affectRestZoneToSelectedNPC(zoneInstanceId) - local npcInstanceId = r2:getLeader(r2:getSelectedInstance()).InstanceId - --r2:affectZoneToNPC(npcInstanceId, zoneInstanceId) - r2:setBehaviorToNPC(npcInstanceId, zoneInstanceId, "Rest In Zone") -end - -function r2:affectFeedZoneToSelectedNPC(zoneInstanceId) - local npcInstanceId = r2:getLeader(r2:getSelectedInstance()).InstanceId - --r2:affectZoneToNPC(npcInstanceId, zoneInstanceId) - r2:setBehaviorToNPC(npcInstanceId, zoneInstanceId, "Feed In Zone") -end - -function r2:affectHuntZoneToSelectedNPC(zoneInstanceId) - local npcInstanceId = r2:getLeader(r2:getSelectedInstance()).InstanceId - --r2:affectZoneToNPC(npcInstanceId, zoneInstanceId) - r2:setBehaviorToNPC(npcInstanceId, zoneInstanceId, "Hunt In Zone") -end - -function r2:affectGuardZoneToSelectedNPC(zoneInstanceId) - local npcInstanceId = r2:getLeader(r2:getSelectedInstance()).InstanceId - --r2:affectZoneToNPC(npcInstanceId, zoneInstanceId) - r2:setBehaviorToNPC(npcInstanceId, zoneInstanceId, "Guard Zone") -end - - - - - ------------------------------------------------------------------------------------- -function r2:createZoneAndAffectBehaviorToNPC(startX, startY, startZ, primLook, primInvalidLook, primCanCloseLook, affectFunction, activity) - if affectFunction == nil then - dumpCallStack(1) - assert(false) - end - - r2.requestNewPendingMultiAction(i18n.get("uiR2EDAddActivityAction"), 3) - - -- TODO nico : use co-routine here instead of the callback stuff... - local npcInstanceId = r2:getSelectedInstance().InstanceId - local selectInstance = false - local params = - { - Look = primLook, - InvalidLook = primInvalidLook, - CanCloseLook = primCanCloseLook, - Vertices = { { x = startX, y = startY, z = startZ } }, -- start with single vertex where the user clicked - CookieKey = "CreateFunc", -- special function called by the road/region displayer when it is created - CookieValue = function(primitive) - -- this is a pending action with 3 steps here - affectFunction(r2, npcInstanceId, primitive.InstanceId, activity) - end, - SelectInstance = selectInstance, -- when road or place is created to associate new activity to a NPC, - -- it must not be selected - OnCancel = function() - r2.requestCancelAction() - end - } - if params.CanCloseLook and params.CanCloseLook.Shape == r2.PrimRender.Shape.ClosedPolyLine then - params.Type = "Region" - else - params.Type = "Route" - end - r2:setCurrentTool("R2::CToolDrawPrim", params) - --debugInfo("createZoneAndAffectBehaviorToNPC END") -end - - ------------------------------------------------------------------------------------- -function r2:createZoneAndAffectZoneToNPC(startX, startY, startZ) - r2:createZoneAndAffectBehaviorToNPC(startX, startY, startZ, r2.PrimRender.RegionCreateLook, r2.PrimRender.RegionCreateInvalidLook, r2.PrimRender.RegionCreateCanCloseLook, r2.setBehaviorToNPC, "Wander") -end - -function r2:createRestZoneAndAffectZoneToNPC(startX, startY, startZ) - r2:createZoneAndAffectBehaviorToNPC(startX, startY, startZ, r2.PrimRender.RegionCreateLook, r2.PrimRender.RegionCreateInvalidLook, r2.PrimRender.RegionCreateCanCloseLook, r2.setBehaviorToNPC, "Rest In Zone") -end - -function r2:createFeedZoneAndAffectZoneToNPC(startX, startY, startZ) - r2:createZoneAndAffectBehaviorToNPC(startX, startY, startZ, r2.PrimRender.RegionCreateLook, r2.PrimRender.RegionCreateInvalidLook, r2.PrimRender.RegionCreateCanCloseLook, r2.setBehaviorToNPC, "Feed In Zone") -end - -function r2:createHuntZoneAndAffectZoneToNPC(startX, startY, startZ) - r2:createZoneAndAffectBehaviorToNPC(startX, startY, startZ, r2.PrimRender.RegionCreateLook, r2.PrimRender.RegionCreateInvalidLook, r2.PrimRender.RegionCreateCanCloseLook, r2.setBehaviorToNPC, "Hunt In Zone") -end - -function r2:createGuardZoneAndAffectZoneToNPC(startX, startY, startZ) - r2:createZoneAndAffectBehaviorToNPC(startX, startY, startZ, r2.PrimRender.RegionCreateLook, r2.PrimRender.RegionCreateInvalidLook, r2.PrimRender.RegionCreateCanCloseLook, r2.setBehaviorToNPC, "Guard Zone") -end - ------------------------------------------------------------------------------------- -function r2:setBehaviorToNPC(npcInstanceId, zoneInstanceId, activity) - - local npcInstance = r2:getInstanceFromId(npcInstanceId) - if npcInstance == nil then return end - - local behavior = r2:getBehavior(npcInstance) - local targetInstance = r2:getInstanceFromId(zoneInstanceId) - - if targetInstance:isKindOf("WayPoint") or targetInstance:isKindOf("RegionVertex") then - zoneInstanceId = targetInstance.ParentInstance.InstanceId - end - - local act = npcInstance:getParentAct() - if act~= nil - then - --debugInfo(colorTag(255,0,0).."act class: "..act.Class) - else - debugInfo(colorTag(255,0,0).."act niiil!! ") - end - - r2.activities:initEditorAfterFirstCall() - - local tableInit = {} - tableInit.Activity = activity - tableInit.ActivityZoneId = zoneInstanceId - if activity=="Follow Route" or activity=="Repeat Road" or activity=="Patrol" then - tableInit.TimeLimit = "No Limit" - tableInit.TimeLimitValue = "0" - else - tableInit.TimeLimit = "Few Sec" - tableInit.TimeLimitValue = "20" - end - - if activity=="Repeat Road" or activity=="Patrol" then - tableInit.RoadCountLimit = "2" - end - -- if current display mode for prim is 'hide all', then force to 'contextual' at - if r2.PrimDisplayVisible == false then - r2:primDisplayShowContextual() - displaySystemInfo(i18n.get("uiR2EDPrimDisplayModeChangedToContextual"), 'BC') - end - if not r2.activities:newElementInst(tableInit) then return end -end - -function r2:setBehaviorToSelectedNPC(zoneInstanceId, activity) - local npcInstanceId = r2:getLeader(r2:getSelectedInstance()).InstanceId - r2:setBehaviorToNPC(npcInstanceId, zoneInstanceId, activity) -end - ------------------------------------------------------------------------------------- -function r2:setBehaviorFollowRouteToNPC(roadInstanceId) - r2:setBehaviorToSelectedNPC(roadInstanceId, "Follow Route") -end - -function r2:createRouteAndSetBehaviorFollowRouteToNPC(startX, startY, startZ) - r2:createZoneAndAffectBehaviorToNPC(startX, startY, startZ, r2.PrimRender.RoadCreateLook, r2.PrimRender.RoadCreateInvalidLook, nil, self.setBehaviorToNPC, "Follow Route") -end - - ------------------------------------------------------------------------------------- -function r2:setBehaviorPatrolRouteToNPC(roadInstanceId) - r2:setBehaviorToSelectedNPC(roadInstanceId, "Patrol") -end - -function r2:createRouteAndSetBehaviorPatrolRouteToNPC(startX, startY, startZ) - r2:createZoneAndAffectBehaviorToNPC(startX, startY, startZ, r2.PrimRender.RoadCreateLook, r2.PrimRender.RoadCreateInvalidLook, nil, self.setBehaviorToNPC, "Patrol") -end - - ------------------------------------------------------------------------------------- -function r2:setBehaviorRepeatRoadToNPC(roadInstanceId) - r2:setBehaviorToSelectedNPC(roadInstanceId, "Repeat Road") -end - -function r2:createRoadAndSetBehaviorRepeatRoadToNPC(startX, startY, startZ) - r2:createZoneAndAffectBehaviorToNPC(startX, startY, startZ, r2.PrimRender.RoadCreateLook, r2.PrimRender.RoadCreateInvalidLook, nil, self.setBehaviorToNPC, "Repeat Road") -end - - ------------------------------------------------------------------------------------- -function r2:setNPCStandInPlace(instance) - - r2.activities:initEditorAfterFirstCall() - - local tableInit = {} - tableInit.Activity = "Stand Still" - tableInit.ActivityZoneId = "" - tableInit.TimeLimit = "Few Sec" - tableInit.TimeLimitValue = "20" - if not r2.activities:newElementInst(tableInit) then return end -end - - ----------------- ----------------- --- MENU SETUP -- ----------------- ----------------- - - ------------------------------------------------------------------------------------- -function r2:selectParent(index) - local parent = r2:getSelectedInstance() - for i = 1,index do - parent = parent.ParentInstance - if parent == nil then return end - end - r2:setSelectedInstanceId(parent.InstanceId) -end - - -------------------- -------------------- --- COPY AND PASTE -- -------------------- -------------------- - ------------------------------------------------------------------------------------- --- called by C++ when copy has been pressed (key or ui button) -function r2:copy() - local selection = r2:getSelectedInstance() - if selection == nil then - displaySystemInfo(i18n.get("uiR2EDCantCopyEmptySelection"), "BC") - return - end - if not selection:isCopyable() then - displaySystemInfo(i18n.get("uiR2EDSelectionDoNotSupportCopy"), "BC") - return - end - r2.ClipBoard = selection:copy() - r2.ClipBoardSrcInstanceId = selection.InstanceId - r2.ClipBoardDisplayName = selection:getDisplayName() - displaySystemInfo(concatUCString(selection:getDisplayName(), i18n.get("uiR2EDSelectionCopied")), "BC") -end - ------------------------------------------------------------------------------------- --- called by C++ when copy has been pressed (key or ui button) -function r2:paste() - r2.requestNewAction(concatUCString(i18n.get("uiR2EDPasteAction"), r2.ClipBoardDisplayName)) - if r2.ClipBoard == nil then - displaySystemInfo(i18n.get("uiR2EDEmptyClipBoard"), "BC") - return - end - -- call the paste function (not a method here) - local newCopy = r2.Classes[r2.ClipBoard.Class].newCopy(r2.ClipBoard) - r2.requestNewAction(concatUCString(i18n.get("uiR2EDPasteAction"), r2.ClipBoardDisplayName)) - r2.Classes[r2.ClipBoard.Class].paste(newCopy, true, r2.ClipBoardSrcInstanceId) - r2.requestEndAction() -end - --- tmp tmp for debug -function doublePaste() - debugInfo("1 " .. tostring(r2.UIMainLoop.LeftQuotaModified)) - r2:paste() - debugInfo("2 " .. tostring(r2.UIMainLoop.LeftQuotaModified)) - r2:paste() - debugInfo("3 " .. tostring(r2.UIMainLoop.LeftQuotaModified)) -end - - --- tmp tmp for debug -function testPaste() - for k = 1, 99 do - r2:paste() - end -end - - - ---r2.CuttedSelectionId = "" -- instance id for the selection to be cutted --- ------------------------------------------------------------------------------------- ---function r2:getCuttedSelection() --- return r2:getInstanceFromId(self.CuttedSelectionId) --- end --------------------------------------------------------------------------------------- ---function r2:cut(instance) --- local oldSelection = r2:getCuttedSelection() --- if oldSelection and oldSelection.DisplayerUI then --- oldSelection.DisplayerUI:onCut(oldSelection, false) -- not cut anymore --- end --- if instance then --- r2.CuttedSelectionId = instance.InstanceId --- else --- r2.CuttedSelectionId = "" --- end --- local newSelection = r2:getCuttedSelection() --- if newSelection and newSelection.DisplayerUI then --- newSelection.DisplayerUI:onCut(newSelection, true) -- new instance being cut --- end ---end --- --------------------------------------------------------------------------------------- ---function r2:paste() --- local target = r2:getSelectedInstance() --- local src = r2:getCuttedSelection() --- assert(target) --- assert(src) --- r2:cut(nil) --- -- check that target accept the paste --- assert(target.accept) --- local destArray = target:accept(src) --- -- do the move --- if target.insert ~= nil then --- -- if an 'insert' then use it to do the insertion --- target:insert(src) --- else --- -- else just move the node at the end of the array --- assert(type(destArray) == "string") --- r2.requestMoveNode(src.InstanceId, "", -1, target.InstanceId, destArray, -1) --- end ---end - ------------------------- ------------------------- --- INSTANCE SELECTION -- ------------------------- ------------------------- - ------------------------------------------------------------------------------------- --- called by the framework when an instance is selected -function r2:onSelectInstance(instance) - --local st = nltime.getPreciseLocalTime() - if instance then - instance:onSelect() - -- reset slect bar type - r2.SelectBar.InstancesType = instance:getSelectBarType() - end - if r2.isPropertyWindowVisible() then - r2:showProperties(instance) - end - r2.CustomBBox:updateUI() - r2.ContextualCommands:setupToolbar(instance) - r2.MiniToolbar:setupToolbar(instance) - if not instance then - r2.ContextualCommands:setupMenu(nil) - end - r2.SelectBar:touch() - r2.SelectBar:getBar().active = (instance ~= nil and not instance.Ghost)-- ensure that 'active' is properly set for the select bar - -- (do not wait per frame update) - getUI("ui:interface:r2ed_select_bar"):updateCoords() - getUI("ui:interface:r2ed_contextual_toolbar_new"):updateCoords() - getUI("ui:interface:r2ed_mini_activity_view"):updateCoords() - --local et = nltime.getPreciseLocalTime() - --debugInfo("select instance : " .. tostring(1000 * (et - st)) .." ms") -end - - ------------------------------------------------------------------------------------- ---function r2:showEditOrTestButton(isEdition) --- if isEdition == nil then --- debugInfo(debug.traceback()) --- end --- local editButton = getUI("ui:interface:r2ed_toolbar_admin:r2ed_tool_go_edition") --- if editButton then editButton.active = not isEdition end --- local testButton = getUI("ui:interface:r2ed_toolbar_admin:r2ed_tool_go_test") --- if testButton then testButton.active = isEdition end ---end - - - ------------------------------------------------------------------------------------- ---function r2:setEditorMode(isEdition) --- -- tmp hack here to know what is the current mode --- if isEdition then --- r2:setupUIForEdition() --- else --- r2:setupUIForTest() --- end --- --r2:showEditOrTestButton(isEdition) --- r2.IsEdition = isEdition ---end - - ---------------- ---------------- --- MAIN MENU -- ---------------- ---------------- - ------------------------------------------------------------------------------------- -function r2:popMainMenu() - - r2:setCurrentTool('') - local menuName = select(r2.Mode == "Edit", "ui:interface:r2ed_main_menu", "ui:interface:r2ed_main_menu_animation") - --runAH(nil, "active_menu", "menu=" .. menuName) - launchContextMenuInGame(menuName) - local menu = getUI(menuName) - assert(menu) - local function buildKeyName(action, params) - local keyName = ucstring(runExpr(string.format("getKey('%s', '%s')", action, params))) - assert(isUCString(keyName)) - if keyName == i18n.get("uiNotAssigned") then - -- no associated key... - return keyName - else - local result = concatUCString(ucstring("(") , keyName, ucstring(")")) - --debugInfo(result:toUtf8()) - return result - end - end - -- fill menu entries common to edition & test - menu:find("preferences_key").t.uc_hardtext = buildKeyName("show_hide", "game_config") - menu:find("keys_key").t.uc_hardtext = buildKeyName("show_hide", "keys") - --menu:find("debug_console_key").t.uc_hardtext = buildKeyName("show_hide", "debug_info") - menu:find("chat_window_key").t.uc_hardtext = buildKeyName("show_hide", "main_chat") - menu:find("quit_key").t.uc_hardtext = buildKeyName("quit_ryzom_now", "") - menu:find("mail_box_key").t.uc_hardtext = buildKeyName("show_hide", "mailbox") - menu:find("guild_forum_key").t.uc_hardtext = buildKeyName("show_hide", "guild_forum") - -- fill name of key for each menu entry - if r2.Mode == "Edit" then - menu:find("go_test_key").t.uc_hardtext = buildKeyName("r2ed_try_go_test", "") - menu:find("palette_key").t.uc_hardtext = buildKeyName("show_hide", "r2ed_palette") - menu:find("scenario_key").t.uc_hardtext = buildKeyName("show_hide", "r2ed_scenario") - menu:find("cust_bbox").active = (config.R2EDExtendedDebug == 1) - else - menu:find("stop_test_key").t.uc_hardtext = buildKeyName("r2ed_stop_test", "") - menu:find("stop_test").active = (r2.AccessMode == "Editor") - end - - if r2.Mode ~= "Edit" then - menu:find("live").active = not (r2.AccessMode == "Editor") - menu:find("stop_live").active = not (r2.AccessMode == "Editor") - menu:find("player_admin").active = not (r2.AccessMode == "Editor") - end - - menu:find("map_key").t.uc_hardtext = buildKeyName("show_hide", "map") - menu:find("debug_console").active = (config.R2EDExtendedDebug == 1) - - menu:find("fixed_lighting_bm").bm.texture = select(r2:getFixedLighting(), "r2_icon_light_on_small.tga", "r2_icon_light_off_small.tga") - menu:find("toggle_fixed_lighting").hardtext = select(r2:getFixedLighting(), "uiR2EDTurnLightOff", "uiR2EDTurnLightOn") - - -- setup position - local scrW, scrH = getWindowSize() - menu:updateCoords() - menu.x = scrW - menu.w_real - menu.y = 28 - menu:updateCoords() -end - --- called by main menu in edition mode to go to test mode -function r2:tryGoTest() - - -- remove any keyboard focus so that any editbox properties will be updated correctly - resetCaptureKeyboard() - - r2.acts.deleteOldScenario = true - - r2:defaultUIDisplayer():storeClosedTreeNodes() - - if r2:getLeftQuota() < 0 then - messageBox(i18n.get("uiR2EDCantGoTest")) - return - end - -- freeze go test in menu & button - local goTestButton = getUI("ui:interface:r2ed_toolbar"):find("r2ed_tool_start").unselected.button - local goTestMenu = getUI("ui:interface:r2ed_main_menu"):find("go_test") - if not goTestButton.frozen or goTest.grayed then - goTestButton.frozen = true - goTestMenu.grayed = true - runAH(nil, "r2ed_go_test", "") - end -end - ------------------------------- ------------------------------- --- NO MORE ROOM IN SCENARIO -- ------------------------------- ------------------------------- - --- called by C++ (or lua) to signal that there's no more room to create new entities -function r2:makeRoomMsg() - displaySystemInfo(i18n.get("uiR2EDMakeRoom"), "BC") -end - - - -local instanceTrees = nil -- private to r2:getInstanceFromUIUnderMouse - --- test if mouse is currently over a widget in the ui that represents an entity in the scenario (used by the pick tool) --- TODO nico : put this in the cpp API !!! -function r2:getInstanceIdFromUIUnderMouse() - -- implemented for the scenario tree only for now ... - -- build pointers on all tree if not already done - if instanceTrees == nil then - instanceTrees = {} - table.insert(instanceTrees, getUI("ui:interface:r2ed_scenario"):find("content_tree_list")) - local maxNumActs = getDefine('r2ed_max_num_additionnal_acts') - for i = 0, r2:getMaxNumberOfAdditionnalActs() - 1 do - table.insert(instanceTrees, getUI("ui:interface:r2ed_scenario"):find("act_tree_" .. tostring(i))) - table.insert(instanceTrees, getUI("ui:interface:r2ed_scenario"):find("macro_act_tree_" .. tostring(i))) - end - end - -- look in all scenario trees .... - for k, v in pairs(instanceTrees) do - if v and v.active then - local node = v:getNodeUnderMouse() - if node then - return node.Id - end - end - end - return nil -end - ----------- ----------- --- ACTS -- ----------- ----------- - --- called by C++ when a new act has been selected -function r2:onActChanged(previousAct, currentAct) - -- update the scenario window - r2.ScenarioWindow:updateUIFromCurrentAct() - -- update the select bar - r2.SelectBar:touch() - - if r2:isScenarioUpdating() then - return - end - - - -- tp if change location - local baseAct = r2.Scenario:getBaseAct() - -- change position - if previousAct and currentAct and baseAct then - - local previousActInstanceId = tostring(r2.Scenario.User.SelectedActInstanceId); - local previousLocationInstanceId = tostring(r2.Scenario.User.SelectedLocationInstanceId) - local currentActInstanceId = tostring(currentAct.InstanceId) - local currentActLocationInstanceId = tostring(currentAct.LocationId) - if currentAct.InstanceId ~= tostring(baseAct.InstanceId) then - r2.Scenario.User.SelectedActInstanceId = tostring(currentAct.InstanceId) - r2.Scenario.User.SelectedLocationInstanceId = tostring(currentAct.LocationId) - debugInfo("Location id: " ..tostring(currentAct.LocationId)) - if ( r2.Scenario.User.SelectedLocationInstanceId ~= previousLocationInstanceId) then - local actIndex = 0 - local k,v = next(r2.Scenario.Acts) - while k do - - if tostring(v.InstanceId) == tostring(currentAct.InstanceId) then - debugInfo("::BEFORE TP::Location id: " ..tostring(currentAct.LocationId)) - r2.requestSetStartingAct(actIndex) - r2.requestTpToEntryPoint(actIndex) - end - actIndex = actIndex + 1 - k,v = next(r2.Scenario.Acts, k) - end - end - end - end -end - - ------------------- ------------------- --- EDITOR MODES -- ------------------- ------------------- - - --- called by C ++ : cleanup tasks when the editor is released -function r2:onFinalRelease() - r2.DMGift:cancel() -- if a dm gift was current, cancel it -end - --- called by C ++ when current mode of the editor is about to change -function r2:onPreModeChanged() - r2.DMGift:cancel() -- if a dm gift was current, cancel it -end - --- Called by the C++ framework when there's a mode change between editing, dm etc --- the r2.Mode variable is changed to one of the following: --- 'Edit' for editing mode --- 'Test' for test mode --- 'DM' for DM mode --- 'GoingToDM' when switching from editing to dm mode (when the transition screen is displayed) --- 'BackToEditing' when switching from dm/test mode to editing (when the transition screen is displayed) - -function r2:onModeChanged() - -- if a form was displayed, just cancel it - if r2.CurrentForm and r2.CurrentForm.active then - r2:cancelForm(r2.CurrentForm) - end - - -- if we're back in edition and there's an error message left, display it now - if r2.Mode == "Edit" and r2.LastTranslationErrorMsg ~= nil then - local str = r2.LastTranslationErrorMsg - assert(type(str) == "string") - local ucStringMsg = ucstring("Translation Error") - --ucStringMsg:fromUtf8(r2.LastTranslationErrorMsg) - displaySystemInfo(ucStringMsg, "BC") - messageBox(str) - r2.LastTranslationErrorMsg = nil - end - - -- reset the list af acts and triggers until they are received - if mode == "Edit" then - r2.AnimGlobals:reset() - end - -end - ---------------------------------------------------------------------------------------------- -------------- -------------- --- WEATHER -- -------------- -------------- - --- pop the weather edition dialog in test mode -function r2:changeWeatherDialog() - local function onOk(form) - setWeatherValue(true) -- back to auto weather - -- send request message to dss - local newWeatherValue = select(form.ManualWeather == 1, form.WeatherValue + 1, 0) - if newWeatherValue ~= getDbProp("SERVER:WEATHER:VALUE") then - r2.requestSetWeather(newWeatherValue) -- predicted weather - end - --if form.Season ~= getDbProp("SERVER:SEASON:VALUE") then - -- r2.requestSetSeason(form.Season) - --end - end - local function onCancel(form) - setWeatherValue(true) -- back to auto weather - end - local params = - { - WeatherValue = getWeatherValue() * 1022, - ManualWeather = select(getDbProp("SERVER:WEATHER:VALUE") ~= 0, 1, 0), - --Season = getServerSeason() - } - r2:doForm("ChangeWeatherForm", params, onOk, onCancel) -end - - --- teleport --- tpPosition when player click on the minimap --- Whe can not use the /a Position command because we need admin power to do it -function r2:activeTeleportTool() - local function posOk(x, y, z) - if config.Local == 1 then - runCommand("pos", x, y, z); - else - r2.requestTpPosition(x, y, z) - end - end - local function posCancel() - debugInfo("Cancel teleport pos") - end - r2:choosePos("", posOk, posCancel, "teleport", "r2ed_tool_can_pick.tga", "r2ed_tool_pick.tga") -end - --- teleport --- tpPosition when player click on the minimap --- Whe can not use the /a Position command because we need admin power to do it -function r2:teleportToTarget() - - local target = r2:getSelectedInstance() - if not target then return end - local pos = r2.getWorldPos(target) - - local x = pos.x - local y = pos.y - local z = pos.z - - local x2, y2, z2 = r2:getUserEntityPosition() - - local dx = (x - x2)^2 --* (npcPosX - leaderPosX) - local dy = (y - y2)^2 --* (npcPosY - leaderPosY) - local dist = math.sqrt(dy + dx) - if dist > 300 then return end - - if config.Local == 1 then - runCommand("pos", x, y, z); - else - r2.requestTpPosition(x, y, z) - end -end - ---------------------------------------------------------------------------------------------- ------------------------- ------------------------- --- TOOLS CONTEXT HELP -- ------------------------- ------------------------- - --- call by C++ to change the context help that is displayed for the current tool -function r2:setToolContextHelp(ucHelp) - --debugInfo(tostring(ucHelp)) - local helpGroup = getUI("ui:interface:r2ed_tool_context_help") - helpGroup.t.uc_hardtext = ucHelp - helpGroup.t:updateCoords() - helpGroup.w = helpGroup.t.w - helpGroup:invalidateCoords() -end - --- call by C++ to display a message saying that the max number of points has been reached --- while drawing a primitive -function r2:noMoreRoomLeftInPrimitveMsg() - local keyName = ucstring(runExpr("getKey('r2ed_context_command', 'commandId=delete')")) - local msg = concatUCString(i18n.get("uiR2EDNoMoreRoomInPrimStart"), - keyName, - i18n.get("uiR2EDNoMoreRoomInPrimEnd")) - displaySystemInfo(msg, "TAGBC") -end - - ---------------------------------------------------------------------------------------------- --------------------- --------------------- --- ANIMATION TIME -- --------------------- --------------------- -function r2:updateAnimBarActions(...) - local arg = {...} - -- forward to the real anim bar - r2.ui.AnimBar:updateActions(arg) -end - - ---------------------------------------------------------------------------------------------- ------------------------- ------------------------- --- UNDO / REDO EVENTS -- ------------------------- ------------------------- - --- called by C++ when an action has been undone -function r2:onUndo(actionUCName) - debugInfo("*undo*") - displaySystemInfo(concatUCString(i18n.get("uiR2EDUndoing"), actionUCName), "BC") - r2.ToolUI:updateUndoRedo() -end - --- called by C++ when an action has been redone -function r2:onRedo(actionUCName) - debugInfo("*redo*") - displaySystemInfo(concatUCString(i18n.get("uiR2EDRedoing"), actionUCName), "BC") - r2.ToolUI:updateUndoRedo() -end - --- called by C++ when a new action has been added in the action historic -function r2:onNewActionAddedInHistoric() - debugInfo("*new action*") - r2.ToolUI:updateUndoRedo() -end - --- called by C++ when an action new pending action has begun -function r2:onCancelActionInHistoric() - r2.ToolUI:updateUndoRedo() -end - --- called by C++ when a new pending action has begun -function r2:onPendingActionBegin() - r2.ToolUI:updateUndoRedo() -end - --- called by C++ when an undo was attempted but failed because there were no actions left in the historic -function r2:onCantUndo(actionUCName) - displaySystemInfo(i18n.get("uiR2EDCantUndo"), "BC") -end - --- called by C++ when a redo was attempted but failed because there are no more actions at the end of the historic -function r2:onCantRedo(actionUCName) - displaySystemInfo(i18n.get("uiR2EDCantRedo"), "BC") -end - --- called by C++ when the action historic has been cleared --- this may happen after scenario version update -function r2:onClearActionHistoric() - r2.ToolUI:updateUndoRedo() -end - - ---------------------------------------------------------------------------------------------- ------------------------- ------------------------- --- DISPLAY MODE MENU -- ------------------------- ------------------------- - --- call by the toolabr button to pop the 'display mode' menu -function r2:popDisplayModeMenu() - local menuName = "ui:interface:r2ed_primitive_display" - local menu = getUI(menuName) - launchContextMenuInGame(menuName) - -- setup position - local parentIcon = getUI("ui:interface:r2ed_toolbar:r2ed_tool_display_mode") - local scrW, scrH = getWindowSize() - -- - menu:find("freeze_all").grayed = not r2.PrimDisplayVisible - menu:find("freeze_all").checked = r2.PrimDisplayFrozen - menu:find("unfreeze_all").grayed = not r2.PrimDisplayVisible - menu:find("unfreeze_all").checked = not r2.PrimDisplayFrozen - menu:find("hide_all").checked = not r2.PrimDisplayVisible - menu:find("show_contextual").checked = (r2.PrimDisplayVisible and r2.PrimDisplayContextualVisibility) - menu:find("show_all").checked = (r2.PrimDisplayVisible and not r2.PrimDisplayContextualVisibility) - -- - menu:setPosRef("TL TL") - menu:updateCoords() - menu.x = parentIcon.x_real - menu.y = parentIcon.y_real - scrH - menu:updateCoords() -end - - - -local scratchDisplayModeTableSrc = {} -- 'reserve' for list of objects we want to change display mode -local scratchDisplayModeTableDest = {} - - --- reset the display mode to 'Visibl' for all objects in all acts -function r2:resetDisplayModeForAllObjects() - local objList = scratchDisplayModeTableSrc -- alias - table.clear(objList) - r2.Scenario:getSons(objList) - r2.requestNewAction(i18n.get("uiR2EDChangeDisplayAction")) - for k, v in pairs(objList) do - if v:isKindOf("WorldObject") then - v.DisplayerVisual.DisplayMode = 0 - end - end -end - ----------------------------------------------------------------- --- primitive display mode menu handlers --- current display mode for primitive --- NB : these flags may be accessed by C++ when a new route or zone is drawn, to switch 'to display all' mode --- which isdone by calling 'r2:primDisplayShowAll' -r2.PrimDisplayMode = 0 -- Visible --- is contextual selection on for primitives ? -r2.PrimDisplayFrozen = false -r2.PrimDisplayVisible = true -r2.PrimDisplayContextualVisibility = false - - --- 0, Visible --- 1, Hidden --- 2, Frozen --- 3, Locked -function r2:getPrimDisplayMode() - if not r2.PrimDisplayVisible then - return 1 - else - if r2.PrimDisplayFrozen then - return 2 - else - return 0 - end - end -end - -function r2:updatePrimDisplayMode() - r2:setDisplayMode("places", r2:getPrimDisplayMode(), r2.PrimDisplayContextualVisibility) -end - -function r2:primDisplayFreezeAll() - r2.PrimDisplayFrozen = true - r2:updatePrimDisplayMode() -end --- -function r2:primDisplayUnfreezeAll() - r2.PrimDisplayFrozen = false - r2:updatePrimDisplayMode() -end --- -function r2:primDisplayHideAll() - r2.PrimDisplayVisible = false - r2.PrimDisplayContextualVisibility = false - r2:updatePrimDisplayMode() -end --- -function r2:primDisplayShowContextual() - r2.PrimDisplayVisible = true - r2.PrimDisplayContextualVisibility = true - r2:updatePrimDisplayMode() -end --- -function r2:primDisplayShowAll() - r2.PrimDisplayVisible = true - r2.PrimDisplayContextualVisibility = false - r2:updatePrimDisplayMode() -end --- -function r2:notifyPrimDisplayShowAll() - displaySystemInfo(i18n.get("uiR2EDPrimDisplayModeChangedToShowAll"), 'BC') - r2:primDisplayShowAll() -end - - - - - --- change display mode for all objects of the given category --- filter may be : --- 'all' --- 'places' : roads and regions --- "bot_objects' : pieces of furniture, buildings ... -function r2:setDisplayMode(filter, displayMode, contextualVisibility) - local objList = scratchDisplayModeTableSrc -- alias - local finalObjList = scratchDisplayModeTableDest -- alias - table.clear(objList) - table.clear(finalObjList) - -- operate in all acts - for k, v in specPairs(r2.Scenario.Acts) do - v:getSons(objList) - end - for k,v in pairs(objList) do - if v:isKindOf("WorldObject") then - if filter == "all" then - if v:canChangeDisplayMode() then - table.insert(finalObjList, v) - end - elseif filter == "places" then - if v:isKindOf("Region") or v:isKindOf("Road") then - table.insert(finalObjList, v) - end - elseif filter == "bot_objects" then - if v:isKindOf("Npc") and v:isBotObject() then - table.insert(finalObjList, v) - end - end - end - end - if table.getn(finalObjList) == 0 then - --displaySystemInfo(i18n.get("uiR2EDNoTargetForDisplayModeChange"), "BC") - return - end - -- change display mode only for object that need it - --r2.requestNewAction(i18n.get("uiR2EDChangeDisplayAction")) - for k, v in pairs(finalObjList) do - v.DisplayerVisual.DisplayMode = displayMode - if v:isKindOf("BasePrimitive") then - v.DisplayerVisual.ContextualVisibilityActive = contextualVisibility - end - --if v.DisplayMode == srcDisplayMode or (srcDisplayMode == nil and v.DisplayMode ~= displayModeValue) then - --debugInfo("Changing display mode for " .. v:getDisplayName():toUtf8()) - --r2.requestSetNode(v.InstanceId, "DisplayMode", displayModeValue) - -- now a local property - --end - end -end - - -r2.BotObjectsFrozen = false - -function r2:setupFreezeBotObjectButton() - getUI("ui:interface:r2ed_toolbar"):find("r2ed_freeze_bot_objects").active = not r2.BotObjectsFrozen - getUI("ui:interface:r2ed_toolbar"):find("r2ed_unfreeze_bot_objects").active = r2.BotObjectsFrozen -end - - -function r2:freezeUnfreezeBotObjects() - if r2.BotObjectsFrozen then - r2:unfreezeBotObjects() - else - r2:freezeBotObjects() - end -end - -function r2:freezeBotObjects() - r2.BotObjectsFrozen = true - r2:setDisplayMode("bot_objects", 2, false) - r2:setupFreezeBotObjectButton() -end - -function r2:unfreezeBotObjects() - r2.BotObjectsFrozen = false - r2:setDisplayMode("bot_objects", 0, false) - r2:setupFreezeBotObjectButton() -end - - - -function r2:setUndoRedoInstances(instanceId) - if instanceId then - r2.logicComponents.undoRedoInstances[tostring(instanceId)] = true - end -end - - ---- ---Called by C++ when upload message are send --- - -local lastMessage = {MessageName="", Size=0, Received=0 } - -function r2:onMessageSendingStart(messageName, nbPacket, size) - debugInfo("--- Start "..messageName.. " " .. tostring(nbPacket).. " " ..tostring(size)) - lastMessage.MessageName = messageName - lastMessage.Size = size - lastMessage.Received =0 - - local msg = nil - if lastMessage.MessageName == "SSUA" then - msg = i18n.get("uiR2EDUploadScenario"):toUtf8() - elseif lastMessage.MessageName == "RSS2" then - msg = i18n.get("uimR2EDGoToDMMode"):toUtf8() - - else - return - end - local ui = getUI("ui:interface:r2ed_uploading_bar") - if not ui then - return - end - - local bar = ui:find("uploading_bar") - if not bar then - return - end - - bar.hardtext = msg .. " 0%" - ui.active = true -end - - -function r2:onMessageSendingUpdate(packetId, packetSize) - debugInfo("--- Update " .. tostring(packetId) .. " " .. tostring(packetSize) ) - lastMessage.Received = lastMessage.Received + packetSize - if lastMessage.Size and lastMessage.Size ~= 0 then - debugInfo("--- " .. tostring( math.floor( (100*lastMessage.Received) / lastMessage.Size) ) ) - - if lastMessage.MessageName == "SSUA" then - msg = i18n.get("uiR2EDUploadScenario"):toUtf8() - - elseif lastMessage.MessageName == "RSS2" then - msg = i18n.get("uimR2EDGoToDMMode"):toUtf8() - - else - return - end - - local ui = getUI("ui:interface:r2ed_uploading_bar") - if not ui then - return - end - - local bar = ui:find("uploading_bar") - if not bar then - return - end - - bar.hardtext = msg .. " ".. tostring( math.floor( (100*lastMessage.Received) / lastMessage.Size ) ) .."%" - ui.active = true - end -end - -function r2:onMessageSendingFinish() - debugInfo("--- Finish ") - debugInfo(lastMessage.MessageName) - - local ui = getUI("ui:interface:r2ed_uploading_bar") - if not ui then - return - end - local bar = ui:find("uploading_bar") - if not bar then - return - end - bar.hardtext = "" - ui.active = true -end - - --- called by C++ to signal that there are too many entity displayed simultaneously -function r2:setMaxVisibleEntityExceededFlag(tooMany) - local msgGroup = getUI("ui:interface:r2ed_max_visible_entity_count_exceeded") - msgGroup.active = tooMany - if tooMany then - msgGroup.t:updateCoords() - msgGroup.w = msgGroup.t.w - msgGroup:invalidateCoords() - end -end - diff --git a/code/ryzom/common/data_common/r2/r2_ui_features_tree.lua b/code/ryzom/common/data_common/r2/r2_ui_features_tree.lua deleted file mode 100644 index cb15f5a42..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_features_tree.lua +++ /dev/null @@ -1,312 +0,0 @@ - -r2.FeatureTree = -{ - Path = "ui:interface:r2ed_palette:content:feature_tree_panel:feature_enclosing:tree_list", -} - -local featureTree = r2.FeatureTree - -function featureTree.buildFeatureTreeUI() - local tree = getUI(r2.FeatureTree.Path) - if not tree then return end - - local rootNode = SNode() - rootNode.Text = "Features" - rootNode.Opened = false - --rootNode.Bitmap = "r2ed_icon_macro_components.tga" - tree:setRootNode(rootNode) - - featureTree.addAllFeatures() - - - tree:forceRebuild() - -end - -function featureTree.getCategoryPicture(category) - local categories = r2.getCategories() - local k, v = next(categories, nil) - while k do - if v then - if v[1] == category then - return v[2] - end - end - k, v = next(categories, k) - end - return "r2ed_icon_macro_components.tga" -end - -function featureTree.getFatherNode(category) - local categories = r2.getCategories() - local k, v = next(categories, nil) - while k do - if v then - if v[1] == category then - return v[3] - end - end - k, v = next(categories, k) - end - return "root" -end - -function featureTree.createParentNode(parentCategory) - local tree = getUI(r2.FeatureTree.Path) - if not tree then return end - - local root = tree:getRootNode() - if not root then return end - - categoryNode = SNode() - local text = i18n.hasTranslation(parentCategory) - if not text then text = parentCategory else text = i18n.get(parentCategory) end - categoryNode.Text = text - categoryNode.Id = parentCategory - categoryNode.Opened = false - --categoryNode.Bitmap = featureTree.getCategoryPicture(parentCategory) - root:addChild(categoryNode) - return categoryNode -end - - -function featureTree.addNodeWithId(featureName, category) - local tree = getUI(r2.FeatureTree.Path) - if not tree then return end - - local root = tree:getRootNode() - if not root then return end - - local categoryNode = root:getNodeFromId(category) - - if not categoryNode then - categoryNode = SNode() - local text = i18n.hasTranslation(category) - if not text then text = category else text = i18n.get(category) end - categoryNode.Text = text - categoryNode.Id = category - categoryNode.Opened = false - local catFather = featureTree.getFatherNode(category) - if catFather == "root" then - --categoryNode.Bitmap = featureTree.getCategoryPicture(category) - root:addChild(categoryNode) - else - local fatherNode = root:getNodeFromId(catFather) - if not fatherNode then --if the parent node doesn't exist, attach new category to root anyway - fatherNode = featureTree.createParentNode(catFather) - end - fatherNode:addChild(categoryNode) - end - end - - local featureNode = SNode() - local componentName = featureName - - --special case: chat sequence is not a feature like the others - if featureName == "ChatSequence" then - featureNode.Text = i18n.get("uiR2EDChatSequence") - featureNode.AHName = "lua" - featureNode.AHParams = "r2.Features['ActivitySequence'].Components.ChatSequence:createProtected()" - categoryNode:addChild(featureNode) - return - end - - if string.find(componentName, "Feature") ~= nil then - componentName = string.sub(componentName, 1, string.len(componentName) - 7) - end - featureNode.Text = i18n.get("uiR2Ed"..featureName.. "Node") - featureNode.AHName = "lua" - featureNode.AHParams = "r2.Features['".. featureName.."'].Components." ..componentName.. ":createProtected()" - - categoryNode:addChild(featureNode) -end - -function featureTree.addUserComponentNode(userComponentName) - local tree = getUI(r2.FeatureTree.Path) - if not tree then return false end - - local root = tree:getRootNode() - if not root then return false end - - local userComponentsBranch = root:getNodeFromId("uiR2EdUserComponentCategory") - if not userComponentsBranch then return end - - local presentNode = root:getNodeFromId(userComponentName) - if presentNode ~= nil then - messageBox("The user component '"..userComponentName.."' is already loaded. Please unload it before loading a user component with the same name.") - return false - end - - local categoryNode = root:getNodeFromId("uiR2EdLoadedUserComponentCategory") - - if not categoryNode then - categoryNode = SNode() - categoryNode.Text = i18n.get("uiR2EdLoadedUserComponentCategory") - categoryNode.Id = "uiR2EdLoadedUserComponentCategory" - categoryNode.Opened = false - userComponentsBranch:addChild(categoryNode) - end - - local featureNode = SNode() - - featureNode.Id = userComponentName - featureNode.Text = userComponentName - featureNode.AHName = "lua" - featureNode.AHParams = "r2.Translator.CreateUserComponent('"..userComponentName.."')" - - categoryNode:addChild(featureNode) - tree:forceRebuild() - return true -end - -function featureTree.getUserComponentList() - local tree = getUI(r2.FeatureTree.Path) - if not tree then return false end - - local root = tree:getRootNode() - if not root then return false end - - local featureNameTable = {} - local userComponentCategoryNode = root:getNodeFromId("uiR2EdLoadedUserComponentCategory") - if not userComponentCategoryNode then - return {} - end - local nodeSize = userComponentCategoryNode:getNumChildren() - local i = 0 - while i < nodeSize do - local node = userComponentCategoryNode:getChild(i) - table.insert(featureNameTable, node.Id) - i = i + 1 - end - return featureNameTable -end - - -function featureTree.addAllFeatures() - local loadedFeatures = r2.getLoadedFeaturesStatic() - - local k, v = next(loadedFeatures, nil) - while k do - if v then - featureTree.addNodeWithId(v[2], v[3]) - end - k, v = next(loadedFeatures, k) - end - - if config.R2EDLoadDynamicFeatures == 1 then - - local loadBt = getUI("ui:interface:r2ed_palette:content:feature_tree_panel:user_component_buttons:load") - local unloadBt = getUI("ui:interface:r2ed_palette:content:feature_tree_panel:user_component_buttons:unload") - - --loadBt.active = true - --unloadBt = true - featureTree.addLoadedUserComponents() - - local btPanel = getUI("ui:interface:r2ed_palette:content:feature_tree_panel:user_component_buttons") - btPanel.active = true - - local loadedFeatures = r2.getLoadedFeaturesDynamic() - - local k, v = next(loadedFeatures, nil) - while k do - if v then - featureTree.addNodeWithId(v[2], v[3]) - end - k, v = next(loadedFeatures, k) - end - - end -end - - -function featureTree.addLoadedUserComponents() - local tree = getUI(r2.FeatureTree.Path) - if not tree then return end - - local root = tree:getRootNode() - if not root then return end - - categoryNode = SNode() - categoryNode.Text = i18n.get("uiR2EdUserComponentCategory") - categoryNode.Id = "uiR2EdUserComponentCategory" - categoryNode.Opened = false - --categoryNode.Bitmap = "r2ed_icon_macro_components.tga" - root:addChild(categoryNode) - - local featureNode = SNode() - - featureNode.Id = "NewComponent" - featureNode.Text = "New Component" - featureNode.AHName = "lua" - featureNode.AHParams = "r2.Features['DefaultFeature'].Components.UserComponentHolder.create()" - - - categoryNode:addChild(featureNode) - - local loadedUserComponentTable = r2_core.UserComponentTable - if table.getn(loadedUserComponentTable) == 0 then - debugInfo("No UserComponent were previously loaded") - return - end - - local k, v = next(loadedUserComponentTable, nil) - while k do - local userComponentName = v[1] - featureTree.addUserComponentNode(userComponentName) - k, v = next(loadedUserComponentTable, k) - end -end -function featureTree.removeUCFromTree(featureName) - local tree = getUI(r2.FeatureTree.Path) - if not tree then return end - - local root = tree:getRootNode() - if not root then return end - - local featureNode = root:getNodeFromId(featureName) - if featureNode:getFather() then - featureNode:getFather():deleteChild(featureNode) - end - - local categoryNode = root:getNodeFromId("uiR2EdLoadedUserComponentCategory") - local num = categoryNode:getNumChildren() - if num == 0 then - root:deleteChild(categoryNode) - end - tree:forceRebuild() - - categoryNode:addChild(featureNode) - - local loadedUserComponentTable = r2_core.UserComponentTable - if table.getn(loadedUserComponentTable) == 0 then - debugInfo("No UserComponent were previously loaded") - return - end - - local k, v = next(loadedUserComponentTable, nil) - while k do - local userComponentName = v[1] - featureTree.addUserComponentNode(userComponentName) - k, v = next(loadedUserComponentTable, k) - end -end -function featureTree.removeUCFromTree(featureName) - local tree = getUI(r2.FeatureTree.Path) - if not tree then return end - - local root = tree:getRootNode() - if not root then return end - - local featureNode = root:getNodeFromId(featureName) - if featureNode:getFather() then - featureNode:getFather():deleteChild(featureNode) - end - - local categoryNode = root:getNodeFromId("uiR2EdLoadedUserComponentCategory") - local num = categoryNode:getNumChildren() - if num == 0 then - root:deleteChild(categoryNode) - end - tree:forceRebuild() - -end diff --git a/code/ryzom/common/data_common/r2/r2_ui_forms.lua b/code/ryzom/common/data_common/r2/r2_ui_forms.lua deleted file mode 100644 index 587581f26..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_forms.lua +++ /dev/null @@ -1,674 +0,0 @@ - -r2.Forms = {} - -r2.EventTeamScenarios = -{ - simple = {}, - odd_ball = {}, - adventure = {}, - challenge = {}, -} - -r2.LevelDesignScenarios = -{ - cat1 = {}, - cat2 = {}, - cat3 = {}, -} ---/////////////////// ---// EDITION FORMS // ---/////////////////// - --- a test form -r2.Forms.TestForm = -{ - Prop = - { - -- following field are tmp for property sheet building testing - {Name="PVP", Type="Number", WidgetStyle="Boolean", Category="uiR2EDRollout_Test" }, - {Name="Slider1", Type="Number", WidgetStyle="Slider", Category="uiR2EDRollout_Test"}, - {Name="Slider2", Type="Number", WidgetStyle="Slider", Category="uiR2EDRollout_Test"}, - {Name="ComboBox1", Type="Number", WidgetStyle="EnumDropDown", - Enum= { "Toto", "Tata", "Titi" } - }, - {Name="ComboBox2", Type="Number", WidgetStyle="EnumDropDown", - Enum= { "A", "B", "C" } - }, - {Name="Title", Type="String", Category="uiR2EDRollout_EditBoxesTest"}, - {Name="Text1", Type="String", Category="uiR2EDRollout_EditBoxesTest"}, - {Name="Text2", Type="Number", Category="uiR2EDRollout_EditBoxesTest", Min="1", Max="10", Default="1"}, - } - -- "onPostRender" : called by the framework after each frame (may be nil) - -- onPostRender = function(formInstance) - -- ... - -- end - -- - -- "onShow" : called by the framework when the form is displayed - -- onShow = function(formInstance) - -- ... - -- end -} - - - -r2.Forms.CreateNewAdventureStep1 = -{ - Caption = "uiR2EDScenarioParameters", - Prop = - { - {Name="Level", Type="Number", WidgetStyle="EnumDropDown", Category="uiR2EDRollout_Aventure", - Enum= { "0-20", "0 - 50", "50 - 100"} - }, - {Name="Rule", Type="Number", WidgetStyle="EnumDropDown", Category="uiR2EDRollout_Aventure", - Enum= { "Liberal", "Strict"} - }, - {Name="MaxEntities", Type="Number", Category="uiR2EDRollout_Aventure", Min="0", Max="250", Default="50"} - } -} - -r2.Forms.CreateNewAdventureStep2 = -{ - Caption = "uiR2EDScenarioParameters", - Prop = - { - { - Name="Location", Type="Number", WidgetStyle="EnumDropDown", Category="uiR2EDRollout_Aventure", - Enum = r2.getIslandsLocation() - }, - {Name="EntryPoint", Type="Number", WidgetStyle="EnumDropDown", Category="uiR2EDRollout_Aventure", - Enum= { "Main Entry Point"} - }, - } -} - -r2.Forms.CreateNewAdventureScenarioDescription = -{ - Caption = "uiR2EDScenarioParameters", - Prop = - { - {Name="Title", Type="String", Category="uiR2EDRollout_Aventure"}, - {Name="Category", Type="Number", WidgetStyle="EnumDropDown", Category="uiR2EDRollout_Aventure", - Enum= { "Invasion"} - }, - {Name="Description", Type="String", Category="uiR2EDRollout_Aventure"} - } -} - -r2.Forms.CreateNewAdventureActDescription = -{ - Caption = "uiR2EDNewActParameters", - Prop = - { - {Name="ActName", Type="String", Category="uiR2EDRollout_Aventure"}, - {Name="Location", Type="Number", WidgetStyle="EnumDropDown", Category="uiR2EDRollout_Aventure", - Enum= { "Fyros", "Tryker"} - }, - {Name="EntryPoint", Type="Number", WidgetStyle="EnumDropDown", Category="uiR2EDRollout_Aventure", - Enum= { "EntryPoint1", "EntryPoint2"} - } - } -} - - -r2.Forms.ConnectAdventure = -{ - Caption = "uiR2EDConnectAdventure", - Prop = - { - {Name="AdventureId", Type="Number", Category="uiR2EDRollout_Load"} - } -} - -r2.Forms.NewActForm = -{ - Caption = "uiR2EDNewActParameters", - Prop = - { - {Name="ActTitle", Type="String" }, - -- {Name="EntryPoint", Type="Number", WidgetStyle="EnumDropDown", Enum= { "Spawn Point 1", "Spawn Point 2" } } - } -} - - ------------------ --- LOAD / SAVE -- ------------------ - --- file list -local fileListXML = -[[ - - - - - - - - - -]] - ---scenario tree -local scenarioTreeXML = -[[ - - - - - - - - - -]] - - -function r2.setCurrSelectedFile(filename, path) - - local formInstance = r2.CurrentForm.Env.FormInstance - if formInstance.LastFileButton and formInstance.LastFileButton.pushed then - formInstance.LastFileButton.pushed = false - end - if getUICaller().pushed then - getUICaller().pushed = true - end - formInstance.LastFileButton = getUICaller() - r2.CurrentForm.Env.FormInstance.Name = filename - if path ~= nil and r2.CurrentForm.Env.FormInstance.Path then - r2.CurrentForm.Env.FormInstance.Path = path - - local header = r2.getFileHeader(path..filename) - if header then - if header.Title then - r2.CurrentForm.Env.FormInstance.LoadScenario_Title = header.Title - elseif r2.CurrentForm.Env.FormInstance.LoadScenario_Title then - r2.CurrentForm.Env.FormInstance.LoadScenario_Title = "" - end - if header.ShortDescription then - r2.CurrentForm.Env.FormInstance.LoadScenario_Description = header.ShortDescription - elseif r2.CurrentForm.Env.FormInstance.LoadScenario_Description then - r2.CurrentForm.Env.FormInstance.LoadScenario_Description = "" - end - if header.Rules then - r2.CurrentForm.Env.FormInstance.LoadScenario_Rules = header.Rules - elseif r2.CurrentForm.Env.FormInstance.LoadScenario_Rules then - r2.CurrentForm.Env.FormInstance.LoadScenario_Rules = "" - end - if header.Level then - r2.CurrentForm.Env.FormInstance.LoadScenario_Level = header.Level - elseif r2.CurrentForm.Env.FormInstance.LoadScenario_Level then - r2.CurrentForm.Env.FormInstance.LoadScenario_Level = "" - end - if header.Language then - r2.CurrentForm.Env.FormInstance.LoadScenario_Language = i18n.get("uiR2ED"..header.Language):toUtf8() - elseif r2.CurrentForm.Env.FormInstance.LoadScenario_Language then - r2.CurrentForm.Env.FormInstance.LoadScenario_Language = "" - end - if header.RingPointLevel then - if r2.checkRingAccess(header.RingPointLevel) == true then - r2.CurrentForm.Env.FormInstance.LoadScenario_RingPointsLevel = i18n.get("uiR2EDLoadScenario_Yes"):toUtf8() - else - r2.CurrentForm.Env.FormInstance.LoadScenario_RingPointsLevel = i18n.get("uiR2EDLoadScenario_No"):toUtf8() - end - elseif r2.CurrentForm.Env.FormInstance.LoadScenario_RingPointsLevel then - r2.CurrentForm.Env.FormInstance.LoadScenario_RingPointsLevel = "" - end - - end - end - - r2.CurrentForm.Env.updateAll() - r2.CurrentForm.Env.updateSize() - local eb = r2.CurrentForm:find("eb") - setCaptureKeyboard(eb) - eb:setSelectionAll() -end - - -function r2.setCurrSelectedFileToLoad(filename, path) - - local formInstance = r2.CurrentForm.Env.FormInstance - if formInstance.LastFileButton and formInstance.LastFileButton.pushed then - formInstance.LastFileButton.pushed = false - end - if getUICaller().pushed then - getUICaller().pushed = true - end - formInstance.LastFileButton = getUICaller() - r2.CurrentForm.Env.FormInstance.LoadScenario_Name = ucstring(filename):toUtf8() - - if path ~= nil and r2.CurrentForm.Env.FormInstance.Path then - r2.CurrentForm.Env.FormInstance.Path = path - - local header = r2.getFileHeader(path..filename) - if header then - if header.Title then - r2.CurrentForm.Env.FormInstance.LoadScenario_Title = header.Title - elseif r2.CurrentForm.Env.FormInstance.LoadScenario_Title then - r2.CurrentForm.Env.FormInstance.LoadScenario_Title = "" - end - if header.ShortDescription then - r2.CurrentForm.Env.FormInstance.LoadScenario_Description = header.ShortDescription - elseif r2.CurrentForm.Env.FormInstance.LoadScenario_Description then - r2.CurrentForm.Env.FormInstance.LoadScenario_Description = "" - end - if header.Rules then - r2.CurrentForm.Env.FormInstance.LoadScenario_Rules = header.Rules - elseif r2.CurrentForm.Env.FormInstance.LoadScenario_Rules then - r2.CurrentForm.Env.FormInstance.LoadScenario_Rules = "" - end - if header.Level then - r2.CurrentForm.Env.FormInstance.LoadScenario_Level = header.Level - elseif r2.CurrentForm.Env.FormInstance.LoadScenario_Level then - r2.CurrentForm.Env.FormInstance.LoadScenario_Level = "" - end - if header.Language then - r2.CurrentForm.Env.FormInstance.LoadScenario_Language = i18n.get("uiR2ED"..header.Language):toUtf8() - elseif r2.CurrentForm.Env.FormInstance.LoadScenario_Language then - r2.CurrentForm.Env.FormInstance.LoadScenario_Language = "" - end - if header.RingPointLevel then - if r2.checkRingAccess(header.RingPointLevel) == true then - r2.CurrentForm.Env.FormInstance.RingAccess = 1 - r2.CurrentForm.Env.FormInstance.LoadScenario_RingPointsLevel = i18n.get("uiR2EDLoadScenario_Yes"):toUtf8() - else - r2.CurrentForm.Env.FormInstance.RingAccess = 0 - r2.CurrentForm.Env.FormInstance.LoadScenario_RingPointsLevel = i18n.get("uiR2EDLoadScenario_No"):toUtf8() - end - elseif r2.CurrentForm.Env.FormInstance.LoadScenario_RingPointsLevel then - r2.CurrentForm.Env.FormInstance.RingAccess = 0 - r2.CurrentForm.Env.FormInstance.LoadScenario_RingPointsLevel = "" - end - - end - end - - r2.CurrentForm.Env.updateAll() - r2.CurrentForm.Env.updateSize() - --local eb = r2.CurrentForm:find("eb") - --setCaptureKeyboard(eb) - --eb:setSelectionAll() -end - --- called at init to fill the file list -local function showFileList(formInstance) - local fileGroupList = r2.CurrentForm:find('file_list') - --local searchPath = select(config.R2ScenariiPath, "save") - local searchPath =r2.getScenarioSavePath() - local files = getPathContent(searchPath) - table.sort(files) - fileGroupList:clear() - for k, v in pairs(files) do - if string.lower(nlfile.getExtension(v)) == "r2" then - local shortFilename = nlfile.getFilename(v) - local shortFileEscape=string.gsub(shortFilename, "'", "\\'") - - local shortFilename2 = ucstring(shortFilename):toUtf8() - local shortFileEscape2 = ucstring(shortFileEscape):toUtf8() - - - local entry = createGroupInstance("r2ed_filelist_entry", "", - { id = tostring(k), text = shortFilename2, - params_l="r2.setCurrSelectedFile('" .. shortFileEscape2 .. "')" }) - fileGroupList:addChild(entry) - end - end - setCaptureKeyboard(r2.CurrentForm:find("eb")) -end - - - -local function saveScenarioOnChange(formInstance) - r2.print(formInstance.Name) - local name = string.gsub(formInstance.Name, "[\\/:*?\"<>|]", "_") - if name ~= formInstance.Name then - fromInstance.Name = name - formInstance.Modified = true - end -end - - - - -local function buildScenarioTree(formInstance) - - local tree = r2.CurrentForm:find('tree_list') - - local rootNode = SNode() - rootNode.Id = "root" - rootNode.Text = "Scenarios" - rootNode.Opened = false - --rootNode.Bitmap = "r2ed_icon_macro_components.tga" - tree:setRootNode(rootNode) - - function addNodeToParent(name, id, parentId) - local parentNode = rootNode:getNodeFromId(parentId) - - addedNode = SNode() - --local text = i18n.hasTranslation(parentCategory) - --if not text then text = parentCategory else text = i18n.get(parentCategory) end - addedNode.Text = name - addedNode.Id = id - addedNode.Opened = false - parentNode:addChild(addedNode) - end - - function parseDirectory(nodeId, searchPath) - local destNode = rootNode:getNodeFromId(nodeId) - local autosaveNode = rootNode:getNodeFromId("autosave") - local files = getPathContent(searchPath) - table.sort(files) - for k, v in pairs(files) do - if string.lower(nlfile.getExtension(v)) == "r2" then - local shortFilename = nlfile.getFilename(v) - local shortFileEscape=string.gsub(shortFilename, "'", "\\'") - - local fileLeaf= SNode() - fileLeaf.Id = shortFilename - local len = string.len(shortFilename) - 3 - fileLeaf.Text = string.sub(shortFilename,0, len) - fileLeaf.AHName = "lua" - fileLeaf.AHParams = "r2.setCurrSelectedFileToLoad('" .. shortFileEscape .. "', '"..searchPath.."')" - --if autosave file, plug it in the autosave branch - if string.find(shortFilename, "autosave") ~= nil then - autosaveNode:addChild(fileLeaf) - else - destNode:addChild(fileLeaf) - end - end - end - end - - function loadLDScenariosFromFile() - --if using a bnp, use doFile method instead - local fileListOk = loadfile("examples/r2_leveldesign_scenarios.lua") - if fileListOk then - fileListOk() - end - local files = r2.LevelDesignScenarios - for parentId, fileEntries in pairs(files) do - local parentNode = rootNode:getNodeFromId(parentId) - if not parentNode then - addNodeToParent(parentId, parentId, "root") - parentNode = rootNode:getNodeFromId(parentId) - end - for k, v in pairs(fileEntries) do - local fileLeaf= SNode() - fileLeaf.Id = v[1] - --fileLeaf.Text = v[1] - local len = string.len(v[1]) - 3 - fileLeaf.Text = string.gsub(string.sub(v[1],0, len), "_", " ") - fileLeaf.AHName = "lua" - fileLeaf.AHParams = "r2.setCurrSelectedFileToLoad('" .. v[1] .. "', './Examples/')" - parentNode:addChild(fileLeaf) - end - end - end - - function loadETScenariosFromFile() - --if using a bnp, use doFile method instead - local fileListOk = loadfile("examples/r2_event_team_scenarios.lua") - if fileListOk then - fileListOk() - end - local files = r2.EventTeamScenarios - for parentId, fileEntries in pairs(files) do - local parentNode = rootNode:getNodeFromId(parentId) - if not parentNode then - addNodeToParent(parentId, parentId, "root") - parentNode = rootNode:getNodeFromId(parentId) - end - for k, v in pairs(fileEntries) do - local fileLeaf= SNode() - fileLeaf.Id = v[1] - --fileLeaf.Text = v[1] - local len = string.len(v[1]) - 3 - fileLeaf.Text = string.gsub(string.sub(v[1],0, len), "_", " ") - fileLeaf.AHName = "lua" - fileLeaf.AHParams = "r2.setCurrSelectedFileToLoad('" .. v[1] .. "', './Examples/')" - parentNode:addChild(fileLeaf) - end - end - end - - function loadNewbieScenariosFromFile() - --if using a bnp, use doFile method instead - local fileListOk = loadfile("examples/r2_newbieland_scenarios.lua") - if fileListOk then - fileListOk() - end - local files = r2.NewbielandScenarios - if files then - for parentId, fileEntries in pairs(files) do - local parentNode = rootNode:getNodeFromId(parentId) - if not parentNode then - addNodeToParent(parentId, parentId, "root") - parentNode = rootNode:getNodeFromId(parentId) - end - for k, v in pairs(fileEntries) do - local fileLeaf= SNode() - fileLeaf.Id = v[1] - local len = string.len(v[1]) - 3 - fileLeaf.Text = string.gsub(string.sub(v[1],0, len), "_", " ") - fileLeaf.AHName = "lua" - fileLeaf.AHParams = "r2.setCurrSelectedFileToLoad('" .. v[1] .. "', './Examples/')" - parentNode:addChild(fileLeaf) - end - end - end - end - - --LEVELDESIGN SCENARIOS - --addNodeToParent("Nevrax Examples", "examples", "root") - --addNodeToParent("Simple", "simple", "examples") - --addNodeToParent("Odd Ball", "odd_ball", "examples") - --addNodeToParent("Adventure", "adventure", "examples") - --addNodeToParent("Challenge", "challenge", "examples") - loadLDScenariosFromFile() - - --EVENTTEAM SCENARIOS - --addNodeToParent("Pioneer Scenarios", "event_team_offerings", "root") - loadETScenariosFromFile() - - --NEWBIE SCENARIOS - loadNewbieScenariosFromFile() - - --MY SCENARIOS - addNodeToParent("My Files", "my_files", "root") - addNodeToParent("Autosave", "autosave", "my_files") - addNodeToParent("My scenarios", "my_scenarios", "my_files") - parseDirectory("my_scenarios", "./My_scenarios/") - - --Tmp branch for old scenarios - addNodeToParent("Old Scenarios", "old", "root") - parseDirectory("old", "./") - - tree:forceRebuild() -end - - --- load / save forms -r2.Forms.SaveScenario = -{ - Caption = "uiR2EDSaveScenario", - PropertySheetHeader = fileListXML, - Prop = - { - {Name="Name", Type="String", EntryType="filename", Category="uiR2EDRollout_Save", ValidateOnEnter = true, MaxNumChar="512" , onChange = saveScenarioOnChange} - }, - onShow = showFileList -} - - -r2.Forms.LoadScenario = -{ - Caption = "uiR2EDLoadScenario", - PropertySheetHeader = scenarioTreeXML, --fileListXML, - Prop = - { - {Name="LoadScenario_Name", Type="String", WidgetStyle="StaticText", Category="uiR2EDRollout_Load"}, - {Name="Path", Type="String", Visible=false}, - {Name="RingAccess", Type="Number", Visible=false}, - {Name="LoadScenario_Title", Type="String", WidgetStyle="StaticText", Category="uiR2EDRollout_ScenarioInfo"}, - {Name="LoadScenario_Description", Type="String", WidgetStyle="StaticTextMultiline", Category="uiR2EDRollout_ScenarioInfo"}, - {Name="LoadScenario_Rules", Type="String", WidgetStyle="StaticText", Category="uiR2EDRollout_ScenarioInfo"}, - {Name="LoadScenario_Level", Type="String", WidgetStyle="StaticText", Category="uiR2EDRollout_ScenarioInfo"}, - {Name="LoadScenario_Language", Type="String", WidgetStyle="StaticText", Category="uiR2EDRollout_ScenarioInfo"}, - {Name="LoadScenario_RingPointsLevel", Type="String", WidgetStyle="StaticText", Category="uiR2EDRollout_ScenarioInfo"}, - }, - onShow = buildScenarioTree -} - - ---///////////////////// ---// ANIMATION FORMS // ---///////////////////// - - -------------- --- WEATHER -- -------------- - -local function updateWeather(formInstance) - setWeatherValue(formInstance.ManualWeather == 0, formInstance.WeatherValue / 1022) - formInstance.Modified = true -end - -r2.Forms.ChangeWeatherForm = -{ - Caption = "uiR2EDChangeWeather", - Width="300", - PropertySheetHeader = - [[ - - - ]], - Prop = - { - {Name="ManualWeather", Type="Number", WidgetStyle="Boolean", - onChange = updateWeather - }, - { Name="WeatherValue", Type="Number", WidgetStyle="Slider", Min=0, Max=1022, - LeftBitmap="r2ed_sun.tga", MiddleBitmap="r2ed_clouds.tga", RightBitmap="r2ed_storm.tga", ActiveBitmaps="true", - onChange = updateWeather, - Visible = function(form) return form.ManualWeather == 1 end - }, - --{Name="Season", Type="Number", WidgetStyle="EnumDropDown", DefaultValue="0", - -- Enum= { "uiR2EDSeasonAuto", "uiR2EDSpring", "uiR2EDSummer", "uiR2EDAutumn", "uiR2EDWinter" }, - --} - }, - onPostRender = function(formInstance) - -- if form hasn't been modified, then continuously update weather from the db value - if not formInstance.Modified and formInstance.ManualWeather then - formInstance.WeatherValue = getWeatherValue() * 1022 - r2.CurrentForm.Env.updateAll() - end - end, -} - --- --- User Defined Component --- - -function r2:userComponentOk(shortFilename, msg) - r2.setCurrSelectedFile(shortFilename) - messageBox(msg) -end - -function r2:userComponentKo(shortFilename, msg) - messageBox(msg.." in " .. shortFilename) - r2.setCurrSelectedFile("") -end - - --- called at init to fill the file list -local function showUserDefinedComponent(formInstance) - local fileGroupList = r2.CurrentForm:find('file_list') - --local searchPath = select(config.R2ScenariiPath, "save") - local searchPath = formInstance.Directory - local files = getPathContent(searchPath) - table.sort(files) - fileGroupList:clear() - for k, v in pairs(files) do - if string.lower(nlfile.getExtension(v)) == formInstance.Extension then - local shortFilename = nlfile.getFilename(v) - local package = r2.UserComponentsManager:loadPackage(v) - - if package then - local description= string.gsub(package.Description, "\n", "\\n") - description= "Description="..description.."\\n\\n" - local name = "Name= "..package.Name .. "\\n\\n" - local md5 = "" - local tstamp = "" - local path="" - if package.fileinfo and package.fileinfo.MD5 and package.fileinfo.TimeStamp and package.fileinfo.Package then - md5 = "MD5="..package.fileinfo.MD5.."\\n\\n" - tstamp = "TimeStamp=" .. tostring(package.fileinfo.TimeStamp) .. "\\n\\n" - path = "Package="..package.fileinfo.Package.."\\n\\n" - end - local str = name..description .. md5..tstamp..path - debugInfo(str) - - local entry = createGroupInstance("r2ed_filelist_entry", "", { id = tostring(k), text = "OK: " .. shortFilename, params_l="r2:userComponentOk('" .. shortFilename .. "', '"..str.."')" }) - fileGroupList:addChild(entry) - else - - local entry = createGroupInstance("r2ed_filelist_entry", "", { id = tostring(k), text = "KO: " .. shortFilename, params_l="r2:userComponentKo('" ..shortFilename .."', 'syntax error')" }) - fileGroupList:addChild(entry) - end - end - end - setCaptureKeyboard(r2.CurrentForm:find("eb")) -end - - - -r2.Forms.LoadUserComponent = -{ - Caption = "uiR2EDLoadUserComponent", - PropertySheetHeader = fileListXML, - Prop = - { - {Name="Name", Type="String", Category="uiR2EDRollout_Load", ValidateOnEnter = true, MaxNumChar="512"} - }, - onShow = showUserDefinedComponent -} - -r2.Forms.SpecialPaste = -{ - Caption = "uiR2EDSpecialPaste", - Prop = - { - { Name="CopyEvents", Type="Number", WidgetStyle="Boolean", InvertWidget="true", CaptionWidth=5, - Visible = function(props) - return props.CopyEvents >= 0 - end - }, - { Name="CopyActivities", Type="Number", WidgetStyle="Boolean", InvertWidget="true", CaptionWidth=5, - Visible = function(props) - return props.CopyActivities >= 0 - end - }, - { Name="DuplicateGroup", Type="Number", WidgetStyle="Boolean", InvertWidget="true", CaptionWidth=5, - Visible = function(props) - return props.DuplicateGroup >= 0 - end - }, - --{ Name="CopyChatSequences", Type="Number", WidgetStyle="Boolean", InvertWidget="true", CaptionWidth=5, - -- Visible = function(props) - -- return props.CopyChatSequences >= 0 - -- end - -- }, - }, -} - - - diff --git a/code/ryzom/common/data_common/r2/r2_ui_logic_entities.lua b/code/ryzom/common/data_common/r2/r2_ui_logic_entities.lua deleted file mode 100644 index a8a12d9ad..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_logic_entities.lua +++ /dev/null @@ -1,3111 +0,0 @@ -r2.logicEntityUIPath = "r2ed_logic_entities:content:menu:" - --- id of button which has just activated "which entity" menu -r2.whichEntitySelectedButtonId = nil - --- id of button which has just activated "right" menu -r2.rightSelectedButtonId = nil - --- table of buttons which can activate "which entity" menu --- id of a such button give the method which must be called -r2.whichEntityButtons = {} - -r2.logicEntityAttributes = { - - - ["ApplicableActions"] = { --- ["Activate"] = tostring(i18n.get( "uiR2EdActivate" ):toUtf8()), --- ["Deactivate"] = tostring(i18n.get( "uiR2EdDeactivate" ):toUtf8()), --- ["Wander"] = tostring(i18n.get( "uiR2EdWander" ):toUtf8()), --- ["Sit Down"] = tostring(i18n.get( "uiR2EdSitDown" ):toUtf8()), --- ["Stand Up"] = tostring(i18n.get( "uiR2EdStandUp" ):toUtf8()), --- ["Respawn"] = tostring(i18n.get( "uiR2EdRespawn" ):toUtf8()), --- ["Kill"] = tostring(i18n.get( "uiR2EdKill" ):toUtf8()), --- ["begin activity sequence"] = tostring(i18n.get( "uiR2EdBeginActivitySequ" ):toUtf8()), --- ["begin chat sequence"] = tostring(i18n.get( "uiR2EdBeginChatSequ" )) - }, - - ["Events"] = { --- ["activation"] = tostring(i18n.get( "uiR2EdActivation" ):toUtf8()), --- ["desactivation"] = tostring(i18n.get( "uiR2EdDesactivation" ):toUtf8()), --- ["a member death"] = tostring(i18n.get( "uiR2EdAMemberDeath" ):toUtf8()), --- ["member death"] = tostring(i18n.get( "uiR2EdMemberDeath" ):toUtf8()), --- ["group death"] = tostring(i18n.get( "uiR2EdGroupDeath" ):toUtf8()), --- ["head to wander zone"] = tostring(i18n.get( "uiR2EdHeadWanderZone" ):toUtf8()), --- ["arrive at wander zone"] = tostring(i18n.get( "uiR2EdArriveWanderZone" ):toUtf8()), --- ["head to camp"] = tostring(i18n.get( "uiR2EdHeadCamp" ):toUtf8()), --- ["arrive at camp"] = tostring(i18n.get( "uiR2EdArriveCamp" ):toUtf8()), --- ["death"] = tostring(i18n.get( "uiR2EdDeath" ):toUtf8()), --- ["end of activity step"] = tostring(i18n.get( "uiR2EdEndActivityStep" ):toUtf8()), --- ["begin of activity step"] = tostring(i18n.get( "uiR2EdBeginActivityStep" ):toUtf8()), --- ["end of activity sequence"] = tostring(i18n.get( "uiR2EdEndActivitySequ" ):toUtf8()), --- ["begin of activity sequence"] = tostring(i18n.get( "uiR2EdBeginOfActivitySequ" ):toUtf8()), - --- ["end of chat step"] = tostring(i18n.get( "uiR2EdEndChatStep" ):toUtf8()), --- ["end of chat sequence"] = tostring(i18n.get( "uiR2EdEndChatSequ" ):toUtf8()), --- ["group death"] = tostring(i18n.get( "uiR2EdGroupDeath" ):toUtf8()), - }, - - - ["Conditions"] = { --- ["is active"] = tostring(i18n.get( "uiR2EdIsActive" ):toUtf8()), --- ["is inactive"] = tostring(i18n.get( "uiR2EdIsInactive" ):toUtf8()), --- ["is dead"] = tostring(i18n.get( "uiR2EdIsDead" ):toUtf8()), --- ["is alive"] = tostring(i18n.get( "uiR2EdIsAlive" ):toUtf8()), --- ["is wandering"] = tostring(i18n.get( "uiR2EdIsWandering" ):toUtf8()), --- ["is sitting"] = tostring(i18n.get( "uiR2EdIsSitting" ):toUtf8()), --- ["is heading to wander zone"] = tostring(i18n.get( "uiR2EdIsHeadingWanderZone" ):toUtf8()), --- ["is heading to camp"] = tostring(i18n.get( "uiR2EdIsHeadingCamp" ):toUtf8()), --- ["is in activity sequence"] = tostring(i18n.get( "uiR2EdIsInActivitySequ" ):toUtf8()), --- ["is in activity step"] = tostring(i18n.get( "uiR2EdIsInActivityStep" ):toUtf8()), --- ["is in chat sequence"] = tostring(i18n.get( "uiR2EdIsInChatSequ" ):toUtf8()), --- ["is in chat step"] = tostring(i18n.get( "uiR2EdIsInChatStep" ):toUtf8()), - }, -} - ------------------------------------------------- --- private: implement mergeComponentsLogicEntityAttributes -function r2:registerComponentsLogicEntityAttributes(localLogicEntityAttributes) - local k, v = next(localLogicEntityAttributes, nil) - while k do - local k2, v2 = next(v, nil) - while k2 do - if not r2.logicEntityAttributes[k][k2] then - r2.logicEntityAttributes[k][k2] = v2 - end - k2, v2 = next(v, k2) - end - k, v = next(localLogicEntityAttributes, k) - end - end - ------------------------------------------------- --- -function r2:mergeComponentsLogicEntityAttributes() - local k, v = next(r2.Classes, nil) - while k do - if v.getLogicTranslations then - local localLogicEntityAttributes = v:getLogicTranslations() - if localLogicEntityAttributes then - r2:registerComponentsLogicEntityAttributes(localLogicEntityAttributes) - else - debugInfo(colorTag(255,0,0).."No Translation for component "..k) - end - end - k, v = next(r2.Classes, k) - end -end - - - - -------------------------------------------- INITIALISATION ------------------------------ --- global initialization -function r2:initLogicEntityEditor() - r2:initActionEditor() - r2:initReactionEditor() -end - ------------------- INIT EVENTS EDITOR ---------------------------------------------------------------- -function r2:initEventsEditor() - - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - -- create action editor - local actions = logicEntityUI:find("actions") - assert(actions) - - local listActions = actions:find("elements_list") - assert(listActions) - - local newEditorElt = createGroupInstance("template_edit_action", listActions.id, {id="edit_element", active="false"}) - assert(newEditorElt) - listActions:addChild(newEditorElt) - listActions.parent:updateCoords() - - newEditorElt.active = false - newEditorElt.Env.isEditor = true - - -- add target scroll - local actionsList = newEditorElt:find("actions_list") - assert(actionsList) - local conditionsList = newEditorElt:find("conditions_list") - assert(conditionsList) - - local menusList = actionsList:find("menus_list") - assert(menusList) - local scroll = actionsList:find("scroll_bar") - assert(scroll) - scroll:setTarget(menusList.id) - - menusList = conditionsList:find("menus_list") - assert(menusList) - scroll = conditionsList:find("scroll_bar") - assert(scroll) - scroll:setTarget(menusList.id) - - -- create reaction editor - local reactions = logicEntityUI:find("reactions") - assert(reactions) - - local listReactions = reactions:find("elements_list") - assert(listReactions) - - newEditorElt = createGroupInstance("template_edit_reaction", listReactions.id, {id="edit_element", active="false"}) - assert(newEditorElt) - listReactions:addChild(newEditorElt) - listReactions.parent:updateCoords() - - newEditorElt.active = false - newEditorElt.Env.isEditor = true - - -- add target scroll - actionsList = newEditorElt:find("actions_list") - assert(actionsList) - conditionsList = newEditorElt:find("conditions_list") - assert(conditionsList) - - local menusList = actionsList:find("menus_list") - assert(menusList) - local scroll = actionsList:find("scroll_bar") - assert(scroll) - scroll:setTarget(menusList.id) - - menusList = conditionsList:find("menus_list") - assert(menusList) - scroll = conditionsList:find("scroll_bar") - assert(scroll) - scroll:setTarget(menusList.id) -end - -function r2:getActionEditor() - return r2:getElementEditor("actions") -end - -function r2:getReactionEditor() - return r2:getElementEditor("reactions") -end - -function r2:getElementEditor(tabName) - - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local actions = logicEntityUI:find(tabName) - assert(actions) - - local listActions = actions:find("elements_list") - assert(listActions) - - return listActions:find("edit_element") -end - -function r2:initActionEditor() - - --local actionsEditor = getUI("ui:interface:r2ed_actions") - local actionsEditor = r2:getActionEditor() - assert(actionsEditor) - - -- Action editor / Actions / Which entity - local whichEntityButton = actionsEditor:find("actions_list"):find("menus_list"):getChild(0):find("left_menu"):find("select") - assert(whichEntityButton) - r2.whichEntityButtons[whichEntityButton.id] = {paramsLineLeft=r2.actionWhichEntity, - paramsLeft="r2:openWhichEntityMenu()", - paramsRight="r2:openRightMenu(true, 'ApplicableActions', 'r2:actionWhatAction')", - removePair="r2:removeActionStep(true)", paramsOver="r2:activeTrashButton()"} - - -- Action editor / Extra conditions / Which entity - whichEntityButton = actionsEditor:find("conditions_list"):find("menus_list"):getChild(0):find("left_menu"):find("select") - assert(whichEntityButton) - r2.whichEntityButtons[whichEntityButton.id] = {paramsLineLeft=r2.actionConditionWhichEntity, - paramsLeft="r2:openWhichEntityMenu()", - paramsRight="r2:openRightMenu(true, 'Conditions', 'r2:actionWhatCondition')", - removePair="r2:removeActionConditionStep()", paramsOver="r2:activeTrashButton()"} -end - -function r2:initReactionEditor() - - --local reactionsEditor = getUI("ui:interface:r2ed_reactions") - local reactionsEditor = r2:getReactionEditor() - assert(reactionsEditor) - - -- Reaction editor / What triggers this reaction / Which entity - local whichEntityButton = reactionsEditor:find("triggers"):find("combos"):find("left_menu"):find("select") - assert(whichEntityButton) - r2.whichEntityButtons[whichEntityButton.id] = {paramsLineLeft=r2.reactionWhatTriggersWhichEntity, - paramsLeft="r2:openWhichEntityMenu()", - paramsRight="r2:openRightMenu(true, 'Events', 'r2:reactionWhichEvent')"} - - -- Rection editor / Actions / Which entity - local whichEntityButton = reactionsEditor:find("actions_list"):find("menus_list"):getChild(0):find("left_menu"):find("select") - assert(whichEntityButton) - r2.whichEntityButtons[whichEntityButton.id] = {paramsLineLeft=r2.reactionActionWhichEntity, - paramsLeft="r2:openWhichEntityMenu()", - paramsRight="r2:openRightMenu(true, 'ApplicableActions', 'r2:reactionWhatAction')", - removePair="r2:removeActionStep(false)", paramsOver="r2:activeTrashButton()"} - - -- Reaction editor / Extra conditions / Which entity - whichEntityButton = reactionsEditor:find("conditions_list"):find("menus_list"):getChild(0):find("left_menu"):find("select") - assert(whichEntityButton) - r2.whichEntityButtons[whichEntityButton.id] = {paramsLineLeft=r2.reactionConditionWhichEntity, - paramsLeft="r2:openWhichEntityMenu()", - paramsRight="r2:openRightMenu(true, 'Conditions', 'r2:reactionWhatCondition')", - removePair="r2:removeReactionConditionStep()", paramsOver="r2:activeTrashButton()"} -end - ------------------------------------------------------------------------------------------------------------ ------------------------------------- FIRST MENU ----------------------------------------------------------- ------------------------------------------------------------------------------------------------------------ --- when a "which entity" button is pushed, the "which entity" menu is open -function r2:openWhichEntityMenu() - - r2.whichEntitySelectedButtonId = getUICaller().id - r2:initWhichEntityMenu() - r2:openLogicEntityMenu(getUICaller()) -end - - ----------------------------------------------------------------------------------------------------------- --- register features to menu LogicEntityMenu -function r2:registerFeaturesMenu(logicEntityMenu) - do - local k,v = next(r2.Classes, nil) - while k do - if v.initLogicEntitiesMenu then v:initLogicEntitiesMenu(logicEntityMenu) end - k,v = next(r2.Classes, k) - end - end - -end - - ------------------------------------------------------------------------------------------------------------ --- returns a list of instance of all act of the scenario (not only the base act and the current act) -function r2:getAllActInstances() - local ret = {} - if not r2.Scenario then return ret end - - local base = true - local k, v = next(r2.Scenario.Acts, nil) - while k do - if base then - base = false - else - table.insert(ret, v) - end - k, v = next(r2.Scenario.Acts, k) - end - return ret -end - ------------------------------------------------------------------------------------------------------------ --- "which entity" menu initialization, called when "which menu" is open -function r2:initWhichEntityMenu() - - -- which entity menu initialization - local logicEntityMenu = getUI("ui:interface:r2ed_logic_entity_menu") - assert(logicEntityMenu) - - local logicEntityMenu = logicEntityMenu:getRootMenu() - assert(logicEntityMenu) - - logicEntityMenu:reset() - - local name = i18n.get("uiR2EdBanditCamps") - logicEntityMenu:addLine(ucstring(name), "lua", "", "BanditCampFeature") - - name = i18n.get("uiR2EdGroups") - logicEntityMenu:addLine(ucstring(name), "lua", "", "NpcGrpFeature") - - name = i18n.get("uiR2EdNPCs") - logicEntityMenu:addLine(ucstring(name), "lua", "", "Npc") - - r2:registerFeaturesMenu(logicEntityMenu) - - for i=0,logicEntityMenu:getNumLine()-1 do - local lineId = tostring(logicEntityMenu:getLineId(i)) - local entitiesTable = nil - if lineId == "Act" then - entitiesTable = r2:getAllActInstances() - else - entitiesTable = r2.Scenario:getAllInstancesByType(lineId) - end - - logicEntityMenu:addSubMenu(i) - local subMenu = logicEntityMenu:getSubMenu(i) - - local count = 0 - for key, entity in pairs(entitiesTable) do - local addLine = true - if entity:isKindOf("Act") and (entity:isBaseAct()) then - addLine = false - end - if entity:isKindOf("Npc") and (entity:isBotObject() or entity:isPlant()) then - addLine = false - end - if addLine then - subMenu:addLine(ucstring(entity.Name), "lua", "r2:selectWhichEntity(".. tostring(i) .. "," .. tostring(count) .. ")", entity.InstanceId) - count=count+1 - end - end - - if count == 0 then - subMenu:addLine(i18n.get("uiR2EdNoSelelection"), "", "", "") - end - end -end - ------------------------------------------------------------------------------------------------------------ --- the commun "logic entity" menu is open -function r2:openLogicEntityMenu(caller) - - local menuName = "ui:interface:r2ed_logic_entity_menu" - launchContextMenuInGame(menuName) - local menu = getUI(menuName) - - menu:updateCoords() - menu.y = caller.y_real - (menu.h - caller.h_real) - menu.x = caller.x_real - menu:updateCoords() -end - ------------------------------------------------------------------------------------------------------------ --- a logical entity is selected in the "which entity" menu --- the correct method is called in function of the "which entity" button which has been pushed previously -function r2:selectWhichEntity(subMenuIndex, lineIndex) - - local whichEntityMenu = getUI("ui:interface:r2ed_logic_entity_menu") - assert(whichEntityMenu) - - whichEntityMenu = whichEntityMenu:getRootMenu() - - local whichEntitySubMenu = whichEntityMenu:getSubMenu(subMenuIndex) - assert(whichEntitySubMenu) - - local entityId = tostring(whichEntitySubMenu:getLineId(lineIndex)) - - local entityInstance = r2:getInstanceFromId(entityId) - assert(entityInstance) - - local selectButton = getUI(r2.whichEntitySelectedButtonId) - assert(selectButton) - - -- necessary data when right menu will be selected - selectButton.parent.parent.Env.oldEntityId = selectButton.parent.parent.Env.entityId - selectButton.parent.parent.Env.entityId = entityId - - -- update correct property - local updateWhichEntity = r2.whichEntityButtons[r2.whichEntitySelectedButtonId].paramsLineLeft - updateWhichEntity(entityInstance) -end - - -function r2:createNewMenuPairAndComponent(newComponentName) - - local leftButton = getUI(r2.whichEntitySelectedButtonId) - local buttonParams = r2.whichEntityButtons[r2.whichEntitySelectedButtonId] - - local listMenu = leftButton.parent.parent.parent.parent - assert(listMenu) - - -- the pushed "which entity" button is in a list - -- if it's the last child of this list, a new pair of buttons must be added at the end - if listMenu:getChild(listMenu.childrenNb-1).id == leftButton.parent.parent.parent.id then - - -- create new menu pair template - r2:createNewMenuPair(listMenu, buttonParams) - - -- create new lua component for menus whose left button has been pushed - return r2.newComponent(newComponentName) - end - return nil -end - -function r2:createNewMenuPair(listMenu, buttonParams) - - local newId = "menu_pair"..(listMenu.childrenNb+1) - - -- create new UI element - local newButtonPair = createGroupInstance("two_menu_trash_template", listMenu.id, - {id=newId, params_left=buttonParams.paramsLeft, params_right=buttonParams.paramsRight, - remove_pair=buttonParams.removePair, col_pushed="255 255 255 255", - params_over=buttonParams.paramsOver}) - - listMenu:addChild(newButtonPair) - listMenu.parent:updateCoords() - - local newLeftButton = newButtonPair:find("left_menu"):find("select") - assert(newLeftButton) - - r2.whichEntityButtons[newLeftButton.id] = {paramsLineLeft=buttonParams.paramsLineLeft, - paramsLeft=buttonParams.paramsLeft, paramsRight=buttonParams.paramsRight, - removePair=buttonParams.removePair, paramsOver=buttonParams.paramsOver} - - return newButtonPair -end - ------------------------------------------------------------------------------------------------------------ --- update an action text -function r2:updateActionText(actionUI) - - if actionUI == nil then - actionUI = r2:getSelectedEltUI(r2.logicEntityUIPath.."actions") - end - assert(actionUI) - - local actionInst = r2:getInstanceFromId(actionUI.Env.elementId) - - local actionText = actionUI:find("text_list") - assert(actionText) - - actionText:clear() - - if actionInst ~= nil then - - local sep = actionUI:find("sep") - assert(sep) - - if actionInst.Actions.Size > 0 then - actionText:addColoredTextChild("\n"..tostring(i18n.get("uiR2EdActionStepList")), 250, 200, 0, 255) - - local totalText = "" - - for a = 0, actionInst.Actions.Size - 1 do - local actionStep = actionInst.Actions[a] - assert(actionStep) - - local entity = r2:getInstanceFromId(actionStep.Entity) - local actionType = actionStep.Action - - if entity then - totalText = totalText..entity.Name - totalText = totalText .. " : " - - if actionType.Type ~= "" then - local textValue = r2.logicEntityAttributes["ApplicableActions"][actionType.Type] - if textValue == nil then textValue = "?".. actionType.Type.."?" end - totalText = totalText .. textValue - if actionType.Value ~= "" then - local inst = r2:getInstanceFromId(actionType.Value) - if inst ~= nil then - totalText = totalText .. " " .. inst.Name - end - end - else - totalText = totalText .. "..." - end - end - - totalText = totalText.."\n" - end - - actionText:addTextChild(ucstring(totalText)) - sep.active = true - else - sep.active = false - end - end - - -- update titel - r2:buildActionTitle(actionUI, false) - - local selectedAction = r2:getSelectedEltInstId(r2.logicEntityUIPath.."actions") - if selectedAction and selectedAction == actionInst.InstanceId then - r2:updateActionEditor() - end -end - ------------------------------------------------------------------------------------------------------------ --- update a reaction text -function r2:updateReactionText(reactionUI) - - if reactionUI == nil then - reactionUI = r2:getSelectedEltUI(r2.logicEntityUIPath.."reactions") - end - assert(reactionUI) - - local reactionInst = r2:getInstanceFromId(reactionUI.Env.elementId) - assert(reactionInst) - - local actionInst = r2:getInstanceFromId(reactionInst.LogicEntityAction) - - local reactionText = reactionUI:find("text_list") - assert(reactionText) - - local sep = reactionUI:find("sep") - assert(sep) - - reactionText:clear() - - if actionInst ~= nil then - - if actionInst.Actions.Size > 1 then - - reactionText:addColoredTextChild("\n"..tostring(i18n.get("uiR2EdOtherActionStepList")), 170, 95, 235, 255) - local totalText = "" - - for a = 0, actionInst.Actions.Size - 1 do - local actionStep = actionInst.Actions[a] - assert(actionStep) - - if actionStep.InstanceId ~= reactionInst.ActionStep then - - local entity = r2:getInstanceFromId(actionStep.Entity) - local actionType = actionStep.Action - - if entity then - totalText = totalText..entity.Name - totalText = totalText .. " : " - - if actionType.Type ~= "" then - totalText = totalText .. r2.logicEntityAttributes["ApplicableActions"][actionType.Type] - if actionType.Value ~= "" then - local inst = r2:getInstanceFromId(actionType.Value) - if inst ~= nil then - totalText = totalText .. " " .. inst.Name - end - end - else - totalText = totalText .. "..." - end - end - - totalText = totalText .. "\n" - end - end - - reactionText:addTextChild(ucstring(totalText)) - - sep.active = true - else - sep.active = false - end - end - - -- update title reaction - r2:buildReactionTitle(reactionUI, false) - - local selectedReaction = r2:getSelectedEltInstId(r2.logicEntityUIPath.."reactions") - if selectedReaction and selectedReaction == reactionInst.InstanceId then - r2:updateReactionEditor() - end -end - ------------------------------------------------------------------------------------------------------------ --- selection of a logic entity in Action editor/Actions/Which entity menu -r2.actionWhichEntity = function(logicEntity) - - r2.requestNewAction(i18n.get("uiR2EDSetwhichEntityAction")) - - local actionInstId = r2:getSelectedEltInstId(r2.logicEntityUIPath.."actions") - local action = r2:getInstanceFromId(actionInstId) - assert(action) - - local actionStep = r2:createNewMenuPairAndComponent("ActionStep") - if actionStep ~= nil then - actionStep.Entity = r2.RefId(logicEntity.InstanceId) - r2.requestInsertNode(actionInstId, "Actions", -1, "", actionStep) - local reaction = r2.newComponent("LogicEntityReaction") - reaction.LogicEntityAction = actionInstId - reaction.ActionStep = actionStep.InstanceId - - r2.requestInsertNode(logicEntity:getBehavior().InstanceId, "Reactions", -1, "", reaction) - else - local leftButton = getUI(r2.whichEntitySelectedButtonId) - assert(leftButton) - - local menuPair = leftButton.parent.parent.parent - assert(menuPair) - - local menuList = menuPair.parent - assert(menuList) - - local actionStepIndex = menuList:getElementIndex(menuPair) - local actionStep = action.Actions[actionStepIndex] - assert(actionStep) - - local oldWhichEntity = r2:getInstanceFromId(tostring(actionStep.Entity)) - - -- the associated reaction must be given to correct logic entity - - if oldWhichEntity and oldWhichEntity.InstanceId ~= logicEntity.InstanceId then - local index - for r = 0, oldWhichEntity:getBehavior().Reactions.Size - 1 do - if oldWhichEntity:getBehavior().Reactions[r].ActionStep == actionStep.InstanceId then - index = r - break - end - end - - r2.requestMoveNode(oldWhichEntity:getBehavior().InstanceId, "Reactions", index, - logicEntity:getBehavior().InstanceId, "Reactions", -1) - - r2.requestSetNode(actionStep.InstanceId, "Entity", r2.RefId(logicEntity.InstanceId)) - - -- empty property by waiting user choice - r2.requestSetNode(actionStep.Action.InstanceId, "Type", "") - r2.requestSetNode(actionStep.Action.InstanceId, "Value", r2.RefId("")) - end - end -end - ------------------------------------------------------------------------------------------------------------ --- selection of a logic entity in Action editor/Extra conditions/Which entity menu -r2.actionConditionWhichEntity = function(logicEntity) - - r2.requestNewAction(i18n.get("uiR2EDSetWhichEntityConditionAction")) - - local actionInstId = r2:getSelectedEltInstId(r2.logicEntityUIPath.."actions") - - local conditionStep = r2:createNewMenuPairAndComponent("ConditionStep") - if conditionStep ~= nil then - conditionStep.Entity = r2.RefId(logicEntity.InstanceId) - r2.requestInsertNode(actionInstId, "Conditions", -1, "", conditionStep) - else - - local action = r2:getInstanceFromId(actionInstId) - assert(action) - - local leftButton = getUI(r2.whichEntitySelectedButtonId) - assert(leftButton) - - local menuPair = leftButton.parent.parent.parent - assert(menuPair) - - local menuList = menuPair.parent - assert(menuList) - - local conditionStepIndex = menuList:getElementIndex(menuPair) - local conditionStep = action.Conditions[conditionStepIndex] - assert(conditionStep) - - r2.requestSetNode(conditionStep.InstanceId, "Entity", r2.RefId(logicEntity.InstanceId)) - - -- empty property by waiting user choice - r2.requestSetNode(conditionStep.Condition.InstanceId, "Type", "") - r2.requestSetNode(conditionStep.Condition.InstanceId, "Value", r2.RefId("")) - end -end - ------------------------------------------------------------------------------------------------------------ --- selection of a logic entity in Reaction editor/What triggers this reaction/Which entity menu -r2.reactionWhatTriggersWhichEntity = function(logicEntity) - - r2.requestNewAction(i18n.get("uiR2EDSetWhatTriggersWhichEntityAction")) - local selectButton = getUI(r2.whichEntitySelectedButtonId) - assert(selectButton) - - -- if left button is this of "Reaction editor/What triggers this reaction" - -- we create actually the "LogicEntityReaction" and its associated "LogicEntityAction" and "ActionStep" - local uiName = r2.logicEntityUIPath.."reactions" - local element = r2:getSelectedEltUI(uiName) - if element.Env.WhatTriggers~=nil and not element.Env.WhatTriggers then - - element.Env.WhatTriggers = true - - local reactionEditor = r2:getReactionEditor() - assert(reactionEditor) - - local actions = reactionEditor:find("actions_list") - assert(actions) - actions.active = true - - local conditions = reactionEditor:find("conditions_list") - assert(conditions) - conditions.active = true - - local reaction = r2.newComponent("LogicEntityReaction") - - r2:setSelectedEltInstId(uiName, reaction.InstanceId) - - -- we create associated LogicEntityAction and ActionStep - local selectedLogicEntity = r2:getSelectedInstance() - local action = r2.newComponent("LogicEntityAction") - local actionStep = r2.newComponent("ActionStep") - actionStep.Entity = r2.RefId(selectedLogicEntity.InstanceId) - table.insert(action.Actions, actionStep) - - reaction.LogicEntityAction = action.InstanceId - reaction.ActionStep = actionStep.InstanceId - - r2.requestInsertNode(logicEntity:getBehavior().InstanceId, "Actions", -1, "", action) - r2.requestInsertNode(selectedLogicEntity:getBehavior().InstanceId, "Reactions", -1, "", reaction) - - element.Env.elementId = reaction.InstanceId - - -- the trigger logic entity is changed : the "LogicEntityAction" property of the reaction - -- is moved to the new trigger - else - local oldWhichEntity = r2:getInstanceFromId(selectButton.parent.parent.Env.oldEntityId) - assert(oldWhichEntity) - - selectButton.parent.parent.Env.oldEntityId = nil - - local reactionInst = r2:getSelectedEltInst(uiName) - local actionId = reactionInst.LogicEntityAction - - local index - for a = 0, oldWhichEntity:getBehavior().Actions.Size - 1 do - if oldWhichEntity:getBehavior().Actions[a].InstanceId == actionId then - index = a - break - end - end - - if oldWhichEntity.InstanceId ~= logicEntity.InstanceId then - r2.requestMoveNode(oldWhichEntity:getBehavior().InstanceId, "Actions", index, - logicEntity:getBehavior().InstanceId, "Actions", -1) - - -- empty property by waiting user choice - local actionInst = r2:getInstanceFromId(actionId) - assert(actionInst) - r2.requestSetNode(actionInst.Event.InstanceId, "Type", "") - r2.requestSetNode(actionInst.Event.InstanceId, "Value", r2.RefId("")) - end - end -end - ------------------------------------------------------------------------------------------------------------ --- selection of a logic entity in Reaction editor/Actions/Which entity menu -r2.reactionActionWhichEntity = function(logicEntity) - - r2.requestNewAction(i18n.get("uiR2EDSetReactionActionWhichEntityAction")) - - local reactionInst = r2:getSelectedEltInst(r2.logicEntityUIPath.."reactions") - assert(reactionInst) - - local action = r2:getInstanceFromId(reactionInst.LogicEntityAction) - - local actionStep = r2:createNewMenuPairAndComponent("ActionStep") - if actionStep ~= nil then - actionStep.Entity = r2.RefId(logicEntity.InstanceId) - - if action then - r2.requestInsertNode(action.InstanceId, "Actions", -1, "", actionStep) - end - - -- new LogicEntityReaction - local newReaction = r2.newComponent("LogicEntityReaction") - newReaction.LogicEntityAction = reactionInst.LogicEntityAction - newReaction.ActionStep = actionStep.InstanceId - - r2.requestInsertNode(logicEntity:getBehavior().InstanceId, "Reactions", -1, "", newReaction) - else - - local leftButton = getUI(r2.whichEntitySelectedButtonId) - assert(leftButton) - - local menuPair = leftButton.parent.parent.parent - assert(menuPair) - - local menuList = menuPair.parent - assert(menuList) - - local actionIndex = menuList:getElementIndex(menuPair) - assert(actionIndex) - - local maxSize = actionIndex - if actionIndex >= action.Actions.Size then actionIndex = action.Actions.Size-1 end - for i=0, maxSize do - local actionStepInst = action.Actions[i] - if actionStepInst.InstanceId == reactionInst.ActionStep then - actionIndex = actionIndex+1 - break - end - end - - local actionInst = r2:getInstanceFromId(reactionInst.LogicEntityAction) - assert(actionInst) - - local actionStepInst = actionInst.Actions[actionIndex] - assert(actionStepInst) - - local oldWhichEntity = r2:getInstanceFromId(tostring(actionStepInst.Entity)) - - - -- the associated reaction must be given to correct logic entity - if oldWhichEntity and oldWhichEntity.InstanceId ~= logicEntity.InstanceId then - local index - for r = 0, oldWhichEntity:getBehavior().Reactions.Size - 1 do - if oldWhichEntity:getBehavior().Reactions[r].ActionStep == actionStepInst.InstanceId then - index = r - break - end - end - - r2.requestMoveNode(oldWhichEntity:getBehavior().InstanceId, "Reactions", index, - logicEntity:getBehavior().InstanceId, "Reactions", -1) - - r2.requestSetNode(actionStepInst.InstanceId, "Entity", r2.RefId(logicEntity.InstanceId)) - - -- empty property by waiting user choice - r2.requestSetNode(actionStepInst.Action.InstanceId, "Type", "") - r2.requestSetNode(actionStepInst.Action.InstanceId, "Value", r2.RefId("")) - end - end -end - ------------------------------------------------------------------------------------------------------------ --- selection of a logic entity in Reaction editor/Extra conditions/Which entity menu -r2.reactionConditionWhichEntity = function(logicEntity) - - r2.requestNewAction(i18n.get("uiR2EDSetReactionConditionWhichEntityAction")) - - local reactionInstId = r2:getSelectedEltInstId(r2.logicEntityUIPath.."reactions") - local reaction = r2:getInstanceFromId(reactionInstId) - assert(reaction) - - local conditionStep = r2:createNewMenuPairAndComponent("ConditionStep") - if conditionStep ~= nil then - - conditionStep.Entity = r2.RefId(logicEntity.InstanceId) - - local action = r2:getInstanceFromId(reaction.LogicEntityAction) - if action then - r2.requestInsertNode(action.InstanceId, "Conditions", -1, "", conditionStep) - end - else - - local leftButton = getUI(r2.whichEntitySelectedButtonId) - assert(leftButton) - - local menuPair = leftButton.parent.parent.parent - assert(menuPair) - - local menuList = menuPair.parent - assert(menuList) - - local conditionIndex = menuList:getElementIndex(menuPair) - assert(conditionIndex) - - local actionInst = r2:getInstanceFromId(reaction.LogicEntityAction) - assert(actionInst) - - local conditionInst = actionInst.Conditions[conditionIndex] - assert(conditionInst) - - r2.requestSetNode(conditionInst.InstanceId, "Entity", r2.RefId(logicEntity.InstanceId)) - - -- empty property by waiting user choice - r2.requestSetNode(conditionInst.Condition.InstanceId, "Type", "") - r2.requestSetNode(conditionInst.Condition.InstanceId, "Value", r2.RefId("")) - end -end - - -function r2:activeTrashButton() - - local menuTrashPair = getUICaller().parent.parent.parent - assert(menuTrashPair) - - local trashButtonCaller = menuTrashPair:find("remove_menu_pair") - assert(trashButtonCaller) - - local pairList = menuTrashPair.parent - assert(pairList) - - if menuTrashPair.id == pairList:getChild(pairList.childrenNb-1).id then return end - - for i=0, pairList.childrenNb-1 do - local pair = pairList:getChild(i) - assert(pair) - - local trashButton = pair:find("remove_menu_pair") - assert(trashButton) - - if trashButton.active then - if trashButton.id == trashButtonCaller.id then return end - trashButton.active = false - break - end - end - - trashButtonCaller.active = true -end - ------------------------------------------------------------------------------------------------------------ ------------------------------------- SECOND MENU ---------------------------------------------------------- ------------------------------------------------------------------------------------------------------------ --- when the second button of a menu pair is pushed, the second menu is open -r2.openSequencesMenu = { ["begin activity sequence"]= {element="activity", singleSubMenu=true}, - ["end of activity sequence"]={element="activity", singleSubMenu=true}, - ["is in activity sequence"]= {element="activity", singleSubMenu=true}, - ["begin chat sequence"]= {element="chat", singleSubMenu=true}, - ["end of chat sequence"]= {element="chat", singleSubMenu=true}, - ["is in chat sequence"]= {element="chat", singleSubMenu=true}, - ["is in activity step"]= {element="activity", singleSubMenu=false}, - ["end of activity step"]= {element="activity", singleSubMenu=false}, - ["begin of activity step"]= {element="activity", singleSubMenu=false}, - ["end of chat step"]= {element="chat", singleSubMenu=false}, - ["is in chat step"]= {element="chat", singleSubMenu=false}, - ["starts chat"]= {element="chatstep", singleSubMenu=true} - - --["member death"]= {element="npc", singleSubMenu=true} - - } - -function r2:openRightMenu(isEntityOfLeftMenu, loadTable, selectLineFunction) - - -- logic entity menu initialization - local logicEntityMenu = getUI("ui:interface:r2ed_logic_entity_menu") - assert(logicEntityMenu) - - local logicEntityMenu = logicEntityMenu:getRootMenu() - assert(logicEntityMenu) - - logicEntityMenu:reset() - r2.rightSelectedButtonId = getUICaller().id - - -- either menu is relative to selected logic entity or to selected entity in left menu (which entity...) - local entityInst - if isEntityOfLeftMenu then - - local entityId = getUICaller().parent.parent.parent.Env.entityId - - if entityId == nil then - entityId = getUICaller().parent.parent.Env.entityId - end - - if entityId == nil then - return - else - entityInst = r2:getInstanceFromId(entityId) - end - else - entityInst = r2:getSelectedInstance() - end - assert(entityInst) - - -- initialization of "logic entity" menu - local class = r2.Classes[entityInst.Class] - assert(class) - - for i=1,table.getn(class[loadTable]) do - local action = class[loadTable][i] - local openSequencesMenu = r2.openSequencesMenu[action] - local actionName = r2.logicEntityAttributes[loadTable][action] - if actionName == nil then actionName = "?"..action.."?" end - local actionText = ucstring(actionName) - if openSequencesMenu ~= nil then - - -- first line - logicEntityMenu:addLine(actionText, "", "", action) - - -- sequences sub menu - logicEntityMenu:addSubMenu(i-1) - local subMenu = logicEntityMenu:getSubMenu(i-1) - - local sequences - if openSequencesMenu.element == "activity" then - sequences = entityInst:getBehavior().Activities - elseif openSequencesMenu.element == "chat" then - sequences = entityInst:getBehavior().ChatSequences - elseif openSequencesMenu.element == "chatstep" then - sequences = entityInst.Components - elseif openSequencesMenu.element == "npc" then - sequences = entityInst.Components - end - - local count1 = 0 - for s = 0, sequences.Size - 1 do - local sequence = sequences[s] - - if not openSequencesMenu.singleSubMenu then - - --subMenu:addLine(ucstring(sequence.Name), "", "", sequence.InstanceId) - subMenu:addLine(ucstring(r2:getSequenceName(sequence)), "", "", sequence.InstanceId) - - -- steps sub menu - subMenu:addSubMenu(s) - local stepsMenu = subMenu:getSubMenu(s) - - local steps = sequence.Components - if steps.Size == 0 then - stepsMenu:addLine(i18n.get("uiR2EdNoSelelection"), "lua", selectLineFunction .. "()", "") - end - - local count2 = 0 - for s = 0, steps.Size - 1 do - local step = steps[s] - local stepName = r2:getElementName(step) - stepsMenu:addLine(ucstring(stepName), "lua", - selectLineFunction.. "('".. action .. "','" .. step.InstanceId .."')", step.InstanceId) - count2=count2+1 - end - else - --subMenu:addLine(ucstring(sequence.Name), "lua", - subMenu:addLine(ucstring(r2:getSequenceName(sequence)), "lua", - selectLineFunction.. "('".. action .. "','" .. sequence.InstanceId .. "')", sequence.InstanceId) - end - - count1=count1+1 - end - - if sequences.Size == 0 then - subMenu:addLine(i18n.get("uiR2EdNoSelelection"), "lua", selectLineFunction .. "()", "") - end - - else - logicEntityMenu:addLine(actionText, "lua", selectLineFunction .. "('".. action .. "')", action) - end - end - - -- open menu - r2:openLogicEntityMenu(getUICaller()) -end - ------------------------------------------------------------------------------------------------------------ --- selection of an event in "Action editor/on which event" menu -function r2:actionWhichEvent(type, value) - - r2.requestNewAction(i18n.get("uiR2EDSetActionWhichEventAction")) - - local actionEditor = r2:getActionEditor() - assert(actionEditor) - - local whichEventText = actionEditor:find("which_event"):find("menu"):find("text") - assert(whichEventText) - - if value == nil then value = "" end - - -- update "Event" property - local actionInst = r2:getSelectedEltInst(r2.logicEntityUIPath.."actions") - assert(actionInst) - - r2.requestSetNode(actionInst.Event.InstanceId, "Type", type) - r2.requestSetNode(actionInst.Event.InstanceId, "Value", r2.RefId(value)) -end - ------------------------------------------------------------------------------------------------------------ --- selection of an action in "Action editor/Actions/What action" menu -function r2:actionWhatAction(type, value) - - r2.requestNewAction(i18n.get("uiR2EDSetActionWhatActionAction")) - - local rightButton = getUI(r2.rightSelectedButtonId) - assert(rightButton) - - if value == nil then value = "" end - - -- update ActionStep - local action = r2:getSelectedEltInst(r2.logicEntityUIPath.."actions") - assert(action) - - local menuPair = rightButton.parent.parent.parent - assert(menuPair) - - local menuList = menuPair.parent - assert(menuList) - - local actionStepIndex = menuList:getElementIndex(menuPair) - - local actionStepInst = action.Actions[actionStepIndex] - assert(actionStepInst) - - r2.requestSetNode(actionStepInst.Action.InstanceId, "Type", type) - r2.requestSetNode(actionStepInst.Action.InstanceId, "Value", r2.RefId(value)) -end - ------------------------------------------------------------------------------------------------------------ --- selection of a condition in "Action editor/Extra conditions/What condition" menu -function r2:actionWhatCondition(type, value) - - r2.requestNewAction(i18n.get("uiR2EDSetActionWhatConditionAction")) - - local rightButton = getUI(r2.rightSelectedButtonId) - assert(rightButton) - - if value == nil then value = "" end - - -- update ConditionStep - local action = r2:getSelectedEltInst(r2.logicEntityUIPath.."actions") - assert(action) - - local menuPair = rightButton.parent.parent.parent - assert(menuPair) - - local menuList = menuPair.parent - assert(menuList) - - local conditionStepIndex = menuList:getElementIndex(menuPair) - - local conditionStepInst = action.Conditions[conditionStepIndex] - assert(conditionStepInst) - - r2.requestSetNode(conditionStepInst.Condition.InstanceId, "Type", type) - r2.requestSetNode(conditionStepInst.Condition.InstanceId, "Value", r2.RefId(value)) -end - ------------------------------------------------------------------------------------------------------------ --- selection of an event in "Reaction editor/Which event" menu -function r2:reactionWhichEvent(type, value) - - r2.requestNewAction(i18n.get("uiR2EDSetReactionWhichEventAction")) - - if value == nil then value = "" end - - -- update "Event" property of associated LogicEntityAction - local reactionInst = r2:getSelectedEltInst(r2.logicEntityUIPath.."reactions") - - local logicEntityAction = r2:getInstanceFromId(reactionInst.LogicEntityAction) - assert(logicEntityAction) - r2.requestSetNode(logicEntityAction.Event.InstanceId, "Type", type) - r2.requestSetNode(logicEntityAction.Event.InstanceId, "Value", r2.RefId(value)) -end - ------------------------------------------------------------------------------------------------------------ --- selection of an action in "Reaction editor/What action to apply to me" menu -function r2:reactionWhatAction(type, value) - - r2.requestNewAction(i18n.get("uiR2EDSetReactionWhatActionAction")) - - local rightButton = getUI(r2.rightSelectedButtonId) - assert(rightButton) - - if value == nil then value = "" end - - -- update ActionStep - local reactionInst = r2:getSelectedEltInst(r2.logicEntityUIPath.."reactions") - assert(reactionInst) - - local action = r2:getInstanceFromId(reactionInst.LogicEntityAction) - assert(action) - - local menuPair = rightButton.parent.parent.parent - assert(menuPair) - - local menuList = menuPair.parent - assert(menuList) - - local actionIndex = menuList:getElementIndex(menuPair) - - local maxSize = actionIndex - if actionIndex >= action.Actions.Size then actionIndex = action.Actions.Size-1 end - for i=0, maxSize do - local actionStepInst = action.Actions[i] - if actionStepInst.InstanceId == reactionInst.ActionStep then - actionIndex = actionIndex+1 - break - end - end - - local actionStepInst = action.Actions[actionIndex] - assert(actionStepInst) - - r2.requestSetNode(actionStepInst.Action.InstanceId, "Type", type) - r2.requestSetNode(actionStepInst.Action.InstanceId, "Value", r2.RefId(value)) -end - ------------------------------------------------------------------------------------------------------------ --- selection of an action in "Reaction editor/What action to apply to me" menu -function r2:reactionWhatMainAction(type, value) - - r2.requestNewAction(i18n.get("uiR2EDSetReactionWhatMainActionAction")) - - local rightButton = getUI(r2.rightSelectedButtonId) - assert(rightButton) - - if value == nil then value = "" end - - -- update ActionStep - local reactionInst = r2:getSelectedEltInst(r2.logicEntityUIPath.."reactions") - - local actionStepInst = r2:getInstanceFromId(reactionInst.ActionStep) - assert(actionStepInst) - - r2.requestSetNode(actionStepInst.Action.InstanceId, "Type", type) - r2.requestSetNode(actionStepInst.Action.InstanceId, "Value", r2.RefId(value)) -end - ------------------------------------------------------------------------------------------------------------ --- selection of a condition in "Reaction editor/Extra conditions/What condition" menu -function r2:reactionWhatCondition(type, value) - - r2.requestNewAction(i18n.get("uiR2EDSetReactionWhatConditionAction")) - - local rightButton = getUI(r2.rightSelectedButtonId) - assert(rightButton) - - if value == nil then value = "" end - - -- update ConditionStep - local reaction = r2:getSelectedEltInst(r2.logicEntityUIPath.."reactions") - assert(reaction) - - local action = r2:getInstanceFromId(reaction.LogicEntityAction) - assert(action) - - local menuPair = rightButton.parent.parent.parent - assert(menuPair) - - local menuList = menuPair.parent - assert(menuList) - - local conditionIndex = menuList:getElementIndex(menuPair) - - local conditionInst = action.Conditions[conditionIndex] - assert(conditionInst) - - r2.requestSetNode(conditionInst.Condition.InstanceId, "Type", type) - r2.requestSetNode(conditionInst.Condition.InstanceId, "Value", r2.RefId(value)) -end - - - ------------------------------------------------------------------------------------------------------------ ------------------------------------- INTERFACE ------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------ ------------------- CREATE NEW ACTION ---------------------------------------------------------------------- -function r2:newAction(firstRequest, instanceElement) - - r2.requestNewAction(i18n.get("uiR2EDNewActionAction")) - - local uiName = r2.logicEntityUIPath.."actions" - - if firstRequest == true then - local instanceElement = r2.newComponent("LogicEntityAction") - - local logicEntity = r2:getSelectedInstance() - assert(logicEntity) - - r2.requestInsertNode(logicEntity:getBehavior().InstanceId, "Actions", -1, "", instanceElement) - - r2.ownCreatedInstances[instanceElement.InstanceId] = true - else - - local templateParams = { - selectElt="r2:selectAction()", - openEltEditor="r2:openActionEditor()", - maxMinElt="r2:maximizeMinimizeAction()", - removeElt="r2:removeAction()", - colOver="200 150 0 100", - colPushed="200 150 0 255" - } - - local element = r2:newLogicElement("actions", tostring(i18n.get("uiR2EdAction")), templateParams, instanceElement.InstanceId) - - r2:updateActionText(element) - end -end - ---------------------- BUILD ACTION TITLE ---------------------------------------------------------- -function r2:buildActionTitle(actionUI, erase) - - local actionInst = r2:getInstanceFromId(actionUI.Env.elementId) - assert(actionInst) - - -- part1 - local index = r2:searchElementIndex(actionInst) - if erase==true then index = index-1 end - local part1 = tostring(i18n.get("uiR2EdAction")).." "..index.." : " - - -- part2 - local eventType = "..." - if tostring(actionInst.Event.Type) ~= "" then - eventType = actionInst.Event.Type - end - if tostring(actionInst.Event.Value) ~= "" then - local inst = r2:getInstanceFromId(tostring(actionInst.Event.Value)) - assert(inst) - eventType = eventType .. " " .. inst.Name - end - - if actionInst.Event.ValueString and tostring(actionInst.Event.ValueString) ~= "" then - eventType = eventType .. " " .. actionInst.Event.ValueString - end - - - local part2 = tostring(i18n.get("uiR2EdEventTxtPreEvent")).." '" .. eventType .. "' "..string.lower(tostring(i18n.get("uiR2EdAction"))) - - -- title - local title = actionUI:find("title") - assert(title) - title.uc_hardtext= part1..part2 -end - -function r2:getActionName(actionInst) - - -- part1 - local index = r2:searchElementIndex(actionInst) - if erase==true then index = index-1 end - local part1 = tostring(i18n.get("uiR2EdAction")).." "..index.." : " - - -- part2 - local eventType = "..." - if tostring(actionInst.Event.Type) ~= "" then - eventType = actionInst.Event.Type - end - if tostring(actionInst.Event.Value) ~= "" then - local inst = r2:getInstanceFromId(tostring(actionInst.Event.Value)) - assert(inst) - eventType = eventType .. " " .. inst.Name - end - if actionInst.Event.ValueString and tostring(actionInst.Event.ValueString) ~= "" then - eventType = eventType .. " " .. actionInst.Event.ValueString - end - - - local part2 = tostring(i18n.get("uiR2EdEventTxtPreEvent")).." '" .. eventType .. "' "..string.lower(tostring(i18n.get("uiR2EdAction"))) - - return part1..part2 -end - ------------------- SELECT ACTION ------------------------------------------------------------------ -function r2:selectAction() - - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local tabUI = logicEntityUI:find("actions") - assert(tabUI) - - local sequence = tabUI:find("sequence_elts") - assert(sequence) - - r2:selectElement(sequence, r2.logicEntityUIPath.."actions", false) - - if getUICaller().pushed == true then - r2:openActionEditor() --TEMP - end -end - ------------------- REMOVE ACTION ------------------------------------------------------------------ -function r2:removeAction(removedElement) - - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local tabUI = logicEntityUI:find("actions") - assert(tabUI) - - local sequence = tabUI:find("sequence_elts") - assert(sequence) - - local uiName = r2.logicEntityUIPath.."actions" - - r2:removeElement(sequence, uiName, tostring(i18n.get("uiR2EdAction")), removedElement) -end - ------------------- REMOVE ACTION ------------------------------------------------------------------ -function r2:removeActionUI(removedElement) - - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local tabUI = logicEntityUI:find("actions") - assert(tabUI) - - local sequence = tabUI:find("sequence_elts") - assert(sequence) - - local uiName = r2.logicEntityUIPath.."actions" - - if (removedElement==nil) or (removedElement.id == r2:getSelectedEltUI(uiName)) then - r2:closeActionEditor() - end - - r2:removeElementUI(sequence, uiName, removedElement) -end - -------------------- UP ACTION ---------------------------------------------------------------------- -function r2:upAction() - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local tabUI = logicEntityUI:find("actions") - assert(tabUI) - - local sequence = tabUI:find("sequence_elts") - assert(sequence) - - r2:upElement(sequence, r2.logicEntityUIPath.."actions") -end - ---------------------- DOWN ACTION ------------------------------------------------------------------ -function r2:downAction() - - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local tabUI = logicEntityUI:find("actions") - assert(tabUI) - - local sequence = tabUI:find("sequence_elts") - assert(sequence) - - r2:downElement(sequence, r2.logicEntityUIPath.."actions") -end - --------------- MAX/MIN ACTIONS ---------------------------------------------------------------------- -function r2:maximizeMinimizeActions() - - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local tabUI = logicEntityUI:find("actions") - assert(tabUI) - - local sequence = tabUI:find("sequence_elts") - assert(sequence) - - r2:maximizeMinimizeElements(sequence, r2.logicEntityUIPath.."actions") -end - -----------------MAX/MIN ACTION ----------------------------------------------------------------------- -function r2:maximizeMinimizeAction() - r2:maximizeMinimizeElement(r2.logicEntityUIPath.."actions") -end - -function r2:removeActionStep(fromActionEditor) - - r2.requestNewAction(i18n.get("uiR2EDRemoveActionStepAction")) - - local menuPair = getUICaller().parent.parent.parent.parent - assert(menuPair) - - local menuList = menuPair.parent - assert(menuList) - - local actionStepIndex = menuList:getElementIndex(menuPair) - - local action - if fromActionEditor == true then - action = r2:getSelectedEltInst(r2.logicEntityUIPath.."actions") - else - local reaction = r2:getSelectedEltInst(r2.logicEntityUIPath.."reactions") - assert(reaction) - action = r2:getInstanceFromId(reaction.LogicEntityAction) - end - assert(action) - - - if not fromActionEditor then - local reactionInst = r2:getSelectedEltInst(r2.logicEntityUIPath.."reactions") - assert(reactionInst) - - local maxSize = actionStepIndex - if actionStepIndex >= action.Actions.Size then actionStepIndex = action.Actions.Size-1 end - for i=0, maxSize do - local actionStepInst = action.Actions[i] - if actionStepInst.InstanceId == reactionInst.ActionStep then - actionStepIndex = actionStepIndex+1 - break - end - end - end - - - if actionStepIndex >= action.Actions.Size then return end - - local actionStepInst = action.Actions[actionStepIndex] - assert(actionStepInst) - - r2.requestEraseNode(actionStepInst.InstanceId, "", -1) -end - -function r2:removeActionConditionStep() - - r2.requestNewAction(i18n.get("uiR2EDRemoveActionConditionStepAction")) - - local menuPair = getUICaller().parent.parent.parent.parent - assert(menuPair) - - local menuList = menuPair.parent - assert(menuList) - - local conditionStepIndex = menuList:getElementIndex(menuPair) - - local action = r2:getSelectedEltInst(r2.logicEntityUIPath.."actions") - assert(action) - - if conditionStepIndex >= action.Conditions.Size then return end - - local conditionStepInst = action.Conditions[conditionStepIndex] - assert(conditionStepInst) - - r2.requestEraseNode(conditionStepInst.InstanceId, "", -1) - - r2:updateActionEditor() -end - -function r2:removeReactionConditionStep() - - r2.requestNewAction(i18n.get("uiR2EDRemoveReactionConditionStepAction")) - - local menuPair = getUICaller().parent.parent.parent.parent - assert(menuPair) - - local menuList = menuPair.parent - assert(menuList) - - local conditionStepIndex = menuList:getElementIndex(menuPair) - - local reaction = r2:getSelectedEltInst(r2.logicEntityUIPath.."reactions") - assert(reaction) - - local action = r2:getInstanceFromId(reaction.LogicEntityAction) - assert(action) - - if conditionStepIndex >= action.Conditions.Size then return end - - local conditionStepInst = action.Conditions[conditionStepIndex] - assert(conditionStepInst) - - r2.requestEraseNode(conditionStepInst.InstanceId, "", -1) - - r2:updateReactionEditor() -end - ------------------- OPEN ACTION EDITOR ---------------------------------------------------------------- -function r2:openActionEditor() - - r2:updateActionEditor() - r2:openElementEditor(r2.logicEntityUIPath.."actions", "uiR2EDActionEditor", "r2ed_logic_entities") -end - -function r2:updateActionEditor() - - -- delete menu list in editor and add first double menu in every list - local actionEditor = r2:getActionEditor() - assert(actionEditor) - - -- - local actionsList = actionEditor:find("actions_list") - assert(actionsList) - actionsList = actionsList:find("menus_list") - assert(actionsList) - actionsList:clear() - - local newButtonPair = createGroupInstance("two_menu_trash_template", actionsList.id, - {id="menu_pair1", params_left="r2:openWhichEntityMenu()", - params_right="r2:openRightMenu(true, 'ApplicableActions', 'r2:actionWhatAction')", - remove_pair="r2:removeActionStep(true)", col_pushed="255 255 255 255", - params_over="r2:activeTrashButton()"}) - - actionsList:addChild(newButtonPair) - actionsList.parent:updateCoords() - - -- - local conditionsList = actionEditor:find("conditions_list"):find("menus_list") - assert(conditionsList) - conditionsList:clear() - - newButtonPair = createGroupInstance("two_menu_trash_template", conditionsList.id, - {id="menu_pair1", params_left="r2:openWhichEntityMenu()", - params_right="r2:openRightMenu(true, 'Conditions', 'r2:actionWhatCondition')", - remove_pair="r2:removeActionConditionStep()", col_pushed="255 255 255 255", - params_over="r2:activeTrashButton()"}) - - conditionsList:addChild(newButtonPair) - conditionsList.parent:updateCoords() - - r2:initActionEditor() - - -- action name - local actionName = actionEditor:find("name") - assert(actionName) - - -- update buttons text - local actionInst = r2:getSelectedEltInst(r2.logicEntityUIPath.."actions") - - -- which event text - local whichEvent = actionEditor:find("which_event"):find("menu") - assert(whichEvent) - local whichEventText = whichEvent:find("text") - assert(whichEventText) - - -- which event label - local whichEventLabel = actionEditor:find("which_event"):find("label") - assert(whichEventLabel) - local whichEventNameText = whichEventLabel:find("name_text") - assert(whichEventNameText) - text = r2:getSelectedInstance().Name - whichEventNameText.uc_hardtext = text - - if actionInst ~= nil then - - local index = r2:searchElementIndex(actionInst) - if index~= nil then - actionName.uc_hardtext = tostring(i18n.get("uiR2EdAction")).." "..index.." : " - else - actionName.uc_hardtext = tostring(i18n.get("uiR2EdAction")).." : " - end - - -- which event text - local text = r2.logicEntityAttributes["Events"][actionInst.Event.Type] - if text == nil then text = "" end - if tostring(actionInst.Event.Value) ~= "" then - --text = text .. " : " .. r2:getInstanceFromId(tostring(actionInst.Event.Value)).Name - local inst = r2:getInstanceFromId(tostring(actionInst.Event.Value)) - assert(inst) - text = text .. " : " .. r2:getElementName(inst) - end - whichEventText.uc_hardtext = text - - local previousButtonPair = actionsList:getChild(0) - -- ActionStep list - for i=0, actionInst.Actions.Size-1 do - - local actionStepInst = actionInst.Actions[i] - assert(actionStepInst) - - local buttonParams = r2.whichEntityButtons[actionsList:getChild(0):find("left_menu"):find("select").id] - - newButtonPair = r2:createNewMenuPair(actionsList, buttonParams) - - local whichEntityMenu = previousButtonPair:find("left_menu") - assert(whichEntityMenu) - local whichEntityText = whichEntityMenu:find("text") - assert(whichEntityText) - text = r2:getInstanceFromId(tostring(actionStepInst.Entity)).Name - whichEntityText.uc_hardtext = text - - - local whatActionMenu = previousButtonPair:find("right_menu") - assert(whatActionMenu) - local whatActionText = whatActionMenu:find("text") - assert(whatActionText) - text = r2.logicEntityAttributes["ApplicableActions"][actionStepInst.Action.Type] - if text == nil then text = "" end - if tostring(actionStepInst.Action.Value) ~= "" then - --text = text .. " : " .. r2:getInstanceFromId(tostring(actionStepInst.Action.Value)).Name - local inst = r2:getInstanceFromId(tostring(actionStepInst.Action.Value)) - assert(inst) - text = text .. " : " .. r2:getElementName(inst) - end - whatActionText.uc_hardtext = text - - previousButtonPair.Env.entityId = tostring(actionStepInst.Entity) - previousButtonPair = newButtonPair - end - - -- Conditions list - previousButtonPair = conditionsList:getChild(0) - for i=0, actionInst.Conditions.Size-1 do - - local conditionInst = actionInst.Conditions[i] - assert(conditionInst) - - local buttonParams = r2.whichEntityButtons[conditionsList:getChild(0):find("left_menu"):find("select").id] - - newButtonPair = r2:createNewMenuPair(conditionsList, buttonParams) - - local whichEntityMenu = previousButtonPair:find("left_menu") - assert(whichEntityMenu) - local whichEntityText = whichEntityMenu:find("text") - assert(whichEntityText) - text = r2:getInstanceFromId(tostring(conditionInst.Entity)).Name - whichEntityText.uc_hardtext = text - - local whatConditionMenu = previousButtonPair:find("right_menu") - assert(whatConditionMenu) - local whatConditionText = whatConditionMenu:find("text") - assert(whatConditionText) - text = r2.logicEntityAttributes["Conditions"][conditionInst.Condition.Type] - if text == nil then text = "" end - if tostring(conditionInst.Condition.Value) ~= "" then - --text = text .. " : " .. r2:getInstanceFromId(tostring(conditionInst.Condition.Value)).Name - local inst = r2:getInstanceFromId(tostring(conditionInst.Condition.Value)) - assert(inst) - text = text .. " : " .. r2:getElementName(inst) - end - whatConditionText.uc_hardtext = text - - previousButtonPair.Env.entityId = tostring(conditionInst.Entity) - previousButtonPair = newButtonPair - end - else - - local name = tostring(i18n.get("uiR2EdAction")).." : " - actionName.uc_hardtext = name - - whichEventText.uc_hardtext = "" - end -end - - -------------------- CREATE NEW REACTION --------------------------------------------------------------- -function r2:newReaction(firstRequest, instanceElement) - - local templateParams = { - selectElt="r2:selectReaction()", - openEltEditor="r2:openReactionEditor()", - maxMinElt="r2:maximizeMinimizeReaction()", - removeElt="r2:removeReaction()", - colOver="120 45 185 90", - colPushed="120 45 185 255" - } - - local uiName = r2.logicEntityUIPath.."reactions" - - local element - - if firstRequest == true then - r2.ownCreatedInstances["emptyReaction"]=true - element = r2:newLogicElement("reactions", tostring(i18n.get("uiR2EdReaction")), templateParams, "emptyReaction") - element.Env.WhatTriggers = false - - r2:updateReactionEditor() - else - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local reactionsUI = logicEntityUI:find("reactions") - assert(reactionsUI) - - local reactions = reactionsUI:find("elements_list") - assert(reactions) - - for i=0, reactions.childrenNb-1 do - local reactionUI = reactions:getChild(i) - if reactionUI.Env.elementId == instanceElement.InstanceId then - element = reactionUI - break - end - end - - if element == nil then - element = r2:newLogicElement("reactions", tostring(i18n.get("uiR2EdReaction")), templateParams, instanceElement.InstanceId) - end - - element.Env.WhatTriggers = true - - -- update reaction text and title - r2:updateReactionText(element) - end -end - ------------- BUILD REACTION TITLE ---------------------------------------------------------- -function r2:buildReactionTitle(reactionUI, erase) - - local title = reactionUI:find("title") - assert(title) - - if reactionUI.Env.WhatTriggers==true then - local reactionInst = r2:getInstanceFromId(reactionUI.Env.elementId) - assert(reactionInst) - - -- part1 - local index = r2:searchElementIndex(reactionInst) - if erase==true then index = index-1 end - local part1 = tostring(i18n.get("uiR2EdReaction")).." "..index.." : " - - -- part2 - local actionStep = r2:getInstanceFromId(reactionInst.ActionStep) - assert(actionStep) - local value = tostring(actionStep.Action.Value) - local type = actionStep.Action.Type - local actionType = r2.logicEntityAttributes["ApplicableActions"][type] - if actionType == nil then actionType="" end - if value ~= "" then - local inst = r2:getInstanceFromId(value) - assert(inst) - actionType = actionType .. " " .. inst.Name - end - local part2 = actionType .. " " - - -- part3 - local actionInst = r2:getInstanceFromId(reactionInst.LogicEntityAction) - assert(actionInst) - value = tostring(actionInst.Event.Value) - type = r2.logicEntityAttributes["Events"][actionInst.Event.Type] - if type == nil then type="..." end - local eventType = type - if value ~= "" then - local inst = r2:getInstanceFromId(value) - assert(inst) - eventType = eventType .. " " .. inst.Name - end - - - if actionStep.Action.ValueString and actionStep.Action.ValueString ~= "" then - if string.gfind(eventType, "%%1")() then - eventType = string.gsub(eventType, "%%1", "'"..tostring(actionStep.Action.ValueString).."'") - else - eventType = eventType .. " '" .. tostring(actionStep.Action.ValueString).. "'" - end - end - - - local whichEntity = actionInst.Parent.Parent.Parent - assert(whichEntity) - - local part3 = tostring(i18n.get("uiR2EdEventTxtPreEvent")).." '".. eventType .."' "..tostring(i18n.get("uiR2EdEventOf")).." ".. whichEntity.Name - - -- title - title.uc_hardtext= part1..part2..part3 - - elseif erase==true then - local eltsList = reactionUI.parent - local indexReactionUI = eltsList:getElementIndex(reactionUI) - 1 - title.uc_hardtext = tostring(i18n.get("uiR2EdReaction")).." "..indexReactionUI.." : " - end -end - -function r2:getReactionName(reactionInst) - - -- part1 - local index = r2:searchElementIndex(reactionInst) - if erase==true then index = index-1 end - local part1 = tostring(i18n.get("uiR2EdReaction")).." "..index.." : " - - -- part2 - local actionStep = r2:getInstanceFromId(reactionInst.ActionStep) - assert(actionStep) - local value = tostring(actionStep.Action.Value) - local type = actionStep.Action.Type - local actionType = r2.logicEntityAttributes["ApplicableActions"][type] - if actionType == nil then actionType="" end - if value ~= "" then - local inst = r2:getInstanceFromId(value) - assert(inst) - actionType = actionType .. " " .. inst.Name - end - local part2 = actionType .. " " - - -- part3 - local actionInst = r2:getInstanceFromId(reactionInst.LogicEntityAction) - assert(actionInst) - value = tostring(actionInst.Event.Value) - type = r2.logicEntityAttributes["Events"][actionInst.Event.Type] - if type == nil then type="..." end - local eventType = type - if value ~= "" then - local inst = r2:getInstanceFromId(value) - assert(inst) - eventType = eventType .. " " .. inst.Name - end - - if actionStep.Action.ValueString and tostring(actionStep.Action.ValueString) ~= "" then - eventType = eventType .. " " .. actionStep.Action.ValueString - end - - if actionStep.Action.ValueString and actionStep.Action.ValueString ~= "" then - if string.gfind(eventType, "%%1")() then - eventType = string.gsub(eventType, "%%1", "'"..tostring(actionStep.Action.ValueString).."'") - else - eventType = eventType .. " '" .. tostring(actionStep.Action.ValueString).. "'" - end - end - - - - local whichEntity = actionInst.Parent.Parent.Parent - assert(whichEntity) - - local part3 = tostring(i18n.get("uiR2EdEventTxtPreEvent")).." '".. eventType .."' "..tostring(i18n.get("uiR2EdEventOf")).." ".. whichEntity.Name - - return part1..part2..part3 -end - ------------------- SELECT REACTION ------------------------------------------------------------------ -function r2:selectReaction() - - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local tabUI = logicEntityUI:find("reactions") - assert(tabUI) - - local sequence = tabUI:find("sequence_elts") - assert(sequence) - - r2:selectElement(sequence, r2.logicEntityUIPath.."reactions", false) - - if getUICaller().pushed == true then - r2:openReactionEditor() --TEMP - end -end - ------------------- REMOVE REACTION ------------------------------------------------------------------ -function r2:removeReaction(reactionUI) - - r2.requestNewAction(i18n.get("uiR2EDRemoveReactionAction")) - - local uiName = r2.logicEntityUIPath.."reactions" - - local reaction - if reactionUI == nil then - reactionUI = r2:getSelectedEltUI(uiName) - reaction = r2:getSelectedEltInst(uiName) - else - reaction = r2:getInstanceFromId(reactionUI.Env.elementId) - end - - if reactionUI.Env.WhatTriggers==true then - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local tabUI = logicEntityUI:find("reactions") - assert(tabUI) - - local sequence = tabUI:find("sequence_elts") - assert(sequence) - - -- delete associated action step - r2:removeElement(sequence, uiName, tostring(i18n.get("uiR2EdReaction")), reactionUI) - if reaction~= nil then - local actionStepId = reaction.ActionStep - if r2:getInstanceFromId(actionStepId) then - r2.requestEraseNode(actionStepId, "", -1) - end - end - else - r2:removeReactionUI(reactionUI) - end -end - ------------------- REMOVE REACTION ------------------------------------------------------------------ -function r2:removeReactionUI(reactionUI) - - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local tabUI = logicEntityUI:find("reactions") - assert(tabUI) - - local sequence = tabUI:find("sequence_elts") - assert(sequence) - - local uiName = r2.logicEntityUIPath.."reactions" - - if reactionUI.id == r2:getSelectedEltUI(uiName) then - r2:closeReactionEditor() - end - - r2:removeElementUI(sequence, uiName, reactionUI) -end - ------------------- MAX/MIN REACTION ---------------------------------------------------------------- -function r2:maximizeMinimizeReaction() - r2:maximizeMinimizeElement(r2.logicEntityUIPath.."reactions") -end - -------------------- UP REACTION -------------------------------------------------------------------- -function r2:upReaction() - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local tabUI = logicEntityUI:find("reactions") - assert(tabUI) - - local sequence = tabUI:find("sequence_elts") - assert(sequence) - - r2:upElement(sequence, r2.logicEntityUIPath.."reactions") -end - ------------------- DOWN REACTION -------------------------------------------------------------------- -function r2:downReaction() - - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local tabUI = logicEntityUI:find("reactions") - assert(tabUI) - - local sequence = tabUI:find("sequence_elts") - assert(sequence) - - r2:downElement(sequence, r2.logicEntityUIPath.."reactions") -end - ------------------- MAX/MIN REACTIONS ----------------------------------------------------------------- -function r2:maximizeMinimizeReactions() - - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local tabUI = logicEntityUI:find("reactions") - assert(tabUI) - - local sequence = tabUI:find("sequence_elts") - assert(sequence) - - r2:maximizeMinimizeElements(sequence, r2.logicEntityUIPath.."reactions") -end - ------------------- OPEN ACTION EDITOR ---------------------------------------------------------------- -function r2:openReactionEditor() - - r2:updateReactionEditor() - r2:openElementEditor(r2.logicEntityUIPath.."reactions", "uiR2EDReactionEditor", "r2ed_logic_entities") -end - -function r2:updateReactionEditor() - - local reactionEltUI = r2:getSelectedEltUI(r2.logicEntityUIPath.."reactions") - assert(reactionEltUI) - - -- delete menu lists in editor and add first double menu in list - local reactionEditor = r2:getReactionEditor() - assert(reactionEditor) - - local conditionsList = reactionEditor:find("conditions_list"):find("menus_list") - assert(conditionsList) - conditionsList:clear() - - local newButtonPair = createGroupInstance("two_menu_trash_template", conditionsList.id, - {id="menu_pair1", params_left="r2:openWhichEntityMenu()", - params_right="r2:openRightMenu(true, 'Conditions', 'r2:reactionWhatCondition')", - remove_pair="r2:removeReactionConditionStep()", col_pushed="255 255 255 255", - params_over="r2:activeTrashButton()"}) - - conditionsList:addChild(newButtonPair) - conditionsList.parent:updateCoords() - - local actionsList = reactionEditor:find("actions_list"):find("menus_list") - assert(actionsList) - actionsList:clear() - - newButtonPair = createGroupInstance("two_menu_trash_template", actionsList.id, - {id="menu_pair1", params_left="r2:openWhichEntityMenu()", - params_right="r2:openRightMenu(true, 'ApplicableActions', 'r2:reactionWhatAction')", - remove_pair="r2:removeActionStep(false)", col_pushed="255 255 255 255", - params_over="r2:activeTrashButton()"}) - - actionsList:addChild(newButtonPair) - actionsList.parent:updateCoords() - - r2:initReactionEditor() - - local actions = reactionEditor:find("actions_list") - assert(actions) - - local whatAction = actions:find("what_action") - assert(whatAction) - - -- reaction name - local reactionName = reactionEditor:find("name") - assert(reactionName) - local eltsList = reactionEltUI.parent - assert(eltsList) - - local indexReactionUI = eltsList:getElementIndex(reactionEltUI) + 1 - local name = tostring(i18n.get("uiR2EdReaction")).." "..indexReactionUI.." : " - - -- what action label - local whatActionLabel = whatAction:find("label") - assert(whatActionLabel) - local whatActionText = whatActionLabel:find("name_text") - assert(whatActionText) - local text = " " .. r2:getSelectedInstance().Name - whatActionText.uc_hardtext = text - - local conditions = reactionEditor:find("conditions_list") - assert(conditions) - - local whatActionMenu = whatAction:find("menu") - assert(whatActionMenu) - local whatActionText = whatActionMenu:find("text") - assert(whatActionText) - - local menuPair = reactionEditor:find("combos") - assert(menuPair) - - local whatTriggersMenu = menuPair:find("left_menu") - assert(whatTriggersMenu) - local whatTriggersText = whatTriggersMenu:find("text") - assert(whatTriggersText) - - local whichEventMenu = menuPair:find("right_menu") - assert(whichEventMenu) - local whichEventText = whichEventMenu:find("text") - assert(whichEventText) - - if not reactionEltUI.Env.WhatTriggers then - - actions.active = false - conditions.active = false - - whatActionText.uc_hardtext = "" - whatTriggersText.uc_hardtext = "" - whichEventText.uc_hardtext = "" - - if reactionEditor.Env.minimize ~= true then - reactionEditor.h = reactionEditor.h - 320 - reactionEditor.Env.minimize = true - end - else - - actions.active = true - conditions.active = true - - if reactionEditor.Env.minimize == true then - reactionEditor.h = reactionEditor.h + 320 - reactionEditor.Env.minimize = false - end - - local reactionInst = r2:getSelectedEltInst(r2.logicEntityUIPath.."reactions") - assert(reactionInst) - - local index = r2:searchElementIndex(reactionInst) - if index~= nil then - name = tostring(i18n.get("uiR2EdReaction")).." "..index.." : " - else - name = tostring(i18n.get("uiR2EdReaction")).." : " - end - - local actionInst = r2:getInstanceFromId(reactionInst.LogicEntityAction) - assert(actionInst) - - local actionStepInst = r2:getInstanceFromId(reactionInst.ActionStep) - assert(actionStepInst) - - -- "what action" button text - text = r2.logicEntityAttributes["ApplicableActions"][actionStepInst.Action.Type] - if text == nil then text = "" end - if tostring(actionStepInst.Action.Value) ~= "" then - --text = text .. " : " .. r2:getInstanceFromId(tostring(actionStepInst.Action.Value)).Name - local inst = r2:getInstanceFromId(tostring(actionStepInst.Action.Value)) - assert(inst) - text = text .. " : " .. r2:getElementName(inst) - end - whatActionText.uc_hardtext = text - - -- "what triggers..." and "which event" buttons text - local entityName = actionInst.ParentInstance.Parent.Name - local text = r2.logicEntityAttributes["Events"][actionInst.Event.Type] - if text == nil then text = "" end - if tostring(actionInst.Event.Value) ~= "" then - --text = text .. " : " .. r2:getInstanceFromId(tostring(actionInst.Event.Value)).Name - local inst = r2:getInstanceFromId(tostring(actionInst.Event.Value)) - assert(inst) - text = text .. " : " .. r2:getElementName(inst) - end - - whatTriggersText.uc_hardtext = entityName - - whichEventText.uc_hardtext = text - - menuPair.Env.entityId = actionInst.ParentInstance.Parent.InstanceId - - -- Actions list - local previousButtonPair = actionsList:getChild(0) - - for i=0, actionInst.Actions.Size-1 do - - local actionStepInst = actionInst.Actions[i] - assert(actionStepInst) - - if actionStepInst.InstanceId ~= reactionInst.ActionStep then - - local buttonParams = r2.whichEntityButtons[actionsList:getChild(0):find("left_menu"):find("select").id] - - newButtonPair = r2:createNewMenuPair(actionsList, buttonParams) - - local whichEntityMenu = previousButtonPair:find("left_menu") - assert(whichEntityMenu) - local whichEntityText = whichEntityMenu:find("text") - assert(whichEntityText) - text = r2:getInstanceFromId(tostring(actionStepInst.Entity)).Name - whichEntityText.uc_hardtext = text - - local whatActionMenu = previousButtonPair:find("right_menu") - assert(whatActionMenu) - local whatActionText = whatActionMenu:find("text") - assert(whatActionText) - text = r2.logicEntityAttributes["ApplicableActions"][actionStepInst.Action.Type] - if text == nil then text = "" end - - if tostring(actionStepInst.Action.Value) ~= "" then - --text = text .. " : " .. r2:getInstanceFromId(tostring(actionStepInst.Action.Value)).Name - local inst = r2:getInstanceFromId(tostring(actionStepInst.Action.Value)) - assert(inst) - text = text .. " : " .. r2:getElementName(inst) - end - whatActionText.uc_hardtext = text - - previousButtonPair.Env.entityId = tostring(actionStepInst.Entity) - previousButtonPair = newButtonPair - end - end - - -- Conditions list - local previousButtonPair = conditionsList:getChild(0) - - for i=0, actionInst.Conditions.Size-1 do - - local conditionInst = actionInst.Conditions[i] - assert(conditionInst) - - local buttonParams = r2.whichEntityButtons[conditionsList:getChild(0):find("left_menu"):find("select").id] - - newButtonPair = r2:createNewMenuPair(conditionsList, buttonParams) - - local whichEntityMenu = previousButtonPair:find("left_menu") - assert(whichEntityMenu) - local whichEntityText = whichEntityMenu:find("text") - assert(whichEntityText) - text = r2:getInstanceFromId(tostring(conditionInst.Entity)).Name - whichEntityText.uc_hardtext = text - - local whatConditionMenu = previousButtonPair:find("right_menu") - assert(whatConditionMenu) - local whatConditionText = whatConditionMenu:find("text") - assert(whatConditionText) - text = r2.logicEntityAttributes["Conditions"][conditionInst.Condition.Type] - if text == nil then text = "" end - if tostring(conditionInst.Condition.Value) ~= "" then - local inst = r2:getInstanceFromId(tostring(conditionInst.Condition.Value)) - assert(inst) - text = text .. " : " .. r2:getElementName(inst) - end - whatConditionText.uc_hardtext = text - - previousButtonPair.Env.entityId = tostring(conditionInst.Entity) - previousButtonPair = newButtonPair - end - end - - reactionName.uc_hardtext = name -end - ----------------------------- new element -------------------------------------------------------------- -function r2:newLogicElement(tabName, elementName, templateParams, instanceId) - - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local tabUI = logicEntityUI:find(tabName) - assert(tabUI) - - local sequence = tabUI:find("sequence_elts") - assert(sequence) - - local newElement = r2:newElement(sequence, elementName, templateParams, false) - - if instanceId~=nil and instanceId~="emptyReaction" then - newElement.Env.elementId = instanceId - end - - if r2.ownCreatedInstances[instanceId]==true then - newElement:find("select").pushed = true - r2:selectElement(sequence, r2.logicEntityUIPath..tabName, false, newElement:find("select")) - r2.ownCreatedInstances[instanceId] = nil - if tabName == "actions" then - r2:updateActionEditor() - elseif tabName == "reactions" then - r2:updateReactionEditor() - end - end - - r2:maximizeMinimizeElement(uiName, newElement) - - return newElement -end - ------------------------------------------------- -function r2:cleanLogicEntityUI() - - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local actionSequence = logicEntityUI:find("actions") - assert(actionSequence) - local logicEntityActions = actionSequence:find("elements_list") - assert(logicEntityActions) - logicEntityActions.Env.minimize = nil - - local reactionSequence = logicEntityUI:find("reactions") - assert(reactionSequence) - local logicEntityReactions = reactionSequence:find("elements_list") - assert(logicEntityReactions) - logicEntityReactions.Env.minimize = nil - - logicEntityActions:clear() - logicEntityReactions:clear() - - -- clean actions sequence - r2:setSelectedEltUIId(r2.logicEntityUIPath.."actions", nil) - local minElts = actionSequence:find("minimize_elements") - assert(minElts) - - local maxElts = actionSequence:find("maximize_elements") - assert(maxElts) - - minElts.active = false - maxElts.active = false - - logicEntityActions.Env.elementsCount = nil - - -- clean reactions sequence - r2:setSelectedEltUIId(r2.logicEntityUIPath.."reactions", nil) - minElts = reactionSequence:find("minimize_elements") - assert(minElts) - - maxElts = reactionSequence:find("maximize_elements") - assert(maxElts) - - minElts.active = false - maxElts.active = false - - logicEntityReactions.Env.elementsCount = nil - - r2:initEventsEditor() -end - - -function r2:updateLogicEntityUI(instance) - - if r2.logicEntityUIUpdated == true then return end - r2.logicEntityUIUpdated = true - - -- remove all actions and reactions - r2:cleanLogicEntityUI() - - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local actionSequence = logicEntityUI:find("actions") - assert(actionSequence) - local logicEntityActions = actionSequence:find("elements_list") - assert(logicEntityActions) - - - local reactionSequence = logicEntityUI:find("reactions") - assert(reactionSequence) - local logicEntityReactions = reactionSequence:find("elements_list") - assert(logicEntityReactions) - - -- build actions and reactions of selected logic entity - local behavior = instance:getBehavior() - local actions = instance:getBehavior().Actions - local reactions = instance:getBehavior().Reactions - - local uiName = r2.logicEntityUIPath.."actions" - for s = 0, actions.Size - 1 do - local action = actions[s] - r2:newAction(false, action) - end - if actions.Size > 0 then - local firstElt = logicEntityActions:getChild(1) - local selectedButton = firstElt:find("select") - selectedButton.pushed = true - local sequenceUI = actionSequence:find("sequence_elts") - assert(sequenceUI) - - r2:selectElement(sequenceUI, uiName, false, selectedButton) - - r2:updateActionEditor() - end - - uiName = r2.logicEntityUIPath.."reactions" - for s = 0, reactions.Size - 1 do - local reaction = reactions[s] - r2:newReaction(false, reaction) - end - if reactions.Size > 0 then - local firstElt = logicEntityReactions:getChild(1) - local selectedButton = firstElt:find("select") - selectedButton.pushed = true - local sequenceUI = reactionSequence:find("sequence_elts") - assert(sequenceUI) - - r2:selectElement(sequenceUI, uiName, false, selectedButton) - - r2:updateReactionEditor() - end - - logicEntityUI.uc_title = tostring(i18n.get("uiR2EDEventsTriggersEditor")) .. r2:getSelectedInstance().Name -end - ------------------------------ CLOSE ACTION / REACTION EDITOR ------------------------------------ -function r2:closeActionEditor() - local actionsEditor = r2:getActionEditor() - assert(actionsEditor) - - actionsEditor.active = false -end - -function r2:closeReactionEditor() - local reactionsEditor = r2:getReactionEditor() - assert(reactionsEditor) - - reactionsEditor.active = false -end - - - --------------------------------------------------------------------------------------------------- --------------------------------- LOGIC ENTITY DisplayerProperties ------------------------- --------------------------------------------------------------------------------------------------- ---local logicEntityPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- ---function logicEntityPropertySheetDisplayerTable:onPostCreate(instance) ---end ------------------------------------------------- ---function logicEntityPropertySheetDisplayerTable:onErase(instance) ---end ------------------------------------------------- ---function logicEntityPropertySheetDisplayerTable:onPreHrcMove(instance) ---end ------------------------------------------------- ---function logicEntityPropertySheetDisplayerTable:onPostHrcMove(instance) ---end ------------------------------------------------- ---function logicEntityPropertySheetDisplayerTable:onFocus(instance, hasFocus) ---end - ------------------------------------------------- -r2.logicEntityUIUpdated = false ---function logicEntityPropertySheetDisplayerTable:onSelect(instance, isSelected) - --- if not isSelected then --- r2.events:closeEditor() --- end ---end - ------------------------------------------------- ---function logicEntityPropertySheetDisplayerTable:onAttrModified(instance, attributeName) - --- if not r2.logicEntityUIUpdated or instance ~= r2:getSelectedInstance() then --- return --- end - - --- if attributeName == "Name" then - --- local actionEditor = r2:getActionEditor() --- assert(actionEditor) - --- local reactionEditor = r2:getReactionEditor() --- assert(reactionEditor) - --- if actionEditor.active == true then --- r2:updateActionEditor() --- end - --- if reactionEditor.active == true then --- r2:updateReactionEditor() --- end - --- local logicEntityWnd = getUI("ui:interface:r2ed_logic_entities") --- assert(logicEntityWnd) - --- logicEntityWnd.uc_title = tostring(i18n.get("uiR2EDEventsTriggersEditor")) .. instance[attributeName] --- end ---end - ------------------------------------------------- ---function r2:logicEntityPropertySheetDisplayer() --- return logicEntityPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory ---end - - - - --------------------------------------------------------------------------------------------------- --------------------------------- LOGIC ENTITY ACTION DisplayerProperties ------------------------- --------------------------------------------------------------------------------------------------- ---local logicEntityActionPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- ---function logicEntityActionPropertySheetDisplayerTable:onPostCreate(instance) - --- local logicEntity = r2:getSelectedInstance() --- local logicEntityParent = instance.Parent.Parent.Parent - --- if not r2.logicEntityUIUpdated or logicEntity==nil or logicEntity ~= logicEntityParent then --- return --- end - --- r2:newAction(false, instance) ---end ------------------------------------------------- ---function logicEntityActionPropertySheetDisplayerTable:onErase(instance) - --- local logicEntity = r2:getSelectedInstance() --- local logicEntityParent = instance.Parent.Parent.Parent - --- if not r2.logicEntityUIUpdated or logicEntity==nil or logicEntity ~= logicEntityParent then --- return --- end - --- local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") --- assert(logicEntityUI) - --- local tabUI = logicEntityUI:find("actions") --- assert(tabUI) - --- local sequence = tabUI:find("sequence_elts") --- assert(sequence) - --- local uiName = r2.logicEntityUIPath.."actions" - --- local actionList = sequence:find("elements_list") --- assert(actionList) - --- local actionUI = nil --- for i=0, actionList.childrenNb-1 do --- local action = actionList:getChild(i) --- assert(action) - --- if (action.Env.elementId~=nil) and (action.Env.elementId == instance.InstanceId) then --- actionUI = action --- break --- end --- end - --- if actionUI~= nil then --- r2:removeActionUI(actionUI) --- end ---end ------------------------------------------------- ---function logicEntityActionPropertySheetDisplayerTable:onPreHrcMove(instance) - --- local logicEntity = r2:getSelectedInstance() --- local logicEntityParent = instance.Parent.Parent.Parent - --- if not r2.logicEntityUIUpdated or logicEntity==nil or logicEntity ~= logicEntityParent then --- return --- end - - -- if this LogicEntityAction was on the selected logic entity, - -- we must update interface by removing the associated action UI --- local actionsUI = getUI("ui:interface:r2ed_logic_entities"):find("actions") --- assert(actionsUI) - --- local actionsList = actionsUI:find("elements_list") --- assert(actionsList) - --- for r=0, actionsList.childrenNb-1 do --- local action = actionsList:getChild(r) --- assert(action) - --- if action.Env.elementId~=nil then --- local actionInst = r2:getInstanceFromId(action.Env.elementId) - --- if actionInst and actionInst.InstanceId == instance.InstanceId then --- r2:removeActionUI(action) --- break --- end --- end --- end ---end - ------------------------------------------------- ---function logicEntityActionPropertySheetDisplayerTable:onPostHrcMove(instance) - --- local logicEntity = r2:getSelectedInstance() --- local logicEntityParent = instance.Parent.Parent.Parent - --- if not r2.logicEntityUIUpdated then --- return --- end - --- if logicEntity~=nil and logicEntity == logicEntityParent then --- r2:newAction(false, instance) --- end - - -- update the reaction UI which are associated to this action --- local reactionsUI = getUI("ui:interface:r2ed_logic_entities"):find("reactions") --- assert(reactionsUI) - --- local reactionsList = reactionsUI:find("elements_list") --- assert(reactionsList) - --- for r=0, reactionsList.childrenNb-1 do --- local reaction = reactionsList:getChild(r) --- assert(reaction) - --- if reaction.Env.elementId~=nil then --- local reactionInst = r2:getInstanceFromId(reaction.Env.elementId) - --- if reactionInst and reactionInst.LogicEntityAction == instance.InstanceId then --- r2:updateReactionText(reaction) --- end --- end --- end ---end ------------------------------------------------- ---function logicEntityActionPropertySheetDisplayerTable:onFocus(instance, hasFocus) ---end - ------------------------------------------------- ---function logicEntityActionPropertySheetDisplayerTable:onSelect(instance, isSelected) ---end - ------------------------------------------------- ---function logicEntityActionPropertySheetDisplayerTable:onAttrModified(instance, attributeName) - --- if not r2.logicEntityUIUpdated then return end - --- local logicEntity = r2:getSelectedInstance() --- local logicEntityParent = instance.Parent.Parent.Parent - --- if logicEntity~=nil and logicEntity == logicEntityParent then - - -- update action UI text --- local actionsUI = getUI("ui:interface:r2ed_logic_entities"):find("actions") --- assert(actionsUI) - --- local actionsList = actionsUI:find("elements_list") --- assert(actionsList) - --- for a=0, actionsList.childrenNb-1 do --- local action = actionsList:getChild(a) --- assert(action) - --- if (action.Env.elementId~=nil) and (action.Env.elementId == instance.InstanceId) then --- r2:updateActionText(action) --- break --- end --- end --- end - - -- update reaction UI text --- local reactionsUI = getUI("ui:interface:r2ed_logic_entities"):find("reactions") --- assert(reactionsUI) - --- local reactionsList = reactionsUI:find("elements_list") --- assert(reactionsList) - - -- several LogicEntityReaction !!! --- for r=0, reactionsList.childrenNb-1 do --- local reaction = reactionsList:getChild(r) --- assert(reaction) - --- if reaction.Env.elementId~=nil then --- local reactionInst = r2:getInstanceFromId(reaction.Env.elementId) - --- if reactionInst and reactionInst.LogicEntityAction == instance.InstanceId --- and r2:getInstanceFromId(reactionInst.ActionStep)~=nil then - --- r2:updateReactionText(reaction) --- end --- end --- end ---end - ------------------------------------------------- ---function r2:logicEntityActionPropertySheetDisplayer() --- return logicEntityActionPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory ---end - - --------------------------------------------------------------------------------------------------- --------------------------------- LOGIC ENTITY REACTION DisplayerProperties ----------------------- --------------------------------------------------------------------------------------------------- -local logicEntityReactionPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function logicEntityReactionPropertySheetDisplayerTable:onPostCreate(instance) - - local logicEntity = r2:getSelectedInstance() - local logicEntityParent = instance.Parent.Parent.Parent - - if not r2.logicEntityUIUpdated or logicEntity==nil or logicEntity ~= logicEntityParent then - return - end - - r2:newReaction(false, instance) -end ------------------------------------------------- -function logicEntityReactionPropertySheetDisplayerTable:onErase(instance) - - local logicEntity = r2:getSelectedInstance() - local logicEntityParent = instance.Parent.Parent.Parent - - if not r2.logicEntityUIUpdated or logicEntity==nil or logicEntity ~= logicEntityParent then - return - end - - local logicEntityUI = getUI("ui:interface:r2ed_logic_entities") - assert(logicEntityUI) - - local tabUI = logicEntityUI:find("reactions") - assert(tabUI) - - local sequence = tabUI:find("sequence_elts") - assert(sequence) - - local uiName = r2.logicEntityUIPath.."reactions" - - local reactionList = sequence:find("elements_list") - assert(reactionList) - - local reactionUI = nil - for i=0, reactionList.childrenNb-1 do - local reaction = reactionList:getChild(i) - assert(reaction) - - if (reaction.Env.elementId~=nil) and (reaction.Env.elementId == instance.InstanceId) then - reactionUI = reaction - break - end - end - - if reactionUI~=nil then - r2:removeReactionUI(reactionUI) - end -end ------------------------------------------------- -function logicEntityReactionPropertySheetDisplayerTable:onPreHrcMove(instance) - - local logicEntity = r2:getSelectedInstance() - local logicEntityParent = instance.Parent.Parent.Parent - - if not r2.logicEntityUIUpdated or logicEntity==nil or logicEntity ~= logicEntityParent then - return - end - - -- if this LogicEntityReaction was on the selected logic entity, - -- we must update interface by removing the associated reaction UI - local reactionsUI = getUI("ui:interface:r2ed_logic_entities"):find("reactions") - assert(reactionsUI) - - local reactionsList = reactionsUI:find("elements_list") - assert(reactionsList) - - for r=0, reactionsList.childrenNb-1 do - local reaction = reactionsList:getChild(r) - assert(reaction) - - if reaction.Env.elementId~=nil then - local reactionInst = r2:getInstanceFromId(reaction.Env.elementId) - - if reactionInst and reactionInst.InstanceId == instance.InstanceId then - r2:removeReactionUI(reaction) - break - end - end - end -end ------------------------------------------------- -function logicEntityReactionPropertySheetDisplayerTable:onPostHrcMove(instance) - - local logicEntity = r2:getSelectedInstance() - local logicEntityParent = instance.Parent.Parent.Parent - - if not r2.logicEntityUIUpdated or logicEntity==nil or logicEntity ~= logicEntityParent then - return - end - - r2:newReaction(false, instance) -end ------------------------------------------------- -function logicEntityReactionPropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function logicEntityReactionPropertySheetDisplayerTable:onSelect(instance, isSelected) -end - ------------------------------------------------- -function logicEntityReactionPropertySheetDisplayerTable:onAttrModified(instance, attributeName) - - local logicEntity = r2:getSelectedInstance() - local logicEntityParent = instance.Parent.Parent.Parent - - if not r2.logicEntityUIUpdated or logicEntity==nil or logicEntity ~= logicEntityParent then - return - end -end - -function r2:findElementUIFromInstance(instance, uiName) - - local sequenceInst = instance.Parent.Parent - - local sequenceUI = getUI("ui:interface:"..uiName) - assert(sequenceUI) - - local eltsList = sequenceUI:find("elements_list") - assert(eltsList) - - for i=0,eltsList.childrenNb-1 do - local element = eltsList:getChild(i) - if element.Env.elementId == instance.InstanceId then - return element - end - end -end - ------------------------------------------------- -function logicEntityReactionPropertySheetDisplayerTable:onTargetInstanceCreated(instance, refIdName, refIdIndexInArray) -end ------------------------------------------------- -function logicEntityReactionPropertySheetDisplayerTable:onTargetInstanceErased(instance, refIdName, refIdIndexInArray) -end ------------------------------------------------- -function logicEntityReactionPropertySheetDisplayerTable:onTargetInstanceAttrModified(instance, refIdName, refIdIndexInArray, targetAttrName, targetAttrIndexInArray) -end - ------------------------------------------------- -function r2:logicEntityReactionPropertySheetDisplayer() - return logicEntityReactionPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - - --------------------------------------------------------------------------------------------------- --------------------------------- EVENT TYPE DisplayerProperties ----------------------- --------------------------------------------------------------------------------------------------- ---local eventTypePropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- ---function eventTypePropertySheetDisplayerTable:onPostCreate(instance) ---end ------------------------------------------------- ---function eventTypePropertySheetDisplayerTable:onErase(instance) ---end ------------------------------------------------- ---function eventTypePropertySheetDisplayerTable:onPreHrcMove(instance) ---end ------------------------------------------------- ---function eventTypePropertySheetDisplayerTable:onPostHrcMove(instance) ---end ------------------------------------------------- ---function eventTypePropertySheetDisplayerTable:onFocus(instance, hasFocus) ---end - ------------------------------------------------- ---function eventTypePropertySheetDisplayerTable:onSelect(instance, isSelected) ---end - ------------------------------------------------- ---function eventTypePropertySheetDisplayerTable:onAttrModified(instance, attributeName) ---end - ------------------------------------------------- ---function eventTypePropertySheetDisplayerTable:onTargetInstanceEraseRequested(instance, refIdName, refIdIndexInArray) --- r2.requestSetNode(instance.InstanceId, "Type", "") --- r2.requestSetNode(instance.InstanceId, "Value", r2.RefId("")) ---end ------------------------------------------------- ---function eventTypePropertySheetDisplayerTable:onTargetInstanceAttrModified(instance, refIdName, refIdIndexInArray, targetAttrName, targetAttrIndexInArray) --- if targetAttrName == "Name" then --- r2:logicEntityActionPropertySheetDisplayer():onAttrModified(instance.Parent) --- end ---end - ------------------------------------------------- ---function r2:eventTypePropertySheetDisplayer() --- return eventTypePropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory ---end - - - --------------------------------------------------------------------------------------------------- --------------------------------- ACTION STEP DisplayerProperties ----------------------- --------------------------------------------------------------------------------------------------- ---local actionStepPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- ---function actionStepPropertySheetDisplayerTable:onPostCreate(instance) ---end ------------------------------------------------- ---function actionStepPropertySheetDisplayerTable:onErase(instance) - --- local logicEntity = r2:getInstanceFromId(tostring(instance.Entity)) --- if logicEntity then - --- for i=0, logicEntity:getBehavior().Reactions.Size-1 do - --- local reaction = logicEntity:getBehavior().Reactions[i] --- assert(reaction) - --- if (reaction.ActionStep == instance.InstanceId) then --- r2.requestEraseNode(reaction.InstanceId, "", -1) --- break --- end --- end --- end ---end ------------------------------------------------- ---function actionStepPropertySheetDisplayerTable:onPreHrcMove(instance) ---end ------------------------------------------------- ---function actionStepPropertySheetDisplayerTable:onPostHrcMove(instance) ---end ------------------------------------------------- ---function actionStepPropertySheetDisplayerTable:onFocus(instance, hasFocus) ---end - ------------------------------------------------- ---function actionStepPropertySheetDisplayerTable:onSelect(instance, isSelected) ---end - ------------------------------------------------- ---function actionStepPropertySheetDisplayerTable:onAttrModified(instance, attributeName) ---end - ------------------------------------------------- ---function actionStepPropertySheetDisplayerTable:onTargetInstanceErased(instance, refIdName, refIdIndexInArray) --- r2.requestEraseNode(instance.InstanceId, "", -1) ---end ------------------------------------------------- ---function actionStepPropertySheetDisplayerTable:onTargetInstanceAttrModified(instance, refIdName, refIdIndexInArray, targetAttrName, targetAttrIndexInArray) --- if targetAttrName == "Name" then --- r2:logicEntityActionPropertySheetDisplayer():onAttrModified(instance.Parent.Parent) --- end ---end - ------------------------------------------------- ---function r2:actionStepPropertySheetDisplayer() --- return actionStepPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory ---end - - - --------------------------------------------------------------------------------------------------- --------------------------------- ACTION TYPE DisplayerProperties ----------------------- --------------------------------------------------------------------------------------------------- ---local actionTypePropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- ---function actionTypePropertySheetDisplayerTable:onPostCreate(instance) ---end ------------------------------------------------- ---function actionTypePropertySheetDisplayerTable:onErase(instance) ---end ------------------------------------------------- ---function actionTypePropertySheetDisplayerTable:onPreHrcMove(instance) ---end ------------------------------------------------- ---function actionTypePropertySheetDisplayerTable:onPostHrcMove(instance) ---end ------------------------------------------------- ---function actionTypePropertySheetDisplayerTable:onFocus(instance, hasFocus) ---end - ------------------------------------------------- ---function actionTypePropertySheetDisplayerTable:onSelect(instance, isSelected) ---end - ------------------------------------------------- ---function actionTypePropertySheetDisplayerTable:onAttrModified(instance, attributeName) ---end - ------------------------------------------------- ---function actionTypePropertySheetDisplayerTable:onTargetInstanceEraseRequested(instance, refIdName, refIdIndexInArray) --- r2.requestSetNode(instance.InstanceId, "Type", "") --- r2.requestSetNode(instance.InstanceId, "Value", r2.RefId("")) ---end ------------------------------------------------- ---function actionTypePropertySheetDisplayerTable:onTargetInstanceAttrModified(instance, refIdName, refIdIndexInArray, targetAttrName, targetAttrIndexInArray) --- if targetAttrName == "Name" then --- r2:logicEntityActionPropertySheetDisplayer():onAttrModified(instance.Parent.Parent.Parent) --- end ---end - ------------------------------------------------- ---function r2:actionTypePropertySheetDisplayer() --- return actionTypePropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory ---end - - - --------------------------------------------------------------------------------------------------- --------------------------------- CONDITION STEP DisplayerProperties ----------------------- --------------------------------------------------------------------------------------------------- ---local conditionStepPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- ---function conditionStepPropertySheetDisplayerTable:onPostCreate(instance) ---end ------------------------------------------------- ---function conditionStepPropertySheetDisplayerTable:onErase(instance) ---end ------------------------------------------------- ---function conditionStepPropertySheetDisplayerTable:onPreHrcMove(instance) ---end ------------------------------------------------- ---function conditionStepPropertySheetDisplayerTable:onPostHrcMove(instance) ---end ------------------------------------------------- ---function conditionStepPropertySheetDisplayerTable:onFocus(instance, hasFocus) ---end - ------------------------------------------------- ---function conditionStepPropertySheetDisplayerTable:onSelect(instance, isSelected) ---end - ------------------------------------------------- ---function conditionStepPropertySheetDisplayerTable:onAttrModified(instance, attributeName) ---end - ------------------------------------------------- ---function conditionStepPropertySheetDisplayerTable:onTargetInstanceEraseRequested(instance, refIdName, refIdIndexInArray) --- r2.requestEraseNode(instance.InstanceId, "", -1) ---end ------------------------------------------------- ---function conditionStepPropertySheetDisplayerTable:onTargetInstanceAttrModified(instance, refIdName, refIdIndexInArray, targetAttrName, targetAttrIndexInArray) --- if targetAttrName == "Name" then --- r2:logicEntityActionPropertySheetDisplayer():onAttrModified(instance.Parent.Parent) --- end ---end - ------------------------------------------------- ---function r2:conditionStepPropertySheetDisplayer() --- return conditionStepPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory ---end - - - - --------------------------------------------------------------------------------------------------- --------------------------------- CONDITION TYPE DisplayerProperties ----------------------- --------------------------------------------------------------------------------------------------- ---local conditionTypePropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- ---function conditionTypePropertySheetDisplayerTable:onPostCreate(instance) ---end ------------------------------------------------- ---function conditionTypePropertySheetDisplayerTable:onErase(instance) ---end ------------------------------------------------- ---function conditionTypePropertySheetDisplayerTable:onPreHrcMove(instance) ---end ------------------------------------------------- ---function conditionTypePropertySheetDisplayerTable:onPostHrcMove(instance) ---end ------------------------------------------------- ---function conditionTypePropertySheetDisplayerTable:onFocus(instance, hasFocus) ---end - ------------------------------------------------- ---function conditionTypePropertySheetDisplayerTable:onSelect(instance, isSelected) ---end - ------------------------------------------------- ---function conditionTypePropertySheetDisplayerTable:onAttrModified(instance, attributeName) ---end - ------------------------------------------------- ---function conditionTypePropertySheetDisplayerTable:onTargetInstanceEraseRequested(instance, refIdName, refIdIndexInArray) --- r2.requestSetNode(instance.InstanceId, "Type", "") --- r2.requestSetNode(instance.InstanceId, "Value", r2.RefId("")) ---end ------------------------------------------------- ---function conditionTypePropertySheetDisplayerTable:onTargetInstanceAttrModified(instance, refIdName, refIdIndexInArray, targetAttrName, targetAttrIndexInArray) --- if targetAttrName == "Name" then --- r2:logicEntityActionPropertySheetDisplayer():onAttrModified(instance.Parent.Parent.Parent) --- end ---end - ------------------------------------------------- ---function r2:conditionTypePropertySheetDisplayer() --- return conditionTypePropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory ---end - - - - - - - - - - - - - - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_ui_lua_inspector.lua b/code/ryzom/common/data_common/r2/r2_ui_lua_inspector.lua deleted file mode 100644 index ba2f97743..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_lua_inspector.lua +++ /dev/null @@ -1,228 +0,0 @@ - - ------------------------------------------------------------------------------------------------------------- --- Create interface for inspecting a lua table --- The resultat is displayedin a tree control in the UI --- Also support display of reflected objects (interface group & widgets etc.) --- TODO place this elsewhere because useful for other stuffs than r2 - -local maxEnumerationSize = 4000 -- if a enumeration id done for more than this elements, than - -- this value, then a possible infinite loop may have happened so abort the inspection - -function inspect(object, maxdepth, alreadySeen) - - if (object ~= nil and object.isNil) then - debugInfo("Inspecting nil object") - object = nil - end - - local container = getUI("ui:interface:lua_inspector") - local treeCtrl = getUI("ui:interface:lua_inspector:content:sbtree:tree_list") - - - local inspectedTableToTreeNode = {} -- for each table / user data, give a pointer to the tree node that is displayed - - if treeCtrl == nil or container == nil then - debugWarning("Cannot find inspector ui") - return - end - - if alreadySeen == nil then - alreadySeen = {} - end - - if (maxdepth == nil) then maxdepth = 1 end - - - -- color for each type - local typeColor = - { - number = CRGBA(255, 255, 255, 255), - string = CRGBA(0, 255, 255, 255), - boolean = CRGBA(255, 255, 0, 255), - thread = CRGBA(128, 128, 128, 255), - table = CRGBA(255, 128, 32, 255), - userdata = CRGBA(255, 128, 64, 255) - - } - - typeColor["function"] = CRGBA(255, 0, 255, 255) -- separate code here because - typeColor["nil"] = CRGBA(255, 0, 0, 255) - - - local id = 0 - - -- generate a new ID for a tree node - local function newId() id = id + 1; return tostring(id) end - - - -- return xml code for a leaf node - local function node(content, color, opened) - if opened == nil then opened = true end - --debugInfo(colorTag(255, 255, 0) .. "node") - if color == nil then color = CRGBA(127, 255, 127, 0) end - local result = SNode() - result.Id = newId() - result.Text = content - if type(color) ~= "userdata" then - debugInfo(tostring(color)) - end - result.Color = color - result.YDecal = -1 - result.FontSize = 15 - result.Opened = opened - -- debugInfo(result) - return result - end - - - - - local function objectStr(Name, value) - --return tostring(Name).. " (" .. type(value) .. ")" .. " = " .. tostring(value) - return tostring(Name) .. " = " .. tostring(value) - end - - - -- for each type, gives the code that generate the tree for the inspector - local typeTable = - { - number = function(key, val) return node(objectStr(key, val), typeColor[type(val)]) end, - string = function(key, val) return node(objectStr(key, val), typeColor[type(val)]) end, - boolean = function(key, val) return node(objectStr(key, val), typeColor[type(val)]) end, - thread = function(key, val) return node(objectStr(key, "thread"), typeColor[type(val)]) end, - } - - -- 'function' is a declared keyword, so must declare it this way - typeTable["function"] = - function(key, val) - local caption = "function (" .. debug.getinfo(val).short_src .. ", " .. tostring(debug.getinfo(val).linedefined) .. ")" - return node(objectStr(key, caption), typeColor[type(val)]) - end - typeTable["nil"] = function(key, val) return node(objectStr(key, "nil"), typeColor[type(val)]) end - - -- recursive code to generate the code for a table - typeTable.table = function(key, val, depth) - local mt = getmetatable(val) - if type(val) == "userdata" and (mt == nil or type(mt.__next) ~= "function") then - -- this is a user data with no 'next' method, so can't enumerate - return node(tostring(key) .. "(key type = " .. type(key) .. ")", typeColor[type(val)], false); - end - -- if type(val) == "userdata" then - -- debugInfo(colorTag(255, 255, 0) .. "found user data with '__next' metamethod") - -- end - if (alreadySeen[val] == true) then -- avoid cyclic graph - return node("!CYCLE!", CRGBA(0, 255, 0, 255)) - end - alreadySeen[val] = true - -- create a temp table sorted by type - local sortedTable = {} - local index = 1 - for k, v in specPairs(val) do - sortedTable[index] = { key = k, value = v }; - index = index + 1 - if index - 1 > maxEnumerationSize then - error(colorTag(255, 0, 0) .. "inspect : table enumeration is over " .. tostring(maxEnumerationSize) .. " elements, possible infinite loop, aborting.") - end - end - local function comp(val1, val2) - -- sort by type, then by key - if not (type(val1.value) == type(val2.value)) then return type(val1.value) < type(val2.value) end - return tostring(val1.key) < tostring(val2.key) - end - table.sort(sortedTable, comp) - --debugInfo("VAL") - --luaObject(val) - --debugInfo("SORTED") - --luaObject(sortedTable) - local rootNode = node(tostring(key) .. "(key type = " .. type(key) .. ")", typeColor[type(val)], depth < maxdepth); - inspectedTableToTreeNode[val] = rootNode - local elemCount = 0 - for key, value in specPairs(sortedTable) do - if (typeTable[type(value.value)] == nil) then - rootNode.addChild(node("?")) - else - -- add node for a field of the table - rootNode:addChild(typeTable[type(value.value)](value.key, value.value, depth + 1)) - end - elemCount = elemCount + 1 - if elemCount > maxEnumerationSize then - error(colorTag(255, 0, 0) .. "inspect : table enumeration is over " .. tostring(maxEnumerationSize) .. " elements, possible infinite loop, aborting.") - end - end - return rootNode - end - - typeTable.userdata = typeTable.table - - - -- generate the tree - local rootNode = typeTable[type(object)]("#object#", object, 0) - - - treeCtrl:setRootNode(rootNode) - treeCtrl:forceRebuild() - if container.active == false then - container.active = true - container:center() - end - - setOnDraw(container, "onLuaInspectorDraw()") - - -- store the inspected object in the container lua environment for further refresh - container.Env.InspectedObject = object - container.Env.InspectedTableToTreeNode = inspectedTableToTreeNode - container.Env.AutoRefreshWidget = container:find("auto_refresh_button") - if container.Env.AutoRefreshWidget == nil then - debugInfo("lua inspector : Can't find auto_refresh button") - end -end - ------------------------------------------------------------------------------------------------------------- -function refreshLuaInspector() - local container = getUI("ui:interface:lua_inspector") - if container == nil then - debugWarning("Cannot find inspector ui") - return - end - local inspectedObject = container.Env.InspectedObject - if inspectedObject ~= nil then - -- memorize open / close state of each node - local openTreeNode = {} - -- special cases for objects with an instance id - - -- - for k, v in pairs(container.Env.InspectedTableToTreeNode) do - if not v.isNil then -- if tree node has not been deleted ... - openTreeNode[k] = v.Opened - end - end - inspect(inspectedObject) - -- restore the open state for each node - for k, v in pairs(openTreeNode) do - local newTreeNode = container.Env.InspectedTableToTreeNode[k] - if newTreeNode ~= nil and not newTreeNode.isNil then - newTreeNode.Opened = v - end - end - end -end - ------------------------------------------------------------------------------------------------------------- -function onLuaInspectorDraw() - local container = getUI("ui:interface:lua_inspector") - if container == nil then - return - end - if not container.active then - return - end - local autoRefreshWidget = container.Env.AutoRefreshWidget - if autoRefreshWidget == nil then - return - end - if autoRefreshWidget.pushed == true then - refreshLuaInspector() - end -end - diff --git a/code/ryzom/common/data_common/r2/r2_ui_main_loop.lua b/code/ryzom/common/data_common/r2/r2_ui_main_loop.lua deleted file mode 100644 index 849e8aa05..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_main_loop.lua +++ /dev/null @@ -1,56 +0,0 @@ --- This file contains code that is called each frame by the C++ framework - - -r2.UIMainLoop = -{ - -- TODO nico : move this in a better place - LeftQuotaModified = true, -- when set to true, the "left quota" field in the scenario window should be updated - PlotItemsModified = false -} - - - -local firstLoop = true -local loopIndex = 0 -local lastTime = 0 --------------------------------------------------------------------------------- --- Called by the C++ framework just after scene has been rendered and before ui rendering -function r2.UIMainLoop:onPostSceneRender() - -- if left quota has been modified then update scenario window - if r2.Mode == "Edit" then - if self.LeftQuotaModified then - r2.ScenarioWindow:updateLeftQuota() - end - r2.SelectBar:update() - end - -- plot items - if self.PlotItemsModified then - r2.PlotItemDisplayerCommon:updateAll() - self.PlotItemsModified = false - end - -- if there's a forms displayed, call its update proc if it has one - if r2.CurrentForm and r2.CurrentForm.active then - if type(r2.CurrentForm.Env.Form.onPostRender) == "function" then - r2.CurrentForm.Env.Form.onPostRender(r2.CurrentForm.Env.FormInstance) - end - end - - - if firstLoop == true then - firstLoop = false - else - loopIndex = loopIndex + 1 - if loopIndex > 10 then - loopIndex = 0 - local now =os.clock () - if now ~= lastTime then - lastTime = now - if r2.Translator then r2.Translator.updateEachSecond() end - if ld.update then ld.update() end - if not r2_core.UserComponentManager:isInitialized() and r2.isServerEditionModuleUp() then - r2_core.UserComponentManager:init() - end - end - end - end -end diff --git a/code/ryzom/common/data_common/r2/r2_ui_mini_toolbar.lua b/code/ryzom/common/data_common/r2/r2_ui_mini_toolbar.lua deleted file mode 100644 index 9edab2567..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_mini_toolbar.lua +++ /dev/null @@ -1,59 +0,0 @@ ------------------- --- MINI TOOLBAR -- ------------------- - - -r2.MiniToolbar = r2.newToolbar() - - - - -------------------------------------------------------------------- --- PRIVATE :IMPLEMENT METHODS REQUIRED BY r2_ui_toolbar_base.lua -- -------------------------------------------------------------------- - --- return a reference on the toolbar -function r2.MiniToolbar:getToolbar() - return getUI("ui:interface:r2ed_main_menu_button:mini_toolbar") -end - --- return the max number of command that the toolbar may contains -function r2.MiniToolbar:getMaxNumCommands() - return tonumber(getDefine("r2ed_max_num_mini_buttons")) -end - --- get a button from its index in the toolbar -function r2.MiniToolbar:getButton(buttonIndex) - if self.ButtonList == nil then - self.ButtonList = self:getToolbar():find("buttons") - end - return self.ButtonList["b" .. tostring(buttonIndex)] -end - --- setup a button from a command in the toolbar -function r2.MiniToolbar:setupButton(button, commandDesc, buttonIndex) - assert(button) - button.active = true - -- buld filenames for the 'normal', 'over' & 'pushed" textures - local icon = commandDesc.ButtonBitmap - local iconOver = nlfile.getFilenameWithoutExtension(icon) .. - "_over." .. nlfile.getExtension(icon) - local iconPushed = nlfile.getFilenameWithoutExtension(icon) .. - "_pushed." .. nlfile.getExtension(icon) - - button.b.texture = icon - button.b.texture_over = iconOver - button.b.texture_pushed = iconPushed - button.b.tooltip = i18n.get(commandDesc.TextId) - button.Env.Toolbar = self - - button.b.onclick_l = "lua" - button.b.params_l = "r2.runBaseToolbarCommand(getUICaller().parent.Env.Toolbar, " .. tostring(buttonIndex) .. ")" -end - --- retrieve a command list for the given instance -function r2.MiniToolbar:getAvailableCommands(instance, dest) - -- OBSOLETE - instance:getAvailableMiniCommands(dest) -end - diff --git a/code/ryzom/common/data_common/r2/r2_ui_misc.lua b/code/ryzom/common/data_common/r2/r2_ui_misc.lua deleted file mode 100644 index 310e648b8..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_misc.lua +++ /dev/null @@ -1,292 +0,0 @@ --- misc ui helper functions - ------------------------------------------------------------------------------------------------------------- --- backup window coordinates -function r2:backupWndCoords(wnd) - if wnd == nil then - return nil - end - local coords = { x = wnd.x, y = wnd.y, w = wnd.w, h = wnd.h } - return coords -end - ------------------------------------------------------------------------------------------------------------- --- restore window coordinates -function r2:restoreWndCoords(wnd, coords) - if wnd == nil or coords == nil then - debugInfo("Not restauring coordinates, wnd = " .. tostring(wnd) .. ", coords = " .. tostring(coords)) - return - end - wnd.x = coords.x - wnd.y = coords.y - wnd.w = coords.w - wnd.h = coords.h - wnd:invalidateCoords() -end - ------------------------------------------------------------------------------------------------------------- --- clean content of a tree node -function r2:cleanTreeNode(tree, nodeId) - local node = tree:getRootNode():getNodeFromId(nodeId) - if not node or node.isNil then - debugInfo("r2:cleanTreeNode : Can't find node " .. nodeId) - return - end - while node:getNumChildren() ~= 0 do - node:deleteChild(node:getChild(0)) - end -end - ------------------------------------------------------------------------------------------------------------- --- clean content of a tree node -function r2:cleanTreeRootNode(tree) - local node = tree:getRootNode() - if not node or node.isNil then - debugInfo("r2:cleanTreeNode : Can't find node " .. nodeId) - return - end - while node:getNumChildren() ~= 0 do - node:deleteChild(node:getChild(0)) - end -end - ------------------------------------------------------------------------------------------------------------- --- make an instance and its sons blink --- TODO nico : put elsewhere (not really ui, but 3D view) -function r2:blink(instance) - if type(instance) == "userdata" then - local vd = instance.DisplayerVisual - if vd ~= nil then - vd:blink() - end - forEach(instance, function (k, v) self:blink(v) end) - -- TODO : pairs do not called the redefined 'next' function - --for k, v in pairs(instance) do - -- self:blink(v) - --end - end -end - ------------------------------------------------------------------------------------------------------------- --- clear the content of a menu -function r2:clearMenu(menu) - local numLine = menu:getNumLine() - for k = 1, numLine do - menu:removeLine(0) - end -end - ------------------------------------------------------------------------------------------------------------- --- add a menu entry with an icon on the left -function r2:addMenuLine(menu, ucText, ah, ahParams, id, iconName, size) - menu:addLine(ucText, ah, ahParams, id) - if iconName ~= "" and iconName ~= nil then - local menuButton = createGroupInstance("r2_menu_button", "", { bitmap = iconName, size = tostring(size)}) - if menuButton then - menu:setUserGroupLeft(menu:getNumLine() - 1, menuButton) - end - end -end - ------------------------------------------------------------------------------------------------------------- --- enclose a ui xml script with the necessary header and ending -function r2:encloseXmlScript(script) - return [[ - ]] .. script .. [[]] -end - ------------------------------------------------------------------------------------------------------------- --- create interface for inspecting a lua table --- TODO place this elsewhere because useful for other stuffs -function oldInspect(object, maxdepth, alreadySeen) - -if (object == nil) then - debugWarning("Cannot inspect a nil value") - return -end - -if alreadySeen == nil then - alreadySeen = {} -end - -if (maxdepth == nil) then maxdepth = 1 end - - -local x = 0 -local y = 0 -local w = 150 -local h = 150 - --- backup position -prevGroup = getUI("ui:interface:lua_inspector") -if not (prevGroup == nil) then - x = prevGroup.x - y = prevGroup.y - w = prevGroup.w - h = prevGroup.h -end - - --- window header -local script = -[[ - - - - - - - -]] - -local id = 0 - --- generate a new ID for a tree node -local function newId() id = id + 1; return tostring(id) end - --- return xml code to open a new tree node with the given content -local function nodeOpen(content, color, opened) - return [[]] .. "\n" -end - --- return xml code to close a tree node -local function nodeClose() - return "\n" -end - --- color for each type -local typeColor = -{ - number = "255 255 255 255", - string = "0 255 255 255", - boolean = "255 255 0 255", - thread = "128 128 128 255", - table = "255 128 32 255", - userdata = "255 128 64 255" -} - -typeColor["function"] = "255 0 255 255" - - --- return xml code for a leaf node -local function node(content, val) - --debugInfo(colorTag(255, 255, 0) .. "node") - local color = typeColor[type(val)] - if (color == nil) then color = "127 255 127 0" end - local result = [[]] .. "\n" - -- debugInfo(result) - return result -end - - -local function objectStr(Name, value) - --return tostring(Name).. " (" .. type(value) .. ")" .. " = " .. tostring(value) - return tostring(Name) .. " = " .. tostring(value) -end - - --- for each type, gives the code that generate the tree for the inspector -local typeTable = -{ - number = function(key, val) return node(objectStr(key, val), val) end, - string = function(key, val) return node(objectStr(key, val), val) end, - boolean = function(key, val) return node(objectStr(key, val), val) end, - thread = function(key, val) return node(objectStr(key, "thread"), val) end, -} - --- 'function' is a declared keyword, so must declare it this way -typeTable["function"] = function(key, val) return node(objectStr(key, "function"), val) end - --- recursive code to generate the code for a table -typeTable.table = function(key, val, depth) - if (alreadySeen[val] == true) then -- avoid cyclic graph - return node("!CYCLE!", "0 255 0 255") - end - alreadySeen[val] = true - -- create a temp table sorted by type - local sortedTable = {} - local index = 1 - forEach(val, function (k, v) sortedTable[index] = { key = k, value = v }; index = index + 1 end) - local function comp(val1, val2) - -- sort by type, then by key - if not (type(val1.value) == type(val2.value)) then return type(val1.value) < type(val2.value) end - return tostring(val1.key) < tostring(val2.key) - end - table.sort(sortedTable, comp) - --debugInfo("VAL") - --luaObject(val) - --debugInfo("SORTED") - --luaObject(sortedTable) - local content = nodeOpen(tostring(key) .. "(key type = " .. type(key) .. ")", typeColor[type(val)], depth < maxdepth); - local function tableElement(key, value) - if (typeTable[type(value.value)] == nil) then - content = content .. node("?") - return - end - -- add node for a field of the table - content = content .. typeTable[type(value.value)](value.key, value.value, depth + 1) - end - forEach(sortedTable, tableElement) - return content .. nodeClose() -end - -typeTable.userdata = typeTable.table - - --- generate the tree -script = script .. typeTable[type(object)]("#object#", object, 0) - - - --- window end -script = script .. -[[ - - - - - - - - -]] .. "\n" - ---for w in string.gfind(script, "node(.*)") do --- debugInfo(w) ---end ---debugInfo(script) - -if true then - parseInterfaceFromString(script) - - -- restore position - newGroup = getUI("ui:interface:old_lua_inspector") - if not (newGroup == nil) then - newGroup.x = x - newGroup.y = y - newGroup.w = w - newGroup.h = h - end - - - updateAllLocalisedElements() -end - -end - ------------------------------------------------------------------------------------------------------------- --- inspect current instance content -function r2:inspectCurrInstance() -debugInfo("Inspect current instance") -local instanceTable = r2:getSelectedInstance() -if (instanceTable == nil) then - debugWarning("Can't found instance") - --runCommand("luaObject","r2.instances") - return; -end -inspect(instanceTable, 4, { instanceTable.parent }) -end diff --git a/code/ryzom/common/data_common/r2/r2_ui_palette.lua b/code/ryzom/common/data_common/r2/r2_ui_palette.lua deleted file mode 100644 index 16e28b0dd..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_palette.lua +++ /dev/null @@ -1,223 +0,0 @@ ----------------- --- PALETTE UI -- ----------------- - ------------------------------------------------------------------------------------------------------------- --- handle right click on palette item -function r2:onPaletteRightClick(paletteNode) - -- store palette path for futur display - self.tmpPaletteNode = paletteNode -end - ------------------------------------------------------------------------------------------------------------- -function r2:onShowPaletteLuaTable(maxDepth) - if (self.tmpPaletteNode == nil) then return end - runCommand("luaObject", self.tmpPaletteNode, maxDepth) -end - - - ------------------------------------------------------------------------------------------------------------- -function r2:buildPaletteUI() - - --debugInfo(colorTag(0, 255, 127) .."Begin building palette UI") - local tree = getUI(r2.Palette.UIPath) - local botTree = getUI(r2.Palette.BotObjectsUIPath) - if tree==nil or botTree==nil then return end - - local shortElementId = 0 - - r2.Palette.ShortIdToElement = {} - - local function buildBranch(luaBranch, branchStrId, depth, openDepth) - local newNode = SNode() - newNode.Opened = depth < openDepth - newNode.Id = "branch" - newNode.Text = i18n.get(branchStrId) - for k, v in pairs(luaBranch) do - if (k ~= "instances") then - - if type(v)=="table" and v.Display~=false then - - -- this is a sub branch - newNode:addChild(buildBranch(v, "uiR2ED" .. k, depth + 1, openDepth)) - end - else - for instKey, instValue in pairs(v) do - -- the value is a table containing a list of instances - local subNode = SNode() - if instValue.DirectName ~= nil then - subNode.Text = instValue.DirectName - else - subNode.Text = i18n.get(instValue.Translation) - end - - r2.PaletteIdToTranslation[instValue.Id] = subNode.Text:toUtf8() - r2.PaletteIdToGroupTranslation[instValue.Id] = newNode.Text:toUtf8() - r2.PaletteIdToType[instValue.Id] = v - - subNode.Id = tostring(shortElementId) - local paletteElement = r2.getPaletteElement(instValue.Id) - if (paletteElement == nil) - then - debugInfo("invalid nil Palette: " .. instValue.Id) - else - r2.Palette.ShortIdToElement[tostring(shortElementId)] = paletteElement - shortElementId = shortElementId + 1 - subNode.Opened = false - subNode.AHName = "r2ed_create_entity" - subNode.AHParams = "PaletteId=" .. instValue.Id - --subNode.AHNameRight = "lua" - --subNode.AHParamsRight = "r2ed:onPaletteRightClick(" .. instValue.Id .. ")" - local ringAccess = r2.getPropertyValue(paletteElement, "RingAccess") - local insertNode = true - if ringAccess then - insertNode = r2.RingAccess.testAccess(ringAccess) - end - if insertNode then - newNode:addChild(subNode) - end - end - end - end - end - return newNode - end - -- create root node & call function - local rootNode = buildBranch(r2.Palette.Entries, r2.Palette.StrId, 0, 2) - rootNode:sort() - tree:setRootNode(rootNode) - - local botRootNode = buildBranch(r2.Palette.BotEntries, r2.Palette.StrId, 0, 1) - botRootNode:sort() - botTree:setRootNode(botRootNode) - -- - local paletteWindow = tree:getEnclosingContainer() - if paletteWindow then - -- paletteWindow.active = true - -- paletteWindow:updateCoords() - local selection = paletteWindow:find("entity_selection") - local enclosing = paletteWindow:find("entity_enclosing") - local delta = 6 - enclosing.h = - selection.h_real - delta - enclosing.y = - selection.h_real - delta - paletteWindow:invalidateCoords() - end - - --debugInfo(colorTag(0, 255, 127) .. "Palette UI built") - r2:setupPaletteAccessibleContent() - --r2:setupDefaultCustomBBoxes() -end - ---------------------------------------------------------------------------------------------------------- --- Setup the content that is visible in the palette depending on the chosen ecosystem and level -function r2:setupPaletteAccessibleContent() - - local levelMin, levelMax, ecosystem = r2:getPaletteAccessibilityFactors() - - local function setupBranch(branch) - local show = false - if branch.Id == "branch" then - for index = 0, branch:getNumChildren() - 1 do - local showChild = setupBranch(branch:getChild(index)) - if showChild then - show = true - end - end - else - -- this is a leaf - local paletteNode = r2.Palette.ShortIdToElement[branch.Id] - --assert(paletteNode) - if paletteNode then - local currLevel = defaulting(paletteNode.Level, 1) - local currEcosystem = defaulting(paletteNode.Ecosystem, "") - -- tmp : ignore level & ecosystem for objects - if string.match(paletteNode.SheetClient, "object.*") then - show = true - elseif currLevel >= levelMin and currLevel <= levelMax and (currEcosystem == "" or string.match(currEcosystem, ecosystem)) then - show = true - else - --debugInfo(currEcosystem) - end - end - end - -- if show then - -- branch.Color = CRGBA(255, 255, 255) - -- else - -- branch.Color = CRGBA(255, 0, 0) - --end - branch.Show = show - return show - end - - if ecosystem and levelMin and levelMax then - local tree = getUI(r2.Palette.UIPath) - setupBranch(tree:getRootNode()) - tree:forceRebuild() - end -end - -function r2:getPaletteAccessibilityFactors() - - local tree = getUI(r2.Palette.UIPath) - if tree == nil then return end - local levelRange = tree:getEnclosingContainer():find("level").selection + 1 -- TMP : tha 'all' field was removed ... - local levelMin - local levelMax - if levelRange == 0 then - levelMin = 1 - levelMax = 250 - else - levelMin = (levelRange - 1) * 50 + 1 - levelMax = levelMin + 49 - end - local ecosystemTable = - { - ".*", "Desert", "Forest", "Jungle", "Lacustre", "PrimeRoots", "Goo" - } - local ecosystem= ecosystemTable[tree:getEnclosingContainer():find("ecosystem").selection + 2] -- TMP : added 2 instead of 1 because the 'all' field has been removed - - return levelMin, levelMax, ecosystem -end - -function r2:createRoad() - - r2:setCurrentTool('R2::CToolDrawPrim', { Look = r2.PrimRender.RoadCreateLook, - InvalidLook = r2.PrimRender.RoadCreateInvalidLook, - Type="Road", ForceShowPrims=true }) -end - -function r2:createRegion() - - r2:setCurrentTool('R2::CToolDrawPrim', - { - Look = r2.PrimRender.RegionCreateLook, - InvalidLook = r2.PrimRender.RegionCreateInvalidLook, - CanCloseLook = r2.PrimRender.RegionCreateCanCloseLook, - Type = "Region", - SelectInstance = true, - ForceShowPrims=true - } - ) -end - ---------------------------------------------------------------------------------------------------------- --- TMP for demo : assign default custom bbox to mobs ---function r2:setupDefaultCustomBBoxes() --- for id, node in pairs(r2.Palette.ShortIdToElement) do --- if string.match(node.Base, "palette.entities.creatures.*") then --- local box = --- { --- Enabled = true, --- XMin = -0.5, --- XMax = 0.5, --- YMin = -0.5, --- YMax = 0.5, --- ZMin = 0, --- ZMax = 2, --- } --- r2:setEntityCustomSelectBox(node.SheetClient, box) --- end --- end ---end - diff --git a/code/ryzom/common/data_common/r2/r2_ui_player_tracking.lua b/code/ryzom/common/data_common/r2/r2_ui_player_tracking.lua deleted file mode 100644 index b9f6a3672..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_player_tracking.lua +++ /dev/null @@ -1,631 +0,0 @@ --- players tracking window - -PlayerTracking = -{ - CurrList = {}, - CurrActiveList = {}, - SortDir = {}, - SelectedPlayerId = nil, - TextCache = {}, -- cache for text widgets - CenteredTextCache = {}, - NumberCache = {}, -- cache for number widgets - BitmapCache = {}, -- cache for bitmap widgets - - -- Map scenario flags to the bitmaps displayed in the first column - FlagsToTex = - { - [0] = { Bitmap = "blank.tga", Color = "0 0 0 0 " }, - [1] = { Bitmap = "rap_not_invited_dm.tga", Color = "255 255 255 255" }, - }, - - WaitingList = false, - FirstShow = true, - RefreshPeriod = 10, - MinRefreshPeriod = 4, - LastRefreshTime = 0, - LastRefreshQuerryTime = 0, - PendingRefresh = false, - ListReceived = false, - - -- - RaceTypeToUtf8 = {}, - ReligionTypeToUtf8 = {}, - ShardTypeToUtf8 = {}, - LevelTypeToUtf8 = {}, -} - -local sampleList1 = -{ -} -table.insert(sampleList1, { Id=0, Player = "plop", Guild="Guild1", Race=1, Religion=1, Shard=2, Level=1, Flags=0}) -table.insert(sampleList1, { Id=1, Player = "titi", Guild="Guild1", Race=2, Religion=2, Shard=4, Level=2, Flags=1}) -table.insert(sampleList1, { Id=2, Player = "bob", Guild="", Race=1, Religion=4, Shard=1, Level=1, Flags=1}) -table.insert(sampleList1, { Id=3, Player = "bobette", Guild="Guild2", Race=1, Religion=2, Shard=1, Level=4, Flags=1}) -table.insert(sampleList1, { Id=4, Player = "nico", Guild="Super guild", Race=8, Religion=1, Shard=2, Level=4, Flags=0}) -table.insert(sampleList1, { Id=5, Player = "toto2", Guild="GG", Race=4, Religion=2, Shard=2, Level=4, Flags=1}) -table.insert(sampleList1, { Id=6, Player = "titi2", Guild="Plop guild", Race=8, Religion=2, Shard=4, Level=4, Flags=1}) -table.insert(sampleList1, { Id=7, Player = "bob2", Guild="Plop guild", Race=8, Religion=2, Shard=1, Level=8, Flags=0}) -table.insert(sampleList1, { Id=8, Player = "bobette2", Guild="Guild1", Race=2, Religion=4, Shard=1, Level=8, Flags=0}) -table.insert(sampleList1, { Id=9, Player = "nico2", Guild="Super guild", Race=8, Religion=2, Shard=1, Level=16, Flags=0}) -table.insert(sampleList1, { Id=10, Player = "toto3", Guild="Guild2", Race=4, Religion=4, Shard=2, Level=16, Flags=1}) -table.insert(sampleList1, { Id=11, Player = "titi3", Guild="GG", Race=1, Religion=1, Shard=4, Level=32, Flags=1}) -table.insert(sampleList1, { Id=12, Player = "bob3", Guild="Plop guild", Race=8, Religion=2, Shard=1, Level=32, Flags=1}) -table.insert(sampleList1, { Id=13, Player = "bobette3",Guild="GG", Race=8, Religion=4, Shard=2, Level=32, Flags=0}) -table.insert(sampleList1, { Id=14, Player = "nico3", Guild="GG", Race=8, Religion=2, Shard=2, Level=4, Flags=1}) -table.insert(sampleList1, { Id=15, Player = "toto4", Guild="", Race=4, Religion=1, Shard=1, Level=8, Flags=0}) -table.insert(sampleList1, { Id=16, Player = "titi'", Guild="TSuper guild", Race=2, Religion=1, Shard=4, Level=2, Flags=1}) -table.insert(sampleList1, { Id=17, Player = "bob4", Guild="GG", Race=2, Religion=4, Shard=4, Level=8, Flags=0}) -table.insert(sampleList1, { Id=18, Player = "bobette4",Guild="Guild2", Race=4, Religion=2, Shard=1, Level=1, Flags=1}) -table.insert(sampleList1, { Id=19, Player = "nico4", Guild="", Race=1, Religion=1, Shard=1, Level=2, Flags=1}) - - -local boolToInt = -{ -} -boolToInt[false] = 0 -boolToInt[true] = 1 - - ---********************************* --- standard comparison -local function less(lhs, rhs) - if type(lhs) == "boolean" then - return boolToInt[lhs] < boolToInt[rhs] - else - return lhs < rhs - end -end - ---********************************* --- reversed comparison -local function more(lhs, rhs) - return not less(lhs,rhs) -end - ---********************************* --- sorting by race type -local function lessRaceType(lhs, rhs) - return PlayerTracking.RaceTypeToUtf8[lhs] < PlayerTracking.RaceTypeToUtf8[rhs] -end - ---********************************* --- sorting by religion type -local function lessReligionType(lhs, rhs) - return PlayerTracking.ReligionTypeToUtf8[lhs] < PlayerTracking.ReligionTypeToUtf8[rhs] -end - - --- init sort dir -table.insert(PlayerTracking.SortDir, { Var="Flags", Up=false, Cmp = more }) -table.insert(PlayerTracking.SortDir, { Var="Player", Up=false, Cmp = less}) -table.insert(PlayerTracking.SortDir, { Var="Guild", Up=false, Cmp = less }) -table.insert(PlayerTracking.SortDir, { Var="Race", Up=false, Cmp = lessRaceType }) -table.insert(PlayerTracking.SortDir, { Var="Religion", Up=false, Cmp = lessReligionType }) -table.insert(PlayerTracking.SortDir, { Var="Shard", Up=false, Cmp = less }) -table.insert(PlayerTracking.SortDir, { Var="Level", Up=false, Cmp = less }) - ---*********************************************************************** -function PlayerTracking:getWindow() - return getUI("ui:login:ring_players_tracking") -end - ---*********************************************************************** -function PlayerTracking:initRaceTypes() - for k = 0, 3 do - self.RaceTypeToUtf8[math.pow(2, k)] = i18n.get("uiRAP_PlayerRace_" .. tostring(k)):toUtf8() - end -end - ---*********************************************************************** -function PlayerTracking:initReligionTypes() - for k = 0, 2 do - self.ReligionTypeToUtf8[math.pow(2, k)] = i18n.get("uiRAP_PlayerReligion_" .. tostring(k)):toUtf8() - end -end - ---*********************************************************************** -function PlayerTracking:initShardTypes() - for k = 0, 2 do - self.ShardTypeToUtf8[math.pow(2, k)] = i18n.get("uiRAP_PlayerShard_" .. tostring(k)):toUtf8() - end -end - ---*********************************************************************** -function PlayerTracking:initLevelTypes() - for k = 0, 5 do - self.LevelTypeToUtf8[math.pow(2, k)] = i18n.get("uiRAP_PlayerLevel_" .. tostring(k)):toUtf8() - end -end - - ---*********************************************************************** -function PlayerTracking:isConnected(flags) - return flags == 1 -end - ---*********************************************************************** -function PlayerTracking:getColumn(name) - return getUI("ui:login:ring_players_tracking:content:main:enclosing:columns:getw:column_group:" .. name .. ":values") -end - - ---*********************************************************************** -function PlayerTracking:getSelectList() - return getUI("ui:login:ring_players_tracking:content:main:enclosing:columns:getw:select") -end - - -local scratchUCStr = ucstring() - ---*********************************************************************** -function PlayerTracking:newTemplate(name, cache) - local group - if table.getn(cache) ~= 0 then - group = cache[table.getn(cache)] - table.remove(cache, table.getn(cache)) - else - group = createGroupInstance(name, "", {}) - end - return group -end - ---*********************************************************************** --- build a new text group from utf8 text -function PlayerTracking:newTextLabel(value) - local group = self:newTemplate("rap_text", self.TextCache) - scratchUCStr:fromUtf8(value) - group:find("t").uc_hardtext_single_line_format = scratchUCStr - return group -end - ---*********************************************************************** --- build a new text group from utf8 text -function PlayerTracking:newCenteredTextLabel(value) - local group = self:newTemplate("rap_text_centered", self.CenteredTextCache) - scratchUCStr:fromUtf8(value) - group:find("t").uc_hardtext_single_line_format = scratchUCStr - return group -end - ---*********************************************************************** -function PlayerTracking:newNumberLabel(value) - local group = self:newTemplate("rap_number", self.NumberCache) - group:find("t").uc_hardtext_single_line_format = tostring(value) - return group -end - ---*********************************************************************** -function PlayerTracking:newBitmap(texName, color) - if color == nil then color = "255 255 255 255" end - local group = self:newTemplate("rap_bitmap", self.BitmapCache) - group.f.texture = texName - group.f.color = color - return group -end - - ---*********************************************************************** -function PlayerTracking:newBooleanLabel(value) - local group = self:newTemplate("rap_bitmap", self.BitmapCache) - if value == true then - group.f.texture="patch_on.tga" - group.f.color="255 255 255 255" - else - group.f.texture="blank.tga" - group.f.color="0 0 0 0" - end - return group -end - ---*********************************************************************** -function PlayerTracking:addLine(line) - - self:getColumn("player"):addChild(self:newTextLabel(line.Player)) - self:getColumn("guild"):addChild(self:newTextLabel(line.Guild)) - self:getColumn("race"):addChild(self:newTextLabel(self.RaceTypeToUtf8[line.Race])) - self:getColumn("religion"):addChild(self:newTextLabel(self.ReligionTypeToUtf8[line.Religion])) - self:getColumn("shard"):addChild(self:newTextLabel(self.ShardTypeToUtf8[line.Shard])) - self:getColumn("level"):addChild(self:newNumberLabel(self.LevelTypeToUtf8[line.Level])) - self:getColumn("flags"):addChild(self:newBitmap(self.FlagsToTex[line.Flags].Bitmap, self.FlagsToTex[line.Flags].Color)) -end - ---*********************************************************************** -function PlayerTracking:putColumnInCache(column, cache) - local childrenCount = column.childrenNb - for i = 0, childrenCount - 1 do - local child = column:getChild(column.childrenNb - 1) - table.insert(cache, child) - column:detachChild(child) - end -end - - ---*********************************************************************** -function PlayerTracking:putMixedColumnInCache(column, textCache, bitmapCache) - local childrenCount = column.childrenNb - for i = 0, childrenCount - 1 do - local child = column:getChild(column.childrenNb - 1) - if child:find("t") then - table.insert(textCache, child) - else - table.insert(bitmapCache, child) - end - column:detachChild(child) - end -end - ---*********************************************************************** -function PlayerTracking:putInCache() - self.TextCache = {} - self.CenteredTextCache = {} - self.NumberCache = {} - self.BitmapCache = {} - self:putColumnInCache(self:getColumn("player"), self.TextCache) - self:putColumnInCache(self:getColumn("guild"), self.TextCache) - self:putColumnInCache(self:getColumn("race"), self.TextCache) - self:putColumnInCache(self:getColumn("shard"), self.TextCache) - self:putColumnInCache(self:getColumn("religion"), self.TextCache) - -- - self:putColumnInCache(self:getColumn("level"), self.NumberCache) - -- - self:putColumnInCache(self:getColumn("flags"), self.BitmapCache) -end - ---*********************************************************************** -function PlayerTracking:clear() - self:getColumn("flags"):clear() - self:getColumn("player"):clear() - self:getColumn("guild"):clear() - self:getColumn("race"):clear() - self:getColumn("religion"):clear() - self:getColumn("shard"):clear() - self:getColumn("level"):clear() - - self.TextCache = {} - self.CenteredTextCache = {} - self.NumberCache = {} - self.BitmapCache = {} - self:getSelectList():clear() - self:getSelectList().active = false - self.CurrList = {} - self.CurrActiveList = {} - self.ListReceived = false -end - ---*********************************************************************** -function PlayerTracking:testFill1() - self:onPlayersListReceived(sampleList1) -end - ---*********************************************************************** -function PlayerTracking:onPlayersListReceived(list) - self.WaitingList = false - self.LastRefreshTime = nltime.getLocalTime() / 1000 - self.ListReceived = true - self:fill(list) -end - ---*********************************************************************** -function PlayerTracking:fill(list) - - self:initRaceTypes() - self:initReligionTypes() - self:initShardTypes() - self:initLevelTypes() - - - -- if the window is not active, then maybe an old msg -> ignore - if not self:getWindow().active then return end - self:enableButtons(true) - -- - local startTime = nltime.getPreciseLocalTime() - debugInfo(tostring(self.SelectedPlayerId)) - -- - self:getWindow():find("teleport").frozen = true - self:getWindow():find("kick").frozen = true - self:getWindow():find("tell").frozen = true - -- - self:putInCache() - -- - debugInfo("***********************") - debugInfo("TextCache size = " .. table.getn(self.TextCache)) - debugInfo("CenteredTextCache size = " .. table.getn(self.CenteredTextCache)) - debugInfo("NumberCache size = " .. table.getn(self.NumberCache)) - debugInfo("BitmapCache size = " .. table.getn(self.BitmapCache)) - --self:clear() - self.CurrList = list - self.CurrActiveList = {} - self:sort() - local selectList = self:getSelectList() - selectList:clear() - local count = 0 - local displayedCount = 0 - for k, v in pairs(self.CurrList) do - count = count + 1 - local active - - self:addLine(v) - local newGroup = createGroupInstance("rap_select_line", "", { id=tostring(v.Id)}) - - selectList:addChild(newGroup) - newGroup:find("but").pushed = (v.Id == self.SelectedPlayerId) - table.insert(self.CurrActiveList, v) - displayedCount = displayedCount + 1 - end - - if displayedCount == 0 then - if count ~= 0 then - self:setErrorMessage("uiRAP_NoSessionForLangFilter") - else - --self:setErrorMessage(i18n.get("uiRAP_NoSessionFound")) - self:setErrorMessage(ucstring()) - self:enableButtons(false) - end - else - self:clearMessage() - end - local endTime = nltime.getPreciseLocalTime() - debugInfo(string.format("time ellapsed = %d", 1000 * (endTime - startTime))) -end - - ---*********************************************************************** -function PlayerTracking:setMessage(msg, color) - local errorTxt = self:getWindow():find("errorMsg") - errorTxt.uc_hardtext = msg - errorTxt.color = color - errorTxt.active=true -end - ---*********************************************************************** -function PlayerTracking:clearMessage() - local errorTxt = self:getWindow():find("errorMsg") - errorTxt.active = false -end - ---*********************************************************************** -function PlayerTracking:setErrorMessage(msg) - self:setMessage(msg, "255 0 0 255") -end - ---*********************************************************************** -function PlayerTracking:setInfoMessage(msg) - self:setMessage(msg, "255 255 255 255") -end - - ---*********************************************************************** -function PlayerTracking:sort(list) - local sortDir = self.SortDir - local function sorter(lhs, rhs) - for k = 1, table.getn(sortDir) do - if lhs[sortDir[k].Var] ~= rhs[sortDir[k].Var] then - if sortDir[k].Up then - return not sortDir[k].Cmp(lhs[sortDir[k].Var], rhs[sortDir[k].Var]) - else - return sortDir[k].Cmp(lhs[sortDir[k].Var], rhs[sortDir[k].Var]) - end - end - end - return false - end - table.sort(self.CurrList, sorter) -end - ---*********************************************************************** -function PlayerTracking:headerLeftClick(down, criterion) - -- change column sort order - local parent = getUICaller().parent - parent.tdown.active = down - parent.tup.active = not down - -- insert - local sortDir = self.SortDir - for k = 1, table.getn(sortDir) do - if sortDir[k].Var == criterion then - sortDir[k].Up = not sortDir[k].Up - table.insert(sortDir, 1, sortDir[k]) - table.remove(sortDir, k + 1) - if self.ListReceived then - self:fill(self.CurrList) -- update only if list has been received - end - return - end - end -end - ---*********************************************************************** -function PlayerTracking:getPlayerFromId(id) - for k, v in pairs(self.CurrList) do - if v.Id == id then return v end - end - return nil -end - ---*********************************************************************** -function PlayerTracking:onLineLeftClick() - self.SelectedPlayerId = self.CurrActiveList[self:getSelectList():getElementIndex(getUICaller().parent) + 1].Id - local selectList = self:getSelectList() - for k = 0, selectList.childrenNb - 1 do - local but = selectList:getChild(k):find("but") - if but == getUICaller() then - but.pushed = true - else - but.pushed = false - end - end - self:getWindow():find("kick").frozen = not self:isConnected(self:getPlayerFromId(self.SelectedPlayerId).Flags) - self:getWindow():find("teleport").frozen = not self:isConnected(self:getPlayerFromId(self.SelectedPlayerId).Flags) - self:getWindow():find("tell").frozen = false -end - ---*********************************************************************** -function PlayerTracking:onLineRightClick() - self:onLineLeftClick() - local menu = getUI("ui:login:ring_player_menu") - - menu:find("tell").uc_hardtext = ucstring(i18n.get("uiRAP_MenuPlayerTell"):toUtf8() .. "'" .. self:getPlayerFromId(self.SelectedPlayerId).Player .."'") - menu:find("teleport").uc_hardtext = ucstring(i18n.get("uiRAP_MenuTeleportTo"):toUtf8() .. "'" .. self:getPlayerFromId(self.SelectedPlayerId).Player.."'") - menu:find("kick").uc_hardtext = ucstring(i18n.get("uiRAP_MenuKick"):toUtf8() .. "'" .. self:getPlayerFromId(self.SelectedPlayerId).Player.."'") - - menu:find("kick").grayed = not self:isConnected(self:getPlayerFromId(self.SelectedPlayerId).Flags) - menu:find("teleport").grayed = not self:isConnected(self:getPlayerFromId(self.SelectedPlayerId).Flags) - launchContextMenuInGame("ui:login:ring_player_menu") -end - ---*********************************************************************** --- called by C++ if session joining failed -function PlayerTracking:onJoinFailed() - messageBox(i18n.get("uiRAP_JoinFailed")) -end - ---*********************************************************************** -function PlayerTracking:onTell() - debugInfo("tell to owner of session" .. self.SelectedPlayerId) - player = ucstring() - player:fromUtf8(self:getPlayerFromId(self.SelectedPlayerId).Player) - tell(player) -end - ---*********************************************************************** -function PlayerTracking:onTeleportTo() - -end - ---*********************************************************************** -function PlayerTracking:onKick() - -end - ---*********************************************************************** -function PlayerTracking:onLineLeftDblClick() - local player = self:getPlayerFromId(self.SelectedPlayerId) - if self:isConnected(player.Flags) then - validMessageBox(i18n.get("uiRAP_JoinConfirm"), "lua", "PlayerTracking:onJoin()", "", "", "ui:login") - else - -- default to a tell - onTell() - end -end - ---*********************************************************************** -function PlayerTracking:refresh() - - self.PendingRefresh = true - self.LastRefreshTime = nltime.getLocalTime() / 1000 - self.WaitingList = true - debugInfo("*refresh*") -end - ---*********************************************************************** -function PlayerTracking:updatePendingRefresh() - - if self.PendingRefresh then - local currTime = nltime.getLocalTime() / 1000 - if currTime - self.LastRefreshQuerryTime > self.MinRefreshPeriod then - self.LastRefreshQuerryTime = currTime - self.PendingRefresh = false - game.getRingPlayerList() - end - end -end - ---*********************************************************************** -function PlayerTracking:onShow() - self:initRaceTypes() - self:initReligionTypes() - self:initShardTypes() - self:initLevelTypes() - setOnDraw(self:getWindow(), "PlayerTracking:onDraw()") - self:clear() - self:enableButtons(false) - self:refresh() -end - -local waitTextColor = CRGBA(255, 255, 255, 255) - - -function PlayerTracking:connectError(errorTextId) - if not self.WaitingList then return end - self:clear() - self:setErrorMessage(i18n.get(errorTextId)) - self.WaitingList = false - self.PendingRefresh = false - self.LastRefreshTime = nltime.getLocalTime() / 1000 -- force to wait some more -end ---*********************************************************************** --- called by C++ if retrieving of sessions failed -function PlayerTracking:onConnectionFailed() - self:connectError("uiRAP_ConnectionFailed") -end - ---*********************************************************************** --- called by C++ if retrieving of sessions failed -function PlayerTracking:onDisconnection() - self:connectError("uiRAP_Disconnection") -end - ---*********************************************************************** --- called by C++ if retrieving of sessions failed -function PlayerTracking:onConnectionClosed() - self:connectError("uiRAP_ConnectionClosed") -end - ---*********************************************************************** -function PlayerTracking:enableButtons(enabled) - local win = self:getWindow() - local alpha - if enabled then alpha = 255 else alpha = 128 end - self:getSelectList().active = enabled -end - ---*********************************************************************** -function PlayerTracking:show() - -- update msg - local win = self:getWindow() - win.active = true - if self.FirstShow then - local w, h = getWindowSize() - win.w = w * 5 / 6 - win.h = h * 5 / 6 - win:invalidateCoords() - win:updateCoords() - win:center() - win:invalidateCoords() - win:updateCoords() - self.FirstShow = false - end - win:blink(1) -end - ---*********************************************************************** -function PlayerTracking:enlargeColumns() - self:getWindow():find("header_line"):enlargeColumns(10) -end - - ---*********************************************************************** -function PlayerTracking:resizeColumnsAndContainer() - self:getWindow():find("header_line"):resizeColumnsAndContainer(5) -end - ---*********************************************************************** -function PlayerTracking:onDraw() - - local timeInSec = nltime.getLocalTime() / 1000 - if self.WaitingList then - local waitText = i18n.get("uiRAP_WaitMsg" .. math.fmod(os.time(), 3)) - if not self.ListReceived then - self:setInfoMessage(waitText) - waitTextColor.A = 127 + 127 * (0.5 + 0.5 * math.cos(6 * timeInSec)) - local errorTxt = self:getWindow():find("errorMsg") - errorTxt.color_rgba = waitTextColor - end - else - if timeInSec - self.LastRefreshTime > self.RefreshPeriod then - self:refresh() - end - end - self:updatePendingRefresh() -end - - diff --git a/code/ryzom/common/data_common/r2/r2_ui_property_sheet.lua b/code/ryzom/common/data_common/r2/r2_ui_property_sheet.lua deleted file mode 100644 index 9f856dd23..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_property_sheet.lua +++ /dev/null @@ -1,2339 +0,0 @@ --------------------------------------------------------------------------------------------- --- PROPERTY SHEETS & FORMS --- ====================== --- This file contains code to generate xml of generic property sheets & forms that are used to change --- properties of editor objects / tables --- NB : Currenlty there can be only a single property sheet displayed at a time - - --- To speed up reset of editor, we keep a cache to avoid to rebuild ui for class --- whose properties have not changed --- this cache is kept between 2 reset of the editor --- the cache is a simple table : key = class name & value = property of the class --- NB : we don't use the r2 table because it is reseted each time !! -if r2ClassDescCache == nil then - -- first build of the table - r2ClassDescCache = {} - debugInfo(colorTag(255, 0, 255) .. "Init of property sheet cache") -end --- same thing for forms -if r2FormsCache == nil then - -- first build of the table - r2FormsCache = {} - debugInfo(colorTag(255, 0, 255) .. "Init of forms cache") -end - -function resetR2UICache() - r2FormsCache = nil - r2ClassDescCache = nil -end - - -r2.DefaultPropertySheetTitleClampSize = -28 - -local eventArgs = {} -- static table here to avoid costly allocs with the ellipsis ... -local emptyArgs = {} --- build an edit box for an arbitrary type -function r2:buildEditBox(prop, textRef, entryType, multiLine, maxNumChars, onChangeAction, onFocusLostAction) - local result = - [[" - return result -end - - --- build an edit box for an arbitrary type ---function r2:buildComboEditBox(prop, textRef, entryType, multiLine, maxNumChars, onChangeAction) --- return --- [[ --- --- --- --- --- ]] --- ---end - - --- widget styles, key is the type, value is a table containing the widget factory (each wdget being identified by its 'WidgetStyle') -r2.WidgetStyles = -{ -} - - - ---////////////////////// ---// STRINGS WIDGETS // ---////////////////////// - --- Build widget factory for 'Strings' --- --- Each key gives the name of the widget style. Each value is a function that returns the xml code for the widget --- that must edit the 'prop' value. --- Moreover, a "setter" function" must be returned, that will update the content of the widget from external modification --- --- The widget may also return a table in place of the setter function, if it is of type 'refid', and wants to handle modification of its target --- In this case, the table must have the following format : --- local refIdTable = {} --- -- Each function below takes 3 parameters : --- -- widget : pointer to the ui widget --- -- value : current value of the property that is displayed by the widget --- -- prop : definition of the property displayed by this widget (taken from the definition of the class that contain that property) --- --- function refIdTable:onSet(widget, value, prop) .. end -- handles modification of the reference --- function refIdTable:onTargetCreated(widget, value, prop) .. end -- handles creation of the targetted object --- function refIdTable:onTargetErased(widget, value, prop) .. end -- handles deletion of the targetted object --- function refIdTable:onTargetPreHrcMove(widget, value, prop) .. end -- targeted object is about to move in the object hierarchy --- function refIdTable:onTargetPostHrcMove(widget, value, prop) .. end -- targeted object has moved in the object hierarchy --- function refIdTable:onTargetAttrModified(widget, value, prop, targetAttr, targetIndexinArray) .. end -- handles modifications of the deleted object --- - -function r2.returnOk(param) - return true -end - -function r2.refuseEmptyString(param) - assert(param) - assert(type(param) == "string") - if string.len(param) == 0 then - local ucStringMsg = i18n.get("uiR2EdNoEmptyString") - displaySystemInfo(ucStringMsg, "BC") - return false - end - return true -end - -r2.WidgetStyles.String = -{ - -- default string edition, using an edit box - Default = function(prop, className) - - local function setter(widget, prop, value) - local ok = true - if prop.ValidationFun then - ok = r2.assert(loadstring('return '.. prop.ValidationFun))()(value) - end - if ok then - local ucValue = ucstring() - --debugInfo("value = " .. tostring(value)) - ucValue:fromUtf8(value) - widget.eb.uc_input_string = ucValue - widget.eb.Env.CurrString = ucValue - --debugInfo("setting" .. widget.eb.id .. " to " .. tostring(value)) - else - widget.eb.uc_input_string = widget.eb.Env.CurrString - widget.eb.input_string = widget.eb.uc_input_string:toUtf8() - end - end - - local validation = "" - - if prop.ValidationFun then - validation = string.format([[ if not %s(utf8Value) then editBox.uc_input_string = editBox.Env.CurrString; return end]], prop.ValidationFun) - end - - local onChangeAction = - string.format( - [[ - local editBox = getUICaller() - if editBox.input_string == editBox.Env.CurrString then - return - end - - local utf8Value = editBox.uc_input_string:toUtf8() - %s - editBox.Env.CurrString = editBox.input_string - r2:requestSetObjectProperty('%s', utf8Value) - ]], validation, prop.Name) - - local onFocusLostAction = onChangeAction - if prop.ValidateOnEnter then - onChangeAction = onChangeAction .. "r2:validateForm(r2.CurrentForm)" - end - return r2:buildEditBox(prop, "TL TL", defaulting(prop.EntryType, "text"), true, defaulting(prop.MaxNumChar, 256), onChangeAction, onFocusLostAction), - setter, - nil - end, - -- string property displayed as a static text (not editable) - StaticText = function(prop, className) - --debugInfo("Building static text") - local function setter(widget, prop, value) - --debugInfo("value = " .. tostring(value)) - local ucValue = ucstring() - ucValue:fromUtf8(value) - widget.uc_hardtext = ucValue - end - local widgetXml = - string.format([[ ]], prop.Name) - return widgetXml, setter, nil - end, - - StaticTextMultiline = function(prop, className) - --debugInfo("Building static text") - local function setter(widget, prop, value) - --debugInfo("value = " .. tostring(value)) - local ucValue = ucstring() - ucValue:fromUtf8(value) - widget.uc_hardtext = ucValue - end - local widgetXml = - string.format([[ ]], prop.Name) - return widgetXml, setter, nil - end -} - - - ------------------------------------------------------------------------------------------------------------- --- helper : build the name of a property tooltip : looks in the bas class until a translation is found -local function buildPropTooltipName(className, propName) - assert(className) - assert(propName) - local tt = "uiR2EdPropertyToolTip_" .. className .. "_" .. propName - if i18n.hasTranslation(tt) then - --debugInfo("### Translation found for " .. propName .. " in " .. className) - return tt, true - end - - -- this Form is not a Class (its a form not a property sheet) so don't search into its parents - if r2.Classes[className] == nil then - return tt, false - end - - local parentClassName = r2.Classes[className].BaseClass - if parentClassName ~= "" and parentClassName~=nil then - local parentClass = r2.Classes[parentClassName] - if parentClass.NameToProp[propName] ~= nil then - --debugInfo("### Translation not found for " .. propName .. " in " .. className .. ".Looking in parent class " .. parentClassName) - local translation, found = buildPropTooltipName(parentClassName, propName) - if found then return translation, true end - end - end - return tt, false -- not found, a 'NotExist' string will be displayed -end - ---///////////////////// ---// REF ID WIDGETS // ---///////////////////// - ------------------------------------------------------------------------------------------------------------- ---/////////////////////////// ---// DEFAULT REF ID PICKER // ---/////////////////////////// - --- handle updates of the "RefId" widget --- this table is common to all the ref id widgets -local refIdDefaultEventHandler ={} --- -function refIdDefaultEventHandler:onSet(widget, prop, value) - --debugInfo("set received") - self:update(widget, value, r2:getInstanceFromId(value)) -end --- -function refIdDefaultEventHandler:onTargetCreated(widget, prop, value) - self:update(widget, value, r2:getInstanceFromId(value)) -end --- -function refIdDefaultEventHandler:onTargetErased(widget, prop, value) - self:update(widget, value, nil) -end --- -function refIdDefaultEventHandler:onTargetAttrModified(widget, prop, value, targetAttr, targetIndexInArray) - -- we are only interested by a change of the instance name - if targetAttr == "Name" then - self:update(widget, value, r2:getInstanceFromId(value)) - end -end --- -function refIdDefaultEventHandler:update(widget, value, target) - local text = widget:find("name") - if target then - local newName = ucstring() - newName:fromUtf8(target.Name) - text.uc_hardtext = newName - else - text.uc_hardtext = i18n.get("uiR2EDNone") - end -end --- -function refIdDefaultEventHandler:onTargetPreHrcMove(widget, prop, value) - --debugInfo(string.format("displayer : pre hrc move : (%s)", prop.Name)) -end --- -function refIdDefaultEventHandler:onTargetPostHrcMove(widget, prop, value) - --debugInfo(string.format("displayer : post hrc move : (%s)", prop.Name)) -end - - --- globals for the 'RefId' default widget -r2.currentRefIdWidgetParentInstance = nil -r2.currentRefIdWidgetFilter = nil -r2.currentRefIdWidgetAttrName = nil -r2.currentRefIdIndexInArray = nil --- -function r2:testCanPickRefIdWidgetTarget(instanceId) - if instanceId == r2.currentRefIdWidgetParentInstance.InstanceId then return false end - return r2:getInstanceFromId(instanceId):isKindOf(r2.currentRefIdWidgetFilter) -end --- -function r2:setRefIdWidgetTarget(instanceId) - --r2.requestSetNode(r2.currentRefIdWidgetParentInstance.InstanceId, r2.currentRefIdWidgetAttrName, instanceId) - r2.currentRefIdWidgetParentInstance:setRefIdValue(r2.currentRefIdWidgetAttrName, instanceId) - --debugInfo("requestSetNode") -end - -function r2:canPickTaskComponent(instanceId) - local taskClasses = {} - table.insert(taskClasses, "GiveItem") - table.insert(taskClasses, "RequestItem") - table.insert(taskClasses, "TalkTo") - table.insert(taskClasses, "VisitZone") - table.insert(taskClasses, "TargetMob") - table.insert(taskClasses, "KillNpc") - table.insert(taskClasses, "HuntTask") - table.insert(taskClasses, "DeliveryTask") - table.insert(taskClasses, "GetItemFromSceneryObjectTaskStep") - table.insert(taskClasses, "SceneryObjectInteractionTaskStep") - - - local comp = r2:getSelectedInstance() - if not comp or instanceId == "" then - return true - end - - --check act? - - local tmpInstance = r2:getInstanceFromId(instanceId) - assert(tmpInstance) - local class = tmpInstance.Class - local k, v = next(taskClasses, nil) - while k do - if class == v then - return true - end - k, v = next(taskClasses, k) - end - return false -end - -function r2:setTaskComponentTarget(instanceId) - local tmpInstance = r2:getInstanceFromId(instanceId) - if tmpInstance then - if r2:canPickTaskComponent(instanceId) then - r2.currentRefIdWidgetParentInstance:setRefIdValue(r2.currentRefIdWidgetAttrName, instanceId) - end - end -end - - -function r2:canPickSceneryObject(instanceId) - local comp = r2:getSelectedInstance() - if not comp or instanceId == "" then - return true - end - - if r2.Translator.checkActForPicking(comp.InstanceId, instanceId) == false then - return false - end - - local tmpInstance = r2:getInstanceFromId(instanceId) - - if tmpInstance:isBotObject() then - return true - else - return false - end - -end - -function r2:setSceneryObjectTarget(instanceId) - local tmpInstance = r2:getInstanceFromId(instanceId) - if tmpInstance then - if r2:canPickSceneryObject(instanceId) then - r2.currentRefIdWidgetParentInstance:setRefIdValue(r2.currentRefIdWidgetAttrName, instanceId) - end - end -end - -function r2:canPickCivilian(instanceId) - local comp = r2:getSelectedInstance() - if not comp or instanceId == "" then - return true - end - - if r2.Translator.checkActForPicking(comp.InstanceId, instanceId) == false then - return false - end - - local tmpInstance = r2:getInstanceFromId(instanceId) - - --if not (tmpInstance.Class == "NpcCustom" or tmpInstance.Class == "Npc") or tmpInstance:isBotObject() - --or tmpInstance:isGrouped() then - -- return false - if tmpInstance:isGrouped() or string.find(tmpInstance.Base, "civil") == nil then - return false - else - return true - end - -end - -function r2:setCivilian(instanceId) - local tmpInstance = r2:getInstanceFromId(instanceId) - if tmpInstance then - if r2:canPickCivilian(instanceId) then - r2.currentRefIdWidgetParentInstance:setRefIdValue(r2.currentRefIdWidgetAttrName, instanceId) - end - end -end - - -function r2:canPickTalkingNpc(instanceId) - local comp = r2:getSelectedInstance() - if not comp or instanceId == "" then - return true - end - - if r2.Translator.checkActForPicking(comp.InstanceId, instanceId) == false then - return false - end - - local tmpInstance = r2:getInstanceFromId(instanceId) - - if not (tmpInstance.Class == "NpcCustom" or tmpInstance.Class == "Npc") or tmpInstance:isBotObject() - or tmpInstance:isGrouped() then - return false - else - return true - end - -end - -function r2:setTalkingNpc(instanceId) - local tmpInstance = r2:getInstanceFromId(instanceId) - if tmpInstance then - if r2:canPickTalkingNpc(instanceId) then - r2.currentRefIdWidgetParentInstance:setRefIdValue(r2.currentRefIdWidgetAttrName, instanceId) - end - end -end - - -function r2:canPickNpcOrGroup(instanceId) - local comp = r2:getSelectedInstance() - if not comp or instanceId == "" then return true end - local componentId = comp.InstanceId - --if r2.Translator.checkActForPicking(componentId, instanceId) == false then - -- return false - --end - if instanceId == r2.currentRefIdWidgetParentInstance.InstanceId then return false - else - local tmpInstance = r2:getInstanceFromId(instanceId) - - if tmpInstance and not tmpInstance:isBotObject() then - if tmpInstance:isKindOf("Npc") - or tmpInstance.ParentInstance:isKindOf("NpcGrpFeature") - or tmpInstance:isKindOf("NpcGrpFeature") then - return true - else return false end - end - return false - end - -end - -function r2:setNpcOrGroupRefIdTarget(instanceId) - local tmpInstance = r2:getInstanceFromId(instanceId) - if tmpInstance then - -- if the instance is a npc belonging to a npcgrp - if not tmpInstance:isBotObject() and tmpInstance:isKindOf("Npc") and tmpInstance.ParentInstance:isKindOf("NpcGrpFeature") then - --debugInfo("inserted: " ..tmpInstance.ParentInstance.Name) - --r2.requestSetNode(r2.currentRefIdWidgetParentInstance.InstanceId, r2.currentRefIdWidgetAttrName, tmpInstance.ParentInstance.InstanceId) - r2.currentRefIdWidgetParentInstance:setRefIdValue(r2.currentRefIdWidgetAttrName, tmpInstance.ParentInstance.InstanceId) - -- else if the instance is npc or a npcgrp - elseif not tmpInstance:isBotObject() and tmpInstance:isKindOf("NpcGrpFeature") or tmpInstance:isKindOf("Npc") then - --r2.requestSetNode(r2.currentRefIdWidgetParentInstance.InstanceId, r2.currentRefIdWidgetAttrName, instanceId) - r2.currentRefIdWidgetParentInstance:setRefIdValue(r2.currentRefIdWidgetAttrName, instanceId) - end - end -end - -function r2:canPickEasterEgg(instanceId) - local comp = r2:getSelectedInstance() - if not comp or instanceId == "" then return true end - local componentId = comp.InstanceId - if r2.Translator.checkActForPicking(componentId, instanceId) == false then - return false - end - if instanceId == r2.currentRefIdWidgetParentInstance.InstanceId then return false - else - local tmpInstance = r2:getInstanceFromId(instanceId) - - if tmpInstance then - if tmpInstance:isKindOf("EasterEgg") then return true - else return false end - end - return false - end -end - -function r2:setEasterEggRefIdTarget(instanceId) - local tmpInstance = r2:getInstanceFromId(instanceId) - if tmpInstance then - -- if the instance is a npc belonging to a npcgrp - if tmpInstance:isKindOf("EasterEgg") then - --r2.requestSetNode(r2.currentRefIdWidgetParentInstance.InstanceId, r2.currentRefIdWidgetAttrName, instanceId) - r2.currentRefIdWidgetParentInstance:setRefIdValue(r2.currentRefIdWidgetAttrName, instanceId) - end - end -end - -function r2:canPickNotGroupedNpc(instanceId) - --if instanceId == r2.currentRefIdWidgetParentInstance.InstanceId then return false - --else - if r2:getSelectedInstance() and instanceId ~= "" then - local componentId = r2:getSelectedInstance().InstanceId - if r2.Translator.checkActForPicking(componentId, instanceId) == false then - return false - end - local tmpInstance = r2:getInstanceFromId(instanceId) - - if tmpInstance then - if not tmpInstance:isBotObject() and tmpInstance:isKindOf("Npc") and not tmpInstance.ParentInstance:isKindOf("NpcGrpFeature") then return true - else return false end - end - return false - end - return true - --end -end - -function r2:setNotGroupedNpcRefIdTarget(instanceId) - local tmpInstance = r2:getInstanceFromId(instanceId) - if tmpInstance then - if not tmpInstance:isBotObject() and tmpInstance:isKindOf("Npc") and not tmpInstance.ParentInstance:isKindOf("NpcGrpFeature") then - --r2.requestSetNode(r2.currentRefIdWidgetParentInstance.InstanceId, r2.currentRefIdWidgetAttrName, instanceId) - r2.currentRefIdWidgetParentInstance:setRefIdValue(r2.currentRefIdWidgetAttrName, instanceId) - end - end -end - -function r2:canPickZone(instanceId) - local comp = r2:getSelectedInstance() - if not comp or instanceId == "" then return true end - local componentId = comp.InstanceId - if r2.Translator.checkActForPicking(componentId, instanceId) == false then - return false - end - if instanceId == r2.currentRefIdWidgetParentInstance.InstanceId then return false - else - local tmpInstance = r2:getInstanceFromId(instanceId) - if tmpInstance then - if tmpInstance:isKindOf("Region") then return true - else return false end - end - return false - end -end - -function r2:setZoneRefIdTarget(instanceId) - local tmpInstance = r2:getInstanceFromId(instanceId) - if tmpInstance and tmpInstance:isKindOf("Region") then - --r2.requestSetNode(r2.currentRefIdWidgetParentInstance.InstanceId, r2.currentRefIdWidgetAttrName, instanceId) - r2.currentRefIdWidgetParentInstance:setRefIdValue(r2.currentRefIdWidgetAttrName, instanceId) - end -end - -function r2:canPickDialog(instanceId) - local comp = r2:getSelectedInstance() - if not comp or instanceId == "" then return true end - local componentId = comp.InstanceId - if r2.Translator.checkActForPicking(componentId, instanceId) == false then - return false - end - if instanceId == r2.currentRefIdWidgetParentInstance.InstanceId then return false - else - local tmpInstance = r2:getInstanceFromId(instanceId) - - if tmpInstance then - if tmpInstance:isKindOf("ChatSequence") then return true - else return false end - end - return false - end -end - -function r2:setDialogRefIdTarget(instanceId) - local tmpInstance = r2:getInstanceFromId(instanceId) - if tmpInstance then - -- if the instance is a npc belonging to a npcgrp - if tmpInstance:isKindOf("ChatSequence") then - --r2.requestSetNode(r2.currentRefIdWidgetParentInstance.InstanceId, r2.currentRefIdWidgetAttrName, instanceId) - r2.currentRefIdWidgetParentInstance:setRefIdValue(r2.currentRefIdWidgetAttrName, instanceId) - end - end -end ------------------------------------------------------------------------------------------------------------- ---/////////////////////// ---// PLOT ITEMS PICKER // ---/////////////////////// - --- handle updates of the "RefId" widget for plot items -local maxNumPlotItems = tonumber(getDefine("r2ed_max_num_plot_items")) - -local refIdPlotItemEventHandler = clone(refIdDefaultEventHandler) --- - -function refIdPlotItemEventHandler:updateSheet(widget, targetPlotItem) - for k = 0, maxNumPlotItems - 1 do - local dbPath = "LOCAL:R2:PLOT_ITEMS:" .. tostring(k) - if getDbProp(dbPath .. ":SHEET") == targetPlotItem.SheetId then - widget.sheet.sheet = dbPath - r2.ScratchUCStr:fromUtf8(targetPlotItem.Name) - widget.t.uc_hardtext = r2.ScratchUCStr - return true - end - end - return false -end - -function refIdPlotItemEventHandler:update(widget, value, target) - local targetPlotItem = r2:getInstanceFromId(value) - widget:find("edit_plot_item").frozen = (targetPlotItem == nil) - -- target object must already have created its display in the database -> point the same object - if targetPlotItem then - if self:updateSheet(widget, targetPlotItem) then return end - -- update may fail because update of the db for the plot items is done in the main loop - -- and may not has been done yet, so force a refresh and retry - r2.PlotItemDisplayerCommon:updateAll() - if self:updateSheet(widget, targetPlotItem) then return end - end - - widget.sheet.sheet = "" - widget.t.uc_hardtext = i18n.get("uiR2EDChooseItem") -end - --- ui handling for selection of plot items from the scenario -r2.PlotItemsWidget = -{ - SelectionId = "", - DestProp = "" -- the dest property to which new item selection must bedone -} - --- called when user click on the item sheet -> allows to choose a newplot item -function r2.PlotItemsWidget:changeItem(propName) - if r2.Scenario.PlotItems.Size == 0 then - enableModalWindow(getUICaller(), "ui:interface:r2ed_dm_gift_no_plot_items") - return - end - enableModalWindow(getUICaller(), "ui:interface:r2ed_choose_property_sheet_plot_item") - self.SelectionId = r2:getSelectedInstance().InstanceId - self.DestProp = propName -end - --- called when user has chosen a new sheet to affect -function r2.PlotItemsWidget:validateItem(sheet) - local target = r2:getInstanceFromId(self.SelectionId) - if not target then - return -- maybe the target has been deleted by someone else between the first click and the choice ? - end - if sheet == "UI:EMPTY" or sheet == "UI:DUMMY" then - -- empty choice ... - r2.requestSetNode(self.SelectionId, self.DestProp, "") - else - local sheetId = getDbProp(sheet .. ":SHEET") - -- search plot item with the same sheet - for k, v in specPairs(r2.Scenario.PlotItems) do - if v.SheetId == sheetId then - r2.requestNewAction(i18n.get("uiR2EDChangePlotItem")) - r2.requestSetNode(self.SelectionId, self.DestProp, v.InstanceId) -- makeref to the new item - return - end - end - debugInfo("Plot item not found from its sheet") - end -end - --- called when the user hit the 'new' button -> pop a dialog to create a new plot item -function r2.PlotItemsWidget:newPlotItem(propName) - r2.PlotItemsPanel:createNewItemAnAffectToRefId(r2:getSelectedInstance().InstanceId, propName) -end - --- called when the user hit the 'edit' button -> pop a dialog to change the name of the edited plot item -function r2.PlotItemsWidget:editPlotItem(propName) - r2.PlotItemDisplayerCommon:editPlotItemName(r2:getInstanceFromId(r2:getSelectedInstance()[propName])) -end - - --- build widget factory for 'RefId' -r2.WidgetStyles.RefId = -{ - Default = function(prop, className) - local testFunction = "" - local pickFunction = "" - if not prop.PickFunction or prop.PickFunction == "" then - testFunction = "r2:testCanPickRefIdWidgetTarget" - else - testFunction = prop.PickFunction - end - - if not prop.SetRefIdFunction or prop.SetRefIdFunction == "" then - pickFunction = "r2:setRefIdWidgetTarget" - else - pickFunction = prop.SetRefIdFunction - end - - --- TestFunction - - local widgetXml = - string.format( - [[ - - - - - - ]], prop.Name, prop.Name, select(prop.Filter, prop.Filter, "BaseClass"), testFunction, pickFunction, prop.Name - ) - return widgetXml, refIdDefaultEventHandler, nil - end, - PlotItem = function(prop, className) - widgetXml = - string.format( - [[ - - ]], prop.Name) - return widgetXml, refIdPlotItemEventHandler, nil - end, -} - - -------------------------------------------------------------------------------------- --- Signal that a property of object being currently edited (in a property sheet or a form) --- has been changed. This will update the object property with value 'value'. The appropriate net msg will be sent. --- This function should be called by edition widgets. -function r2:requestSetObjectProperty(propName, value, isLocal) - if getUICaller() == nil then - debugInfo(" should be called by a widget") - return - end - local container = getUICaller().parent:getEnclosingContainer() - -- TODO nico : do distinction between forms and property sheet in a better way (with polymorphism) - if container.Env.Form ~= nil then - -- this is a form (update is done in local) - local form = container.Env.Form - local prop = form.NameToProp[propName] - if prop.convertFromWidgetValue ~= nil then - -- if there's a conversion function then use it - value = prop.convertFromWidgetValue(value) - end - container.Env.FormInstance[propName] = value - container.Env.setter(propName, value) - -- if there's a 'onChange' function then call it - if type(prop.onChange) == "function" then - prop.onChange(container.Env.FormInstance) - end - -- visibility of some properties may depend on this one, so update them - container.Env.updatePropVisibility() - else - local target = r2:getPropertySheetTarget() - local class = r2:getClass(target) - local prop = class.NameToProp[propName] - if target[propName] == value then - return -- not really modified -> no op - end - local ucActionName = r2:getPropertyTranslation(prop) - r2.requestNewAction(concatUCString(i18n.get("uiR2EDChangePropertyAction"), ucActionName, i18n.get("uiR2EDChangePropertyOf"), target:getDisplayName())) - -- this is a property sheet - - - -- if the instance is currently being erased, no use - -- to send pending properties (may happen ifthe user being to enter a string - -- an click on the erase button -> then the propertu sheet is closed and this function - -- is fired) - if target.User.Erased == true then - return - end - - if prop.convertFromWidgetValue ~= nil then - -- if there's a conversion function then use it - value = prop.convertFromWidgetValue(value) - end - --debugInfo(string.format("Setting node : prop name = %s, value = %s", tostring(propName), tostring(value))) - - if isLocal then - r2.requestSetLocalNode(target.InstanceId, propName, value) - else - r2.requestSetNode(target.InstanceId, propName, value) - end - - if prop.SecondRequestFunc and prop.SecondRequestFunc~="" then - prop.SecondRequestFunc(value) - end - end -end - -------------------------------------------------------------------------------------- --- Signal that a property of object being currently edited (in a property sheet or a form) --- has been changed. This will update the object property with value 'value'. should be called by edition widget --- This is a local version of 'r2:requestSetObjectProperty' : no net msg is sent, value is modified locally. --- Value is actually sent at commit time (when calling r2:requestCommitLocalObjectProperty) -function r2:requestSetLocalObjectProperty(propName, value) - self:requestSetObjectProperty(propName, value, true) -end - -------------------------------------------------------------------------------------- --- Commit last modifications done on the object that is currently being edited (using r2:requestSetLocalObjectProperty) --- A net msg is sent to update the object property on the server. --- The local value is copied to the client value that was previously shadowed by a call to 'r2:requestSetLocalObjectProperty' -function r2:requestCommitLocalObjectProperty(propName, value) - if getUICaller() == nil then - debugInfo(" should be called by a widget") - return - end - local container = getUICaller().parent:getEnclosingContainer() - if container.Env.Form == nil then - -- this is a property sheet - local target = r2:getPropertySheetTarget() - local class = r2:getClass(target) - local prop = class.NameToProp[propName] - --debugInfo(string.format("Setting node : prop name = %s, value = %s", tostring(propName), tostring(value))) - r2.requestCommitLocalNode(target.InstanceId, propName) - r2.requestEndAction() - end - -- no op for forms (no 'commit' notion) -end - -------------------------------------------------------------------------------------- --- Cancel last modifications done on the object that is currently being edited (using r2:requestSetLocalObjectProperty) --- Object property is restored to its initial value (technically, it stop being 'shadowed' by the local value, so any --- third party modification will be seen from here) --- As a consequence no net msg is sent -function r2:requestRollbackLocalObjectProperty(propName, value) - if getUICaller() == nil then - debugInfo(" should be called by a widget") - return - end - local container = getUICaller().parent:getEnclosingContainer() - if container.Env.Form ~= nil then - -- this is a form (update is done in local) - local form = container.Env.Form - local prop = form.NameToProp[propName] - if prop.convertFromWidgetValue ~= nil then - -- if there's a conversion function then use it - value = prop.convertFromWidgetValue(value) - end - container.Env.FormInstance[propName] = value - container.Env.setter(propName, value) - else - -- this is a property sheet - local target = r2:getPropertySheetTarget() - local class = r2:getClass(target) - local prop = class.NameToProp[propName] - --debugInfo(string.format("Setting node : prop name = %s, value = %s", tostring(propName), tostring(value))) - r2.requestRollbackLocalNode(target.InstanceId, propName) - end - -- no op for forms (no 'commit' notion) -end - -------------------------------------------------------------------------------------- --- get the object whose property sheet is currently displayed --- should be used only with property sheets -function r2:getPropertySheetTarget() - if not r2.CurrentPropertyWindow then return nil end - -- can only be the selection for now ... - return r2.CurrentPropertyWindow.Env.TargetInstance -end - - ------------------------------------------------------------------------------------------------------------- --- get name of ui for default property sheet from the class name -function r2:getDefaultPropertySheetUIPath(className) - return "ui:interface:r2ed_property_sheet_" .. className -end - ------------------------------------------------------------------------------------------------------------- --- get definition of property edited from its widget -function r2:getPropertyDefinition(propName, uiCaller) - -- useful infos are stored in the parent container - assert(uiCaller) - local container = uiCaller:getEnclosingContainer() - if container.Env.Form ~= nil then - -- this is a form (update is done in local) - return container.Env.Form.NameToProp[propName] - else - -- this is a property sheet - local target = r2:getPropertySheetTarget() - local class = r2:getClass(target) - return class.NameToProp[propName] - end -end - - - - ------------------------------------------------------------------------------------------------------------- --- return pointer to a property sheet of an object from its class name -function r2:getPropertySheet(instance) - local class = instance:getClass() - local uiPath = r2:evalProp(class.PropertySheetUIPath, instance, r2:getDefaultPropertySheetUIPath(class.Name)) - return getUI(uiPath) -end - ------------------------------------------------------------------------------------------------------------- --- get a form from its name -function r2:getForm(name) - assert(name) -- why is name nil??? - return getUI("ui:interface:r2ed_form_" .. name) -end - ---///////////////////// ---// NUMBER WIDGETS // ---///////////////////// - --- widget styles for 'Numbers' -r2.WidgetStyles.Number = -{ - -------------------------------------------------------------------------------------------------------------------- - Default = function(prop, className) - local function setter(widget, prop, value) - widget.eb.input_string = tostring(value) - widget.eb.Env.CurrString = tostring(value) - end - local onChangeAction = - string.format( - [[ - local editBox = getUICaller() - if editBox.input_string == editBox.Env.CurrString then - return - end - editBox.Env.CurrString = editBox.input_string - local newValue = tonumber(getUICaller().input_string) - if newValue == nil then - debugInfo('Invalid number value : ' .. getUICaller().input_string) - return - end - local prop = r2:getPropertyDefinition('%s', getUICaller()) - assert(prop) - local clamped = false - if prop.Min and newValue < tonumber(prop.Min) then - newValue = tonumber(prop.Min) - clamped = true - end - if prop.Max and newValue > tonumber(prop.Max) then - newValue = tonumber(prop.Max) - clamped = true - end - if clamped then - editBox.input_string = tostring(newValue) - editBox.Env.CurrString = tostring(newValue) - end - r2:requestSetObjectProperty('%s', newValue) - ]], prop.Name, prop.Name) - return r2:buildEditBox(prop, "TR TR", "integer", false, 16, onChangeAction, onChangeAction), setter, nil - end, - -------------------------------------------------------------------------------------------------------------------- - Boolean = function(prop, className) - local function setter(widget, prop, value) - --debugInfo("setter : " .. tostring(value)) - -- widget is a pointer to the enclosing group - if value == 1 then - value = true - else - value = false - end - widget.butt.pushed = value - --widget.text_true.active = value - --widget.text_false.active = not value - end - local function buildCoverAllButton(prop) - return [[ - ]] - end --- local widgetXml = --- string.format([[ --- --- --- --- --- --- ]], prop.Name, prop.Name) - local widgetXml = - string.format([[ - ]] - .. buildCoverAllButton(prop) .. [[ - - - ]], prop.Name, prop.Name) - -- Caption is special here : - -- It contains a button to avoid to have to click in the tiny checkbox, which is inconvenient - local iwidth0 = defaulting(prop.CaptionWidth, 35) - local width0 = string.format("%d%%", iwidth0) - local width1 = string.format("%d%%", 100 - iwidth0) - local invertWidget = defaulting(prop.InvertWidget, false) - - if invertWidget then - local tmp = width0 - width0 = width1 - width1 = tmp - end - - local part0 = [[ ]] - - - local tooltipTextId, tooltipTextIdFound = buildPropTooltipName(className, prop.Name) - part0 = part0 .. [[" - part0 = part0 .. buildCoverAllButton(prop) - - local color = "255 255 255 255" - local globalColor = "true" - local hardText - local found - hardText, found = r2:getPropertyTranslationId(prop) - if not found and config.R2EDExtendedDebug == 1 then - color = "255 0 0 255" - globalColor = "false" - hardText = hardText .. " (NOT TRANSLATED)" - end - - part0 = part0 .. [[ ]] - part0 = part0 .. "" - part0 = part0 .. "" - - --dumpSplittedString(widgetXml) - return widgetXml, setter, part0 - end, - -------------------------------------------------------------------------------------------------------------------- - Slider = function(prop, className) - local function setter(widget, prop, value) - if widget.c.value ~= nil then - widget.c.value = value - end - end - -- - local widgetXml = - string.format([[ - " .. [[ - - - - - - - - - - - - "" - - "" - ]], prop.Name, prop.Name, prop.Name, defaulting(prop.Min, 0), defaulting(prop.Max, 100), defaulting(prop.StepValue, 1), - defaulting(prop.ActiveBitmaps, 'false'), defaulting(prop.LeftBitmap, ""), defaulting(prop.MiddleBitmap, ""), defaulting(prop.RightBitmap, "")) - -- - --debugInfo(string.format("Creating slider widget, min = %s, max = %s", defaulting(prop.Min, 0), defaulting(prop.Min, 100))) - return widgetXml, setter - end, - -------------------------------------------------------------------------------------------------------------------- - EnumDropDown = function(prop, className) - if type(prop.Enum) ~= "table" then - debugInfo("Can't create enum combo box, the 'Enum' table is not found or of bad type") - return "" - end - local function setter(widget, prop, value) - if widget.selection ~= nil then - widget.parent.Env.Locked = true - widget.selection = value - widget.parent.Env.Locked = false - end - end - local result = - [[ - " - result = result .. [[]] - -- append enumerated values - - for k, v in pairs(prop.Enum) do - result = result .. [[]] - end - result = result .. "" - return result, setter - end, -} - - ------------------------------------------------------------------------------------------------------------- --- build a widget from the definition of the property -function r2:buildPropWidget(prop, className) - local widgetFactory = r2.WidgetStyles[prop.Type] - if widgetFactory == nil then - --debugInfo("Type '" .. tostring(prop.Type) .. "' not found. Widget not built") - return nil - end - local widgetStyle = prop.WidgetStyle - if widgetStyle == nil then - widgetStyle = "Default" - end - if widgetFactory[widgetStyle] == nil then - debugInfo("Widget style '" .. tostring(widgetStyle) .. "' not found for type '" .. tostring(prop.Type) .. - "', widget not built" ) - return nil - end - local result, setter, caption = widgetFactory[widgetStyle](prop, className) - -- add common functionnality of setter - if setter ~= nil then - -- if there's a conversion function on set, then call it - if prop.convertToWidgetValue ~= nil then - if type(setter) == "function" then - local oldSetter = setter - setter = function(widget, prop, value) - oldSetter(widget, prop, prop.convertToWidgetValue(value)) - end - else - assert(type(setter) == "table") - if (setter.onSet) then - local oldSetter = setter.onSet - function setter:onSet(widget, prop, value) - self:oldSetter(widget, prop, prop.convertToWidgetValue(value)) - end - end - end - end - end - return result, setter, caption -end - ------------------------------------------------------------------------------------------------------------- --- create a table of properties -function r2:createPropertyXmlTable(props, className, posparent, posref, x, y, widgetEventHandlerTable) - local result = "" -- the resulting xml - -- add a new string to the resulting string - local function add(value) - result = result .. value - end - add([[ - ]]) - - for key, prop in pairs(props) do - local widgetXmlDesc, setter, captionXmlDesc = self:buildPropWidget(prop, className) - if widgetXmlDesc ~= nil then - add("") - -- build the caption - local color = "255 255 255 255" - local globalColor = "true" - --if SeenNames[prop.Name] == nil then - -- debugInfo(prop.Name) - -- SeenNames[prop.Name] = true - --end - - local hardText - local found - hardText, found = r2:getPropertyTranslationId(prop) - if not found and config.R2EDExtendedDebug == 1 then - color = "255 0 0 255" - globalColor = "false" - hardText = hardText .. " (NOT TRANSLATED)" - end - -- - local iwidth0 = defaulting(prop.CaptionWidth, 35) - local width0 = string.format("%d%%", iwidth0) - local width1 = string.format("%d%%", 100 - iwidth0) - local invertWidget = defaulting(prop.InvertWidget, false) - - if invertWidget then - local tmp = width0 - width0 = width1 - width1 = tmp - end - - local tooltipTextId, tooltipTextIdFound = buildPropTooltipName(className, prop.Name) - --debugInfo(string.format("%60s %s", tooltipTextId, " [@{F00F} FILL ME ! :" .. prop.Name .. "]")) - - local part0 - if not captionXmlDesc then - part0 = [[ ]] - - part0 = part0 .. [[" - part0 = part0 .. [[ ]] - part0 = part0 .. "" - part0 = part0 .. "" - else - part0 = captionXmlDesc - end - - -- build the widget - local part1 = [[ ]] - part1 = part1 .. [[" - part1 = part1 .. widgetXmlDesc .. [[]] - - if invertWidget then - add(part1 .. part0) - else - add(part0 .. part1) - end - -- add the setter function in the table - --debugInfo("inserting entry" .. prop.Name) - if type(setter) == "function" then - -- setter is a plain 'set' function - -- => event handler is a simple table with a 'onSet' method ... - widgetEventHandlerTable[prop.Name] = - { - onSet= function(this, widget, prop, value) - setter(widget, prop, value) - end - } - else - -- debugInfo(prop.Name .. " : " .. type(setter)) - -- setter is a complete object (a lua table) with event handling methods - if type(setter) ~= "table" then - debugInfo(type(setter)) - inspect(setter) - assert(0) - end - widgetEventHandlerTable[prop.Name] = setter - end - add("") - end - end - add([[]]) - return result -end - ------------------------------------------------------------------------------------------------------------- --- build xml for a rollout containing a table of properties -function r2:buildPropRolloutXml2(className, caption, id, posparent, posref, props, rolloutY, widgetEventHandlerTable, isForm) - local content = self:createPropertyXmlTable(props, className, "caption", "BL TL", 0, -4, widgetEventHandlerTable) - -- todo : use something more clear than string.format !!! - local global_color_over = "255 255 255 192" - local params_l = "r2:openCloseRollout('prop_table')" - if isForm then - global_color_over = "127 127 127 127" - params_l = "" - end - local result = string.format( - [[ - - - ]], id, rolloutY, posparent, posref, global_color_over, params_l) - - - if not isForm then - result = result .. - string.format([[ - - - - - ]], caption) - else - result = result .. - string.format([[]], caption) - end - - result = result .. string.format( - [[ - - - - - - %s - - ]],content) - - return result -end - --- build xml for a rollout containing a table of properties -function r2:buildPropRolloutXml(caption, id, posparent, posref, props, className, rolloutY, widgetEventHandlerTable, isForm) - local content = self:createPropertyXmlTable(props, className, "caption", "BL TL", 0, -4, widgetEventHandlerTable) - -- add the caption - local result = string.format( - [[ ]], id, rolloutY, posparent, posref) - - local color = "255 255 255 255" - local globalColor = "true" - --if SeenRolloutCaptions[caption] == nil then - -- debugInfo(caption) - -- SeenRolloutCaptions[caption] = true - --end - if not i18n.hasTranslation(caption) then - if config.R2EDExtendedDebug == 1 then - color = "255 0 0 255" - globalColor = "false" - caption = caption .. "(NOT TRANSLATED)" - end - end - - -- add the rollout bar - if not isForm then - result = result .. - [[ ]] - else - result = result .. - [[ ]] - end - - -- add the content - result = result .. content - - -- close - result = result .. "" - - return result -end - - - - - ----------------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------------------- --- Generation of property sheet ui xml code from a class definition --- this function will return 2 values : --- xml code to generate the dialog to edit instance of the class --- A registration function for that dialog, that must be called prior to use (and once the ui has been created from the xml code) --- Note : Registration isn't done at creation in order to pack several class descriptions in --- a single xml script to speed up parsing - -function r2:buildPropertySheetXml(class, className, id, title, isForm) - - -- The following table contains for each property a set method that allow to change it from the outside - -- these value is filled by each widget "ctor" function. - -- In a similar way, each widget is given a setter function. - local widgetEventHandlerTable = {} - -- - --local function dump() - -- for key, value in pairs(widgetEventHandlerTable) do - -- debugInfo('*') - -- debugInfo(tostring(key, value)) - -- end - --end - -- - local result = "" -- the resulting xml - -- add a new string to the resulting string - local function add(value) - result = result .. value - end - - - local rolloutsX = 12 - local rolloutsW = -14 - if isForm then - rolloutsX = 0 - rolloutsW = -2 - end - - - - - add( - [[ - ]]) - - - - if className == "NpcCustom" then - add( - [[ - - - - - ]]) - elseif r2.hasDisplayInfo(className) == 1 or string.find(className, "_Form") ~= nil then - debugInfo("Adding help header for "..className) - local featureName = className - if string.find(className, "_Form") ~= nil then - local len = string.len(featureName) - featureName = string.sub(featureName, 1, len - 5) - end - - add( - [[ - - - - - ]]) - else - add([[ - ]]) - end - - - add([[ - - - - - - ]]) - - - - -- sort properties by category - local categories = {} - local numCategories = 0 - for key, prop in pairs(class.Prop) do - if prop.Visible ~= false then - local category = prop.Category - if category == nil then - category = "uiR2EDRollout_Default" - end - if categories[category] == nil then - --debugInfo("Adding new category " .. tostring(category)) - -- create a new table if no entries for that category of properties - categories[category] = {} - numCategories = numCategories + 1 - end - table.insert(categories[category], prop) - end - end - - local posparent = "parent" - local posref= "TL TL" - local rolloutY = -4 - - -- if there's a xml property sheet header, use it - if class.PropertySheetHeader then - -- enclose the header in a group to keep good width - - add([[]] .. - class.PropertySheetHeader .. - [[]] - ) - posref="BL TL" - posparent="sheet_header" - end - - -- if there's just a 'default' category, then don't create a rollout - if numCategories == 1 and categories["uiR2EDRollout_Default"] ~= nil then - add(self:createPropertyXmlTable(categories["uiR2EDRollout_Default"], className, posparent, posref, 0, rolloutY, widgetEventHandlerTable)) - posparent="prop_table" - else - -- add each rollout and its properties - rolloutY = -2 - local categoryIndex = 0 - for k, v in pairs(categories) do - add(self:buildPropRolloutXml(k, tostring(categoryIndex), posparent, posref, v, className, rolloutY, widgetEventHandlerTable, isForm)) - posparent = tostring(categoryIndex) - posref ="BL TL" - rolloutY = -4 - categoryIndex = categoryIndex + 1 - end - end - - -- if the dialog is a form, then add 'ok' & 'cancel' button - if isForm then - add([[ - - - - ]]) - end - - - -- close the dialog - add([[ ]]) - if not isForm then - -- scroll bar for property sheet only - add([[ ]]) - end - add([[ - - - - - - ]]) - - ---/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ---/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - -- THE REGISTRATION FUNCTION, called after the ui has been created for real from the xml definition - local function registrationFunction() - local propertySheet = getUI("ui:interface:" .. id) -- tmp : hardcoded name here - local form = propertySheet -- alias, if the dialog is actually a form - local propNameToWidget = {} - local propNameToLCaption= {} - local propNameToRCaption= {} - -- keep a pointer to each widget - -- can only do it now, because this registration is called only once the ui has been created - for k, prop in pairs(class.Prop) do - propNameToWidget[prop.Name] = propertySheet:find(prop.Name) - propNameToLCaption[prop.Name] = propertySheet:find("l_" .. prop.Name) - propNameToRCaption[prop.Name] = propertySheet:find("r_" .. prop.Name) - end - -- Fucntion to retrieve a reference on the currently edited object - local function getTargetInstance() - if isForm then - return form.Env.FormInstance - else - return r2:getPropertySheetTarget() - end - end - ------------------------------------------------------ - if propertySheet ~= nil then -- should not be nil if parsing succeeded - -- create a handleEvent function and put it in the lua environment of the property sheet - -- (in the C++ code, each group in the interface, such as a container, has a 'Env' lua table attached to it) - function propertySheet.Env.handleEvent(eventName, attributeName, args) - -- TODO nico : arrays not handled yet - if propertySheet.active == false then - return -- no update if dialog not visible (updateAll() is called when dialog is shown again) - end - local targetInstance = getTargetInstance() - local widgetEventHandler = widgetEventHandlerTable[attributeName] -- closure here : use locally defined widgetEventHandlerTable - if widgetEventHandler == nil then - return -- no display for that widget - end - local handlingMethod = widgetEventHandler[eventName] - if handlingMethod == nil then - -- no handler for this event, just return - debugInfo("Event not handled for : " .. attributeName) - inspect(getTargetInstance()) - return - end - local propWidget = propNameToWidget[attributeName] -- closure here : use locally defined propertySheet - -- find the name of the widget by its id - if propWidget == nil then - debugInfo("Can't retrieve widget associated with property '" .. attributeName .. "'") - return - end - -- call the actual event handler with the widget as its first parameter - handlingMethod(widgetEventHandler, propWidget, class.NameToProp[attributeName], getTargetInstance()[attributeName], unpack(args)) - end - local handleEventFunction = propertySheet.Env.handleEvent - -- syntaxic sugar : 'setter' function for simple set operation - function propertySheet.Env.setter(attributeName, value) - table.clear(eventArgs) - table.insert(eventArgs, value) - handleEventFunction("onSet", attributeName, eventArgs) - end - local setter = propertySheet.Env.setter - ------------------------------------------------------------------------------------------------------------------ - -- this function is called when the property sheet is shown for the first time - -- in order to update its content - local function updateAll() - --debugInfo("updateAll") - local target = getTargetInstance() - if not target then return end -- 'updateAll' will be triggered at init time when - -- windows are positionned - for k, prop in pairs(class.Prop) do - -- update the 'visible' state of each property - local active = true - if type(prop.Visible) == "function" then - active = prop.Visible(target) - - - local oldActive = propNameToLCaption[prop.Name].active - propNameToLCaption[prop.Name].active = active - propNameToRCaption[prop.Name].active = active - - if oldActive ~= active then - propNameToLCaption[prop.Name]:invalidateCoords() - propNameToLCaption[prop.Name]:updateCoords() - end - - - end - setter(prop.Name, target[prop.Name]) -- retrieve value from object and assign to setter - end - propertySheet:invalidateCoords() - propertySheet:updateCoords() - debugInfo("*") - end - - propertySheet.Env.updateAll = updateAll - end - ------------------------------------------------------------------------------------------------------------------ - -- this function is called by forms or proprty sheets to update visible properties - -- when visibility depends on other properties - local function updatePropVisibility() - local target = getTargetInstance() - local modified = false - for k, prop in pairs(class.Prop) do - -- update the 'visible' state of each property - local active = true - if type(prop.Visible) == "function" then - local active = prop.Visible(target) - if active ~= propNameToLCaption[prop.Name].active then - modified = true - propNameToLCaption[prop.Name].active = active - propNameToRCaption[prop.Name].active = active - propNameToRCaption[prop.Name]:invalidateContent() - end - end - end - return modified - end - ------------------------------------------------------ - propertySheet.active = false - -- if this is a form, then the dialog should be resized when text is entered (for multi line texts) - -- (else no-op for update coords) - -- We should resize it by script, because by default, container impose size of their children - if isForm then - function propertySheet.Env.updateSize() - local rollouts = propertySheet:find("rollouts") - local deltaH = 40 - propertySheet:invalidateCoords() - propertySheet:updateCoords() - local newHReal = rollouts.h_real - -- must resize the parent - local newH = newHReal + deltaH - local yOffset = newH - propertySheet.h - --propertySheet.h = newH - propertySheet.y = propertySheet.y + yOffset / 2 - propertySheet.pop_min_h = newH - propertySheet.pop_max_h = newH - propertySheet:invalidateCoords() - propertySheet:updateCoords() - end - propertySheet.Env.updatePropVisibility = function() - local modified = updatePropVisibility() -- call local function defined above - -- for forms, update size if content was modified - if modified then - propertySheet.Env.updateSize() - end - end - else - propertySheet.Env.updatePropVisibility = updatePropVisibility -- call local function defined above - function propertySheet.Env.updateSize() - -- no op for property sheet (user can change the size of the window) - end - end - end - - - return result, registrationFunction -end - ---/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ---/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - ------------------------------------------------------------------------------------------------------------- --- called when the user has clicked on a rollout --- TODO nico : also used by the scenario window, so factor the code -function r2:setRolloutOpened(rollout, content, opened) - if not rollout or not content then - debugInfo("r2:setRolloutOpened : rollout or content is nil") - return - end - content.active = opened - rollout:find("open_indicator").opened.active = opened - rollout:find("open_indicator").closed.active = not opened -end - - ------------------------------------------------------------------------------------------------------------- -function r2:buildAllPropertySheetsAndForms() - -- TMP TMP - --SeenNames = {} - --SeenRolloutCaptions = {} - local xmlScript = "" - local registrationFunctions = {} - --debugInfo('building property sheets') - local mustReparse = false - for k, class in pairs(r2.Classes) do - -- only build if class require a property sheet - --if class.BuildPropertySheet == true then - if true then - -- to avoid costly parsing, see in the cache if the class was not already parsed - local mustRebuild = true - local propSheetCacheInfo - if class.ClassMethods then - propSheetCacheInfo = class.ClassMethods.getGenericPropertySheetCacheInfos(class) - if r2ClassDescCache[class.Name] ~= nil then - if isEqualIgnoreFunctions(r2ClassDescCache[class.Name], propSheetCacheInfo) then - mustRebuild = false - else - debugInfo("Class " .. class.Name .. " found in cache, but different, rebuilding") - end - end - end - local result, registerFunc = r2:buildPropertySheetXml(class, class.Name, "r2ed_property_sheet_" .. class.Name, "uiR2EDProperties", false) - table.insert(registrationFunctions, registerFunc) - if mustRebuild then - xmlScript = xmlScript .. result - mustReparse = true - r2ClassDescCache[class.Name] = propSheetCacheInfo -- update cache - --debugInfo("Rebuilding property sheet") - end - end - end - - - -- register feature Forms - do - local k, feature = next (r2.Features, nil) - while k do - if feature.registerForms then - feature.registerForms() - end - k, feature = next (r2.Features, k) - end - end - - -- register userComponentManager forms - do - if r2_core.UserComponentManager then - debugInfo("Registering UserComponentManager forms...") - r2_core.UserComponentManager.registerForms() - end - end - - --debugInfo('building forms') - if r2.Forms ~= nil then - for formName, form in pairs(r2.Forms) do - local mustRebuild = true - if r2FormsCache[formName] ~= nil then - if isEqualIgnoreFunctions(r2FormsCache[formName], form.Prop) then - mustRebuild = false - end - end - local result, registerFunc = r2:buildPropertySheetXml(form, formName, "r2ed_form_" .. formName, "uiR2EDForm", true) - table.insert(registrationFunctions, registerFunc) - if mustRebuild then - xmlScript = xmlScript .. result - mustReparse = true - r2FormsCache[formName] = form.Prop -- updating cache - --debugInfo("Rebuilding property form") - end - end - end - --debugInfo('parsing') - if mustReparse then - debugInfo(colorTag(255, 0, 255) .. "Reparsing generated xml") - local startTime = nltime.getLocalTime() - -- TMP TMP - --local f = io.open("testui.log", "w") - --f:write(r2:encloseXmlScript(xmlScript)) - --f:flush() - --f:close() - parseInterfaceFromString(ucstring(r2:encloseXmlScript(xmlScript)):toUtf8()) - local endTime = nltime.getLocalTime() - debugInfo(string.format("Reparsing generated xml took %f second", (endTime - startTime) / 1000)) - end - -- do the registration - for k, regFunc in pairs(registrationFunctions) do - regFunc() - end - -- center all windows at start - local function initPropertySheetPos(wnd) - if wnd == nil then return end - wnd.active = true - r2:initDefaultPropertyWindowPosition(wnd) -- position definition in r2_ui_windows.lua - wnd.active = false - end - -- - for k, class in pairs(r2.Classes) do - -- only build if class require a property sheet - if class.BuildPropertySheet == true then - --debugInfo('*3') - local wnd = getUI(r2:getDefaultPropertySheetUIPath(class.Name)) - if wnd ~= nil then - r2:adjustPropertySheetTitleClampSize(wnd) - initPropertySheetPos(wnd) - end - end - end - if r2.Forms ~= nil then --- for formName, form in pairs(r2.Forms) do - for formName, form in pairs(r2.Forms) do - local wnd = r2:getForm(formName) - if wnd then - - -- prevent update of window content here (no selection exists) - local oldOnActiveParams = wnd.on_active_params - local oldOnDeactiveParams = wnd.on_deactive_params - wnd.on_active_params = "" - wnd.on_deactive_params = "" - wnd.active = true - r2:adjustPropertySheetTitleClampSize(wnd) - wnd.Env.updateSize() - wnd.active = false - wnd.on_active_params = oldOnActiveParams - wnd.on_deactive_params = oldOnDeactiveParams - - - --wnd.active = true - --wnd:invalidateCoords() - --wnd:updateCoords() - --local maxH = wnd:find("rollouts").h_real - --wnd.pop_max_h = maxH + 40 - --wnd.pop_min_h = maxH + 40 - --wnd:center() - --wnd:invalidateCoords() - --wnd:updateCoords() - --wnd:center() - -- force the y size (no scroll) by evaluating content size - --wnd.active = false - end - end --- end - end - - -- force to center all windows at start - --debugInfo('*4') - initPropertySheetPos(getUI("ui:interface:r2ed_property_sheet_no_properties")) - initPropertySheetPos(getUI("ui:interface:r2ed_property_sheet_no_selection")) - - --debugInfo('*5') -end - ------------------------------------------------------------------------------------------------------------- --- TMP -function r2:testPropertySheet() - -- tmp - local result, registrationFunction = r2:buildPropertySheetXml(r2.Classes.MapDescription, "r2ed_property_sheet") - -- parse & register - parseInterfaceFromString(r2:encloseXmlScript(result)) -- parseInterfaceFromString :C++ function exported from the interface manager to parse an new interface - -- from its xml description - registrationFunction() - local propertySheet = getUI("ui:interface:r2ed_property_sheet") - if propertySheet ~= nil then - propertySheet.active = false - propertySheet.active = true -- force an update - propertySheet:center() - updateAllLocalisedElements() - end -end - - ------------------------------------------------------------------------------------------------------------- --- Displayer to update the content of the property sheet -local propertySheetDisplayerTable = {} - ------------------------------------------------- -function propertySheetDisplayerTable:onCreate(instance) -end ------------------------------------------------- -function propertySheetDisplayerTable:onErase(instance) -end ------------------------------------------------- -function propertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function propertySheetDisplayerTable:onPostHrcMove(instance) -end ------------------------------------------------- -function propertySheetDisplayerTable:onFocus(instance, hasFocus) -end ------------------------------------------------- -function propertySheetDisplayerTable:onSelect(instance, isSelected) -end - ------------------------------------------------- --- handle an event on a property, possibly with additionnal parameters -function propertySheetDisplayerTable:handleAttrEvent(eventName, instance, attributeName, args) - -- TODO nico : arrays not handled yet - local class = instance:getClass() - if not class.BuildPropertySheet then - return false - end - local propertySheet = r2:getPropertySheet(instance) - if propertySheet == nil or propertySheet.active == false then - return false - end - --debugInfo("Property sheet test") - --debugInfo(ct .. "Instance " .. instance.InstanceId .." has an attribute modified : " .. attributeName) - -- call event handler into the ui - propertySheet.Env.handleEvent(eventName, attributeName, args) - return true -end ------------------------------------------------- -function propertySheetDisplayerTable:onAttrModified(instance, attributeName, indexInArray) - -- TODO nico : arrays not handled yet - if self.handleAttrEvent and self:handleAttrEvent("onSet", instance, attributeName, emptyArgs) then - -- special case for "Name" : title of the container depends on it - -- update if the property sheet is visible - local propertySheet = r2:getPropertySheet(instance) - if propertySheet then - if attributeName == "Name" and instance == r2:getSelectedInstance() then - propertySheet.uc_title = concatUCString(i18n.get("uiRE2DPropertiesOf"), instance:getDisplayName()) - end - propertySheet.Env.updatePropVisibility() - end - end -end ------------------------------------------------- -function propertySheetDisplayerTable:onTargetInstanceCreated(instance, refIdName, refIdIndexInArray) - -- TODO nico : arrays not handled yet - self:handleAttrEvent("onTargetCreated", instance, refIdName, emptyArgs) -end ------------------------------------------------- -function propertySheetDisplayerTable:onTargetInstanceErased(instance, refIdName, refIdIndexInArray) - -- TODO nico : arrays not handled yet - self:handleAttrEvent("onTargetErased", instance, refIdName, emptyArgs) -end ------------------------------------------------- -function propertySheetDisplayerTable:onTargetInstancePreHrcMove(instance, refIdName, refIdIndexInArray) - -- TODO nico : arrays not handled yet - self:handleAttrEvent("onTargetPreHrcMove", instance, refIdName, emptyArgs) -end ------------------------------------------------- -function propertySheetDisplayerTable:onTargetInstancePostHrcMove(instance, refIdName, refIdIndexInArray) - -- TODO nico : arrays not handled yet - self:handleAttrEvent("onTargetPostHrcMove", instance, refIdName, emptyArgs) -end - ------------------------------------------------- -function propertySheetDisplayerTable:onTargetInstanceAttrModified(instance, refIdName, refIdIndexInArray, targetAttrName, targetAttrIndexInArray) - -- TODO nico : arrays not handled yet - --debugInfo(tostring(refIdName)) - --debugInfo(tostring(refIdIndexInArray)) - --debugInfo(tostring(targetAttrName)) - --debugInfo(tostring(targetAttrIndexInArray)) - table.clear(eventArgs) - table.insert(eventArgs, targetAttrName) - table.insert(eventArgs, targetAttrIndexInArray) - self:handleAttrEvent("onTargetAttrModified", instance, refIdName) -- additionnal parameters -end - -function r2:propertySheetDisplayer() - return propertySheetDisplayerTable -- generic property displayer is shared by all instance -end - - --- last coordinate of property window (for generic property window) -r2.PropertyWindowCoordsBackup = nil - --- see if a property sheet window coords must be backuped -function r2:getPropertySheetBackupFlag(wnd) - local result = true - if not wnd then return false end - local targetInstance = wnd.Env.TargetInstance - if targetInstance then - local targetClass = r2:getClass(targetInstance) - if targetClass and not targetClass.isNil then - result = defaulting(targetClass.BackupPropertySheetSize, true) - end - end - return result -end - ------------------------------------------------------------------------------------------------------------- --- 'show properties' handler : display properties for selected instance --- TODO nico : maybe would better fit inside 'r2_ui_windows.lua' ? -function r2:showProperties(instance) - - r2.PropertyWindowVisible = false - -- alias on r2.PropertyWindowCoordsBackup - local wndCoord = r2.PropertyWindowCoordsBackup - -- hide previous window - if r2:getPropertySheetBackupFlag(r2.CurrentPropertyWindow) then - wndCoord = r2:backupWndCoords(r2.CurrentPropertyWindow) - end - if r2.CurrentPropertyWindow then - r2.CurrentPropertyWindow.active = false - end - local newPropWindow - if instance == nil then - -- display the 'no selected instance window' - newPropWindow = getUI("ui:interface:r2ed_property_sheet_no_selection") - else - local class = instance:getClass() - if class.BuildPropertySheet ~= true then - newPropWindow = getUI("ui:interface:r2ed_property_sheet_no_properties") - else - newPropWindow = r2:getPropertySheet(instance) - end - end - r2.CurrentPropertyWindow = newPropWindow - - if newPropWindow ~= nil then - if instance ~= nil then - newPropWindow.Env.TargetInstance = instance -- set the instance being edited - end - newPropWindow.active = false - newPropWindow:invalidateCoords() - newPropWindow.active = true - r2.PropertyWindowVisible = true - -- see if window want to restore size from previous property sheet (for generic property windows) - if r2:getPropertySheetBackupFlag(r2.CurrentPropertyWindow) then - if wndCoord ~= nil then - newPropWindow.x = wndCoord.x - newPropWindow.y = wndCoord.y - newPropWindow.w = math.max(wndCoord.w, newPropWindow.w) - newPropWindow.h = math.max(wndCoord.h, newPropWindow.h) - end - end - if instance and instance:getClass().BuildPropertySheet then - newPropWindow.uc_title = concatUCString(i18n.get("uiRE2DPropertiesOf"), instance:getDisplayName()) - end - end - r2.CurrentPropertyWindow = newPropWindow - - return newPropWindow -end - - -r2.CurrentForm = nil - ------------------------------------------------------------------------------------------------------------- --- display a form with the given init parameters, & call a function to notify when ok has been pressed --- the callback is called with -function r2:doForm(formName, initialTable, validateCallback, cancelCallback) - if r2.CurrentForm then r2:cancelForm(r2.CurrentForm) end - local form = r2.Forms[formName] - if form == nil then - debugInfo(" Can't retrieve form with name " .. tostring(formName)) - return - end - if form.Prop == nil then - debugInfo(" no properties found for form with name " .. tostring(formName)) - return - end - local formUI = r2:getForm(formName) - if form.Prop == nil then - debugInfo(" can't find ui for form with name " .. tostring(formName)) - return - end - -- fill all properties with their default values - for k, prop in pairs(form.Prop) do - if initialTable[prop.Name] == nil then - if prop.Default ~= nil then - initialTable[prop.Name] = prop.Default - else - -- TODO nico : add a table here when more types are available - if prop.Type == "String" then - initialTable[prop.Name] = "" - else - initialTable[prop.Name] = 0 - end - end - end - end - -- - formUI.Env.Choice = nil -- no choice made yet - formUI.Env.Form = form - formUI.Env.FormInstance = initialTable - formUI.Env.onValidate = validateCallback - formUI.Env.onCancel = cancelCallback - -- TMP for debug : directly call the callback - --validateCallback(formUI.Env.FormInstance) - - formUI.active = true - formUI.Env.updateAll() - formUI.Env.updateSize() - formUI:updateCoords() - formUI:center() - formUI:updateCoords() - if form.Caption ~= nil then - formUI.uc_title = i18n.get(form.Caption) - else - formUI.uc_title = i18n.get("uiR2EDForm") - end - r2.CurrentForm = formUI - if type(form.onShow) == "function" then - form.onShow(initialTable) - end - --runAH(nil, "enter_modal", "group=" .. formUI.id) -end - --- called when the user hit the 'ok' boutton of a form -function r2:validateForm(form) - form.Env.Choice="Ok" - form.active = false - if form.Env.onValidate then - form.Env.onValidate(form.Env.FormInstance, form) - end - - --r2.CurrentForm = nil -end - --- called when the user hit the 'cancel' boutton of a form -function r2:cancelForm(form) - form.Env.Choice="Cancel" - form.active = false - r2.CurrentForm = nil - if form.Env.onCancel then - form.Env.onCancel(form.Env.FormInstance, form) - end - -end - --- test if there's an help button in the window. If so, clamp more of the title -function r2:adjustPropertySheetTitleClampSize(wnd) - if wnd.header_opened == nil then return end - local helpBut = wnd.header_opened.help - if helpBut ~= nil and helpBut.active then - helpBut:getViewText():updateCoords() - helpBut:updateCoords() - if wnd.title_delta_max_w == r2.DefaultPropertySheetTitleClampSize then - wnd.title_delta_max_w = wnd.title_delta_max_w - helpBut.w_real - 4 - end - end -end - --- test of forms -function r2:testForm() - local function onOk(resultTable) - debugInfo('ok was pressed') - inspect(resultTable) - end - local function onCancel() - debugInfo('cancel was pressed') - end - r2:doForm("TestForm", {}, onOk, onCancel) -end - ---function mysetDbProp(dbpath, value) --- debugInfo("Setting " .. dbpath .. " to " .. tostring(value)) --- setDbProp(dbpath, value) ---end - ---function mygetDbProp(dbPath) --- debugInfo("Getting" .. dbPath .. " -> value is " .. tostring(getDbProp(dbPath))) --- return getDbProp(dbPath) ---end - - - - -function r2:onContAlphaSettingsChanged(dbPath) - --debugInfo("onContAlphaSettingsChanged " .. dbPath) - --debugInfo('1') - local cont = getUICaller() - setDbProp("UI:SAVE:" .. dbPath ..":CONTAINER_ALPHA", cont.container_alpha) - setDbProp("UI:SAVE:" .. dbPath ..":CONTENT_ALPHA", cont.content_alpha) - setDbProp("UI:SAVE:" .. dbPath ..":ROLLOVER_CONTENT_ALPHA", cont.rollover_content_alpha) - setDbProp("UI:SAVE:" .. dbPath ..":ROLLOVER_CONTAINER_ALPHA", cont.rollover_container_alpha) - setDbProp("UI:SAVE:" .. dbPath ..":USE_GLOBAL_ALPHA_SETTINGS", select(cont.use_global_alpha_settings, 1, 0)) - --debugInfo('2') -end - --- called by action handler attached to the container when alpha settings of a property sheets have been modified -function r2:onPropertySheetAlphaSettingsChanged() - --debugInfo("onPropertySheetAlphaSettingsChanged") - r2:onContAlphaSettingsChanged("R2_PROP_SHEET") -end - --- called by action handler attached to the container when alpha settings of a form have been modified -function r2:onFormAlphaSettingsChanged() - --debugInfo("onFormAlphaSettingsChanged") - r2:onContAlphaSettingsChanged("R2_FORM") -end - --- called by action handler attached to the container when it is opened to restore --- its alpha settings from the databse (this is because all prop / forms window share the same alpha settings) -function r2:restoreContAlphaSettings(dbPath) - --debugInfo('restoreContAlphaSettings ' .. dbPath) - local cont = getUICaller() - local oldHandler = cont.on_alpha_settings_changed - cont.on_alpha_settings_changed = "" - cont.container_alpha = getDbProp("UI:SAVE:" .. dbPath ..":CONTAINER_ALPHA") - cont.content_alpha = getDbProp("UI:SAVE:" .. dbPath ..":CONTENT_ALPHA") - cont.rollover_content_alpha = getDbProp("UI:SAVE:" .. dbPath ..":ROLLOVER_CONTENT_ALPHA") - cont.rollover_container_alpha = getDbProp("UI:SAVE:" .. dbPath ..":ROLLOVER_CONTAINER_ALPHA") - local use_global_alpha_settings = getDbProp("UI:SAVE:" .. dbPath ..":USE_GLOBAL_ALPHA_SETTINGS") - --debugInfo("use_global_alpha_settings = " .. tostring(use_global_alpha_settings)) - cont.use_global_alpha_settings = use_global_alpha_settings ~= 0 - cont.on_alpha_settings_changed = oldHandler -end - diff --git a/code/ryzom/common/data_common/r2/r2_ui_reset.lua b/code/ryzom/common/data_common/r2/r2_ui_reset.lua deleted file mode 100644 index aca6a351b..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_reset.lua +++ /dev/null @@ -1,566 +0,0 @@ --- Reset ui & manage desktop change (one desktop per editor mode) - - - ------------------------------------------------------------------------------------- -function setActive(wndName, active) - local wnd = getUI(wndName, r2.Config.VerboseGetUI) - if wnd ~= nil then - wnd.active = active - end -end - ------------------------------------------------------------------------------------- -function hide(wndName) - setActive(wndName, false) -end - ------------------------------------------------------------------------------------- -function show(wndName) - setActive(wndName, true) -end - - -function r2:hide(wndName) - hide(wndName) -end - --- Reset windows placement in each desktop (one desktop per mode of the editor, so no virtual desktop are available in r2ed) -function r2:resetDesktop(desktopIndex) - local scrW, scrH = getWindowSize() - - ---------------------------------------------------------------------------------------------------------- - -- reset the EDITION desktop - if desktopIndex == 0 then - hideAllWindows() - local palette = getUI("ui:interface:r2ed_palette") - if palette then - palette.active = true - palette.x = 4 - palette.y = scrH - 85 - palette.w = 225 - palette.h = 245 - end - local scenario = getUI("ui:interface:r2ed_scenario") - if scenario then - scenario.active = false - --scenario.w = 315 - scenario.w = 350 - scenario.h = 450 - scenario.x = scrW - scenario.w - 5 - scenario.y = scrH - 65 - -- by default the 'scene rollout' is opened - --r2:setRolloutOpened(scenario:find("geo_tree").caption, scenario:find("geo_tree_list"), true) - -- by default the 'permanent content' is opened - --r2:setRolloutOpened(scenario:find("content_tree").caption, scenario:find("content_tree_list"), true) - -- by default the 'act' rollout is opened - --r2:setRolloutOpened(scenario:find("acts").caption, scenario:find("act_tree_enclosing"), true) - end - local webAdmin = getUI("ui:interface:r2ed_web_admin") - webAdmin.active = false - --if webAdmin then - -- webAdmin.active = false - -- webAdmin.w = 250 - -- webAdmin.h = 255 - -- webAdmin.x = scrW - webAdmin.w - 5 - -- if scenario then - -- webAdmin.y = scenario.y - scenario.h - 5 - -- else - -- webAdmin.y = scrH - 5 - -- end - -- end - - local toolbar = getUI("ui:interface:r2ed_toolbar") - if toolbar then - toolbar.active = true - toolbar:invalidateCoords() - toolbar:updateCoords() - end - - - if r2.Scenario then - r2:setSelectedInstanceId("") -- force a real select - r2:setSelectedInstanceId(r2.Scenario.InstanceId) - end - -- - -- - -- - -- - -- - - ---------------------------------------------------------------------------------------------------------- - -- reset the TEST dektop - elseif desktopIndex == 1 then - hideAllWindows() - -- show game related windows in test mode - -- (same as virtual desktop 0 in game) - - -- Target - runAH(nil, "set", "target='ui:interface:target:active'|value=1") - runAH(nil, "set", "target='ui:interface:target:locked'|value=0") - runAH(nil, "set", "target='ui:interface:target:x'|value=sub(sub(getprop('ui:interface:w'),getprop('ui:interface:target:w')),4)") - runAH(nil, "set", "target='ui:interface:target:y'|value=sub(getprop('ui:interface:h'),4)") - - -- gestion sets - runAH(nil, "set", "target='ui:interface:gestionsets:active'|value=1") - runAH(nil, "set", "target='ui:interface:gestionsets:x'|value=div(sub(getprop('ui:interface:w'),getprop('ui:interface:gestionsets:w')),2)") - runAH(nil, "set", "target='ui:interface:gestionsets:y'|value=sub(getprop('ui:interface:h'),4)") - - -- player - runAH(nil, "set", "target='ui:interface:player:active'|value=1") - runAH(nil, "set", "target='ui:interface:player:x'|value=4") - runAH(nil, "set", "target='ui:interface:player:y'|value=sub(getprop('ui:interface:h'),4)" ) - runAH(nil, "set", "target='ui:interface:player:locked'|value=0") - runAH(nil, "set_transparent", "ui:interface:player") - - local webAdmin = getUI("ui:interface:r2ed_web_admin") - webAdmin.active = false - --if webAdmin then - -- webAdmin.active = true - -- webAdmin.w = 250 - -- webAdmin.h = 255 - -- webAdmin.x = scrW - webAdmin.w - 5 - -- webAdmin.y = scrH - 75 - --end - - -- bonus malus window - runAH(nil, "set", "target='ui:interface:bonus_malus:active'|value=1") - runAH(nil, "set", "target='ui:interface:bonus_malus:x'|value=188") - runAH(nil, "set", "target='ui:interface:bonus_malus:y'|value=sub(getprop('ui:interface:h'),4)") - runAH(nil, "set", "target='ui:interface:bonus_malus:locked'|value=1") - - -- Compass - --runAH(nil, "set", "target='ui:interface:compass:x'|value=sub(sub(getprop('ui:interface:w'),getprop('ui:interface:compass:w')),4)") - --runAH(nil, "set", "target='ui:interface:compass:y'|value=sub(sub(getprop('ui:interface:h'),getprop('ui:interface:target:h')),8)") - - -- Help - --runAH(nil, "set", "target='ui:interface:help_browser:active'|value=1") - --runAH(nil, "set", "target='ui:interface:help_browser:locked'|value=0") - --runAH(nil, "set", "target='ui:interface:help_browser:w'|value=410") - --runAH(nil, "set", "target='ui:interface:help_browser:h'|value=128") - --runAH(nil, "set", "target='ui:interface:help_browser:x'|value=sub(sub(getprop('ui:interface:w'),getprop('ui:interface:help_browser:w')),4)") - --runAH(nil, "set", "target='ui:interface:help_browser:y'|value=add(getprop('ui:interface:help_browser:h'),4)") - - -- System Info - --runAH(nil, "set", "target='ui:interface:system_info:w'|value=div(sub(getprop('ui:interface:w'),add(getprop('ui:interface:help_browser:w'),16)),2)") - --runAH(nil, "set", "target='ui:interface:system_info:h'|value=128") - --runAH(nil, "set", "target='ui:interface:system_info:x'|value=4") - --runAH(nil, "set", "target='ui:interface:system_info:y'|value=add(getprop('ui:interface:system_info:h'),4)") - - -- Main Chat - -- runAH(nil, "set", "target='ui:interface:main_chat:w'|value=getprop('ui:interface:system_info:w')") - -- runAH(nil, "set", "target='ui:interface:main_chat:h'|value=128") - -- runAH(nil, "set", "target='ui:interface:main_chat:x'|value=add(getprop('ui:interface:system_info:w'),8)") - -- runAH(nil, "set", "target='ui:interface:main_chat:y'|value=add(getprop('ui:interface:system_info:h'),4)") - - - -- Mission Journal - --runAH(nil, "set", "target='ui:interface:info_player_journal:active'|value=1") - --runAH(nil, "set", "target='ui:interface:info_player_journal:locked'|value=0") - --runAH(nil, "set", "target='ui:interface:info_player_journal:x'|value=4") - --runAH(nil, "set", "target='ui:interface:info_player_journal:y'|value=add(add(getprop('ui:interface:system_info:h'),getprop('ui:interface:info_player_journal:h')),8)") - - - -- Milko Pad - --runAH(nil, "set", "target='ui:interface:milko:x'|value=sub(sub(getprop('ui:interface:w'),getprop('ui:interface:milko:w')),4)") - --runAH(nil, "set", "target='ui:interface:milko:y'|value=sub(sub(getprop('ui:interface:compass:y'),getprop('ui:interface:compass:h')),4)") - - -- Hands - - local toolbarWindow = getUI("ui:interface:r2ed_toolbar_window") - toolbarWindow.x=32 - toolbarWindow.y=0 - - local milkoPad = getUI("ui:interface:milko_pad") - milkoPad.y = 0 - milkoPad.x = scrW - milkoPad.w - - ---------------------------------------------------------------------------------------------------------- - -- reset the DM destop - elseif desktopIndex == 2 then - - hideAllWindows() - local webAdmin = getUI("ui:interface:r2ed_web_admin") - webAdmin.active = false - --if webAdmin then - -- webAdmin.active = true - -- webAdmin.w = 250 - -- webAdmin.h = 255 - -- webAdmin.x = scrW - webAdmin.w - 5 - -- webAdmin.y = scrH - 5 - --end - local toolbar = getUI("ui:interface:r2ed_toolbar") - if toolbar then - toolbar.active = true - toolbar:invalidateCoords() - toolbar:updateCoords() - end - - local dmToolbar = getUI("ui:interface:r2ed_windows_dm_bar") - if dmToolbar then - dmToolbar.active = true - dmToolbar:invalidateCoords() - dmToolbar:updateCoords() - end - - hide("ui:interface:bonus_malus") -- patch for the bonus-malus window - elseif desktopIndex == 3 then - hideAllWindows() - end - r2:resetDesktopVisibleWindows(desktopIndex) -end - - -local function cleanEnv(contName) - local cont = getUI("ui:interface" .. contName, r2.Config.VerboseGetUI) - if cont then - cont:deleteLUAEnvTable(true) -- recursively delete lua environments - cont:setOnDraw("") - end -end - - - ----------------------------------------------------------------------------------------------------------- -function r2:adjustToolbarGap() - local toolbar = getUI("ui:interface:r2ed_toolbar") - local dx = 0 - local numGroups = toolbar:getNumGroups() - for k = 0, numGroups - 1 do - local gr = toolbar:getGroup(k) - if gr.active then - gr.x = dx - dx = 4 - else - gr.x = 0 - end - end -end - ----------------------------------------------------------------------------------------------------------- --- common to r2:onChangeDesktop & r2:resetDesktop -function r2:resetDesktopVisibleWindows(desktopIndex) - -- reset the EDIT desktop - if desktopIndex == 0 then - if (r2.CurrentPropertyWindow) then - r2.CurrentPropertyWindow.active = false - r2.CurrentPropertyWindow = nil - end - r2.PropertyWindowVisible = false - show("ui:interface:r2ed_tool_context_help") - if config.R2EDExtendedDebug == 1 then - show("ui:interface:r2ed_current_session") - else - hide("ui:interface:r2ed_current_session") - end - hide("ui:interface:welcome_info") - hide("ui:interface:compass") - show("ui:interface:r2ed_main_menu_button") - show("ui:interface:r2ed_main_bl") - show("ui:interface:r2ed_select_bar") - hide("ui:interface:r2ed_select_bar:buttons") - hide("ui:interface:r2ed_select_bar:sequences") - hide("ui:interface:milko_pad") - hide("ui:interface:windows") - hide("ui:interface:r2ed_npc") - hide("ui:interface:ring_chars_tracking") - local b1 = getUI("ui:interface:r2ed_select_bar"):find("b1") - if b1 then - b1:updateCoords() -- force to update the coords, icon position not good otherwise - end - hide("ui:interface:bonus_malus") -- patch for the bonus-malus window - r2.ToolUI:updateUndoRedo() - hide("ui:interface:r2ed_connect") - hide("ui:interface:r2ed_toolbar_window") - -- reset the TEST desktop - elseif desktopIndex == 1 then - if config.R2EDExtendedDebug == 1 then - show("ui:interface:r2ed_current_session") - else - hide("ui:interface:r2ed_current_session") - end - hide("ui:interface:compass") - hide("ui:interface:welcome_info") - show("ui:interface:r2ed_main_bl") - hide("ui:interface:r2ed_testbar") - hide("ui:interface:r2ed_main_menu_button") - show("ui:interface:milko_pad") - hide("ui:interface:windows") - hide("ui:interface:r2ed_connect") - hide("ui:interface:ring_chars_tracking") - if not r2.isSessionOwner() and r2.AccessMode ~= "Editor" then - hide("ui:interface:r2ed_toolbar_window") - else - show("ui:interface:r2ed_toolbar_window") - end - - -- reset the DM desktop - elseif desktopIndex == 2 then - hide("ui:interface:compass") - if config.R2EDExtendedDebug == 1 then - show("ui:interface:r2ed_current_session") - else - hide("ui:interface:r2ed_current_session") - end - hide("ui:interface:r2ed_main_bl") - show("ui:interface:r2ed_testbar") - show("ui:interface:r2ed_main_menu_button") - hide("ui:interface:milko_pad") - hide("ui:interface:windows") - hide("ui:interface:bonus_malus") -- patch for the bonus-malus window - hide("ui:interface:r2ed_connect") - hide("ui:interface:r2ed_toolbar_window") - hide("ui:interface:ring_chars_tracking") - else - hide("ui:interface:bonus_malus") -- patch for the bonus-malus window - end - - hide("ui:interface:team_share") -- patch for the 'team share' window - - game:updateMissionJournalMode() - r2:disableAnimals() -end - --- called by C ++ : reset non savable parts after a desktop change -function r2:onChangeDesktop(desktopIndex) - --debugInfo("On change desktop = " .. tostring(desktopIndex)) - hideAllNonSavableWindows(); - - -- in each case, hide welcom and ring access windows - getUI("ui:interface:npc_web_browser").active=false - - ---------------------------------------------------------------------------------------------------------- - -- set the EDITION desktop - if desktopIndex == 0 then - r2:setFixedLighting(false) - hide("ui:interface:feature_help") - r2.ui.AnimBar:clearActions() - local toolbar = getUI("ui:interface:r2ed_toolbar") - if toolbar then - toolbar.active = true - toolbar.r2ed_tool_select.active = true - toolbar.r2ed_tool_rotate.active = true - toolbar.r2ed_tool_undo.active = true - toolbar.r2ed_tool_redo.active = true - toolbar.r2ed_tool_copy.active = true - toolbar.r2ed_tool_paste.active = true - toolbar.r2ed_tool_teleport.active = true - toolbar.r2ed_tool_display_mode.active = true - toolbar.r2ed_tool_start.active = true - toolbar.r2ed_tool_stop.active = false - toolbar.r2ed_stop_live.active = false - --toolbar.r2ed_tool_teleport.x = 4 - r2:adjustToolbarGap() - toolbar.r2ed_freeze_bot_objects.x = 4 - toolbar.r2ed_unfreeze_bot_objects.x = 0 - toolbar:invalidateCoords() - toolbar:updateCoords() - toolbar.r2ed_live.active = false - - - end - local windowsDMBar = getUI("ui:interface:r2ed_windows_dm_bar") - if windowsDMBar then - windowsDMBar.active=false - windowsDMBar:invalidateCoords() - windowsDMBar:updateCoords() - end - cleanEnv("r2ed_scenario") - cleanEnv("r2ed_bbox_edit") - cleanEnv("r2ed_toolbar") - cleanEnv("r2ed_windowbar") - cleanEnv("r2ed_testbar") - cleanEnv("r2ed_toolbar_admin") - cleanEnv("r2ed_table_test") - cleanEnv("r2ed_editbox_test") - cleanEnv("lua_inspector") - cleanEnv("r2ed_palette") - cleanEnv("r2ed_connect") - cleanEnv("r2ed_property_sheet_no_selection") - cleanEnv("r2ed_property_sheet_no_properties") - cleanEnv("r2ed_scenario") - r2.ScenarioWindow:resetWindow() - r2.ContextualCommands:setupToolbar(nil) - - -- set new title for th "keys" window - local keys = getUI("ui:interface:keys") - if keys then - keys.uc_title = i18n.get("uiR2EDEditingKeys") - end - - if r2.UserComponentsManager then - r2.UserComponentsManager:updateUserComponentsUi() - end - r2:setupFreezeBotObjectButton() - local goTestButton = getUI("ui:interface:r2ed_toolbar"):find("r2ed_tool_start").unselected.button - local goTestMenu = getUI("ui:interface:r2ed_main_menu"):find("go_test") - goTestButton.frozen = false - goTestMenu.grayed = false - ---------------------------------------------------------------------------------------------------------- - -- set the TEST desktop OR player desktop - elseif desktopIndex == 1 then - r2:setFixedLighting(false) - hide("ui:interface:feature_help") - r2.ui.AnimBar:clearActions() - r2.ui.AnimBar:update() - local toolbar = getUI("ui:interface:r2ed_toolbar") - toolbar.active = false - local toolbarWindow = getUI("ui:interface:r2ed_toolbar_window") - toolbarWindow:find("r2ed_anim_dm_mode").active = (r2.AccessMode == "Editor") - toolbarWindow:find("r2ed_stop_live").active = not (r2.AccessMode == "Editor") and r2.isSessionOwner() - toolbarWindow:find("player_control").active = (not (r2.AccessMode == "Editor")) and r2.isSessionOwner() - toolbarWindow:find("r2ed_live").active = false - - -- resize the toolbarWindow depending on content - r2:resizeToolbarWindow() - - local windowsDMBar = getUI("ui:interface:r2ed_windows_dm_bar") - if windowsDMBar then - windowsDMBar.r2ed_live.active = (not (r2.AccessMode == "Editor")) and r2.isSessionOwner() - windowsDMBar.player_control.active = (not (r2.AccessMode == "Editor")) and r2.isSessionOwner() - windowsDMBar:invalidateCoords() - windowsDMBar:updateCoords() - end - - r2:adjustToolbarGap() - - local keys = getUI("ui:interface:keys") - if keys then - keys.uc_title = i18n.get("uiR2EDTestOrDMKeys") - end - - ---------------------------------------------------------------------------------------------------------- - -- reset the DM desktop - elseif desktopIndex == 2 then - r2:setFixedLighting(false) - hide("ui:interface:feature_help") - r2.ui.AnimBar:clearActions() - local toolbar = getUI("ui:interface:r2ed_toolbar") - if toolbar then - toolbar.active = true - toolbar.r2ed_freeze_bot_objects.active = false - toolbar.r2ed_unfreeze_bot_objects.active = false - toolbar.r2ed_tool_select.active = false - toolbar.r2ed_tool_rotate.active = false - toolbar.r2ed_tool_undo.active = false - toolbar.r2ed_tool_redo.active = false - toolbar.r2ed_tool_copy.active = false - toolbar.r2ed_tool_paste.active = false - toolbar.r2ed_tool_teleport.active = true - toolbar.r2ed_tool_display_mode.active = false - toolbar.r2ed_tool_start.active = false - toolbar.r2ed_tool_stop.active = (r2.AccessMode == "Editor") - toolbar.r2ed_stop_live.active = (not (r2.AccessMode == "Editor")) and r2.isSessionOwner() - --toolbar.r2ed_tool_teleport.x = -20 -- compensate x from previous buttons - --toolbar.r2ed_stop_live.x = -8 -- compensate x from previous buttons - toolbar.r2ed_live.active = (r2.AccessMode=="Editor" or r2.Mode=="DM") - r2:adjustToolbarGap() - toolbar:invalidateCoords() - toolbar:updateCoords() - end - - - local windowsDMBar = getUI("ui:interface:r2ed_windows_dm_bar") - if windowsDMBar then - windowsDMBar.active=true - windowsDMBar.r2ed_live.active = (not (r2.AccessMode == "Editor")) and r2.isSessionOwner() - windowsDMBar.player_control.active = (not (r2.AccessMode == "Editor")) and r2.isSessionOwner() - - windowsDMBar:invalidateCoords() - windowsDMBar:updateCoords() - end - r2.ui.AnimBar:update() - r2.ui.AnimBar:updateDMControlledEntitiesWindow() - local keys = getUI("ui:interface:keys") - if keys then - keys.uc_title = i18n.get("uiR2EDTestOrDMKeys") - end - end - - -- special : if "key" window is visible on current desktop, hide, then show it again to force a refresh of its content - local keys = getUI("ui:interface:keys") - if keys.active then - keys.active = false - keys.active = true - end - - r2:resetDesktopVisibleWindows(desktopIndex) - r2.ToolUI:updateToggleWindowButtons() - r2.ToolUI:updateToggleWindowDMButtons() -end - -function r2:resizeToolbarWindow() - local toolbarWindow = getUI("ui:interface:r2ed_toolbar_window") - toolbarWindow:updateCoords() - local w = toolbarWindow:find("enclosing").w_real + 16 - toolbarWindow.w = w - toolbarWindow.pop_min_w = w - toolbarWindow.pop_max_w = w - toolbarWindow:updateCoords() -end - --- for masterless mode only : display option to control player & quit -function r2:initDMToolbarWindowPos() - - if not r2.isSessionOwner() then return end - - local scrW, scrH = getWindowSize() - -- init dm toolbar default pos - local toolbarWindow = getUI("ui:interface:r2ed_toolbar_window") - toolbarWindow.active = true - toolbarWindow.x= 11 - toolbarWindow.y=scrH - 190 -end - --- for masterless mode only : display option to control player & quit -function r2:popDMToolbarWindow() - local toolbarWindow = getUI("ui:interface:r2ed_toolbar_window") - toolbarWindow.active = true - toolbarWindow:find("r2ed_anim_dm_mode").active = false - toolbarWindow:find("r2ed_stop_live").active = true - toolbarWindow:find("r2ed_live").active = true - toolbarWindow:find("player_control").active = true - r2:resizeToolbarWindow() - setTopWindow(toolbarWindow) - hide("ui:interface:r2ed_main_bl") - game:updateMissionJournalMode() - r2:disableAnimals() - getUI("ui:interface:welcome_info").active=false -end - - --- fix for previous versions : dm toolbar was shown on players desktop -function r2:playerModeUIFix() - local toolbarWindow = getUI("ui:interface:r2ed_toolbar_window") - toolbarWindow.active = false - hide("ui:interface:r2ed_main_bl") - game:updateMissionJournalMode() - r2:disableAnimals() - getUI("ui:interface:welcome_info").active=false -end - - -function r2:disableAnimals() - local animals = getUI("ui:interface:animal_global") - animals.content.no_available_animals.active = true - animals.list.active = false - animals.header_opened.active = false - animals.header_closed.active = true -end - - - - - - - - - - - - - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_ui_scenario.lua b/code/ryzom/common/data_common/r2/r2_ui_scenario.lua deleted file mode 100644 index d627ab7b7..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_scenario.lua +++ /dev/null @@ -1,944 +0,0 @@ ------------------ --- SCENARIO UI -- ------------------ - - -r2.ScenarioWindow = -{ - IgnoreActChange = false, -- when the content of the combo box is changed manually, allow to know we should not process the - -- the 'onchangeAct' msg - LeftQuota = nil, - - LeftStaticQuota = nil, - - Languages = {}, - - Types = {}, - Locked = {}, - - lockComboBoxes = false, - -- chosen act in combo box - showedActId = nil, - - TitleEditBoxLocked = false -} - ------------------------------------------------------------------------------------------------------------ --- init scenario window (language and scenario types from cfg files) -------------------------------------- -function r2.ScenarioWindow:initScenarioWindow() - - local languages = getClientCfgVar("ScenarioLanguages") - local types = getClientCfgVar("ScenarioTypes") - - local locked = {"Full", "RunOnly"} - - -- stores values and init combo boxes - local scenarioWnd = self:getContainer() - local languageCB = scenarioWnd:find("language_combo_box") - local typeCB = scenarioWnd:find("type_combo_box") - local lockCB = scenarioWnd:find("locked_combo_box") - local levelCB = scenarioWnd:find("level_combo_box") - local rulesCB = scenarioWnd:find("rules_combo_box") - - local languages2 = {} - for k, lang in pairs(languages) do - self.Languages[i18n.get("uiR2ED"..lang):toUtf8()] = lang - table.insert(languages2, i18n.get("uiR2ED"..lang)) - end - table.sort(languages2) - languageCB:resetTexts() - for k, lang in pairs(languages2) do - languageCB:addText(lang) - end - - local types2 = {} - for k, type in pairs(types) do - self.Types[i18n.get("uiR2ED"..type):toUtf8()] = type - table.insert(types2, i18n.get("uiR2ED"..type)) - end - table.sort(types2) - typeCB:resetTexts() - - for k, type in pairs(types2) do - typeCB:addText(type) - end - - do - - local tmp = {} - if config.R2EDExtendedDebug == 1 then - table.insert(locked, "RoSOnly") - end - for k, type in pairs(locked) do - self.Locked[i18n.get("uiR2ED"..type):toUtf8()] = type - table.insert(tmp, i18n.get("uiR2ED"..type)) - end --- table.sort(tmp) - lockCB:resetTexts() - for k, type in pairs(tmp) do - lockCB:addText(type) - end - - end - - - levelCB:resetTexts() - for i = 0, 5 do - levelCB:addText(i18n.get("uiRAP_Level".. tostring(i))) - end - - rulesCB:resetTexts() - rulesCB:addText(i18n.get("uiR2EDstrict")) - rulesCB:addText(i18n.get("uiR2EDliberal")) -end - ------------------------------------------------------------------------------------------------------------ --- retrieve the table of acts (table that map each line of the combo box to an act, see r2.ActUIDisplayer) -function r2.ScenarioWindow:getActTable() - return r2.ActUIDisplayer:getActTable() -end - ------------------------------------------------------------------------------------------------------------ --- retrieve the 'scenario' window container (TODO nico : code duplicated with r2.ActUIDisplayer) -function r2.ScenarioWindow:getContainer() - return getUI("ui:interface:r2ed_scenario") -end - ------------------------------------------------------------------------------------------------------------ --- retrieve the 'acts' combo box (TODO nico : code duplicated with r2.ActUIDisplayer) -function r2.ScenarioWindow:getActComboBox() - return self:getContainer():find("act_combo_box") -end - ------------------------------------------------------------------------------------------------------------ --- handler selection of a new act by the user -function r2.ScenarioWindow:onChangeActFromUI() - if self.IgnoreActChange then return end - self:setAct(self:getActTable()[self:getActComboBox().selection + 1].Act) -end - ------------------------------------------------------------------------------------------------------------ --- update ui from the current act -function r2.ScenarioWindow:updateUIFromCurrentAct() - - local act = r2:getCurrentAct() - -- look in the act table to change the selection - self.IgnoreActChange = true -- don't want to trigger the 'onChangeAct' msg here - if self.getActComboBox == nil then - debugInfo(debug.traceback()) - inspect(self) - end - if not act:isBaseAct() then - self:getActComboBox().selection = self:findComboBoxLineFromAct(act) - end - self.IgnoreActChange = false - self:updateActTreeVisibility() - self:updateLeftQuota() -end - - ------------------------------------------------------------------------------------------------------------ --- get left quota, possibly updating it if it was modified --- called by client -function r2.ScenarioWindow:getLeftQuota() - if r2.UIMainLoop.LeftQuotaModified then - self:updateLeftQuota() - end - local quota = 0 - if self.LeftQuota < self.LeftStaticQuota then - quota = self.LeftQuota - else - quota = self.LeftStaticQuota - end - return quota, self.LeftQuota, self.LeftStaticQuota -end - ------------------------------------------------------------------------------------------------------------ --- update display of left quota for the current act -function r2.ScenarioWindow:updateLeftQuota() - function protected() - if not r2.Scenario then return end - local quotaViewText = self:getContainer():find("left_quota") - local quotaTooltip = self:getContainer():find("tab4") - local quotaMacroViewText = self:getContainer():find("left_quota_macro") - local quotaMacroTooltip = self:getContainer():find("tab1") - local quotaViewTextMisc = self:getContainer():find("left_quota_misc") - local quotaViewTextMisc2 = self:getContainer():find("left_quota_misc_2") - local quotaMiscTooltip = self:getContainer():find("tab2") - - local act = r2:getCurrentAct() - - if act then - r2.updateActCost(act) - if not act:isBaseAct() then - r2.updateActCost(r2.Scenario:getBaseAct()) - end - - self.LeftQuota, self.LeftStaticQuota = act:getLeftQuota() - - local uc_tooltip = ucstring() - quotaViewText.hardtext = string.format("(%d)", self.LeftQuota) - uc_tooltip:fromUtf8(i18n.get("uiR2EDScene"):toUtf8() .. " (" .. self.LeftQuota .. ")") - quotaTooltip.tooltip = uc_tooltip - quotaMacroViewText.hardtext = string.format("(%d)", self.LeftQuota) - uc_tooltip:fromUtf8(i18n.get("uiR2EDMacroComponents"):toUtf8() .. " (" .. self.LeftQuota .. ")") - quotaMacroTooltip.tooltip = uc_tooltip - quotaViewTextMisc.hardtext = string.format("(%d)", self.LeftStaticQuota) - quotaViewTextMisc2.hardtext = string.format("(%d)", self.LeftStaticQuota) - uc_tooltip:fromUtf8(i18n.get("uiR2EDbotObjects"):toUtf8() .. " (" .. self.LeftStaticQuota .. ")") - quotaMiscTooltip.tooltip = uc_tooltip - - quotaViewText.color_rgba = select(self.LeftQuota >= 0, CRGBA(255, 255, 255), CRGBA(255, 0, 0)) - quotaViewTextMisc.color_rgba = select(self.LeftStaticQuota >= 0, CRGBA(255, 255, 255), CRGBA(255, 0, 0)) - quotaViewTextMisc2.color_rgba = select(self.LeftStaticQuota >= 0, CRGBA(255, 255, 255), CRGBA(255, 0, 0)) - - else - quotaViewText.hardtext = "" - quotaMacroViewText.hardtext = "" - end - r2.UIMainLoop.LeftQuotaModified = false - end - pcall(protected) -end - ------------------------------------------------------------------------------------------------------------ --- change act into editor, and in the ui -r2.ScenarioWindow.setActId = nil -function r2.ScenarioWindow:setAct(act) - - if act ~= r2:getCurrentAct() then - self:updateComboBoxCurrentAct(act) - r2:setCurrentActFromId(act.InstanceId) -- will also trigger ui update (called by C++) - if act.InstanceId~=self.setActId then - if not r2:isClearingContent() then - displaySystemInfo(concatUCString(i18n.get("uiR2EDCurrentActNotify"), act:getDisplayName()), "BC") - end - self.setActId = act.InstanceId - end - end -end - ------------------------------------------------------------------------------------------------------------ --- -function r2.ScenarioWindow:updateComboBoxCurrentAct(newAct) - - local comboB = self:getActComboBox() - local text = ucstring() - local currentAct = r2:getCurrentAct() - if not (currentAct==nil or currentAct.isNil) then - local currentActIndex = r2.ScenarioWindow:findComboBoxLineFromAct(currentAct) - if currentActIndex then - text:fromUtf8(currentAct:getName()) - comboB:setText(currentActIndex, text) - end - end - - local newActIndex = r2.ScenarioWindow:findComboBoxLineFromAct(newAct) - if newActIndex then - text:fromUtf8(newAct:getName() .. " [" .. i18n.get("uiR2EDCurrentActComboBox"):toUtf8() .."]") - comboB:setText(newActIndex, text) - end -end - ------------------------------------------------------------------------------------------------------------ --- find line in combo box for the given act (index is 0 based) -function r2.ScenarioWindow:findComboBoxLineFromAct(act) - local actTable = self:getActTable() - for index, entry in pairs(actTable) do - if entry.Act == act then - return index - 1 - end - end - return nil -end - ------------------------------------------------------------------------------------------------------------ --- selection of a new act (called by combo box) -function r2.ScenarioWindow:updateActTreeVisibility() - local currentAct = r2:getCurrentAct() - local container = self:getContainer() - -- show the good tree control - for i = 0, r2:getMaxNumberOfAdditionnalActs() - 1 do - local tree = container:find("act_tree_" .. tostring(i)) - assert(tree) - tree.active = (tree == currentAct:getContentTree()) - - local macroTree = container:find("macro_act_tree_" .. tostring(i)) - assert(macroTree) - macroTree.active = (macroTree == currentAct:getMacroContentTree()) - end - -- allow to delete an act only if it is not the base act - container:find("delete_act").active = not currentAct:isBaseAct() -end - ------------------------------------------------------------------------------------------------------------ --- pop window for new act creation - -function r2.ScenarioWindow:newAct() - - if r2.Scenario.Acts.Size == r2:getMaxNumberOfAdditionnalActs() + 1 then -- '+1' because first act is the base add, which can't be deleted/created - messageBox(i18n.get("uiR2EDMaxActCountReached")) - return - end - - r2.acts:openScenarioActEditor(false) -end - ------------------------------------------------------------------------------------------------------------ --- Ask the user to confirm deletion of act -function r2.ScenarioWindow:deleteAct() - validMessageBox(i18n.get("uiR2EDconfirmDeleteAct"), "lua", "r2.ScenarioWindow:confirmDeleteAct()", "lua", "r2.ScenarioWindow:cancelDeleteAct()", "ui:interface") -end - ------------------------------------------------------------------------------------------------------------ --- Act deletion has been confirmed -function r2.ScenarioWindow:confirmDeleteAct() - - r2.requestNewAction(i18n.get("uiR2EDRemoveActAction")) - - assert(not r2:getCurrentAct():isBaseAct()) - local actId = r2:getCurrentAct().InstanceId - local firstAct = (r2.Scenario.Acts.Size>1 and (r2:getCurrentAct() == r2.Scenario.Acts[1])) - - -- update other acts name - local afterDeletedAct = false - for i=0, r2.Scenario.Acts.Size-1 do - local act = r2.Scenario.Acts[i] - - if (not act:isBaseAct()) and afterDeletedAct==true then - - local name = act.Name - - local firstPart = i18n.get("uiR2EDDefaultActTitle"):toUtf8() .. i - local firstPartSpace = i18n.get("uiR2EDDefaultActTitle"):toUtf8().. " " .. i - - if name == firstPart or name == firstPartSpace then - name = i18n.get("uiR2EDDefaultActTitle"):toUtf8() .. " " .. (i-1) - r2.requestSetNode(act.InstanceId, "Name", name) - end - - elseif act.InstanceId == actId then - afterDeletedAct = true - end - end - - -- delete permanent content of the act's island if this one isn't used in another location - local pointToIsland = 0 - local locationId = r2:getCurrentAct().LocationId - local islandName = r2:getInstanceFromId(locationId).IslandName - for i=0, r2.Scenario.Locations.Size-1 do - local location = r2.Scenario.Locations[i] - assert(location) - - if location.IslandName == islandName then - pointToIsland = pointToIsland + 1 - end - end - - if pointToIsland <= 1 then - -- search island attributes - local islandTable = nil - for ecoSystem, ecoSysTable in pairs(r2.acts.islands) do - local islandNb = r2.acts:getIslandNb(islandName) - if ecoSysTable[islandNb] and ecoSysTable[islandNb].name == islandName then - ecoSysName = ecoSystem - islandTable = ecoSysTable[islandNb].table - break - end - end - - -- delete permanent content positionned in deleted location - if false and islandTable then - local permanentContent = {} - local baseAct = r2.Scenario:getBaseAct() - baseAct:appendInstancesByType(permanentContent, "WorldObject") - for k, permObj in pairs(permanentContent) do - local isInX = (islandTable.xmin<=permObj.Position.x and permObj.Position.x<=islandTable.xmax) - local isInY = (islandTable.ymin<=permObj.Position.y and permObj.Position.y<=islandTable.ymax) - if isInX and isInY then - r2.requestEraseNode(permObj.InstanceId) - end - end - end - end - - -- delete the act location if any other act doesn't point to this location - local pointToLocation = 0 - for i=0, r2.Scenario.Acts.Size-1 do - local act = r2.Scenario.Acts[i] - assert(act) - - if act.LocationId == locationId then - pointToLocation = pointToLocation + 1 - end - end - - if pointToLocation <= 1 then - r2.requestEraseNode(locationId) - end - - -- if Act[1] is deleted, we must create another one - if actId==r2.Scenario.Acts[1].InstanceId and table.getn(r2.Scenario.Acts)<=2 then - r2.acts:openScenarioActEditor(false, true, true) - end - - r2.requestEraseNode(actId) - - r2.requestEndAction() -end - ------------------------------------------------------------------------------------------------------------ --- Act deletion has been canceled -function r2.ScenarioWindow:cancelDeleteAct() - debugInfo("Cancel deletion of current act") -end - ------------------------------------------------------------------------------------------------------------ --- Reset content of the scenario window -function r2.ScenarioWindow:resetWindow() - local function cleanContentTree(contentTree) - if contentTree and not contentTree.isNil then - r2:cleanTreeNode(contentTree, "people") - r2:cleanTreeNode(contentTree, "creatures") - contentTree:forceRebuild() - end - end - - local function cleanContentMacroTree(contentTree) - if contentTree and not contentTree.isNil then - --r2:cleanTreeNode(contentTree, "macro_components") - r2:cleanTreeRootNode(contentTree) - contentTree:forceRebuild() - end - end - - -- - local container = self:getContainer() - if not container then - debugInfo("Scenario window not found") - return - end - - -- content & geo now merged - local contentTree = container:find("content_tree_list") - if contentTree and not contentTree.isNil then - --r2:cleanTreeNode(contentTree, "scenery_objects") - r2:cleanTreeRootNode(contentTree) - contentTree:forceRebuild() - end - - -- - for i = 0, r2:getMaxNumberOfAdditionnalActs() - 1 do - local actTree = container:find("act_tree_" .. tostring(i)) - actTree.active = false - cleanContentTree(actTree) - - local actMacroTree = container:find("macro_act_tree_" .. tostring(i)) - actMacroTree.active = false - cleanContentMacroTree(actMacroTree) - end - container:find("delete_act").active = false - -- clean list of acts - local comboBox = self:getActComboBox() - if comboBox then - while comboBox:getNumTexts() ~= 0 do - comboBox:removeTextByIndex(0) - end - end - self.IgnoreActChange = true -- don't whant to trigger a 'onChangeAct' request here (supposed to be called at init) - comboBox.selection = 0 - self.IgnoreActChange = false -end - - ------ WEATHER SLIDER VALUE --------------------------------------------------------- -function r2.ScenarioWindow:weatherValue(requestType) - - if not self.showedActId or not r2:getInstanceFromId(self.showedActId) then return end - local act = r2:getInstanceFromId(self.showedActId) - assert(act) - - self:setActNotes() - - local scenarioUI = self:getContainer() - assert(scenarioUI) - - local actGr = scenarioUI:find("act_properties") - assert(actGr) - - local weatherValue = actGr:find("weather"):find("slider").value - r2.requestNewAction(i18n.get("uiR2EDChangeActWeather")) - - if requestType == nil then - r2.requestSetNode(act.InstanceId, "WeatherValue", weatherValue) - elseif requestType == 'local' then - r2.requestSetLocalNode(act.InstanceId, "WeatherValue", weatherValue) - elseif requestType == 'commit' then - r2.requestCommitLocalNode(act.InstanceId, "WeatherValue") - elseif requestType == 'cancel' then - r2.requestRollbackLocalNode(act.InstanceId, "WeatherValue") - end - - r2.requestEndAction() -end - ------ MANUAL WEATHER ACTIVATION ------------------------------------------------------- -function r2.ScenarioWindow:manualWeather() - - if not self.showedActId or not r2:getInstanceFromId(self.showedActId) then return end - local act = r2:getInstanceFromId(self.showedActId) - assert(act) - - self:setActNotes() - - local scenarioUI = self:getContainer() - assert(scenarioUI) - - local actGr = scenarioUI:find("act_properties") - assert(actGr) - - local manualButton = actGr:find("manual_weather"):find("toggle_butt") - assert(manualButton) - local manual=1 - if manualButton.pushed==true then manual=0 end - - r2.requestNewAction(i18n.get("uiR2EDChangeActWeatherManual")) - r2.requestSetNode(act.InstanceId, "ManualWeather", manual) - r2.requestEndAction() -end - ---------------------- set act notes ---------------------------------------------------- -function r2.ScenarioWindow:setActNotes() - - if not self.showedActId or not r2:getInstanceFromId(self.showedActId) then return end - local act = r2:getInstanceFromId(self.showedActId) - assert(act) - - local scenarioUI = self:getContainer() - assert(scenarioUI) - - local actGr = scenarioUI:find("act_properties") - assert(actGr) - - local preActNotes = actGr:find("pre_act_notes"):find("small_description").uc_input_string:toUtf8() - local actNotes = actGr:find("act_notes"):find("small_description").uc_input_string:toUtf8() - - if act==nil then act = r2:getCurrentAct() end - if actNotes~=act.ShortDescription then - r2.requestSetNode(act.InstanceId, "ShortDescription", actNotes) - end - - if preActNotes~=act.PreActDescription then - r2.requestSetNode(act.InstanceId, "PreActDescription", preActNotes) - end -end - - ---------------------- update act properties in scenario window ------------------------- - -function r2.ScenarioWindow:showActProperties() - - local actNb = self:getActComboBox().selection + 1 - local actTable = self:getActTable() - if actTable[actNb]==nil then return end - local act = actTable[actNb].Act - if act==nil then act=r2:getCurrentAct() end - - self:setActNotes() - self.showedActId = act.InstanceId - - self:updateActProperties() - - local goButton = self:getContainer():find("go_to_act") - assert(goButton) - goButton.active = (act~=r2:getCurrentAct()) - - local deleteButton = self:getContainer():find("delete_act") - assert(deleteButton) - deleteButton.active = (act==r2:getCurrentAct()) -end - -function r2.ScenarioWindow:updateActProperties() - - if not self.showedActId or not r2:getInstanceFromId(self.showedActId) then return end - local act = r2:getInstanceFromId(self.showedActId) - assert(act) - assert((not act:isBaseAct())) - - act:updateWeather() - - local scenarioUI = self:getContainer() - assert(scenarioUI) - - local actGr = scenarioUI:find("act_properties") - assert(actGr) - - -- location name - local location = r2:getInstanceFromId(act.LocationId) - if location==nil then return end - local locationName = actGr:find("location_name") - assert(locationName) - local uc_location = ucstring() - uc_location:fromUtf8(location.Name) - locationName.uc_hardtext = uc_location - - -- season - local seasons = { - ["Spring"] = "uiR2EDSpring", - ["Summer"] = "uiR2EDSummer", - ["Autumn"] = "uiR2EDAutumn", - ["Winter"] = "uiR2EDWinter" - } - local season = actGr:find("season_name") - assert(season) - local uc_season = ucstring() - local seasonStr = seasons[location.Season] - uc_season:fromUtf8(i18n.get(seasonStr):toUtf8()) - season.uc_hardtext = uc_season - - -- manual weather - local weatherGr = actGr:find("weather") - assert(weatherGr) - local weatherManual = weatherGr:find("manual_weather") - assert(weatherManual) - weatherManual:find("toggle_butt").pushed = (act.ManualWeather == 0) - - local weatherSlider = actGr:find("weather_slider") - assert(weatherSlider) - weatherSlider.active = (act.ManualWeather==1) - - -- weather value - local weatherSlider = weatherGr:find("slider") - assert(weatherSlider) - weatherSlider.value = act.WeatherValue - - -- notes - do - local notesGr = actGr:find("act_notes") - assert(notesGr) - local notesAct = notesGr:find("small_description") - assert(notesAct) - local uc_notes = ucstring() - uc_notes:fromUtf8(act.ShortDescription) - notesAct.uc_input_string = uc_notes - end - - -- pre act notes - do - local notesGr = actGr:find("pre_act_notes") - assert(notesGr) - local notesAct = notesGr:find("small_description") - assert(notesAct) - local uc_notes = ucstring() - uc_notes:fromUtf8(act.PreActDescription) - notesAct.uc_input_string = uc_notes - end - - - -- budget - if act==r2:getCurrentAct() then - local entityBudgetText = scenarioUI:find("entity_budget_text") - local macroBudgetText = scenarioUI:find("macro_budget_text") - local ucBudget = ucstring() - ucBudget:fromUtf8(i18n.get("uiR2EDMacroComponentsInAct"):toUtf8() .. act:getName()) - macroBudgetText.uc_hardtext = ucBudget - ucBudget:fromUtf8(i18n.get("uiR2EDEntitiesInAct"):toUtf8() .. act:getName()) - entityBudgetText.uc_hardtext = ucBudget - end -end - - ---------------------- update scenario properties in scenario window ------------------------- -function r2.ScenarioWindow:updateScenarioProperties() - - self.lockComboBoxes = true - - local scenario = r2.Scenario - - local scenarioUI = self:getContainer() - assert(scenarioUI) - - local scenarioGr = scenarioUI:find("scenario_properties") - assert(scenarioGr) - - -- scenario level - local levelCB = scenarioGr:find("level_combo_box") - assert(levelCB) - levelCB.selection = r2.Scenario.Description.LevelId - - do - local cb = scenarioGr:find("locked_combo_box") - assert(cb) - if r2.Scenario.Description.OtherCharAccess then - local access = r2.Scenario.Description.OtherCharAccess - cb.selection_text = i18n.get("uiR2ED".. access):toUtf8() - else - cb.selection_text = i18n.get("uiR2EDFull"):toUtf8() - end - - end - - if r2.Scenario.Description.NevraxScenario then - local ui = getUI("ui:interface:r2ed_palette") - assert(ui) - local widget = ui:find("nevrax_scenario") - assert(widget) - local ok = r2.Scenario.Description.NevraxScenario == "1" - widget:find("toggle_butt").pushed = not ok - end - - if r2.Scenario.Description.TrialAllowed then - local ui = getUI("ui:interface:r2ed_palette") - assert(ui) - local widget = ui:find("trial_allowed_scenario") - assert(widget) - local ok = r2.Scenario.Description.TrialAllowed == "1" - widget:find("toggle_butt").pushed = not ok - end - - if r2.Scenario.Description.MissionTag then - local ui = getUI("ui:interface:r2ed_palette") - assert(ui) - local widget = ui:find("mission_tag") - assert(widget) - local uc = ucstring() - uc:fromUtf8(scenario.Description.MissionTag) - widget:find("mission_tag_eb").eb.uc_input_string = uc - end - - -- scenario rules - local rulesCB = scenarioGr:find("rules_combo_box") - if r2.Scenario.AccessRules == "strict" then - rulesCB.selection = 0 - else - rulesCB.selection = 1 - end - - -- scenario language - local languageCB = scenarioGr:find("language_combo_box") - assert(languageCB) - languageCB.selection_text = i18n.get("uiR2ED"..r2.Scenario.Language):toUtf8() - - -- scenario type - local typeCB = scenarioGr:find("type_combo_box") - assert(typeCB) - -- special case for old enums - if r2.Scenario.Type =="Combat" then - typeCB.selection_text = i18n.get("uiR2EDso_hack_slash"):toUtf8() - elseif r2.Scenario.Type =="Roleplay" then - typeCB.selection_text = i18n.get("uiR2EDso_story_telling"):toUtf8() - else - typeCB.selection_text = i18n.get("uiR2ED"..r2.Scenario.Type):toUtf8() - end - - -- scenario title - local ucTitle = ucstring() - ucTitle:fromUtf8(scenario.Description.Title) - getUI("ui:interface:r2ed_scenario"):find("title_eb").eb.uc_input_string = ucTitle - - -- scenario notes - local notesGr = scenarioGr:find("scenario_notes") - assert(notesGr) - local notesScenario = notesGr:find("small_description") - assert(notesScenario) - local uc_notes = ucstring() - uc_notes:fromUtf8(scenario.Description.ShortDescription) - notesScenario.uc_input_string = uc_notes - - -- scenario name - local scenarioName = scenarioUI:find("scenario_name_text") - local uc_name = ucstring() - uc_name:fromUtf8(i18n.get("uiR2EDScenarioFilename"):toUtf8() .. " " ..ucstring(scenario:getName()):toUtf8()) - scenarioName.uc_hardtext = uc_name - - self.lockComboBoxes = false -end - ---------------------- set scenario notes ---------------------------------------------------- -function r2.ScenarioWindow:setScenarioNotes() - - local scenarioUI = self:getContainer() - assert(scenarioUI) - - local scenarioGr = scenarioUI:find("scenario_properties") - assert(scenarioGr) - - local scenarioNotes = scenarioGr:find("scenario_notes"):find("small_description").uc_input_string:toUtf8() - - if r2.Scenario and scenarioNotes~= r2.Scenario.Description.ShortDescription then - r2.requestNewAction(i18n.get("uiR2EDChangeScenarioDescription")) - r2.requestSetNode(r2.Scenario.Description.InstanceId, "ShortDescription", scenarioNotes) - r2.requestEndAction() - end -end - ---------------------- set scenario level ---------------------------------------------------- -function r2.ScenarioWindow:scenarioLevel() - if self.lockComboBoxes then return end - - self:setScenarioNotes() - self:onTitleChanged() - - local scenarioWnd = self:getContainer() - local levelCB = scenarioWnd:find("level_combo_box") - r2.requestNewAction(i18n.get("uiR2EDChangeScenarioLevel")) - r2.requestSetNode(r2.Scenario.Description.InstanceId, "LevelId", levelCB.selection) - r2.requestEndAction() -end - ---------------------- set scenario rules ---------------------------------------------------- -function r2.ScenarioWindow:scenarioRules() - if self.lockComboBoxes then return end - - self:setScenarioNotes() - self:onTitleChanged() - - local scenarioWnd = self:getContainer() - local rulesCB = scenarioWnd:find("rules_combo_box") - local rules = {[0]="strict", [1]="liberal"} - r2.requestNewAction(i18n.get("uiR2EDChangeScenarioRules")) - r2.requestSetNode(r2.Scenario.InstanceId, "AccessRules", rules[rulesCB.selection]) - r2.requestEndAction() -end - -------------- set scenario language ---------------------------------------------------------- -function r2.ScenarioWindow:scenarioLanguage() - - if self.lockComboBoxes then return end - - self:setScenarioNotes() - self:onTitleChanged() - - local comboB = getUICaller() - local language = self.Languages[comboB.selection_text] - - r2.requestNewAction(i18n.get("uiR2EDChangeScenarioLanguage")) - r2.requestSetNode(r2.Scenario.InstanceId, "Language", language) - r2.requestEndAction() -end - -------------- set scenario type --------------------------------------------------------------- -function r2.ScenarioWindow:scenarioType() - - if self.lockComboBoxes then return end - - self:setScenarioNotes() - self:onTitleChanged() - - local comboB = getUICaller() - local type = self.Types[comboB.selection_text] - - r2.requestNewAction(i18n.get("uiR2EDChangeScenarioType")) - r2.requestSetNode(r2.Scenario.InstanceId, "Type", type) - r2.requestEndAction() -end - -------------- set scenario type --------------------------------------------------------------- -function r2.ScenarioWindow:scenarioEditionLocked() - - if self.lockComboBoxes then return end - - self:setScenarioNotes() - self:onTitleChanged() - - local comboB = getUICaller() - - local type = self.Locked[comboB.selection_text] - -- RoS not usefull anymore - if type == "RoSOnly" and config.R2EDExtendedDebug ~= 1 then - type = "Full" - self.lockComboBoxes = true - comboB.selection_text = i18n.get("uiR2EDFull") - self.lockComboBoxes = false - end - r2.requestNewAction(i18n.get("uiR2EDChangeScenarioEditionLock")) - r2.requestSetNode(r2.Scenario.Description.InstanceId, "OtherCharAccess", type) - r2.requestEndAction() -end --------------------------------------------------------------------------- --- the scenario title was changed by the user -function r2.ScenarioWindow:onTitleChanged() - if self.lockComboBoxes then return end - local newTitle = getUI("ui:interface:r2ed_scenario"):find("title_eb").eb.uc_input_string:toUtf8() - if newTitle ~= r2.Scenario.Description.Title then - r2.requestNewAction(i18n.get("uiR2EDChangeScenarioTitle")) - r2.requestSetNode(r2.Scenario.Description.InstanceId, "Title", newTitle) - r2.requestEndAction() - end -end - ------------------------ cancel focus on text of all edit box when select a new tab -------------- -function r2.ScenarioWindow:cancelFocusOnText() - local editBox = getUICaller() - assert(editBox) - editBox:cancelFocusOnText() -end - - - ---------------------- set nevrax scenario ---------------------------------------------------- -function r2.ScenarioWindow:nevraxScenario() - if self.lockComboBoxes then return end - if config.R2EDExtendedDebug ~= 1 then return end - - local scenarioUI = getUI("ui:interface:r2ed_palette") - assert(scenarioUI) - - local widget = scenarioUI:find("nevrax_scenario") - assert(widget) - - - local val = "0" - if widget:find("toggle_butt").pushed then val = "0" else val = "1" end - - self:setScenarioNotes() - self:onTitleChanged() - - - r2.requestNewAction(i18n.get("uiR2EDChangeScenarioNevraxTag")) - r2.requestSetNode(r2.Scenario.Description.InstanceId, "NevraxScenario", val) - r2.requestEndAction() - - -end - ---------------------- set nevrax scenario ---------------------------------------------------- -function r2.ScenarioWindow:trialAllowed() - if self.lockComboBoxes then return end - if config.R2EDExtendedDebug ~= 1 then return end - - local ui = getUI("ui:interface:r2ed_palette") - assert(ui) - - local widget = ui:find("trial_allowed_scenario") - assert(widget) - - local val = "0" - if widget:find("toggle_butt").pushed then val = "0" else val = "1" end - - self:setScenarioNotes() - self:onTitleChanged() - - r2.requestNewAction(i18n.get("uiR2EDChangeTrialAllowedTag")) - r2.requestSetNode(r2.Scenario.Description.InstanceId, "TrialAllowed", val ) - r2.requestEndAction() - -end - --------------------------------------------------------------------------- --- the scenario title was changed by the user -function r2.ScenarioWindow:onScenarioMissionTagChanged() - if self.lockComboBoxes then return end - if config.R2EDExtendedDebug ~= 1 then return end - local newTag = getUI("ui:interface:r2ed_palette"):find("mission_tag"):find("mission_tag_eb").eb.uc_input_string:toUtf8() - - self:setScenarioNotes() - self:onTitleChanged() - - if newTag ~= r2.Scenario.Description.MissionTag then - r2.requestNewAction(i18n.get("uiR2EDChangeMissionTag")) - r2.requestSetNode(r2.Scenario.Description.InstanceId, "MissionTag", newTag) - r2.requestEndAction() - end -end - diff --git a/code/ryzom/common/data_common/r2/r2_ui_scenario_scores.lua b/code/ryzom/common/data_common/r2/r2_ui_scenario_scores.lua deleted file mode 100644 index d8f9de85a..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_scenario_scores.lua +++ /dev/null @@ -1,311 +0,0 @@ -------------------------------------------------------------------------------------------------------------- ----------------------------------- SCENARIO SCORES -------------------------------------------------- -------------------------------------------------------------------------------------------------------------- - -ScenarioScores = -{ - emptyScore = "", - emptyAverage = "-", -} - --------------------------------------------------------------------------------------------------------------- --- -function ScenarioScores:getWindow() - local ui = getUI("ui:interface:r2ed_scenario_scores") - assert(ui) - return ui -end - --------------------------------------------------------------------------------------------------------------- --- - -function ScenarioScores:initScenarioScores() - -end - -function ScenarioScores:initScenarioScoresOLD() - - local ui = self:getWindow() - - local noRatingsGr = ui:find("no_ratings") - assert(noRatingsGr) - - local ratingsGr = ui:find("ratings") - assert(ratingsGr) - - local averagesGr = ui:find("average_ratings") - assert(averagesGr) - - noRatingsGr.active= not isInRingMode() - if isInRingMode() then - - local isDm = false - if r2.Mode == "DM" or r2.Mode == "AnimationModeDm" then isDm = true end - - local header = r2.getScenarioHeader() - local seeAverages = (isDm or r2.hasCharacterSameCharacterIdMd5(tostring(header.CreatorMD5))) - ratingsGr.active = not seeAverages - averagesGr.active = seeAverages - else - ratingsGr.active = false - averagesGr.active = false - end - - if isInRingMode() then - - if ratingsGr.active then - if game.getScenarioScores then - game.getScenarioScores() - end - - local rateFunUI = ratingsGr:find("fun_rate"):find("edit_rate"):find("eb") - rateFunUI.input_string= self.emptyScore - - local rateDifficultyUI = ratingsGr:find("diff_rate"):find("edit_rate"):find("eb") - rateDifficultyUI.input_string= self.emptyScore - - local rateAccessibilityUI = ratingsGr:find("access_rate"):find("edit_rate"):find("eb") - rateAccessibilityUI.input_string= self.emptyScore - - local rateOriginalityUI = ratingsGr:find("originality_rate"):find("edit_rate"):find("eb") - rateOriginalityUI.input_string= self.emptyScore - - local rateDirectionUI = ratingsGr:find("direction_rate"):find("edit_rate"):find("eb") - rateDirectionUI.input_string= self.emptyScore - - else - if game.getSessionAverageScores then - game.getSessionAverageScores() - end - - local rateFunUI = averagesGr:find("fun_rate"):find("score_text") - rateFunUI.hardtext= self.emptyAverage - - local rateDifficultyUI = averagesGr:find("diff_rate"):find("score_text") - rateDifficultyUI.hardtext= self.emptyAverage - - local rateAccessibilityUI = averagesGr:find("access_rate"):find("score_text") - rateAccessibilityUI.hardtext= self.emptyAverage - - local rateOriginalityUI = averagesGr:find("originality_rate"):find("score_text") - rateOriginalityUI.hardtext= self.emptyAverage - - local rateDirectionUI = averagesGr:find("direction_rate"):find("score_text") - rateDirectionUI.hardtext= self.emptyAverage - end - end - - -- windows title - if ratingsGr.active then - ui.uc_title = i18n.get("uiR2EDMyScenarioScores") - else - ui.uc_title = i18n.get("uiR2EDScenarioScores") - end -end - --------------------------------------------------------------------------------------------------------------- --- -function ScenarioScores:onScenarioScoresReceived(scores) - - self:fill(scores) -end - --------------------------------------------------------------------------------------------------------------- --- -function ScenarioScores:onAverageScoresReceived(averages) - - self:fillAverages(averages) -end - --------------------------------------------------------------------------------------------------------------- --- -function ScenarioScores:onScenarioAverageScoresReceived(averages) - - self:fillScenarioAverages(averages) -end - --------------------------------------------------------------------------------------------------------------- --- -function ScenarioScores:fill(scores) - - local ui = self:getWindow() - local ratingsGr = ui:find("ratings") - assert(ratingsGr) - - local rateFunUI = ratingsGr:find("fun_rate"):find("edit_rate"):find("eb") - if scores.ScenarioRated==0 then - rateFunUI.input_string= tostring(self.emptyScore) - else - rateFunUI.input_string= tostring(scores.RateFun) - end - - local rateDifficultyUI = ratingsGr:find("diff_rate"):find("edit_rate"):find("eb") - if scores.ScenarioRated==0 then - rateDifficultyUI.input_string= tostring(self.emptyScore) - else - rateDifficultyUI.input_string= tostring(scores.RateDifficulty) - end - - local rateAccessibilityUI = ratingsGr:find("access_rate"):find("edit_rate"):find("eb") - if scores.ScenarioRated==0 then - rateAccessibilityUI.input_string= tostring(self.emptyScore) - else - rateAccessibilityUI.input_string= tostring(scores.RateAccessibility) - end - - local rateOriginalityUI = ratingsGr:find("originality_rate"):find("edit_rate"):find("eb") - if scores.ScenarioRated==0 then - rateOriginalityUI.input_string= tostring(self.emptyScore) - else - rateOriginalityUI.input_string= tostring(scores.RateOriginality) - end - - local rateDirectionUI = ratingsGr:find("direction_rate"):find("edit_rate"):find("eb") - if scores.ScenarioRated==0 then - rateDirectionUI.input_string= tostring(self.emptyScore) - else - rateDirectionUI.input_string= tostring(scores.RateDirection) - end -end - --------------------------------------------------------------------------------------------------------------- --- -function ScenarioScores:fillAverages(averages) - - local ui = self:getWindow() - local averagesGr = ui:find("average_ratings") - assert(averagesGr) - - local rateFunUI = averagesGr:find("fun_rate"):find("score_text") - if averages.ScenarioRated==0 then - rateFunUI.hardtext= self.emptyAverage - else - rateFunUI.hardtext= tostring(math.min(100, averages.RateFun)) - end - - local rateDifficultyUI = averagesGr:find("diff_rate"):find("score_text") - if averages.ScenarioRated==0 then - rateDifficultyUI.hardtext= self.emptyAverage - else - rateDifficultyUI.hardtext= tostring(math.min(100, averages.RateDifficulty)) - end - - local rateAccessibilityUI = averagesGr:find("access_rate"):find("score_text") - if averages.ScenarioRated==0 then - rateAccessibilityUI.hardtext= self.emptyAverage - else - rateAccessibilityUI.hardtext= tostring(math.min(100, averages.RateAccessibility)) - end - - local rateOriginalityUI = averagesGr:find("originality_rate"):find("score_text") - if averages.ScenarioRated==0 then - rateOriginalityUI.hardtext= self.emptyAverage - else - rateOriginalityUI.hardtext= tostring(math.min(100, averages.RateOriginality)) - end - - local rateDirectionUI = averagesGr:find("direction_rate"):find("score_text") - if averages.ScenarioRated==0 then - rateDirectionUI.hardtext= self.emptyAverage - else - rateDirectionUI.hardtext= tostring(math.min(100, averages.RateDirection)) - end -end - --------------------------------------------------------------------------------------------------------------- --- -function ScenarioScores:fillScenarioAverages(averages) - - local ui = getUI("ui:interface:ring_scenario_loading_window")--self:getWindow() - assert(ui) - - local rateFunUI = ui:find("FunRating") - rateFunUI.hardtext= tostring(math.min(100, averages.RateFun)) - - local rateDifficultyUI = ui:find("DifficultyRating") - rateDifficultyUI.hardtext= tostring(math.min(100, averages.RateDifficulty)) - - local rateAccessibilityUI = ui:find("AccessibilityRating") - rateAccessibilityUI.hardtext= tostring(math.min(100, averages.RateAccessibility)) - - local rateOriginalityUI = ui:find("OriginalityRating") - rateOriginalityUI.hardtext= tostring(math.min(100, averages.RateOriginality)) - - local rateDirectionUI = ui:find("DirectionRating") - rateDirectionUI.hardtext= tostring(math.min(100, averages.RateDirection)) - - local rrpTotal = ui:find("RRPTotal") - rrpTotal.hardtext= tostring(math.min(100, averages.RRPTotal)) - - local rollouts = ui:find("rollouts") - local deltaH = 40 - ui:invalidateCoords() - ui:updateCoords() - local newHReal = rollouts.h_real - -- must resize the parent - local newH = newHReal + deltaH - local yOffset = newH - ui.h - --propertySheet.h = newH - ui.y = ui.y + yOffset / 2 - ui.pop_min_h = newH - ui.pop_max_h = newH - ui:invalidateCoords() - ui:updateCoords() - -end - --------------------------------------------------------------------------------------------------------------- --- -function ScenarioScores:limitRating() - - local editBox = getUICaller() - local rating = editBox.input_string - - if rating~="" and tonumber(rating) > 100 then - editBox.input_string = tostring(100) - end -end - --------------------------------------------------------------------------------------------------------------- --- -function ScenarioScores:updateScores() - - local ui = self:getWindow() - - local rateFunUI = ui:find("fun_rate"):find("edit_rate"):find("eb") - local rateFun = 0 - if rateFunUI.input_string~="" and rateFunUI.input_string~=self.emptyScore then - rateFun = math.min(100, tonumber(rateFunUI.input_string)) - end - - local rateDifficultyUI = ui:find("diff_rate"):find("edit_rate"):find("eb") - local rateDifficulty = 0 - if rateDifficultyUI.input_string~=self.emptyScore then - rateDifficulty = math.min(100, tonumber(rateDifficultyUI.input_string)) - end - - local rateAccessibilityUI = ui:find("access_rate"):find("edit_rate"):find("eb") - local rateAccessibility = 0 - if rateAccessibilityUI.input_string~=self.emptyScore then - rateAccessibility = math.min(100, tonumber(rateAccessibilityUI.input_string)) - end - - local rateOriginalityUI = ui:find("originality_rate"):find("edit_rate"):find("eb") - local rateOriginality = 0 - if rateOriginalityUI.input_string~=self.emptyScore then - rateOriginality = math.min(100, tonumber(rateOriginalityUI.input_string)) - end - - local rateDirectionUI = ui:find("direction_rate"):find("edit_rate"):find("eb") - local rateDirection = 0 - if rateDirectionUI.input_string~=self.emptyScore then - rateDirection = math.min(100, tonumber(rateDirectionUI.input_string)) - end - - if game.updateScenarioScores then - game.updateScenarioScores(rateFun, rateDifficulty, rateAccessibility, rateOriginality, rateDirection) - end - - ui.active=false -end - diff --git a/code/ryzom/common/data_common/r2/r2_ui_select_bar.lua b/code/ryzom/common/data_common/r2/r2_ui_select_bar.lua deleted file mode 100644 index 6dab1505a..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_select_bar.lua +++ /dev/null @@ -1,337 +0,0 @@ --- rיed selection bar - - -r2.SelectBar = -{ - Content={}, -- array of instance for the current select bar that is displayed - ObserverHandles = {}, -- for each observed instance, gives its observer handle - Touched = false -} - - --- select bar observer : allows to know when a targeted object has been modified, or --- if its name has changed -local selectBarObserver = {} - -function selectBarObserver:onInstanceCreated(instance) - -- no-op -end - -function selectBarObserver:onInstanceErased(instance) - debugInfo(tostring(instance)) - -- nb : we don't use the 'instance' as a key because it is a pointer - -- to the C++ "weak pointer object", thus 2 references to the same instance may have a different - -- value when tested with rawequal ( == operator gives correct results however ...) - r2:removeInstanceObserver(r2.SelectBar.ObserverHandles[instance.InstanceId]) - r2.SelectBar.ObserverHandles[instance.InstanceId] = nil - -- object is not erased yet, so need to clean the table before the update - local maxElem = r2.SelectBar:getMaxNumEntries() - for k, v in pairs(r2.SelectBar.Content) do - if v == instance then - for index = k, maxElem do - r2.SelectBar.Content[index] = nil - end - break - end - end - if instance ~= r2:getSelectedInstance() then - -- nb : if instance is the selection, no need to update the bar right now, because setSelecteInstance(nil) is - -- called just after 'erase' notification messages have been sent - r2.SelectBar:touch() - end -end - -function selectBarObserver:onAttrModified(instance, attrName, attrIndex) - if attrName == "Name" or attrName == "Title" then - r2.SelectBar:touch() - end -end - --------------------------------------------------------- --- retrieve a reference to the select bar -function r2.SelectBar:getBar() - return getUI("ui:interface:r2ed_select_bar:buttons") -end - --------------------------------------------------------- --- get a button in the bar -function r2.SelectBar:getButton(index) - return self:getBar():find(string.format("b%d", index)) -end - --------------------------------------------------------- --- return the max number of button in the select bar -function r2.SelectBar:getMaxNumEntries() - return tonumber(getDefine("r2ed_max_num_select_bar_button")) -end - --------------------------------------------------------- --- init the select bar -function r2.SelectBar:init() - assert(next(self.ObserverHandles) == nil) -- observer table should be empty - local bar = self:getBar() - bar:clear() - for k = 1, self:getMaxNumEntries() do - debugInfo(tostring(k)) - local butt = createGroupInstance("r2ed_select_bar_button", bar.id, - { - id = string.format("b%d", k), - onclick_l="lua", - params_l=string.format("r2.SelectBar:onButtonPushed(%d)", k), - onclick_r="lua", - params_r=string.format("r2.SelectBar:onRightButtonPushed(%d)", k) - }) - butt.active = false - bar:addChild(butt) - end -end - --------------------------------------------------------- --- mark the select bar as modified for update -function r2.SelectBar:touch() - self.Touched = true -end - --------------------------------------------------------- --- update select bar content if necessary -function r2.SelectBar:update() - if not self.Touched then return end - self.Touched = false - -- clear the observer table - for k, v in pairs(self.ObserverHandles) do - r2:removeInstanceObserver(v) - end - table.clear(self.ObserverHandles) - local selection = r2:getSelectedInstance() - self:getBar().active = true - -- count number of elligible elements for display in the select bar - local buttCount = 0 - local currElem = selection - - -- setup a button from an instance - local function setupButton(butt, instance) - butt.active = true - butt.b.pushed = (instance == selection) - butt.b.uc_hardtext = instance:getDisplayName() - local icon = instance:getSelectBarIcon() - if icon ~= "" and icon ~= nil then - butt.icon.texture = icon - butt.icon.active = true - -- butt.icon.color_rgba = CRGBA(255, 255, 255, 255) - butt.b.text_x = 28 - butt.b.wmargin = 10 - else - -- butt.icon.color_rgba = CRGBA(127, 127, 127, 255) - butt.icon.active = false - butt.b.text_x = 12 - butt.b.wmargin = 12 - end - butt:invalidateCoords() - end - - - if selection then - while currElem do - if currElem:displayInSelectBar() then - buttCount = buttCount + 1 - end - currElem = currElem.ParentInstance - end - end - buttCount =math.min(buttCount, self:getMaxNumEntries()) - local target = selection - if buttCount < 2 then - target = r2:getCurrentAct() -- ensure that at least 'scenario' and 'act' are visible - buttCount = 2 - end - -- add the buttons for real - -- parents - local buttIndex = buttCount - local currElem = target - while currElem do - if currElem:displayInSelectBar() then - local butt = - setupButton(self:getButton(buttIndex), currElem) - self.Content[buttIndex] = currElem - self.ObserverHandles[currElem.InstanceId] = r2:addInstanceObserver(currElem.InstanceId, selectBarObserver) - buttIndex = buttIndex - 1 - end - currElem = currElem.ParentInstance - end - -- sons - -- preserve previous sons if they where in previous selection, - -- possibly renaming them - -- (nb : update may be triggered by modification of sons from a third party, so - -- the simpler approach 'if curr selection was in previous then leave unchanged' - -- doesn't work here ...) - buttIndex = buttCount + 1 - -- get next son that can be displayed in the select bar - local currParent = target - while self.Content[buttIndex] ~= nil and not self.Content[buttIndex].isNil do - currElem = self.Content[buttIndex] - if currElem:getFirstSelectBarParent() == currParent then - -- there's a match so keep this entry - setupButton(self:getButton(buttIndex), currElem) - currParent = self.Content[buttIndex] - buttIndex = buttIndex + 1 - self.ObserverHandles[currElem.InstanceId] = r2:addInstanceObserver(currElem.InstanceId, selectBarObserver) - else - -- no match -> exit - break - end - end - - -- hide remaining buttons - for k = buttIndex, self:getMaxNumEntries() do - self:getButton(k).active = false - self.Content[k] = nil - end - - -- show/hide sequence browser if necessary - local sequenceMenuButton = self:getSequenceButton() - if not selection then - sequenceMenuButton.active = false - else - sequenceMenuButton.active = selection:isSequencable() and (selection.Ghost ~= true) - end -end - --------------------------------------------------------- --- called by the ui when one of the select bar button has been pushed -function r2.SelectBar:onButtonPushed(index) - local instanceId = self.Content[index].InstanceId - local selectedInstance = r2:getSelectedInstance() - if selectedInstance and instanceId == selectedInstance.InstanceId then - -- on second click the contextual menu is displayed - self:popMenu(index) - end - r2:setSelectedInstanceId(instanceId) - self:getButton(index).b.pushed = true -end - --------------------------------------------------------- --- called by the ui when one of the select bar button has been pushed with the right button -function r2.SelectBar:onRightButtonPushed(index) - r2:setSelectedInstanceId(self.Content[index].InstanceId) - self:update() - self:onButtonPushed(index) -end - - --------------------------------------------------------- --- get root menu for the select bar -function r2.SelectBar:getRootMenu() - local menu = getUI("ui:interface:r2ed_select_bar_menu") - return menu:getRootMenu() -end - --------------------------------------------------------- --- get menu for the select bar -function r2.SelectBar:getMenu() - return getUI("ui:interface:r2ed_select_bar_menu") -end - --------------------------------------------------------- --- get the 'sequences' button -function r2.SelectBar:getSequenceButton() - return getUI("ui:interface:r2ed_select_bar:sequences") -end - --------------------------------------------------------- --- display sub-instance menu for the given button -function r2.SelectBar:popMenu(index) - local target = r2:getInstanceFromId(self.Content[index].InstanceId) - --r2:setSelectedInstanceId(target.InstanceId) - local menu = getUI("ui:interface:r2ed_select_bar_menu") - local rm = self:getRootMenu() - r2:clearMenu(rm) - local st = os.clock() - -- retrieve all sons (to optimize if needed ...) - local allSons = {} - if target:isKindOf("Scenario") then - -- special case for scenario : 'appendInstancesByType' would only add the active act, and we want them all - for k, v in specPairs(target.Acts) do - table.insert(allSons, v) - end - else - target:appendInstancesByType(allSons, "BaseClass") - end - local et = os.clock() - debugInfo("#1 " .. tostring(et - st)) - st = os.clock() - local sons = {} - -- retrieve direct selectable sons - for k,v in pairs(allSons) do - if v:displayInSelectBar() and v:getFirstSelectBarParent() == target then - table.insert(sons, v) - end - end - et = os.clock() - debugInfo("#2 " .. tostring(et - st)) - st = os.clock() - -- sort by category, then by icon - local function sorter(lhs, rhs) - if lhs:getClassName() ~= rhs:getClassName() then return lhs:getClassName() < rhs:getClassName() end - if lhs:getSelectBarIcon() ~= rhs:getSelectBarIcon() then return lhs:getSelectBarIcon() < rhs:getSelectBarIcon() end - return lhs:getDisplayName() < rhs:getDisplayName() - end - table.sort(sons, sorter) - et = os.clock() - debugInfo("#3 " .. tostring(et - st)) - st = os.clock() - -- fill menu - local currentLine = 0 - for k, v in pairs(sons) do - r2:addMenuLine(rm, v:getDisplayName(), "lua", "r2:setSelectedInstanceId('" .. v.InstanceId .."')", tostring(k), v:getSelectBarIcon(), 14) - --rm:addLine(v:getDisplayName(), "lua", "r2:setSelectedInstanceId('" .. v.InstanceId .."')", tostring(k)) - --if v:getSelectBarIcon() ~= "" then - -- local menuButton = createGroupInstance("r2_menu_button", "", { bitmap = v:getSelectBarIcon(), size="14" }) - -- if menuButton then - -- rm:setUserGroupLeft(currentLine, menuButton) - -- end - -- end - currentLine = currentLine + 1 - end - target:completeSelectBarMenu(rm) - if rm:getNumLine() == 0 then - rm:addLine(i18n.get("uiR2EDEmpty"), "", "", "empty") - end - et = os.clock() - debugInfo("#4 " .. tostring(et - st)) - et = os.clock() - launchContextMenuInGame(menu.id) - local butt = self:getButton(index) - menu.x = butt.x_real - menu.y = butt.y_real + butt.h_real - menu:updateCoords() - et = os.clock() - debugInfo("#5 " .. tostring(et - st)) -end - --------------------------------------------------------- --- TMP placeholder: called when the "sequence" menu is clicked -function r2.SelectBar:browseSequences() - - --r2:updateActivitiesAndChatsUI(r2:getSelectedInstance()) - r2.activities:initEditorAfterFirstCall() - - local logicEntity = r2:getSelectedInstance() - local activitySequences = logicEntity:getBehavior().Activities - - local menu = self:getMenu() - local rm = menu:getRootMenu() - r2:clearMenu(rm) - for s = 0, activitySequences.Size - 1 do - local sequence = activitySequences[s] - rm:addLine(ucstring(r2:getSequenceName(sequence)), "lua", "r2:selectActivitiesSequence(".. tostring(s) .. ")", "s") - end - rm:addSeparator() - r2:addMenuLine(rm, i18n.get("uiR2EDNewSequence"), "lua", "r2:newMiniActivitySequence()", "new_sequence", "r2_icon_create.tga", 14) - - local sequenceMenuButton = self:getSequenceButton() - sequenceMenuButton:updateCoords() - launchContextMenuInGame(menu.id) - menu.x = sequenceMenuButton.x_real - menu.y = sequenceMenuButton.y_real + sequenceMenuButton.h_real - menu:updateCoords() -end diff --git a/code/ryzom/common/data_common/r2/r2_ui_select_bar_2.lua b/code/ryzom/common/data_common/r2/r2_ui_select_bar_2.lua deleted file mode 100644 index 92a299c83..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_select_bar_2.lua +++ /dev/null @@ -1,578 +0,0 @@ --- rיed selection bar - - -r2.SelectBar = -{ - Content={}, -- array of instance for the current select bar that is displayed - ObserverHandles = {}, -- for each observed instance, gives its observer handle - Touched = false, - LastMenuPopper = nil, -- last instance in the scenario that popped the mnu - LastMenuHideTrigger = nil, -- last element that triggered the disparition of the select bar menu - InstancesType = "", - InstancesTypes = { - {["type"]=i18n.get("uiR2EDScene"):toUtf8(), ["icon"]="r2_palette_entities.tga" }, - {["type"]=i18n.get("uiR2EDMacroComponents"):toUtf8(), ["icon"]="r2_palette_components.tga" }, - {["type"]=i18n.get("uiR2EDbotObjects"):toUtf8(), ["icon"]="r2_palette_objets.tga" }, - {["type"]=i18n.get("uiR2EDPlotItems"):toUtf8(), ["icon"]="ICO_mission_purse.tga" } - }, -} - - --- select bar observer : allows to know when a targeted object has been modified, or --- if its name has changed -local selectBarObserver = {} - -function selectBarObserver:onInstanceCreated(instance) - -- no-op -end - -function selectBarObserver:onInstanceErased(instance) - -- debugInfo(tostring(instance)) - -- nb : we don't use the 'instance' as a key because it is a pointer - -- to the C++ "weak pointer object", thus 2 references to the same instance may have a different - -- value when tested with rawequal ( == operator gives correct results however ...) - r2:removeInstanceObserver(r2.SelectBar.ObserverHandles[instance.InstanceId]) - r2.SelectBar.ObserverHandles[instance.InstanceId] = nil - -- object is not erased yet (notification is sent before the true erase), so need to clean the table before the update - local maxElem = r2.SelectBar:getMaxNumEntries() - for k, v in pairs(r2.SelectBar.Content) do - if v == instance then - for index = k, maxElem do - r2.SelectBar.Content[index] = nil - end - break - end - end - if instance ~= r2:getSelectedInstance() then - -- nb : if instance is the selection, no need to update the bar right now, because setSelecteInstance(nil) is - -- called just after 'erase' notification messages have been sent - r2.SelectBar:touch() - end - r2.SelectBar:touch() -end - -function selectBarObserver:onPostHrcMove(instance) - r2.SelectBar:touch() -end - -function selectBarObserver:onAttrModified(instance, attrName, attrIndex) - if attrName == "Name" or attrName == "Title" then - r2.SelectBar:touch() - end -end - --------------------------------------------------------- --- retrieve a reference to the select bar -function r2.SelectBar:getBar() - return getUI("ui:interface:r2ed_select_bar:buttons") -end - --------------------------------------------------------- --- get a button in the bar -function r2.SelectBar:getButton(index) - return self:getBar():find(string.format("b%d", index)) -end - --------------------------------------------------------- --- return the max number of button in the select bar -function r2.SelectBar:getMaxNumEntries() - return tonumber(getDefine("r2ed_max_num_select_bar_button")) -end - --------------------------------------------------------- --- init the select bar -function r2.SelectBar:init() - - assert(next(self.ObserverHandles) == nil) -- observer table should be empty - local bar = self:getBar() - bar:clear() - for k = 1, self:getMaxNumEntries() do - local butt = createGroupInstance("r2ed_select_bar_button", bar.id, - { - id = string.format("b%d", k), - onclick_l="lua", - onclick_r="lua", - params_l=string.format("r2.SelectBar:onButtonPushed(%d)", k), - params_r=string.format("r2.SelectBar:onRightButtonPushed(%d)", k), - }) - butt.active = false - bar:addChild(butt) - end - bar.active = false -end - --------------------------------------------------------- --- mark the select bar as modified for update -function r2.SelectBar:touch() - self.Touched = true - local selection = r2:getSelectedInstance() - if selection and selection:isKindOf("Act") then - self.InstancesType = "" - end -end - ---------------------------------------------------------------- --- update bar in special case of act -function r2.SelectBar:openInstancesOfType(instancesType) - r2.SelectBar:touch() - self.InstancesType = instancesType -end --------------------------------------------------------- --- update select bar content if necessary -function r2.SelectBar:update() - - if not self.Touched then return end - if r2.Scenario == nil then - return -- no scenario created for now - end - self.Touched = false - - -- clear the observer table - for k, v in pairs(self.ObserverHandles) do - r2:removeInstanceObserver(v) - end - table.clear(self.ObserverHandles) - local selection = r2:getSelectedInstance() - if selection then - self:getBar().active = (selection.Ghost ~= true) - else - self:getBar().active = true - end - - - - local function setupButtonWithIconAndText(butt, text, icon, buttIndex) - butt.active = true - butt.b.uc_hardtext = text - local icon = icon - if icon ~= "" and icon ~= nil then - butt.icon.texture = icon - butt.icon.active = true - -- butt.icon.color_rgba = CRGBA(255, 255, 255, 255) - butt.b.text_x = 28 - butt.b.wmargin = 10 - else - -- butt.icon.color_rgba = CRGBA(127, 127, 127, 255) - butt.icon.active = false - butt.b.text_x = 12 - butt.b.wmargin = 12 - end - --butt.b.pushed = (instance == selection) - butt:invalidateCoords() - end - - -- setup a button from an instance - local function setupButton(butt, instance, buttIndex) - setupButtonWithIconAndText(butt, instance:getDisplayName(), instance:getSelectBarIcon(), buttIndex) - butt.Env.Types = false - end - - -- setup a button from a type - local function setupButtonType(butt, type, buttIndex) - local icon - for k, v in pairs(self.InstancesTypes) do - if v.type == type then - icon = v.icon - break - end - end - setupButtonWithIconAndText(butt, ucstring(type), icon, buttIndex) - butt.Env.Types = true - end - - -- count number of elligible elements for display in the select bar - local buttCount = 0 - local currElem = selection - if selection then - while currElem do - if currElem:displayInSelectBar() then - buttCount = buttCount + 1 - - if currElem:isKindOf("Act") and self.InstancesType~="" then - buttCount = buttCount + 1 - end - end - currElem = currElem.ParentInstance - end - end - - local target = selection - if buttCount < 1 then - target = r2:getCurrentAct() -- ensure that at least an act is visible - buttCount = 1 - if self.InstancesType~="" then - buttCount = buttCount + 1 - end - end - - local buttIndex = buttCount - -- special case for scenario wide objects (only plot items for now) - if selection and selection:isGlobalObject() then - - -- current act - currElem = r2:getCurrentAct() - setupButton(self:getButton(1), currElem, 1) - self.Content[1] = currElem - self.ObserverHandles[currElem.InstanceId] = r2:addInstanceObserver(currElem.InstanceId, selectBarObserver) - - -- special button for type - if self.InstancesType~="" then - setupButtonType(self:getButton(2), self.InstancesType, 2) - self.Content[2] = currElem - end - - -- plot item - currElem = selection - setupButton(self:getButton(3), currElem, 3) - self.Content[3] = currElem - self.ObserverHandles[currElem.InstanceId] = r2:addInstanceObserver(currElem.InstanceId, selectBarObserver) - buttIndex = 4 - - -- special case if current selection is the scenario (display a single button) - elseif selection and selection:isSameObjectThan(r2.Scenario) then - setupButton(self:getButton(1), selection, buttIndex) - self.Content[1] = selection - self.ObserverHandles[selection.InstanceId] = r2:addInstanceObserver(selection.InstanceId, selectBarObserver) - buttIndex = 2 - target = r2:getCurrentAct() -- continue with sons of current act - else - -- special case for plot items - -- add the buttons for real - -- parents - local currElem = target - while currElem do - if currElem:displayInSelectBar() then - if buttIndex <= self:getMaxNumEntries() then - if currElem:isKindOf("Act") then - if currElem:isBaseAct() then - currElem = r2:getCurrentAct() - end - - if self.InstancesType~="" then - -- special button for different types - local ucname = ucstring() - ucname:fromUtf8(self.InstancesType) - setupButtonType(self:getButton(buttIndex), ucname, buttIndex) - self.Content[buttIndex] = currElem - buttIndex = buttIndex - 1 - end - end - setupButton(self:getButton(buttIndex), currElem, buttIndex) - self.Content[buttIndex] = currElem - self.ObserverHandles[currElem.InstanceId] = r2:addInstanceObserver(currElem.InstanceId, selectBarObserver) - end - buttIndex = buttIndex - 1 - end - currElem = currElem.ParentInstance - end - buttIndex = buttCount + 1 - -- sons - -- preserve previous sons if they where in previous selection, - -- possibly renaming them - -- (nb : update may be triggered by modification of sons from a third party, so - -- the simpler approach 'if curr selection was in previous then leave unchanged' - -- doesn't work here ...) - -- get next son that can be displayed in the select bar - --local currParent = target - --while self.Content[buttIndex] ~= nil and not self.Content[buttIndex].isNil do - -- currElem = self.Content[buttIndex] - -- if currElem:getFirstSelectBarParent() == currParent then - -- -- there's a match so keep this entry - -- setupButton(self:getButton(buttIndex), currElem) - -- currParent = self.Content[buttIndex] - -- buttIndex = buttIndex + 1 - -- self.ObserverHandles[currElem.InstanceId] = r2:addInstanceObserver(currElem.InstanceId, selectBarObserver) - -- else - -- -- no match -> exit - -- break - -- end - --end - end - - -- old version - -- walk down sons until we reach the max number of buttons - -- local currSon = target:getFirstSelectBarSon() - -- while currSon and buttIndex <= self:getMaxNumEntries() do - -- setupButton(self:getButton(buttIndex), currSon) - -- self.Content[buttIndex] = currSon - -- self.ObserverHandles[currSon.InstanceId] = r2:addInstanceObserver(currSon.InstanceId, selectBarObserver) - -- currSon = currSon:getFirstSelectBarSon() - -- buttIndex = buttIndex +1 - -- end - - - -- if there's room, add a selection button to traverse down the hierarchy - if buttIndex <= self:getMaxNumEntries() then - local butt = self:getButton(buttIndex) - butt.active = true - butt.b.uc_hardtext = i18n.get("uiR2EDSelectSubObject") - butt.icon.active = false - butt.b.text_x = 12 - butt.b.wmargin = 12 - butt:invalidateCoords() - --butt.b.pushed = false - self.Content[buttIndex] = nil - buttIndex = buttIndex + 1 - end - - -- hide remaining buttons - for k = buttIndex, self:getMaxNumEntries() do - self:getButton(k).active = false - self.Content[k] = nil - end - - -- show/hide sequence browser if necessary - local sequenceMenuButton = self:getSequenceButton() - if not selection then - sequenceMenuButton.active = false - else - sequenceMenuButton.active = selection:isSequencable() and (selection.Ghost ~= true) - end - -- touch the contextual toolbar, because it y depends on us - r2.ContextualCommands:getToolbar():invalidateCoords() -end - --------------------------------------------------------- --- called by the ui when one of the select bar button has been pushed --- function r2.SelectBar:onButtonPushed(index) --- local instanceId = self.Content[index].InstanceId --- local selectedInstance = r2:getSelectedInstance() --- if selectedInstance and instanceId == selectedInstance.InstanceId then --- -- on second click the contextual menu is displayed --- self:popMenu(index) --- end --- r2:setSelectedInstanceId(instanceId) --- self:getButton(index).b.pushed = true --- end --- --- -------------------------------------------------------- --- -- called by the ui when one of the select bar button has been pushed with the right button --- function r2.SelectBar:onRightButtonPushed(index) --- r2:setSelectedInstanceId(self.Content[index].InstanceId) --- self:update() --- self:onButtonPushed(index) --- end - - --------------------------------------------------------- --- mark the select bar as modified for update -function r2.SelectBar:onMenuPostClickOut() - local uiCaller = getUICaller() - if uiCaller and uiCaller.parent and uiCaller.parent.parent then - local parentGroup = uiCaller.parent.parent - if parentGroup == getUI("ui:interface:r2ed_select_bar:buttons") then - self.LastMenuHideTrigger = getUICaller() - return - end - end - self.LastMenuHideTrigger = nil - self.LastMenuPopper = nil -end - - --------------------------------------------------------- --- called by the ui when one of the select bar button has been pushed -function r2.SelectBar:onButtonPushed(index) - local butt = self:getButton(index) - local selectedInstance = self.Content[index] - if selectedInstance == nil then - -- pop menu for sons of parents - self:popMenu(index) - return - end - if butt.b == self.LastMenuHideTrigger and selectedInstance == self.LastMenuPopper then - self.LastMenuHideTrigger = nil - return - end - self.LastMenuPopper = selectedInstance - self.LastMenuHideTrigger = nil - r2:setSelectedInstanceId(selectedInstance.InstanceId) - self:touch() - -- on second click the contextual menu is displayed - self:popMenu(index) -end - --------------------------------------------------------- --- called by the ui when one of the select bar button has been pushed with the right button -function r2.SelectBar:onRightButtonPushed(index) - self:onButtonPushed(index) -end - - - --------------------------------------------------------- --- get root menu for the select bar -function r2.SelectBar:getRootMenu() - local menu = getUI("ui:interface:r2ed_select_bar_menu") - return menu:getRootMenu() -end - --------------------------------------------------------- --- get menu for the select bar -function r2.SelectBar:getMenu() - return getUI("ui:interface:r2ed_select_bar_menu") -end - --------------------------------------------------------- --- get the 'sequences' button -function r2.SelectBar:getSequenceButton() - return getUI("ui:interface:r2ed_select_bar:sequences") -end - - - --------------------------------------------------------- --- display sub-instance menu for the given button -function r2.SelectBar:getMenu() - return getUI("ui:interface:r2ed_select_bar_menu") -end - -local allSons = {} - --------------------------------------------------------- --- display sub-instance menu for the given button -function r2.SelectBar:popMenu(index) - - local target - if self.Content[index] == nil then - -- the "select" button was pressed - target = r2:getSelectedInstance() - if target == nil then - target = r2:getCurrentAct() - end - else - target = r2:getInstanceFromId(self.Content[index].InstanceId) - if not target:isSameObjectThan(r2.Scenario) then - -- to get objects of same type, just enumerate from the parent (except for scenario) - target = target:getFirstSelectBarParent() - end - end - - --r2:setSelectedInstanceId(target.InstanceId) - local menu = self:getMenu() - local rm = self:getRootMenu() - r2:clearMenu(rm) - local st = os.clock() - -- retrieve all sons (optimize this if needed ...) - table.clear(allSons) - - if target:isKindOf("Scenario") then - -- special case for scenario : 'appendInstancesByType' would only add the active act, and we want them all - for k, v in specPairs(target.Acts) do - if not v:isBaseAct() then - table.insert(allSons, v) - end - end - elseif target:isKindOf("Act") and self:getButton(index).Env.Types~=true then - - for k, v in specPairs(r2.Scenario.PlotItems) do - table.insert(allSons, v) - end - r2.Scenario:getBaseAct():appendInstancesByType(allSons, "BaseClass") - r2.Scenario:getCurrentAct():appendInstancesByType(allSons, "BaseClass") - local allSonsTemp = {} - for k, v in pairs(allSons) do - if v:getSelectBarType()==self.InstancesType then - table.insert(allSonsTemp, v) - end - end - allSons = allSonsTemp - - elseif target ~= nil then - target:appendInstancesByType(allSons, "BaseClass") - end - - local et = os.clock() - --debugInfo("#1 " .. tostring(et - st)) - st = os.clock() - local sons = {} - -- retrieve direct selectable sons - for k,v in pairs(allSons) do - if v:displayInSelectBar() and (v:getFirstSelectBarParent()==target or (target:isKindOf("Act") and v:getFirstSelectBarParent()==r2.Scenario:getBaseAct())) then - table.insert(sons, v) - end - end - - et = os.clock() - --debugInfo("#2 " .. tostring(et - st)) - st = os.clock() - -- sort by category, then by icon - local function sorter(lhs, rhs) - if lhs:getClassName() ~= rhs:getClassName() then return lhs:getClassName() < rhs:getClassName() end - if lhs:getSelectBarIcon() ~= rhs:getSelectBarIcon() then return lhs:getSelectBarIcon() < rhs:getSelectBarIcon() end - return lhs:getDisplayName() < rhs:getDisplayName() - end - table.sort(sons, sorter) - et = os.clock() - --debugInfo("#3 " .. tostring(et - st)) - st = os.clock() - -- fill menu - - -- special case for act - if index==2 then - for k, v in pairs(self.InstancesTypes) do - local ucname = ucstring() - ucname:fromUtf8(v.type) - r2:addMenuLine(rm, ucname, "lua", "r2.SelectBar:openInstancesOfType('".. v.type .."','" .. v.icon .."')", v.type, v.icon, 14) - end - else - for k, v in pairs(sons) do - r2:addMenuLine(rm, v:getDisplayName(), "lua", "r2:setSelectedInstanceId('" .. v.InstanceId .."')", tostring(k), v:getSelectBarIcon(), 14) - end - end - - target:completeSelectBarMenu(rm) - if rm:getNumLine() == 0 then - rm:addLine(i18n.get("uiR2EDEmpty"), "", "", "empty") - end - if self.Content[index] and self.Content[index].InstanceId == r2:getSelectedInstance().InstanceId then - if r2:getSelectedInstance().BuildPropertySheet then - rm:addSeparator() - r2:addMenuLine(rm, concatUCString(i18n.get("uiRE2DPropertiesOf"), r2:getSelectedInstance():getDisplayName()), "lua", "r2:showProperties(r2:getSelectedInstance())", "prop", "r2_icon_properties.tga", 14) - end - end - et = os.clock() - --debugInfo("#4 " .. tostring(et - st)) - et = os.clock() - - rm:setMaxVisibleLine(15) - launchContextMenuInGame(menu.id) - local butt = self:getButton(index) - menu.x = butt.x_real - menu.y = butt.y_real + butt.h_real - menu:updateCoords() - et = os.clock() - --debugInfo("#5 " .. tostring(et - st)) -end - --------------------------------------------------------- --- TMP placeholder: called when the "sequence" menu is clicked --------------------------------------------------------- --- called when the "sequence" menu is clicked -function r2.SelectBar:browseSequences() - - --r2:updateActivitiesAndChatsUI(r2:getSelectedInstance()) - r2.activities:initEditorAfterFirstCall() - - local logicEntity = r2:getSelectedInstance() - local activitySequences = logicEntity:getBehavior().Activities - - local menu = self:getMenu() - local rm = menu:getRootMenu() - r2:clearMenu(rm) - for s = 0, activitySequences.Size - 1 do - local sequence = activitySequences[s] - local uc_sequ = ucstring() - uc_sequ:fromUtf8(sequence:getName()) - rm:addLine(uc_sequ, "lua", "r2.activities:triggerSelectSequence('".. sequence.InstanceId .. "')", sequence.InstanceId) - end - rm:addSeparator() - r2:addMenuLine(rm, i18n.get("uiR2EDNewSequence"), "lua", "r2.activities:newSequenceInst()", "new_sequence", "r2_icon_create.tga", 14) - - local sequenceMenuButton = self:getSequenceButton() - sequenceMenuButton:updateCoords() - launchContextMenuInGame(menu.id) - menu.x = sequenceMenuButton.x_real - menu.y = sequenceMenuButton.y_real + sequenceMenuButton.h_real - menu:updateCoords() -end diff --git a/code/ryzom/common/data_common/r2/r2_ui_toolbar_base.lua b/code/ryzom/common/data_common/r2/r2_ui_toolbar_base.lua deleted file mode 100644 index 57dde5245..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_toolbar_base.lua +++ /dev/null @@ -1,193 +0,0 @@ ----------------------------- --- GENERIC TOOLBAR SYSTEM -- ----------------------------- - --- Generic code for toolbar --- --- A toolbar is a set of 'buttons' that triggers 'commands' --- A 'command' is a structure returned by a function like baseClass.getAvailableCommand (see there for doc) --- A 'button' is a widget thet may have any form you want, derivers should just tell how to setup a button from a command --- --- Usage : --- --- -- 1°) creation --- myToolBar = r2.newToolbar() --- --- -- 2°) definition of toolbar behavior. Function that should be given by the deriver are given in section below --- function myTooBar:getToolbar() --- ... --- end --- function myToolbar ... --- --- NB : command index are starting at 0 in the ui, and at 1 in lua - - --- --- --- -local toolbarTemplate = {} - - ------------------------------------- --- TO BE IMPLEMENTED BY DERIVERS -- ------------------------------------- - --- return a reference on the toolbar ui -function toolbarTemplate:getToolbar() - assert(false) -- ! SHOULD BE IMPLEMENTED BY DERIVER -end - --- return the max number of commands that the toolbar may contains -function toolbarTemplate:getMaxNumCommands() - assert(false) -- ! SHOULD BE IMPLEMENTED BY DERIVER -end - --- get a button from its index in the toolbar (starting from 0) -function toolbarTemplate:getButton(index) - assert(false) -- ! SHOULD BE IMPLEMENTED BY DERIVER -end - --- setup a button from a commandDesc. -function toolbarTemplate:setupButton(button, commandDesc, buttonIndex) - assert(false) -- ! SHOULD BE IMPLEMENTED BY DERIVER -end - --- retrieve a command list for the given instance -function toolbarTemplate:getAvailableCommands(instance, dest) - assert(false) -- ! SHOULD BE IMPLEMENTED BY DERIVER -end - ------------------------ --- PUBLIC INTERFACE -- ------------------------ - ----------------------------------------------------------------------------------------------------- --- Setup the contextual toolbar for the given instance --- passing nil just hides the toolbar -function toolbarTemplate:setupToolbar(instance) - assert(false) -end - ----------------------------------------------------------------------------------------------------- --- run a command in the toolbar from its index -function toolbarTemplate:runCommand(index) - assert(false) -end - - - ----------------------------------------------------------------------------------------------------- --- call this to create a new toolbar, then specialize it -function r2.newToolbar() - local tb = clone(toolbarTemplate) - - -- description of each command - tb.ToolbarCommands={} - -- map index of each command to the matching toolbar button - tb.IndexToButton = {} - -- Current instance for which this contextual toolbar is displayed - tb.CurrentInstance = nil - -- Index of last triggered command - tb.LastTriggeredCommandIndex = nil - -- Cache for current commands - tb.CurrentCommands = {} - -- Command id to button - tb.CommandIdToIndex = {} - - - ---------------------------------------------------------------------------- - -- Setup the contextual toolbar for the given instance - -- passing nil just hides the toolbar - function tb:setupToolbar(instance) - self.CurrentInstance = instance - -- clear current list of commands - table.clear(self.ToolbarCommands) - table.clear(self.CurrentCommands) - table.clear(self.IndexToButton) - table.clear(self.CommandIdToIndex) - self.LastTriggeredCommandIndex = nil - local toolbar = self:getToolbar() - local buttonList = toolbar:find("buttons") - if not instance then - toolbar.active = false - return - end - local commands = self.CurrentCommands - table.clear(commands) - self:getAvailableCommands(instance, commands) - assert(self.ToolbarCommands) - toolbar.active = true - local buttonIndex = 0 - local maxNumButtons = self:getMaxNumCommands() - for index, commandDesc in pairs(commands) do - local button - if commandDesc.ButtonBitmap ~= "" and commandDesc.ButtonBitmap ~= nil then - -- new button wanted - local button = self:getButton(buttonIndex) - if not button then - inspect(buttonList) - assert(button) - end - self:setupButton(button, commandDesc, buttonIndex) - self.IndexToButton[index] = button - self.ToolbarCommands[buttonIndex + 1] = commandDesc - self.CommandIdToIndex[commandDesc.Id] = index - buttonIndex = buttonIndex + 1 - if buttonIndex == maxNumButtons then break end - end - end - -- hide buttons that are not visible anymore - for index = buttonIndex, maxNumButtons - 1 do - local button = self:getButton(index) - button.active = false - end - - - - end - - ---------------------------------------------------------------------------- - -- Run the command with the given index - function tb:runCommand(index) - assert(self.CurrentInstance) - assert(self.ToolbarCommands[index] ~= nil) - self.LastTriggeredCommandIndex = index - -- do actual call - self.ToolbarCommands[index].DoCommand(self.CurrentInstance) - end - return tb -end - ----------------------------------------------------------------------------- --- Private : execute a command triggered by a toolbar button -function r2.runBaseToolbarCommand(toolbar, index) - assert(toolbar) -- deriver should provide the "Toolbar" field in the groups containing control that can trigger commands! - toolbar:runCommand(index + 1) -end - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_ui_tools.lua b/code/ryzom/common/data_common/r2/r2_ui_tools.lua deleted file mode 100644 index 8b2c75143..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_tools.lua +++ /dev/null @@ -1,149 +0,0 @@ ----------- --- TOOL -- ----------- --- Manage display of current selected tool into the ui ------------------------------------------------------------------------------------------------------------- - - --- base Name for the tool bar in the ui -local toolBarPath = "ui:interface:r2ed_toolbar:" -local geoToolPath = "ui:interface:r2ed_palette:content:sbtree_geo:geo_features:enclosing:geo_feature_list:" -local featuresToolPath = "ui:interface:r2ed_palette:content:sbtree_features:features:enclosing:feature_list:" - - -r2.ToolUI = -{ - -- ref to current hightlighted tool in the ui - ActiveToolUI = nil, - - -- For named tools, map the name to the ui path - ToolNameToUIPath = - { - selectMove = toolBarPath .. "r2ed_tool_select", - selectRotate = toolBarPath .. "r2ed_tool_rotate", - teleport = toolBarPath .. "r2ed_tool_teleport", - drawRoad = geoToolPath .. "r2ed_tool_draw_road:tool", - drawRegion = geoToolPath .. "r2ed_tool_draw_region:tool", - createFeatureBanditCamp = featuresToolPath .. "r2ed_create_feature_bandit_camp:tool", - createFeatureTimer = featuresToolPath .. "r2ed_create_feature_timer:tool", - createFeatureTimeTrigger = featuresToolPath .. "r2ed_create_feature_time_trigger:tool", - createFeatureFauna = featuresToolPath .. "r2ed_create_feature_fauna:tool", - createFeatureBossSpawner = featuresToolPath .. "r2ed_create_feature_boss_spawner:tool", - createFeatureZoneTrigger = featuresToolPath .. "r2ed_create_feature_zone_trigger:tool", - createFeatureUserTrigger = featuresToolPath .. "r2ed_create_user_trigger:tool", - createFeatureEasterEgg = featuresToolPath .."r2ed_create_easter:tool", - createFeatureLootSpawner = featuresToolPath .."r2ed_create_feature_loot_spawner:tool", - createDialog = featuresToolPath .."r2ed_create_dialog:tool", - createFeatureGiveItem = featuresToolPath .."r2ed_create_feature_give_item:tool", - createFeatureRequestItem = featuresToolPath .."r2ed_create_feature_request_item:tool", - createFeatureTalkTo = featuresToolPath .."r2ed_create_feature_talk_to:tool", - createFeatureAmbush = featuresToolPath.."r2ed_create_feature_ambush:tool", - createFeatureTimedSpawner = featuresToolPath.."r2ed_create_feature_timed_spawner:tool", - createFeatureManHunt = featuresToolPath.."r2ed_create_feature_man_hunt:tool", - - - } -} - ------------------------------------------------------------------------------------------------------------- --- PRIVATE : hightlight a tool button by a ref on the tool ui -function r2.ToolUI:highlightToolUI(tool, hightlighted) - if not tool then return end - tool:find("selected").active = hightlighted - tool:find("unselected").active = not hightlighted -end - ------------------------------------------------------------------------------------------------------------- --- Get reference to a tool in the ui by its name (for named tools) -function r2.ToolUI:getToolUIByName(toolName) - if toolName == "" then return nil end - -- get Name of the ui button from the tool Name - local uiPath = self.ToolNameToUIPath[toolName] - if uiPath == nil then - debugWarning("Can't find ui for tool : " .. tostring(toolName)) - return nil - end - return getUI(uiPath) -end - ------------------------------------------------------------------------------------------------------------- --- Get the current highlighted tool -function r2.ToolUI:getActiveToolUI() - if self.CurrentToolUI and not self.CurrentToolUI.isNil then - return self.CurrentToolUI - else - return nil - end -end - - ------------------------------------------------------------------------------------------------------------- --- Set the current highlighted tool -function r2.ToolUI:setActiveToolUI(tool) - if self:getActiveToolUI() then - self:highlightToolUI(self:getActiveToolUI(), false) - end - self.CurrentToolUI = tool - self:highlightToolUI(tool, true) -end - - ------------------------------------------------------------------------------------------------------------- --- This function will be called by the framework when it wants to highlight a tool in the --- ui. It doesn't change the actual tool in the editor, just the ui -function r2.ToolUI:setActiveToolUIByName(toolName) - self:setActiveToolUI(self:getToolUIByName(toolName)) -end - ------------------------------------------------------------------------------------------------------------- -function r2.ToolUI:updateTooltip(onClickL, paramsL) - onClickL = defaulting(onClickL, getUICaller().onclick_l) - paramsL = defaulting(paramsL, getUICaller().params_l) - local expr = string.format("getKey('%s', '%s')", onClickL, paramsL) - local keyName = ucstring(runExpr(expr)) - if keyName == i18n.get("uiNotAssigned") then - -- no associated key - setContextHelpText(getUICaller().tooltip) - else - setContextHelpText(concatUCString(getUICaller().tooltip, "@{6F6F} (", keyName, ")")) - end -end - ----------------------------------------------------------------------------- --- Update the undo / redo buttons grayed states -function r2.ToolUI:updateUndoRedo() - local toolbar = getUI("ui:interface:r2ed_toolbar") - toolbar:find("r2ed_tool_undo").unselected.active = r2:canUndo() - toolbar:find("r2ed_tool_undo").disabled.active = not r2:canUndo() - toolbar:find("r2ed_tool_redo").unselected.active = r2:canRedo() - toolbar:find("r2ed_tool_redo").disabled.active = not r2:canRedo() -end - - ----------------------------------------------------------------------------- --- Update the toggle windows buttons -function r2.ToolUI:updateToggleWindowButtons() - local windowsBar = getUI("ui:interface:r2ed_windows_bar") - local active = (r2.Mode == "Edit") - windowsBar.active = active - if active then - windowsBar:find("r2ed_tool_map_window").selected.active = getUI("ui:interface:map").active - windowsBar:find("r2ed_tool_map_window").unselected.active = not getUI("ui:interface:map").active - windowsBar:find("r2ed_tool_scenario_window").selected.active = getUI("ui:interface:r2ed_scenario").active - windowsBar:find("r2ed_tool_scenario_window").unselected.active = not getUI("ui:interface:r2ed_scenario").active - windowsBar:find("r2ed_tool_palette_window").selected.active = getUI("ui:interface:r2ed_palette").active - windowsBar:find("r2ed_tool_palette_window").unselected.active = not getUI("ui:interface:r2ed_palette").active - end -end - ----------------------------------------------------------------------------- --- Update the toggle windows buttons -function r2.ToolUI:updateToggleWindowDMButtons() - local windowsDMBar = getUI("ui:interface:r2ed_windows_dm_bar") - windowsDMBar:find("r2ed_live").selected.active = getUI("ui:interface:r2ed_scenario_control").active - windowsDMBar:find("r2ed_live").unselected.active = not getUI("ui:interface:r2ed_scenario_control").active - windowsDMBar:find("player_control").selected.active = getUI("ui:interface:ring_chars_tracking").active - windowsDMBar:find("player_control").unselected.active = not getUI("ui:interface:ring_chars_tracking").active -end - - diff --git a/code/ryzom/common/data_common/r2/r2_ui_triggers.lua b/code/ryzom/common/data_common/r2/r2_ui_triggers.lua deleted file mode 100644 index 72a5e9cf5..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_triggers.lua +++ /dev/null @@ -1,3931 +0,0 @@ -r2.maxActivities = 14 -r2.sequencesNb = 0 - -r2.TimeLimitsProp = { - [tostring(i18n.get("uiR2EdNoTimeLimit"))]="No Limit", - --["Until a certain time"]="Until", - [tostring(i18n.get("uiR2EdWhileChat"))]="Chat", - [tostring(i18n.get("uiR2EdForCertainTime"))]="Few Sec" - } -r2.TimeLimitsCB = { - ["No Limit"]=tostring(i18n.get("uiR2EdNoTimeLimit")), - --["Until"]="Until a certain time", - ["Chat"]=tostring(i18n.get("uiR2EdWhileChat")), - ["Few Sec"]=tostring(i18n.get("uiR2EdForCertainTime")), - } - -r2.activityTypeMenu = { - ["Inactive"]=tostring(i18n.get("uiR2EdInactive")), - ["Stand Still"]=tostring(i18n.get("uiR2EdStandStill")), - ["Follow Route"]=tostring(i18n.get("uiR2EdFollowRoad")), - ["Patrol"]=tostring(i18n.get("uiR2EdPatrol")), - ["Repeat Road"]=tostring(i18n.get("uiR2EdRepeatRoad")), - --["Deploy"]=tostring(i18n.get("uiR2EdDeploy")), - ["Wander"]=tostring(i18n.get("uiR2EdWander")), - ["Stand On Start Point"]=tostring(i18n.get("uiR2EdStandOnStartPoint")), - ["Go To Start Point"]=tostring(i18n.get("uiR2EdGoToStartPoint")), - ["Go To Zone"]=tostring(i18n.get("uiR2EdGoToZone")), - ["Sit Down"]=tostring(i18n.get("uiR2EdSitDown")), - ["Stand Up"]=tostring(i18n.get("uiR2EdStandUp")), - - } - -r2.fromNPCNameToId = {} -r2.fromEmoteIdToName = {} - -r2.ownCreatedInstances = {} - - ------------------- INIT TRIGGERS EDITOR ---------------------------------------------------------------- -function r2:initTriggersEditor() - - -- emote - local menuName = "ui:interface:r2ed_triggers_menu" - local emoteMenu = getUI(menuName) - local emoteMenu = emoteMenu:getRootMenu() - assert(emoteMenu) - emoteMenu:reset() - - local emoteTable = initEmotesMenu(menuName, "") - for id, name in pairs(emoteTable) do - r2.fromEmoteIdToName[id] = name - end -end - ------------------- INIT TRIGGERS EDITOR ---------------------------------------------------------------- -function r2:initActivityEditor(activityEditor) - - -- time limit - local timeLimitCB = activityEditor:find("time_limit"):find("combo_box") - assert(timeLimitCB) - timeLimitCB:resetTexts() - timeLimitCB:addText(ucstring(i18n.get("uiR2EdNoTimeLimit"))) - --timeLimitCB:addText(ucstring("Until a certain time")) - timeLimitCB:addText(ucstring(i18n.get("uiR2EdForCertainTime"))) - timeLimitCB:addText(ucstring(i18n.get("uiR2EdWhileChat"))) -end - ----------------------------------------------------------------------------------------------------- -function r2:getSelectedEltUI(uiName) - local id = r2:getSelectedEltUIId(uiName) - if id then - return getUI(id) - else - return nil - end -end - ----------------------------------------------------------------------------------------------------- -function r2:getSelectedEltUIId(uiName) - - if uiName == nil then - dumpCallStack(1) - assert(false) - end - local windowUI = getUI("ui:interface:"..uiName) - assert(windowUI) - - return windowUI.Env.selectedElementId -end - ----------------------------------------------------------------------------------------------------- -function r2:setSelectedEltUIId(uiName, eltUIId) - local windowUI = getUI("ui:interface:"..uiName) - assert(windowUI) - - windowUI.Env.selectedElementId = eltUIId -end - ----------------------------------------------------------------------------------------------------- -function r2:getSelectedEltInstId(uiName) - - local element = r2:getSelectedEltUI(uiName) - if element ~= nil then - return element.Env.elementId - else - return nil - end -end - ----------------------------------------------------------------------------------------------------- -function r2:setSelectedEltInstId(uiName, instId) - local element = r2:getSelectedEltUI(uiName) - assert(element) - element.Env.elementId = instId -end - ----------------------------------------------------------------------------------------------------- -function r2:getSelectedEltInst(uiName) - local id = r2:getSelectedEltInstId(uiName) - if id then - return r2:getInstanceFromId(id) - else - return nil - end -end - ----------------------------------------------------------------------------------------------------- -function r2:getSelectedSequInstId(uiName) - local windowUI = getUI("ui:interface:"..uiName) - assert(windowUI) - - local tab = windowUI:find("sequence_tabs") - assert(tab) - - local sequence = windowUI:find(tab.associatedGroupSelection) - assert(sequence) - - if sequence.Env == nil then return nil end - - return sequence.Env.sequenceId -end - ----------------------------------------------------------------------------------------------------- -function r2:getSelectedSequInst(uiName) - local id = r2:getSelectedSequInstId(uiName) - if id then - return r2:getInstanceFromId(id) - else - return nil - end -end - ----------------------------------------------------------------------------------------------------- -function r2:getSelectedSequ(uiName) - local windowUI = getUI("ui:interface:"..uiName) - assert(windowUI) - - local tab = windowUI:find("sequence_tabs") - - if tab~=nil then - local associatedGroup = tab.associatedGroupSelection - if associatedGroup == "" then - return nil - end - - local sequence = windowUI:find(associatedGroup) - assert(sequence) - - return sequence - else - return windowUI:find("sequence_elts") - end -end - ----------------------------------------------------------------------------------------------------- -function r2:setSelectedSequInstId(uiName, instanceId) - - local windowUI = getUI("ui:interface:"..uiName) - assert(windowUI) - - local tab = windowUI:find("sequence_tabs") - assert(tab) - - local sequence = windowUI:find(tab.associatedGroupSelection) - assert(sequence) - - sequence.Env.sequenceId = instanceId -end - ------------------- CLOSE ALL UI -------------------------------------------------------------------- -function r2:closeActivitySequenceUI() - - local window = getUI("ui:interface:r2ed_edit_activity_sequence") - if window~=nil then - window.active = false - - r2:openAndUpdateMiniActivityView() - end -end - ------------------- NEW SEQUENCE -------------------------------------------------------------------- -function r2:newActivitiesSequence(firstRequest, activitySequence, reset) - - - local triggersUI = getUI("ui:interface:r2ed_triggers") - assert(triggersUI) - - local tab = triggersUI:find("sequence_tabs") - assert(tab) - - if firstRequest and tab.tabButtonNb == 7 then return -1 end - - if firstRequest == true then - activitySequence = r2.newComponent("ActivitySequence") - - --local name = tostring(i18n.get("uiR2EdSeq"))..tab.tabButtonNb+1 - --activitySequence.Name = name - - local npcGroup = r2:getSelectedInstance() - assert(npcGroup) - - r2.requestInsertNode(npcGroup:getBehavior().InstanceId, "Activities", -1, "", activitySequence) --- r2.requestInsertNode(npcGroup.InstanceId,"ActivitiesId",-1,"",activitySequence.InstanceId) --- r2.requestInsertNode(r2:getCurrentAct().InstanceId,"ActivitiesIds",-1,"",activitySequence.InstanceId) - - r2.ownCreatedInstances[activitySequence.InstanceId] = true - - return activitySequence.InstanceId - else - - local updateMiniActivityView = r2.ownCreatedInstances[activitySequence.InstanceId] - if reset then - r2.ownCreatedInstances[activitySequence.InstanceId] = true - end - - local templateParams = { - newElt="r2:newActivity(true)", - newEltText=tostring(i18n.get("uiR2EdNewActivity")), - eltOrderText=tostring(i18n.get("uiR2EdActivityOrder")), - upElt="r2:upActivity()", - downElt="r2:downActivity()", - maxMinElts="r2:maximizeMinimizeActivities()", - downUpColor="200 120 80 255", - colPushed = "200 80 80 255", - paramsL= "r2:selectSequenceTab('r2ed_triggers', "..tostring(tab.tabButtonNb)..")" - } - - local editorEltTemplate = "template_edit_activity" - local sequence = r2:newElementsSequence("r2ed_triggers", templateParams, editorEltTemplate, - activitySequence, tostring(i18n.get("uiR2EdSeq"))) - r2:initActivityEditor(sequence:find("edit_element")) - - local activities = activitySequence.Components - for a = 0, activities.Size - 1 do - r2:newActivity(false, nil, activities[a]) - end - - -- new MiniActivity sequence - if updateMiniActivityView==true then - --r2:updateSequencesButtonBar(tab.tabButtonNb-1, activitySequence.Name) - r2:updateSequencesButtonBar(tab.tabButtonNb-1, r2:getSequenceName(activitySequence)) - r2:openAndUpdateMiniActivityView() - end - end -end - ------------------- REMOVE SEQUENCE ----------------------------------------------------------------- -function r2:removeActivitiesSequence() - - local sequenceId = r2:removeElementsSequence("r2ed_triggers", "Activities", tostring(i18n.get("uiR2EdSeq"))) - --- local group = r2:getSelectedInstance() --- assert(group) --- local sequenceIndex = -1 --- for i=0,group.ActivitiesId.Size-1 do --- if group.ActivitiesId[i] == sequenceId then --- sequenceIndex = i --- break --- end --- end --- if sequenceIndex ~= -1 then --- r2.requestEraseNode(group.InstanceId, "ActivitiesId", sequenceIndex) --- end --- --- local currentAct = r2:getCurrentAct() --- sequenceIndex = -1 --- for i=0,currentAct.ActivitiesIds.Size-1 do --- if currentAct.ActivitiesIds[i] == sequenceId then --- sequenceIndex = i --- break --- end --- end --- if sequenceIndex ~= -1 then --- r2.requestEraseNode(currentAct.InstanceId, "ActivitiesIds", sequenceIndex) --- end -end - -function r2:removeActivitiesSequenceUI(tabIndex) - local firstEltName = r2:removeElementsSequenceUI(tabIndex, "r2ed_triggers", "Activities", tostring(i18n.get("uiR2EdSeq"))) - - r2:updateSequencesButtonBar(0, firstEltName) -end - ------------------- SELECT ACTIVITY ------------------------------------------------------------------ -function r2:selectActivity() - r2:selectTriggerElement(nil, "r2ed_triggers") - - if getUICaller().pushed == true then - r2:updateActivityEditor() - end -end - ------------------- NEW ACTIVITY -------------------------------------------------------------------- -function r2:newActivity(firstRequest, tableInit, instanceElement, sequenceUI, sequenceInstId) - - - - local uiName = "r2ed_triggers" - - if sequenceUI == nil then - sequenceUI = r2:getSelectedSequ(uiName) - end - local activityList - if sequenceUI~=nil then - activityList = sequenceUI:find("elements_list") - assert(activityList) - - if activityList.childrenNb-1 == r2.maxActivities then return false end - end - - if firstRequest == true then - - instanceElement = r2.newComponent("ActivityStep") - - if tableInit ~= nil then - instanceElement.Activity = tableInit.Activity - instanceElement.ActivityZoneId = r2.RefId(tableInit.ActivityZoneId) - instanceElement.TimeLimit = tableInit.TimeLimit - instanceElement.TimeLimitValue = tableInit.TimeLimitValue - else - instanceElement.TimeLimit = "No Limit" - instanceElement.Activity = "Stand Still" - end - - if sequenceInstId == nil then - sequenceInstId = r2:getSelectedSequInstId(uiName) - end - assert(sequenceInstId) - - r2.requestInsertNode(sequenceInstId, "Components", -1, "", instanceElement) - - r2.ownCreatedInstances[instanceElement.InstanceId] = true - else - - local templateParams = { - selectElt="r2:selectActivity()", - openEltEditor="r2:openActivityEditor()", - maxMinElt="r2:maximizeMinimizeActivity()", - removeElt="r2:removeActivity()", - colOver="200 120 80 120", - colPushed="200 120 80 255" - } - - local element = r2:newTriggerElement(uiName, tostring(i18n.get("uiR2EdActivity")), templateParams, sequenceUI, instanceElement.InstanceId) - - r2:updateActivityChatSequence(element) - - -- active chat button if a chat sequence is associated to this activity - if instanceElement.Chat ~= "" then - - local activityEditor = sequenceUI:find("edit_element") - assert(activityEditor) - local chatButtonEditor = activityEditor:find("open_chat_sequence") - assert(chatButtonEditor) - - chatButtonEditor.active = true - end - end - - return true -end - - -function r2:buildActivityTitle(activityUI, erase) - - local activityInst = r2:getInstanceFromId(activityUI.Env.elementId) - assert(activityInst) - - -- part1 - local index = r2:searchElementIndex(activityInst) - if erase==true then index = index-1 end - local part1 = tostring(i18n.get("uiR2EdActivity")).." "..index.." : " - - -- part2 - if not r2.activityTypeMenu[activityInst.Activity] then - debugInfo(colorTag(255,0,0).."The activity '".. activityInst.Activity.."' is not properly registred") - end - - local part2 = r2.activityTypeMenu[activityInst.Activity].." " - if activityInst.ActivityZoneId~= "" then - local place = r2:getInstanceFromId(tostring(activityInst.ActivityZoneId)) - if place~=nil then - part2 = part2.. place.Name .." " - end - end - - -- part3 - local part3 = "" - if activityInst.TimeLimit == "Few Sec" then - - local hourNb, minNb, secNb = r2:calculHourMinSec(tonumber(activityInst.TimeLimitValue)) - - local timeLimitText = tostring(i18n.get("uiR2EdFor")) .. " " - if hourNb ~= 0 then timeLimitText = timeLimitText .. hourNb .. tostring(i18n.get("uiR2EdShortHours")) .. " " end - if minNb ~= 0 then timeLimitText = timeLimitText .. minNb .. tostring(i18n.get("uiR2EdShortMinutes")) .. " " end - timeLimitText = timeLimitText .. secNb .. tostring(i18n.get("uiR2EdShortSeconds")) - - part3 = timeLimitText - - elseif r2.TimeLimitsCB[activityInst.TimeLimit] ~= nil then - part3 = string.lower(r2.TimeLimitsCB[activityInst.TimeLimit]) - end - - -- title - local title = activityUI:find("title") - assert(title) - title.uc_hardtext= part1..part2..part3 -end - -function r2:getActivityName(activityInst) - - -- part1 - local index = r2:searchElementIndex(activityInst) - if erase==true then index = index-1 end - local part1 = tostring(i18n.get("uiR2EdActivity")).." "..index.." : " - - -- part2 - if not r2.activityTypeMenu[activityInst.Activity] then - debugInfo(colorTag(255,0,0).."The activity '".. activityInst.Activity.."' is not properly registred") - end - - local part2 = r2.activityTypeMenu[activityInst.Activity].." " - if activityInst.ActivityZoneId~= "" then - local place = r2:getInstanceFromId(tostring(activityInst.ActivityZoneId)) - if place~=nil then - part2 = part2.. place.Name .." " - end - end - - -- part3 - local part3 = "" - if activityInst.TimeLimit == "Few Sec" then - - local hourNb, minNb, secNb = r2:calculHourMinSec(tonumber(activityInst.TimeLimitValue)) - - local timeLimitText = tostring(i18n.get("uiR2EdFor")) .. " " - if hourNb ~= 0 then timeLimitText = timeLimitText .. hourNb .. tostring(i18n.get("uiR2EdShortHours")) .. " " end - if minNb ~= 0 then timeLimitText = timeLimitText .. minNb .. tostring(i18n.get("uiR2EdShortMinutes")) .. " " end - timeLimitText = timeLimitText .. secNb .. tostring(i18n.get("uiR2EdShortSeconds")) - - part3 = timeLimitText - - elseif r2.TimeLimitsCB[activityInst.TimeLimit] ~= nil then - part3 = string.lower(r2.TimeLimitsCB[activityInst.TimeLimit]) - end - - return part1..part2..part3 -end - -function r2:getElementName(elementInst) - - if elementInst:isKindOf("ActivityStep") then - return r2:getActivityName(elementInst) - elseif elementInst:isKindOf("ChatStep") then - return r2:getChatName(elementInst) - elseif elementInst:isKindOf("LogicEntityAction") then - return r2:getActionName(elementInst) - elseif elementInst:isKindOf("LogicEntityReaction") then - return r2:getReactionName(elementInst) - elseif elementInst:isKindOf("ChatSequence") or elementInst:isKindOf("ActivitySequence") then - return r2:getSequenceName(elementInst) - end - - return "" -end - -function r2:updateActivityChatSequence(elementUI, canceledChatStepId) - - if elementUI == nil then - elementUI = r2:getSelectedEltUI("r2ed_triggers") - end - assert(elementUI) - - local instance = r2:getInstanceFromId(elementUI.Env.elementId) - assert(instance) - - local chatSequence = r2:getInstanceFromId(tostring(instance.Chat)) - - local activityText = elementUI:find("text_list") - assert(activityText) - - local sep = elementUI:find("sep") - assert(sep) - - activityText:clear() - - if chatSequence ~= nil then - local counterTime = 0 - - if chatSequence.Components.Size > 0 then - - local emptyText = true - - activityText:addColoredTextChild("\n"..tostring(i18n.get("uiR2EdSequenceStart")), 255, 175, 135, 255) - - for c = 0, chatSequence.Components.Size - 1 do - local chat = chatSequence.Components[c] - - if chat.InstanceId ~= canceledChatStepId then - counterTime = counterTime + tonumber(chat.Time) - - local firstLine = true - - local who = tostring(chat.Actions[0].Who) - if who ~= "" then - - local facing = tostring(chat.Actions[0].Facing) - local emote = chat.Actions[0].Emote - local says = chat.Actions[0].Says - - local minNb, secNb = r2:calculMinSec(counterTime) - local countInfo = "*" - if minNb ~= 0 then - countInfo = countInfo..tostring(minNb)..tostring(i18n.get("uiR2EdShortMinutes")) - end - countInfo = countInfo.." "..tostring(secNb)..tostring(i18n.get("uiR2EdShortSeconds"))..":" - - if facing ~= "" then - facing = r2:getInstanceFromId(who).Name .. " "..tostring(i18n.get("uiR2EdFaces")).." " .. r2:getInstanceFromId(facing).Name - if firstLine then - activityText:addColoredTextChild(countInfo, 220, 140, 100, 255) - firstLine = false - end - activityText:addTextChild(ucstring(facing)) - emptyText = false - end - if r2.fromEmoteIdToName[emote] ~= nil then - emote = r2:getInstanceFromId(who).Name .. " "..string.lower(tostring(i18n.get("uiR2EdEmote"))).." : " .. r2.fromEmoteIdToName[emote] - if firstLine then - activityText:addColoredTextChild(countInfo, 220, 140, 100, 255) - firstLine = false - end - activityText:addTextChild(ucstring(emote)) - emptyText = false - end - if r2:getInstanceFromId(says)~=nil and r2:getInstanceFromId(says).Text ~= "" then - says = r2:getInstanceFromId(who).Name .. " "..tostring(i18n.get("uiR2EdSays")).." : " .. r2:getInstanceFromId(says).Text - if firstLine then - activityText:addColoredTextChild(countInfo, 220, 140, 100, 255) - firstLine = false - end - activityText:addTextChild(ucstring(says)) - emptyText = false - end - end - end - end - - if emptyText == true then - activityText:clear() - sep.active = false - else - sep.active = true - - local hourNb, minNb, secNb = r2:calculHourMinSec(counterTime) - local totalChatTime = "" - if hourNb ~= 0 then - totalChatTime = tostring(hourNb)..tostring(i18n.get("uiR2EdShortHours")) - end - if minNb ~= 0 then - totalChatTime = totalChatTime.." "..tostring(minNb)..tostring(i18n.get("uiR2EdShortMinutes")) - end - totalChatTime = totalChatTime.." "..tostring(secNb)..tostring(i18n.get("uiR2EdShortSeconds")) - activityText:addColoredTextChild(tostring(i18n.get("uiR2EdSequenceEnd")).." (".. totalChatTime ..")\n", 255, 175, 135, 255) - end - end - else - sep.active = false - end - - --update title - r2:buildActivityTitle(elementUI, false) - - if r2:getSelectedEltInstId("r2ed_triggers") == instance.InstanceId then - local eltEditor = r2:getSelectedSequ("r2ed_triggers"):find("edit_element") - assert(eltEditor) - r2:updateActivityEditor() - end - - r2:updateMiniActivityView() -end - -function r2:updateActivitiesWhithThisChatSequence(chatStep, canceled) - - local chatSequenceId = chatStep.Parent.Parent.InstanceId - - local chatStepId = nil - if canceled == true then chatStepId = chatStep.InstanceId end - - local triggersUI = getUI("ui:interface:r2ed_triggers") - assert(triggersUI) - - local tab = triggersUI:find("sequence_tabs") - assert(tab) - - for s = 0,tab.tabButtonNb-1 do - local activitySequence = tab:getGroup(s) - assert(activitySequence) - - local activityList = activitySequence:find("elements_list") - assert(activityList) - - for a=0, activityList.childrenNb-1 do - local activity = activityList:getChild(a) - assert(activity) - - if activity.Env.elementId~=nil then - local activityInst = r2:getInstanceFromId(activity.Env.elementId) - assert(activityInst) - if tostring(activityInst.Chat) == chatSequenceId then - r2:updateActivityChatSequence(activity, chatStepId) - end - end - end - end -end - ------------------- REMOVE ACTIVITY ------------------------------------------------------------------ -function r2:removeActivity() - r2:removeTriggerElement("r2ed_triggers", tostring(i18n.get("uiR2EdActivity"))) -end - -function r2:removeActivityUI(sequenceUI, elementUI) - - r2:removeElementUI(sequenceUI, "r2ed_triggers", elementUI) - r2:closeActivitySequenceUI() - - local activityList = sequenceUI:find("elements_list") - assert(activityList) -end - ------------------- UP ACTIVITY ----------------------------------------------------------------------- -function r2:upActivity() - r2:upTriggerElement("r2ed_triggers") -end - ------------------- DOWN ACTIVITY --------------------------------------------------------------------- -function r2:downActivity() - r2:downTriggerElement("r2ed_triggers") -end - ------------------- MAXIMIZE MINIMIZE ACTIVITIES ------------------------------------------------------ -function r2:maximizeMinimizeActivities() - r2:maximizeMinimizeTriggerElements("r2ed_triggers") -end - ------------------- MAXIMIZE MINIMIZE ACTIVITY ------------------------------------------------------ -function r2:maximizeMinimizeActivity() - r2:maximizeMinimizeElement("r2ed_triggers") -end - ------------------- OPEN ACTIVITY EDITOR ---------------------------------------------------------------- -function r2:openActivityEditor() - r2:updateActivityEditor() - r2:openElementEditor("r2ed_triggers", "uiR2EDActivityStepEditor") -end - -function r2:updateActivityEditor() - - local uiName = "r2ed_triggers" - local instanceActivity = r2:getSelectedEltInst(uiName) - - local activityEditor = r2:getSelectedSequ(uiName):find("edit_element") - assert(activityEditor) - - -- activity name - local activityName = activityEditor:find("name") - assert(activityName) - - -- activity type - local activityButtonText = activityEditor:find("activity"):find("text") - assert(activityButtonText) - - -- time limit - local comboBox = activityEditor:find("time_limit").combo_box - assert(comboBox) - - -- chat sequence - local chatMenuButton = activityEditor:find("chat_script"):find("menu"):find("text") - assert(chatMenuButton) - - local chatButtonEditor = activityEditor:find("open_chat_sequence") - assert(chatButtonEditor) - - if instanceActivity then - - local index = r2:searchElementIndex(instanceActivity) - if index~= nil then - activityName.uc_hardtext = tostring(i18n.get("uiR2EdActivity")).." "..index.." : " - else - activityName.uc_hardtext = tostring(i18n.get("uiR2EdActivity")).." : " - end - - -- activity type - local activityText = r2.activityTypeMenu[instanceActivity.Activity] - if activityText then - activityButtonText.uc_hardtext = activityText - end - if instanceActivity.ActivityZoneId ~= "" then - local place = r2:getInstanceFromId(instanceActivity.ActivityZoneId) - assert(place) - - activityButtonText.uc_hardtext = activityButtonText.hardtext .. " " .. place.Name - end - - -- time limit - local timeLimit = instanceActivity.TimeLimit - - local certainTime = activityEditor:find("certain_time") - assert(certainTime) - - comboBox.Env.locked = true - if timeLimit == "Few Sec" then - local timeLimitValue = tonumber(instanceActivity.TimeLimitValue) - - if timeLimitValue ~= nil then - - local hoursNb, minNb, secNb = r2:calculHourMinSec(timeLimitValue) - - local timeLimitText = tostring(i18n.get("uiR2EdFor")) .. " " - if hoursNb ~= 0 then timeLimitText = timeLimitText .. hoursNb .. tostring(i18n.get("uiR2EdShortHours")) .. " " end - if minNb ~= 0 then timeLimitText = timeLimitText .. minNb .. tostring(i18n.get("uiR2EdShortMinutes")) .. " " end - timeLimitText = timeLimitText .. secNb .. tostring(i18n.get("uiR2EdShortSeconds")) - - certainTime.active = true - local hoursMenu = certainTime:find("hours"):find("text") - assert(hoursMenu) - hoursMenu.uc_hardtext = tostring(hoursNb) - - local minutesMenu = certainTime:find("minutes"):find("text") - assert(minutesMenu) - minutesMenu.uc_hardtext = tostring(minNb) - - local secondsMenu = certainTime:find("seconds"):find("text") - assert(secondsMenu) - secondsMenu.uc_hardtext = tostring(secNb) - - comboBox.view_text = timeLimitText - end - else - certainTime.active = false - timeLimit = r2.TimeLimitsCB[timeLimit] - if timeLimit~= nil then - comboBox.selection_text = timeLimit - end - end - comboBox.Env.locked = false - - -- chat sequence TEMP TEMP TEMP TEMP - local sequenceChat = r2:getInstanceFromId(tostring(instanceActivity.Chat)) - local repeatLabelButton = activityEditor:find("repeat") - assert(repeatLabelButton) - - if sequenceChat ~= nil then - --chatMenuButton.uc_hardtext = sequenceChat.Name - chatMenuButton.uc_hardtext = r2:getSequenceName(sequenceChat) - - repeatLabelButton.active = true - local repeatButton = repeatLabelButton:find("toggle_butt") - assert(repeatButton) - repeatButton.pushed = not (instanceActivity.Type == "Repeating") - - chatButtonEditor.active = true - else - repeatLabelButton.active = false - chatMenuButton.uc_hardtext = i18n.get("uiR2EdNoElt") - - chatButtonEditor.active = false - end - -- TEMP TEMP TEMP - - else - - local name = tostring(i18n.get("uiR2EdActivity")).." : " - activityName.uc_hardtext = name - - activityButtonText.uc_hardtext = i18n.get("uiR2EdStandStill") - comboBox.selection_text = i18n.get("uiR2EdNoTimeLimit") - chatMenuButton.uc_hardtext = i18n.get("uiR2EdNoElt") - - chatButtonEditor.active = false - end -end - ------------------- REPEAT ACTIVITY SEQUENCE ------------------------------------------------------------- -function r2:repeatActivitySequence() - r2.requestNewAction(i18n.get("uiR2EDRepeatActivitySequenceAction")) - - local sequenceInstId = r2:getSelectedSequInstId("r2ed_triggers") - assert(sequenceInstId) - - local sequenceType = not getUICaller().pushed - if sequenceType==false then sequenceType=0 else sequenceType=1 end - - r2.requestSetNode(sequenceInstId, "Repeating", sequenceType) -end - ------------------- CLOSE ACTIVITY EDITOR ---------------------------------------------------------------- -function r2:closeChatSequencesUI() - - local window = getUI("ui:interface:r2ed_chat_sequence") - assert(window) - window.active = false - - window = getUI("ui:interface:r2ed_edit_chat_sequence") - assert(window) - window.active = false -end - ------------------- OPEN ACTIVITY MENU ------------------------------------------------------------------- -function r2:openActivityMenu() - - local menuName = "ui:interface:r2ed_triggers_menu" - local activityMenu = getUI(menuName) - local activityMenu = activityMenu:getRootMenu() - assert(activityMenu) - activityMenu:reset() - - -- Inactive --- activityMenu:addLine(ucstring(i18n.get("uiR2EdInactive")), "lua", "r2:setActivity('Inactive')", "Inactive") - - -- Stand still - activityMenu:addLine(ucstring(i18n.get("uiR2EdStandStill")), "lua", "r2:setActivity('Stand Still')", "Stand Still") - - -- Follow route - activityMenu:addLine(ucstring(i18n.get("uiR2EdFollowRoad")), "", "", "Follow Route") - local menuButton = createGroupInstance("r2_menu_button", "", { bitmap = "r2ed_icon_road.tga", size="14" }) - activityMenu:setUserGroupLeft(1, menuButton) - activityMenu:addSubMenu(1) - local roadsMenu = activityMenu:getSubMenu(1) - local roadsTable = r2.Scenario:getAllInstancesByType("Road") - for key, road in pairs(roadsTable) do - roadsMenu:addLine(ucstring(road.Name), "lua", "r2:setActivity('Follow Route', '".. road.InstanceId .."')", road.InstanceId) - end - if table.getn(roadsTable) == 0 then - roadsMenu:addLine(ucstring(i18n.get("uiR2EdNoSelelection")), "lua", "r2:setActivity()", "") - end - - -- Patrol - activityMenu:addLine(ucstring(i18n.get("uiR2EdPatrol")), "", "", "Patrol") - menuButton = createGroupInstance("r2_menu_button", "", { bitmap = "r2ed_icon_road.tga", size="14"}) - activityMenu:setUserGroupLeft(2, menuButton) - activityMenu:addSubMenu(2) - roadsMenu = activityMenu:getSubMenu(2) - for key, road in pairs(roadsTable) do - roadsMenu:addLine(ucstring(road.Name), "lua", "r2:setActivity('Patrol', '".. road.InstanceId .."')", road.InstanceId) - end - if table.getn(roadsTable) == 0 then - roadsMenu:addLine(ucstring(i18n.get("uiR2EdNoSelelection")), "lua", "r2:setActivity()", "") - end - - -- Repeat Road - activityMenu:addLine(ucstring(i18n.get("uiR2EdRepeatRoad")), "", "", "Repeat Road") - menuButton = createGroupInstance("r2_menu_button", "", { bitmap = "r2ed_icon_road.tga", size="14"}) - activityMenu:setUserGroupLeft(3, menuButton) - activityMenu:addSubMenu(3) - roadsMenu = activityMenu:getSubMenu(3) - for key, road in pairs(roadsTable) do - roadsMenu:addLine(ucstring(road.Name), "lua", "r2:setActivity('Repeat Road', '".. road.InstanceId .."')", road.InstanceId) - end - if table.getn(roadsTable) == 0 then - roadsMenu:addLine(ucstring(i18n.get("uiR2EdNoSelelection")), "lua", "r2:setActivity()", "") - end - - -- Wander - activityMenu:addLine(ucstring(i18n.get("uiR2EdWander")), "", "", "Wander") - menuButton = createGroupInstance("r2_menu_button", "", { bitmap = "r2ed_icon_region.tga", size="14"}) - activityMenu:setUserGroupLeft(4, menuButton) - activityMenu:addSubMenu(4) - local regionsMenu = activityMenu:getSubMenu(4) - local regionsTable = r2.Scenario:getAllInstancesByType("Region") - for key, region in pairs(regionsTable) do - regionsMenu:addLine(ucstring(region.Name), "lua", "r2:setActivity('Wander', '".. region.InstanceId .."')", region.InstanceId) - end - if table.getn(regionsTable) == 0 then - regionsMenu:addLine(ucstring(i18n.get("uiR2EdNoSelelection")), "lua", "r2:setActivity()", "") - end - - -- Deploy --- activityMenu:addLine(ucstring(i18n.get("uiR2EdDeploy")), "", "", "Deploy") --- menuButton = createGroupInstance("r2_menu_button", "", { bitmap = "r2ed_icon_region.tga", size="14"}) --- activityMenu:setUserGroupLeft(6, menuButton) --- activityMenu:addSubMenu(6) --- local regionsMenu = activityMenu:getSubMenu(6) --- local regionsTable = r2.Scenario:getAllInstancesByType("Region") --- for key, region in pairs(regionsTable) do --- regionsMenu:addLine(ucstring(region.Name), "lua", "r2:setActivity('Deploy', '".. region.InstanceId .."')", region.InstanceId) --- end --- if table.getn(regionsTable) == 0 then --- regionsMenu:addLine(ucstring(i18n.get("uiR2EdNoSelelection")), "lua", "r2:setActivity()", "") --- end - - r2:openTriggersMenu(getUICaller()) -end - -function r2:setActivity(activityType, placeId) - - - - local activityInstId = r2:getSelectedEltInstId("r2ed_triggers") - assert(activityInstId) - - if activityType == nil then - return - elseif placeId == nil then - r2.requestSetNode(activityInstId, "Activity", activityType) - r2.requestSetNode(activityInstId, "ActivityZoneId", r2.RefId("")) - else - r2.requestSetNode(activityInstId, "Activity", activityType) - r2.requestSetNode(activityInstId, "ActivityZoneId", r2.RefId(placeId)) - end -end - ------------------- SET TIME LIMIT -------------------------------------------------------------------- -function r2:setTimeLimit(timeLimit) - - if timeLimit == nil then - timeLimit = getUICaller().selection_text - if getUICaller().Env.locked then return end - end - - local uiName = "r2ed_triggers" - local activity = r2:getSelectedEltUI(uiName) - if activity == nil then return end - - local viewText - local hasTimeLimitValue = false - - if timeLimit == tostring(i18n.get("uiR2EdForCertainTime")) then - hasTimeLimitValue = true - viewText = tostring(i18n.get("uiR2EdFor")) .. " 20" .. tostring(i18n.get("uiR2EdShortSeconds")) - - local eltEditor = r2:getSelectedSequ(uiName):find("edit_element") - assert(eltEditor) - local comboTime = eltEditor:find("time_limit"):find("combo_box") - assert(comboTime) - comboTime.view_text = viewText - else - viewText = timeLimit - end - - timeLimit = r2.TimeLimitsProp[timeLimit] - - local activityInstId = r2:getSelectedEltInstId(uiName) - r2.requestSetNode(activityInstId, "TimeLimit", timeLimit) - - if hasTimeLimitValue then - r2.requestSetNode(activityInstId, "TimeLimitValue", tostring(20)) - else - r2.requestSetNode(activityInstId, "TimeLimitValue", "") - end -end - -function r2:calculHourMinSec(totalSecNb) - - local minSecNb, hourNb = totalSecNb, 0 - while minSecNb > 3599 do - hourNb = hourNb+1 - minSecNb = minSecNb - 3600 - end - - local minNb, secNb = 0, minSecNb - while secNb > 59 do - minNb = minNb+1 - secNb = secNb - 60 - end - - return hourNb, minNb, secNb -end - -function r2:calculMinSec(totalSecNb) - - local minNb, secNb = 0, totalSecNb - while secNb > 59 do - minNb = minNb+1 - secNb = secNb - 60 - end - - return minNb, secNb -end - -function r2:activityForHours(hourNb) - - local activityInst = r2:getSelectedEltInst("r2ed_triggers") - assert(activityInst) - - local lastHourNb, minNb, secNb = r2:calculHourMinSec(tonumber(activityInst.TimeLimitValue)) - - r2:setLimitTimeValue(hourNb, minNb, secNb) -end - -function r2:activityForMinutes(minNb) - - local activityInst = r2:getSelectedEltInst("r2ed_triggers") - assert(activityInst) - - local hoursNb, lastMinNb, secNb = r2:calculHourMinSec(tonumber(activityInst.TimeLimitValue)) - - r2:setLimitTimeValue(hoursNb, minNb, secNb) -end - -function r2:activityForSeconds(secNb) - - local activityInst = r2:getSelectedEltInst("r2ed_triggers") - assert(activityInst) - - local hoursNb, minNb, lastSecNb = r2:calculHourMinSec(tonumber(activityInst.TimeLimitValue)) - - r2:setLimitTimeValue(hoursNb, minNb, secNb) -end - ------------------- SET LIMIT TIME VALUE ------------------------------------------------------------------- -function r2:setLimitTimeValue(hourNb, minNb, secNb) - - local totalSec = tostring(hourNb*3600 + minNb*60 + secNb) - r2.requestSetNode(r2:getSelectedEltInstId("r2ed_triggers"), "TimeLimitValue", totalSec) -end - - ------------------- OPEN SELECT CHAT MENU ------------------------------------------------------------------- -function r2:openSelectChatMenu() - - -- triggers menu initialization - local chatMenu = getUI("ui:interface:r2ed_triggers_menu") - assert(chatMenu) - - local chatMenu = chatMenu:getRootMenu() - assert(chatMenu) - - chatMenu:reset() - - -- first line "None" - chatMenu:addLine(ucstring(i18n.get("uiR2EdNoElt")), "lua", "r2:selectChatSequence('None')", "None") - - -- second line "More" - chatMenu:addLine(ucstring(i18n.get("uiR2EdMore")), "lua", "r2:openChatSequences()", "More") - - local entityInst = r2:getSelectedInstance() - assert(entityInst) - - -- list of avoidable chat sequences - local chatSequences = entityInst:getBehavior().ChatSequences - for i=0, chatSequences.Size-1 do - local chatS = chatSequences[i] - assert(chatS) - --chatMenu:addLine(ucstring(chatS.Name), "lua", "r2:selectChatSequence('" .. chatS.InstanceId .. "')", chatS.InstanceId) - chatMenu:addLine(ucstring(r2:getSequenceName(chatS)), "lua", "r2:selectChatSequence('" .. chatS.InstanceId .. "')", chatS.InstanceId) - end - - r2:openTriggersMenu(getUICaller()) -end - -function r2:openChatSequences() - local chatSequencesUI = getUI("ui:interface:r2ed_chat_sequence") - assert(chatSequencesUI) - - chatSequencesUI.active = true - chatSequencesUI:updateCoords() - - if chatSequencesUI.Env.openFirst == nil then - chatSequencesUI:center() - chatSequencesUI.Env.openFirst = true - end -end - ------------------------------------------------------------------------------------------------------------ --- the commun "logic entity" menu is open -function r2:openTriggersMenu(caller) - - local menuName = "ui:interface:r2ed_triggers_menu" - launchContextMenuInGame(menuName) - local menu = getUI(menuName) - - menu:updateCoords() - menu.y = caller.y_real - (menu.h + 2) - menu.x = caller.x_real - menu:setMinW(caller.w) - menu:updateCoords() -end - ------------------- SELECT CHAT SEQUENCE ------------------------------------------------------------- -function r2:selectChatSequence(choice, activityId) - - local chatSequenceUI = getUI("ui:interface:r2ed_chat_sequence") - assert(chatSequenceUI) - - local uiName = "r2ed_triggers" - - if activityId == nil then - activityId = r2:getSelectedEltInstId(uiName) - end - - local activityUI = r2:getSelectedEltUI(uiName) - assert(activityUI) - - if choice == "None" then - r2.requestSetNode(activityId, "Chat", r2.RefId("")) - local sep = activityUI:find("sep") - assert(sep) - sep.active = false - elseif choice == "More" then - r2:openChatSequences() - elseif choice then - local chatSId = choice - local activityInstId = r2:getSelectedEltInstId(uiName) - r2.requestSetNode(activityId, "Chat", r2.RefId(chatSId)) - r2.requestSetNode(activityInstId, "Type", "Non Repeating") - else - debugInfo("r2:selectChatSequence : unknown menu selection") - end -end - ------------------- REPEAT OR NOT CHAT SEQUENCE ------------------------------------------------------ -function r2:repeatChatSequence() - - local activityInstId = r2:getSelectedEltInstId("r2ed_triggers") - assert(activityInstId) - - local sequenceType = "Repeating" - if getUICaller().pushed then sequenceType = "Non Repeating" end - - r2.requestSetNode(activityInstId, "Type", sequenceType) -end - ------------------- NEW CHAT SEQUENCE ------------------------------------------------------------- -function r2:newChatsSequence(firstRequest, instanceSequence, reset) - - local chatSequencesUI = getUI("ui:interface:r2ed_chat_sequence") - assert(chatSequencesUI) - - local tab = chatSequencesUI:find("sequence_tabs") - assert(tab) - - -- limit sequences number - if firstRequest and tab.tabButtonNb == 7 then return -1 end - - if firstRequest == true then - instanceSequence = r2.newComponent("ChatSequence") - - --local name = tostring(i18n.get("uiR2EdChat"))..tab.tabButtonNb+1 - --instanceSequence.Name = name - - local npcGroup = r2:getSelectedInstance() - assert(npcGroup) - - r2.requestInsertNode(npcGroup:getBehavior().InstanceId, "ChatSequences", -1, "", instanceSequence) - - r2.ownCreatedInstances[instanceSequence.InstanceId] = true - else - - local templateParams = { - newElt="r2:newChat(true)", - newEltText=tostring(i18n.get("uiR2EdNewChat")), - eltOrderText=tostring(i18n.get("uiR2EdChatOrder")), - upElt="r2:upChat()", - downElt="r2:downChat()", - maxMinElts="r2:maximizeMinimizeChats()", - downUpColor="120 150 140 255", - colPushed = "0 255 0 255", - paramsL= "r2:selectSequenceTab('r2ed_chat_sequence', "..tostring(tab.tabButtonNb)..")" - } - - if reset == true then - r2.ownCreatedInstances[instanceSequence.InstanceId] = true - end - - local editorEltTemplate = "template_edit_chat" - local sequence = r2:newElementsSequence("r2ed_chat_sequence", templateParams, editorEltTemplate, - instanceSequence, tostring(i18n.get("uiR2EdSequChat"))) - - local chats = instanceSequence.Components - for c = 0, chats.Size - 1 do - r2:newChat(false, chats[c]) - end - - local eltEditor = sequence:find("edit_element") - assert(eltEditor) - - local editBox = eltEditor:find("edit_box_group") - assert(editBox) - - local scroll = sequence:find("edit_box_scroll_ed") - assert(scroll) - - scroll:setTarget(editBox.id) - end - - return instanceSequence.InstanceId -end - -------------------- REMOVE CHATS SEQUENCE --------------------------------------------------------- -function r2:removeChatsSequence() - - -- remove sequence - r2:removeElementsSequence("r2ed_chat_sequence", "ChatSequences", tostring(i18n.get("uiR2EdSequChat"))) -end - -function r2:removeChatsSequenceUI(sequIndex) - - r2:closeChatEditor() - - -- remove sequence UI - r2:removeElementsSequenceUI(sequIndex, "r2ed_chat_sequence", "ChatSequences", tostring(i18n.get("uiR2EdSequChat"))) -end - -------------------- SELECT CHAT ------------------------------------------------------------------- -function r2:selectChat() - r2:selectTriggerElement(nil, "r2ed_chat_sequence") - - if getUICaller().pushed == true then - r2:updateChatEditor() - end -end - -------------------- OPEN CHAT EDITOR -------------------------------------------------------------- -function r2:openChatEditor() - r2:updateChatEditor() - r2:openElementEditor("r2ed_chat_sequence", "uiR2EDChatStepEditor") -end - -function r2:updateChatEditor() - - local instanceChat = r2:getSelectedEltInst("r2ed_chat_sequence") - - local chatEditor = r2:getSelectedSequ("r2ed_chat_sequence"):find("edit_element") - assert(chatEditor) - - -- chat name - local chatName = chatEditor:find("name") - assert(chatName) - - -- time - local minutesText = chatEditor:find("minutes"):find("text") - assert(minutesText) - - local secondsText = chatEditor:find("seconds"):find("text") - assert(secondsText) - - -- update NPC name lists - local whoMenuText = chatEditor:find("whoMenu"):find("text") - assert(whoMenuText) - - local toWhoMenuText = chatEditor:find("toWhoMenu"):find("text") - assert(toWhoMenuText) - - local editBox = chatEditor:find("says"):find("edit_box_group") - assert(editBox) - - local emoteButtonText = chatEditor:find("emote"):find("menu"):find("text") - assert(emoteButtonText) - - if instanceChat then - - local index = r2:searchElementIndex(instanceChat) - if index~= nil then - chatName.uc_hardtext = tostring(i18n.get("uiR2EdChat")).." "..index.." : " - else - chatName.uc_hardtext = tostring(i18n.get("uiR2EdChat")).." : " - end - - -- after value - local time = instanceChat.Time - local minNb, secNb = r2:calculMinSec(time) - - minutesText.uc_hardtext = tostring(minNb) - secondsText.uc_hardtext = tostring(secNb) - - -- who - local whoInst = r2:getInstanceFromId(tostring(instanceChat.Actions[0].Who)) - whoMenuText.uc_hardtext = whoInst.Name - - -- says what - local textID = instanceChat.Actions[0].Says - if textID ~= "" then - editBox.uc_input_string = r2:getInstanceFromId(textID).Text - else - editBox.uc_input_string = "" - end - - -- to who - local toWhoInst = r2:getInstanceFromId(tostring(instanceChat.Actions[0].Facing)) - if toWhoInst then - toWhoMenuText.uc_hardtext = toWhoInst.Name - else - toWhoMenuText.uc_hardtext = tostring(i18n.get("uiR2EdNobody")) - end - - -- emote - local emoteName = r2.fromEmoteIdToName[instanceChat.Actions[0].Emote] - if emoteName then - emoteButtonText.uc_hardtext = emoteName - else - emoteButtonText.uc_hardtext = tostring(i18n.get("uiR2EdNoElt")) - end - - else - - local name = tostring(i18n.get("uiR2EdChat")).." : " - chatName.uc_hardtext = name - - minutesText.uc_hardtext = tostring(0) - secondsText.uc_hardtext = tostring(0) - - whoMenuText.uc_hardtext = "" - - editBox.uc_input_string = "" - - toWhoMenuText.uc_hardtext = tostring(i18n.get("uiR2EdNobody")) - - emoteButtonText.uc_hardtext = tostring(i18n.get("uiR2EdNoElt")) - end -end - ------------------- OPEN CHAT SEQUENCE EDITOR -------------------------------------------------- -function r2:openChatSequenceEditor() - - local editor = getUI("ui:interface:r2ed_edit_chat_sequence") - assert(editor) - - local chatsUI = getUI("ui:interface:r2ed_chat_sequence") - assert(chatsUI) - - editor.x = chatsUI.x - editor.y = chatsUI.y - editor.active = true -end - -------------------- MAX / MIN CHAT ---------------------------------------------------------------- -function r2:maximizeMinimizeChat() - r2:maximizeMinimizeElement("r2ed_chat_sequence") -end - --------------------- NEW CHAT --------------------------------------------------------------------- -function r2:newChat(firstRequest, instanceElement, sequenceUI) - - local uiName = "r2ed_chat_sequence" - - if firstRequest == true then - instanceElement = r2.newComponent("ChatStep") - - instanceElement.Time = 3 - - local who - local selectedInst = r2:getSelectedInstance() - assert(selectedInst) - - if selectedInst:isGrouped() then - who = r2:getLeader(selectedInst) - else - who = selectedInst - end - local chatAction = r2.newComponent("ChatAction") - chatAction.Who = who.InstanceId - table.insert(instanceElement.Actions, chatAction) - - local sequenceInstId = r2:getSelectedSequInstId(uiName) - - r2.requestInsertNode(sequenceInstId, "Components", -1, "", instanceElement) - - r2.ownCreatedInstances[instanceElement.InstanceId] = true - else - - local templateParams = { - selectElt="r2:selectChat()", - openEltEditor="r2:openChatEditor()", - maxMinElt="r2:maximizeMinimizeChat()", - removeElt="r2:removeChat()", - colOver="120 150 140 100", - colPushed="120 150 140 255" - } - - if sequenceUI == nil then - sequenceUI = r2:getSelectedSequ(uiName) - end - local element = r2:newTriggerElement(uiName, tostring(i18n.get("uiR2EdChat")), templateParams, sequenceUI, instanceElement.InstanceId) - - r2:updateChatText(element) - end -end - -function r2:searchElementIndex(eltInst) - - local components = eltInst.Parent - local index - for i=0, components.Size-1 do - local elt = components[i] - if elt.InstanceId == eltInst.InstanceId then - return (i+1) - end - end -end - -function r2:buildChatTitle(chatUI, erase) - - local chatInst = r2:getInstanceFromId(chatUI.Env.elementId) - assert(chatInst) - - -- part1 - local index = r2:searchElementIndex(chatInst) - if erase==true then index = index-1 end - local part1 = tostring(i18n.get("uiR2EdChat")).." "..index.." : " - - -- part2 - local minNb, secNb = r2:calculMinSec(chatInst.Time) - local time = "" - if minNb ~= 0 then - time = tostring(minNb)..tostring(i18n.get("uiR2EdShortMinutes")) - end - time = time.." " ..tostring(secNb)..tostring(i18n.get("uiR2EdShortSeconds")) - local part2 = "(" ..tostring(i18n.get("uiR2EdAfter")).." ".. time..") " - - -- part3 - local part3 = "" - local action = chatInst.Actions[0] - local who = action.Who - if who ~= "" then - who = r2:getInstanceFromId(who) - assert(who) - part3 = who.Name .. " " ..tostring(i18n.get("uiR2EdSays")).. " " - - local says = action.Says - if says ~= "" then - says = r2:getInstanceFromId(says).Text - says = string.substr(says, 0, 4) - end - - part3 = part3 .. says .. "..." - end - - -- title - local title = chatUI:find("title") - assert(title) - title.uc_hardtext= part1..part2..part3 -end - -function r2:getChatName(chatInst) - - -- part1 - local index = r2:searchElementIndex(chatInst) - if erase==true then index = index-1 end - local part1 = tostring(i18n.get("uiR2EdChat")).." "..index.." : " - - -- part2 - local minNb, secNb = r2:calculMinSec(chatInst.Time) - local time = "" - if minNb ~= 0 then - time = tostring(minNb)..tostring(i18n.get("uiR2EdShortMinutes")) - end - time = time.." " ..tostring(secNb)..tostring(i18n.get("uiR2EdShortSeconds")) - local part2 = "(" ..tostring(i18n.get("uiR2EdAfter")).." ".. time..") " - - -- part3 - local part3 = "" - local action = chatInst.Actions[0] - local who = action.Who - if who ~= "" then - who = r2:getInstanceFromId(who) - assert(who) - part3 = who.Name .. " " ..tostring(i18n.get("uiR2EdSays")).. " " - - local says = action.Says - if says ~= "" then - says = r2:getInstanceFromId(says).Text - says = string.sub(says, 1, 4) - end - - part3 = part3 .. says .. "..." - end - - return part1..part2..part3 - -end - -function r2:updateChatText(elementUI) - - if elementUI == nil then - elementUI = r2:getSelectedEltUI("r2ed_chat_sequence") - end - assert(elementUI) - - local instance = r2:getInstanceFromId(elementUI.Env.elementId) - assert(instance) - - local chatText = elementUI:find("text_list") - assert(chatText) - - chatText:clear() - - local who = tostring(instance.Actions[0].Who) - if who ~= "" then - - local text = "" - local textEmpty = true - - local facing = tostring(instance.Actions[0].Facing) - local emote = instance.Actions[0].Emote - local says = instance.Actions[0].Says - - if facing ~= "" then - text = "\n"..r2:getInstanceFromId(who).Name .." "..tostring(i18n.get("uiR2EdFaces")).." ".. r2:getInstanceFromId(facing).Name - textEmpty = false - end - if r2.fromEmoteIdToName[emote] ~= nil then - text = text .. "\n" .. r2:getInstanceFromId(who).Name .. " "..string.lower(tostring(i18n.get("uiR2EdEmote"))).." : " .. r2.fromEmoteIdToName[emote] - textEmpty = false - end - if r2:getInstanceFromId(says)~=nil and r2:getInstanceFromId(says).Text ~= "" then - text = text.."\n"..r2:getInstanceFromId(who).Name .. " "..tostring(i18n.get("uiR2EdSays")).." : " .. r2:getInstanceFromId(says).Text - textEmpty = false - end - text = text.."\n" - - chatText:addTextChild(ucstring(text)) - - local sep = elementUI:find("sep") - assert(sep) - if textEmpty == false then - sep.active = true - else - chatText:clear() - sep.active = false - end - end - - r2:buildChatTitle(elementUI, false) - - local chatEditor = r2:getSelectedSequ("r2ed_chat_sequence"):find("edit_element") - assert(chatEditor) - - if instance.InstanceId == r2:getSelectedEltInstId("r2ed_chat_sequence") then - r2:updateChatEditor() - end - - r2:updateActivitiesWhithThisChatSequence(instance, false) -end - - --------------------- UP CHAT ---------------------------------------------------------------------- -function r2:upChat() - r2:upTriggerElement("r2ed_chat_sequence") -end - --------------------- DOWN CHAT -------------------------------------------------------------------- -function r2:downChat() - r2:downTriggerElement("r2ed_chat_sequence") -end - --------------------- MAX / MIN CHATS -------------------------------------------------------------- -function r2:maximizeMinimizeChats() - r2:maximizeMinimizeTriggerElements("r2ed_chat_sequence") -end - --------------------- REMOVE CHAT ------------------------------------------------------------------ -function r2:removeChat() - r2:removeTriggerElement("r2ed_chat_sequence", tostring(i18n.get("uiR2EdChat"))) -end - --------------------- CHAT TIME -------------------------------------------------------------------- -function r2:setTime(minNb, secNb) - - local chatSequenceId = r2:getSelectedEltInstId("r2ed_chat_sequence") - - r2.requestSetNode(chatSequenceId, "Time", minNb*60+secNb) -end - --------------------- INIT TIME MENU ----------------------------------------------------------------- -function r2:initTimeMenu(timeFunction, isHours) - - local timeMenu = getUI("ui:interface:r2ed_triggers_menu") - assert(timeMenu) - - local timeMenu = timeMenu:getRootMenu() - assert(timeMenu) - - timeMenu:reset() - - for i=0,9 do - timeMenu:addLine(ucstring(tostring(i)), "lua", timeFunction .. "(" .. tostring(i) .. ")", tostring(i)) - end - - if isHours == true then - timeMenu:addLine(ucstring(tostring(10)), "lua", timeFunction .. "(" .. tostring(10) .. ")", tostring(10)) - else - - local lineNb = 9 - for i=10, 50, 10 do - local lineStr = tostring(i).."/"..tostring(i+9) - timeMenu:addLine(ucstring(lineStr), "", "", tostring(i)) - lineNb = lineNb+1 - - timeMenu:addSubMenu(lineNb) - local subMenu = timeMenu:getSubMenu(lineNb) - - for s=0,9 do - lineStr = tostring(i+s) - subMenu:addLine(ucstring(lineStr), "lua", timeFunction .. "(" .. tostring(i+s) .. ")", lineStr) - end - end - end - - r2:openTriggersMenu(getUICaller()) -end - --------------------- CHAT SECONDS ----------------------------------------------------------------- -function r2:chatAfterSeconds(secNb) - - local chatStepInst = r2:getSelectedEltInst("r2ed_chat_sequence") - - local lastTime = chatStepInst.Time - - local minNb = 0 - while lastTime > 59 do - lastTime = lastTime - 60 - minNb = minNb + 1 - end - - r2:setTime(minNb, secNb) - - -- recover "says what" (equiv change focus) - local chatEditor = r2:getSelectedSequ("r2ed_chat_sequence"):find("edit_element") - assert(chatEditor) - - local saysWhat = chatEditor:find("says"):find("edit_box_group").input_string - if chatStepInst.Actions[0].Says ~= r2.registerText(saysWhat).InstanceId then - r2:setSaysWhat(saysWhat) - end -end - --------------------- CHAT MINUTES ----------------------------------------------------------------- -function r2:chatAfterMinutes(minNb) - - local chatStepInst = r2:getSelectedEltInst("r2ed_chat_sequence") - - local lastTime = chatStepInst.Time - - local secNb = lastTime - while secNb > 59 do - secNb = secNb - 60 - end - - r2:setTime(minNb, secNb) - - -- recover "says what" (equiv change focus) - local chatEditor = r2:getSelectedSequ("r2ed_chat_sequence"):find("edit_element") - assert(chatEditor) - - local saysWhat = chatEditor:find("says"):find("edit_box_group").input_string - if chatStepInst.Actions[0].Says ~= r2.registerText(saysWhat).InstanceId then - r2:setSaysWhat(saysWhat) - end -end - --------------------- WHO -------------------------------------------------------------------------- -function r2:setWho(who, chatStepInst) - - if chatStepInst == nil then - chatStepInst = r2:getSelectedEltInst("r2ed_chat_sequence") - end - assert(chatStepInst) - - r2.requestSetNode(chatStepInst.Actions[0].InstanceId, "Who", r2.RefId(who)) - - if who == chatStepInst.Actions[0].Facing then - r2:setToWho(tostring(i18n.get("uiR2EdNobody"))) - end - - -- recover "says what" (equiv change focus) - local chatEditor = r2:getSelectedSequ("r2ed_chat_sequence"):find("edit_element") - assert(chatEditor) - - local saysWhat = chatEditor:find("says"):find("edit_box_group").input_string - if chatStepInst.Actions[0].Says ~= r2.registerText(saysWhat).InstanceId then - r2:setSaysWhat(saysWhat) - end -end - -function r2:openWhoMenu(whoFunction, towho) - - local menuName = "ui:interface:r2ed_triggers_menu" - - local whoMenu = getUI(menuName) - local whoMenu = whoMenu:getRootMenu() - assert(whoMenu) - - whoMenu:reset() - - local npcTable = r2.Scenario:getAllInstancesByType("Npc") - - if towho == true then - whoMenu:addLine(ucstring(i18n.get("uiR2EdNobody")), "lua", whoFunction.."('" ..tostring(i18n.get("uiR2EdNobody")).. "')", "Nobody") - end - - for key, npc in npcTable do - local addLine = true - if not npc:isBotObject() and not npc:isPlant() and not r2.isCreature(npc.InstanceId) then - if towho == true then - local chatStepInst= r2:getSelectedEltInst("r2ed_chat_sequence") - assert(chatStepInst) - - local whoId = chatStepInst.Actions[0].Who - if whoId~="" and whoId == npc.InstanceId then - addLine = false - end - end - if addLine then - whoMenu:addLine(ucstring(npc.Name), "lua", whoFunction.."('" ..npc.InstanceId.. "')", npc.InstanceId) - end - end - end - - r2:openTriggersMenu(getUICaller()) -end - --------------------- SAYS WHAT -------------------------------------------------------------------- -function r2:setSaysWhat(what) - - if what == nil then - what = getUICaller().input_string - end - - local says = what - - local chatStep = r2:getSelectedEltInst("r2ed_chat_sequence") - if chatStep ~= nil then - if what ~= "" then - what=r2.registerText(what).InstanceId - end - r2.requestSetNode(chatStep.Actions[0].InstanceId, "Says", what) - - local chatStepUI = r2:getSelectedEltUI("r2ed_chat_sequence") - assert(chatStepUI) - end -end - --------------------- CLOSE CHAT EDITOR ------------------------------------------------------------ -function r2:closeChatEditor(chatEditor) - - if chatEditor == nil then - chatEditor = r2:getSelectedSequ("r2ed_chat_sequence"):find("edit_element") - end - assert(chatEditor) - - local editSaysWhat = chatEditor:find("says"):find("edit_box_group") - assert(editSaysWhat) - - if r2.callSetSaysWhat == true then - r2:setSaysWhat(editSaysWhat.input_string) - end -end - --------------------- TO WHO ----------------------------------------------------------------------- -function r2:setToWho(toWho) - - local chatSequence = r2:getSelectedEltInst("r2ed_chat_sequence") - assert(chatSequence) - - local chatEditor = r2:getSelectedSequ("r2ed_chat_sequence"):find("edit_element") - assert(chatEditor) - - -- recover "says what" (equiv change focus) - local saysWhat = chatEditor:find("says"):find("edit_box_group").input_string - if chatSequence.Actions[0].Says ~= r2.registerText(saysWhat).InstanceId then - r2:setSaysWhat(saysWhat) - end - - if toWho == tostring(i18n.get("uiR2EdNobody")) then toWho="" end - - r2.requestSetNode(chatSequence.Actions[0].InstanceId, "Facing", r2.RefId(toWho)) -end - --------------------- EMOTE ------------------------------------------------------------------------ -function r2:openEmoteMenu() - - local menuName = "ui:interface:r2ed_triggers_menu" - - local emoteMenu = getUI(menuName) - local emoteMenu = emoteMenu:getRootMenu() - assert(emoteMenu) - - emoteMenu:reset() - initEmotesMenu(menuName, "r2:setEmote") - r2:openTriggersMenu(getUICaller()) -end - -function r2:setEmote(emoteId) - - local chatSequence = r2:getSelectedEltInst("r2ed_chat_sequence") - assert(chatSequence) - - r2.requestSetNode(chatSequence.Actions[0].InstanceId, "Emote", emoteId) - - -- recover "says what" (equiv change focus) - local chatEditor = r2:getSelectedSequ("r2ed_chat_sequence"):find("edit_element") - assert(chatEditor) - - local saysWhat = chatEditor:find("says"):find("edit_box_group").input_string - if chatSequence.Actions[0].Says ~= r2.registerText(saysWhat).InstanceId then - r2:setSaysWhat(saysWhat) - end -end - ------------------- SELECT CHAT SEQUENCE --------------------------------------------------------- -function r2:selectChatsSequence(index) - r2:selectElementsSequence("r2ed_chat_sequence", index) - r2:updateMiniActivityView() -end - ---------------------------------------------------------------------------------------------------- ------------------------------- FACTORISATION ---------------------------------------------------- ---------------------------------------------------------------------------------------------------- - ------------------------------- Remove element --------------------------------------------------- -function r2:removeTriggerElement(uiName, elementName) - - local wndUI = getUI("ui:interface:"..uiName) - assert(wndUI) - - local tab = wndUI:find("sequence_tabs") - assert(tab) - - local sequenceUI = wndUI:find(tab.associatedGroupSelection) - assert(sequenceUI) - - r2:removeElement(sequenceUI, uiName, elementName) -end - ------------------------------------------------------------------------------------------------------ -function r2:removeElement(sequence, uiName, elementName, removedElement) - - local listElements = sequence:find("elements_list") - assert(listElements) - - local toErasedInstId - if removedElement == nil then - toErasedInstId = r2:getSelectedEltInstId(uiName) - else - toErasedInstId = removedElement.Env.elementId - end - assert(toErasedInstId) - - -- request erase node - if toErasedInstId ~= nil and r2:getInstanceFromId(toErasedInstId) ~= nil then - r2.requestEraseNode(toErasedInstId, "", -1) - end -end - -function r2:removeElementUI(sequence, uiName, removedElement) - - local listElements = sequence:find("elements_list") - assert(listElements) - - -- update follow elements number - local removedIndex = listElements:getElementIndex(removedElement) - for i = removedIndex+1, (listElements.childrenNb-1) do - local element = listElements:getChild(i) - assert(element) - - if not element.Env.isEditor then - r2:buildElementTitle(uiName, element, true) - end - end - - -- delete element and update coordinates of elements list - if removedElement == r2:getSelectedEltUI(uiName) then - r2:setSelectedEltUIId(uiName, nil) - - -- inactive element editor - local eltEditor = listElements:find("edit_element") - assert(eltEditor) - eltEditor.active = false - - -- disactive up and down element buttons - local upElement = sequence:find("up_element") - assert(upElement) - local downElement = sequence:find("down_element") - assert(downElement) - local elementOrder = sequence:find("element_order") - assert(elementOrder) - - upElement.active = false - downElement.active = false - elementOrder.active = false - end - listElements.Env.elementsNb = listElements.Env.elementsNb - 1 - - listElements:delChild(removedElement) - listElements.parent:invalidateCoords() - - -- if any activity in list, disactive global minimize / maximize button - if listElements.childrenNb == 1 then - local minElts = sequence:find("minimize_elements") - assert(minElts) - - local maxElts = sequence:find("maximize_elements") - assert(maxElts) - - minElts.active = false - maxElts.active = false - end -end - ------------------------------- Max / Min elements ----------------------------------------------- -function r2:maximizeMinimizeTriggerElements(uiName) - - local sequence = r2:getSelectedSequ(uiName) - assert(sequence) - - r2:maximizeMinimizeElements(sequence, uiName) -end - ------------------------------- Max / Min elements ----------------------------------------------- -function r2:maximizeMinimizeElements(sequence, uiName) - - local elements = sequence:find("elements_list") - assert(elements) - - if elements.Env.minimize == nil then - elements.Env.minimize = true - end - - elements.Env.minimize = not elements.Env.minimize - - for i = 0, elements.childrenNb-1 do - local element = elements:getChild(i) - assert(element) - - if element.Env.isEditor ~= true then - r2:maximizeMinimizeElement(uiName, element, elements.Env.minimize) - end - end - - local minElts = sequence:find("minimize_elements") - assert(minElts) - local maxElts = sequence:find("maximize_elements") - assert(maxElts) - - if elements.Env.minimize == true then - minElts.active = false - maxElts.active = true - else - minElts.active = true - maxElts.active = false - end -end - ------------------------------- Max / Min element ------------------------------------------------ -function r2:maximizeMinimizeElement(uiName, element, allMinimize) - - if element == nil then - element = getUICaller().parent.parent.parent.parent.parent.parent - end - assert(element) - - local eltText = element:find("element_text") - assert(eltText) - - local allMin, allMax = true, true - if allMinimize ~= nil then - allMin = allMinimize - allMax = not allMin - end - - local maxButton = element:find("maximize_element") - assert(maxButton) - local minButton = element:find("minimize_element") - assert(minButton) - - -- maximize - if allMax and eltText.active==false then - eltText.active = true - maxButton.active = false - minButton.active = true - - -- minimize - elseif allMin and eltText.active==true then - eltText.active = false - maxButton.active = true - minButton.active = false - end -end - ------------------------------------- Down element -------------------------------------------------- -function r2:downTriggerElement(uiName) - - local eltSequenceUI = getUI("ui:interface:"..uiName) - assert(eltSequenceUI) - - local tab = eltSequenceUI:find("sequence_tabs") - assert(tab) - - local sequence = eltSequenceUI:find(tab.associatedGroupSelection) - assert(sequence) - - local listElements = sequence:find("elements_list") - assert(listElements) - - local selectedElement = r2:getSelectedEltUI(uiName) - local index = listElements:getElementIndex(selectedElement) - - local sequenceId = r2:getSelectedSequInstId(uiName) - if index < r2:getInstanceFromId(sequenceId).Components.Size-1 then - r2.requestMoveNode(sequenceId, "Components", index+1, - sequenceId, "Components", index) - end -end - ------------------------------------- Down or up element UI ------------------------------------------ - -function r2:downUpElement(elementUI, uiName) - - local listElements = elementUI.parent - assert(listElements) - - local eltEditor = listElements:find("edit_element") - assert(eltEditor) - - local index = listElements:getElementIndex(elementUI) - - if index > 0 then - local previousElement = listElements:getChild(index - 1) - - local editorBetweenBothElts = false - if previousElement.Env.elementId==nil then - previousElement = listElements:getChild(index - 2) - editorBetweenBothElts = true - end - - listElements:upChild(elementUI) - if editorBetweenBothElts==true then - listElements:upChild(elementUI) - end - - local selectedEltUI = r2:getSelectedEltUI(uiName) - if selectedEltUI~=nil then - local selectedEltIndex = listElements:getElementIndex(selectedEltUI) - local eltEditorIndex = listElements:getElementIndex(eltEditor) - if eltEditorIndex~=selectedEltIndex+1 then - if eltEditorIndex0 then - local sequenceId = r2:getSelectedSequInstId(uiName) - r2.requestMoveNode(sequenceId, "Components", index, - sequenceId, "Components", index-1) - end -end - ---------------------------------------------------------------------------------------------------- -function r2:selectTriggerElement(sequenceUI, uiName, selectedButtonElt) - - if sequenceUI == nil then - sequenceUI = r2:getSelectedSequ(uiName) - end - r2:selectElement(sequenceUI, uiName, true, selectedButtonElt) -end - ---------------------------------------------------------------------------------------------------- -function r2:closeElementEditor(uiName) - - if uiName == "r2ed_chat_sequence" then - r2:closeChatEditor(getUICaller()) - end - - local sequenceUI = r2:getSelectedSequ(uiName) - assert(sequenceUI) - - local selectedEltUI = r2:getSelectedEltUI(uiName) - assert(selectedEltUI) - - local selectedEltButton = selectedEltUI:find("select") - assert(selectedEltButton) - - selectedEltButton.pushed = false - - r2:selectElement(sequenceUI, uiName, false, selectedEltButton) -end - ----------------- SELECT ELEMENT ------------------------------------------------------------------- -function r2:selectElement(sequence, uiName, eltOrder, selectedButtonElt) - - local upElement = sequence:find("up_element") - assert(upElement) - local downElement = sequence:find("down_element") - assert(downElement) - local orderElt = sequence:find("element_order") - - if selectedButtonElt == nil then - selectedButtonElt = getUICaller() - end - - -- new selected element - if selectedButtonElt.pushed == true then - - if r2:getSelectedEltUIId(uiName) then - - local lastSelectedElement = r2:getSelectedEltUI(uiName) - assert(lastSelectedElement) - - local lastEltsList = lastSelectedElement.parent - local editElt = lastEltsList:find("edit_element") - assert(editElt) - - if r2:getSelectedEltUIId(uiName) == selectedButtonElt.parent.parent.parent.id then - return - end - - lastSelectedElement.active = true - lastSelectedElement:find("select").pushed = false - - editElt.active = false - end - - r2:setSelectedEltUIId(uiName, selectedButtonElt.parent.parent.parent.id) - - local selectedElement = selectedButtonElt.parent.parent.parent - assert(selectedElement) - - if eltOrder then - upElement.active = true - downElement.active = true - orderElt.active = true - end - - -- update element editor position in list - local eltsList = sequence:find("elements_list") - assert(eltsList) - local editElt = eltsList:find("edit_element") - assert(editElt) - - local indexSelectedElt = eltsList:getElementIndex(selectedElement) - local indexEltEditor = eltsList:getElementIndex(editElt) - - if indexEltEditor=0) and (sequencesTab.tabButtonNb > index) then - sequencesTab.selection = tonumber(index) - - local repeatButton = eltsWnd:find("repeat_group"):find("repeat"):find("toggle_butt") - assert(repeatButton) - - local sequenceUI = sequencesTab:getGroup(index) - assert(sequenceUI) - local sequenceInstId = sequenceUI.Env.sequenceId - - if sequenceInstId and r2:getInstanceFromId(sequenceInstId) then - local sequenceInst = r2:getInstanceFromId(sequenceInstId) - repeatButton.pushed = (sequenceInst.Repeating == 0) - end - end -end - - ----------------------------------------- Open element editor -------------------------------------- -function r2:openElementEditor(uiName, title, baseWindowName) - - local elementEditor = r2:getSelectedSequ(uiName):find("edit_element") - assert(elementEditor) - - local selectedElement = r2:getSelectedEltUI(uiName) - assert(selectedElement) - - elementEditor.active = true - selectedElement.active = false -end - ------------------------------------ Remove elements sequence -------------------------------------- -function r2:removeElementsSequence(uiName, elementsTable, sequName) - - local eltSequenceUI = getUI("ui:interface:"..uiName) - assert(eltSequenceUI) - - local tab = eltSequenceUI:find("sequence_tabs") - assert(tab) - - local activeLogicEntity = r2:getSelectedInstance() - assert(activeLogicEntity) - local activitySequences = activeLogicEntity:getBehavior()[elementsTable] - - --local seq = sequName - - --for i=tab.selection+1,(tab.tabButtonNb-1) do - -- local buttonTab = tab:find("tab"..i) - -- assert(buttonTab) - - -- if activitySequences[i].Name == seq..(i+1) then - -- local newText = seq..(i) - -- r2.requestSetNode(activitySequences[i].InstanceId, "Name", newText) - -- end - --end - - local sequenceId = r2:getSelectedSequInstId(uiName) - -- request erase node - r2.requestEraseNode(sequenceId, "", -1) - - return sequenceId -end - -function r2:removeElementsSequenceUI(tabIndex, uiName, elementsTable, sequName) - - local wndUI = getUI("ui:interface:"..uiName) - assert(wndUI) - - local tab = wndUI:find("sequence_tabs") - assert(tab) - - local activeLogicEntity = r2:getSelectedInstance() - assert(activeLogicEntity) - local activitySequences = activeLogicEntity:getBehavior()[elementsTable] - - for i=tabIndex+1,(tab.tabButtonNb-1) do - local buttonTab = tab:find("tab"..i) - assert(buttonTab) - - buttonTab.params_l = "r2:selectSequenceTab('"..uiName.."', "..tostring(i-1)..")" - - if buttonTab.hardtext == sequName..(i+1) then - buttonTab.uc_hardtext = sequName..i - end - end - - -- recover name of the future "first sequence" - local firstEltName - local indexName - if tab.tabButtonNb > 1 then - if tabIndex==0 then - indexName = 1 - else - indexName = 0 - end - --if activitySequences[indexName].Name==sequName..(indexName+1) then - if r2:getSequenceName(activitySequences[indexName])==sequName..(indexName+1) then - firstEltName = sequName.."1" - else - --firstEltName = activitySequences[indexName].Name - firstEltName = r2:getSequenceName(activitySequences[indexName]) - end - else - firstEltName = tostring(i18n.get("uiR2EDSequences")) - end - - local selectedElt = r2:getSelectedEltUI(uiName) - if selectedElt and selectedElt.parent.parent.parent.id == r2:getSelectedSequ(uiName).id then - r2:setSelectedEltUIId(uiName, nil) - end - - tab:removeTab(tabIndex) - - if tab.tabButtonNb == 0 then - r2:cleanSequenceEditor(wndUI) - end - - return firstEltName -end - -function r2:cleanSequenceEditor(eltSequenceUI) - - local sepTop = eltSequenceUI:find("sep_top") - assert(sepTop) - - local sepBottom = eltSequenceUI:find("sep_bottom") - assert(sepBottom) - - local sepLeft = eltSequenceUI:find("sep_left") - assert(sepLeft) - - local sepRight = eltSequenceUI:find("sep_right") - assert(sepRight) - - local removeSequence = eltSequenceUI:find("remove_sequence_button") - assert(removeSequence) - - local editSequence = eltSequenceUI:find("edit_sequence") - assert(editSequence) - - sepTop.active = false - sepBottom.active = false - sepLeft.active= false - sepRight.active= false - removeSequence.active = false - editSequence.active = false - - local repeatButtonGr = eltSequenceUI:find("repeat_group") - repeatButtonGr.active = false -end - ------------------- new elements sequence ------------------------------------------------------------- -function r2:newElementsSequence(uiName, templateParams, editorEltTemplate, instance, sequName) - - local eltSequenceUI = getUI("ui:interface:"..uiName) - assert(eltSequenceUI) - - local menu = eltSequenceUI:find("sequence_menu") - assert(menu) - - local tab = menu:find("sequence_tabs") - assert(tab) - - local newTabNb = tab.tabButtonNb+1 - local posParent, posRef, id, hardText, group - if newTabNb == 1 then - posParent = "parent" - posRef = "TL TL" - else - posParent = "tab"..(newTabNb-2) - posRef = "TR TL" - end - - id = "tab"..(newTabNb-1) - local group = "sequence"..r2.sequencesNb - - r2.sequencesNb = r2.sequencesNb + 1 - - local newTabGroup = createUIElement("sequence_elements_template", menu.id, {id=group, - new_elt=templateParams.newElt, new_elt_text=templateParams.newEltText, - elt_order_text=templateParams.eltOrderText, up_elt=templateParams.upElt, - down_elt=templateParams.downElt, max_min_elts=templateParams.maxMinElts, - down_up_color=templateParams.downUpColor}) - assert(newTabGroup) - - menu:addGroup(newTabGroup) - - newTabGroup.Env.sequenceId = instance.InstanceId - - local tabName - if instance.Name~= "" then - tabName = instance.Name - else - local comps = instance.Parent - for i=0, comps.Size-1 do - if comps[i].InstanceId == instance.InstanceId then - tabName = sequName..(i+1) - break - end - end - end - - local newTab = createUIElement("sequence_tab_template", tab.id, - {id=id, posparent=posParent, posref=posRef, hardtext=tabName, group=group, - col_pushed =templateParams.colPushed, params_l=templateParams.paramsL}) - assert(newTab) - - tab:addTab(newTab) - - if r2.ownCreatedInstances[instance.InstanceId] == true then - tab.selection = tab.tabButtonNb-1 - r2.ownCreatedInstances[instance.InstanceId] = nil - - --local repeatButton = eltSequenceUI:find("repeat_group"):find("repeat"):find("toggle_butt") - --assert(repeatButton) - --repeatButton.pushed = (instance.Repeating == 0) - - r2:selectElementsSequence(uiName, tab.tabButtonNb-1) - end - - if tab.tabButtonNb == 1 then - local sepTop = menu:find("sep_top") - assert(sepTop) - - local sepBottom = menu:find("sep_bottom") - assert(sepBottom) - - local sepLeft = menu:find("sep_left") - assert(sepLeft) - - local sepRight = menu:find("sep_right") - assert(sepRight) - - local removeSequence = eltSequenceUI:find("remove_sequence_button") - assert(removeSequence) - - local editSequence = eltSequenceUI:find("edit_sequence") - assert(editSequence) - - sepTop.active = true - sepBottom.active = true - sepLeft.active= true - sepRight.active= true - removeSequence.active = true - editSequence.active = true - - if uiName == "r2ed_triggers" then --TEMP TEMP TEMP - local repeatButtonGr = eltSequenceUI:find("repeat_group") - repeatButtonGr.active = true - end --TEMP TEMP TEMP - end - - local listElements = newTabGroup:find("elements_list") - assert(listElements) - listElements.Env.elementsCount = nil - - -- add element editor in list - local newEditorElt = createGroupInstance(editorEltTemplate, listElements.id, {id="edit_element", active="false"}) - assert(newEditorElt) - listElements:addChild(newEditorElt) - listElements.parent:updateCoords() - - newEditorElt.Env.isEditor = true - - newEditorElt.active = false - - return newTabGroup -end - ----------------------------- new element -------------------------------------------------------------- -function r2:newTriggerElement(uiName, elementName, templateParams, sequenceUI, instanceId) - - if sequenceUI == nil then - eltSequenceUI = getUI("ui:interface:"..uiName) - assert(eltSequenceUI) - - local tab = eltSequenceUI:find("sequence_tabs") - assert(tab) - - local sequenceUI = eltSequenceUI:find(tab.associatedGroupSelection) - end - assert(sequenceUI) - - local newElement = r2:newElement(sequenceUI, elementName, templateParams, true) - - newElement.Env.elementId = instanceId - - if r2.ownCreatedInstances[instanceId] == true then - newElement:find("select").pushed = true - r2:selectTriggerElement(sequenceUI, uiName, newElement:find("select")) - r2.ownCreatedInstances[instanceId] = nil - - if uiName == "r2ed_triggers" then - r2:updateActivityEditor() - elseif uiName == "r2ed_chat_sequence" then - r2:updateChatEditor() - end - end - - r2:maximizeMinimizeElement(uiName, newElement) - - return newElement -end - ----------------------------- new base element -------------------------------------------------------------- -function r2:newElement(sequence, elementName, templateParams, eltOrder) - - local listElements = sequence:find("elements_list") - assert(listElements) - - -- counter for element group id - if listElements.Env.elementsCount == nil then - listElements.Env.elementsCount = 0 - listElements.Env.elementsNb = 1 - else - listElements.Env.elementsCount = listElements.Env.elementsCount+1 - listElements.Env.elementsNb = listElements.Env.elementsNb+1 - end - - local elementId = "elt"..listElements.Env.elementsCount - - local hardText = elementName.." "..listElements.Env.elementsNb.." : " - - -- create new element - local newElement = createGroupInstance("element_template", listElements.id, - {id=elementId, posref="TL TL", x="0", y="0", sizeref="w", hardtext=hardText, - select_elt=templateParams.selectElt, open_elt_editor=templateParams.openEltEditor, - max_min_elt=templateParams.maxMinElt, remove_elt=templateParams.removeElt, open_chat=templateParams.openChat, - col_over=templateParams.colOver, col_pushed=templateParams.colPushed}) - - -- add element to list - listElements:addChild(newElement) - listElements.parent:updateCoords() - - -- active global minimize / maximize button - if listElements.childrenNb == 2 then - local maxElts = sequence:find("maximize_elements") - assert(maxElts) - maxElts.active = true - - if eltOrder then - - local elementOrder = sequence:find("element_order") - assert(elementOrder) - elementOrder.active=true - end - end - - -- scroll goes down to new element - local sequenceContent = newElement.parent.parent.parent - assert(sequenceContent) - - local scrollBar = sequenceContent:find("scroll_objects") - assert(scrollBar) - scrollBar.trackPos = 0 - - -- target sroll text - local scroll = newElement:find("scroll_bar_text") - assert(scroll) - - local scrollText = newElement:find("scroll_text_gr") - assert(scrollText) - scroll:setTarget(scrollText.id) - - return newElement -end - ------------------- OPEN SEQUENCE EDITOR -------------------------------------------------- -function r2:openSequenceEditor(uiName, editorName) - - local editor = getUI("ui:interface:"..editorName) - assert(editor) - - local eltsUI = getUI("ui:interface:"..uiName) - assert(eltsUI) - - editor.x = eltsUI.x - editor.y = eltsUI.y - editor.active = true - - -- update edit box text with current sequence name - local editName = editor:find("sequence_name"):find("edit_box_group") - assert(editName) - - local tab = eltsUI:find("sequence_tabs") - assert(tab) - - local buttonTab = tab:find("tab"..tab.selection) - assert(buttonTab) - - editName.uc_input_string = buttonTab.uc_hardtext -end - ------------------- SET SEQUENCE NAME ----------------------------------------------------- -function r2:setSequenceName(uiName, editorName) - - local editor = getUI("ui:interface:"..editorName) - assert(editor) - - local editName = editor:find("sequence_name"):find("edit_box_group") - assert(editName) - - local name = editName.input_string - - local sequenceInstId = r2:getSelectedSequInstId(uiName) - r2.requestSetNode(sequenceInstId, "Name", name) -end - -function r2:updateSequenceName(uiName, instance) - - --local name = instance.Name - local name = r2:getSequenceName(instance) - local sequInstId = instance.InstanceId - - local eltsUI = getUI("ui:interface:"..uiName) - assert(eltsUI) - - local tab = eltsUI:find("sequence_tabs") - assert(tab) - - local tabId - for i=0, tab.tabButtonNb-1 do - local sequenceUI = tab:getGroup(i) - if sequenceUI.Env.sequenceId == sequInstId then - tabId = i - break - end - end - - local buttonTab = tab:find("tab"..tabId) - assert(buttonTab) - - buttonTab.uc_hardtext = name - - if uiName == "r2ed_triggers" then - r2:updateSequencesButtonBar(tabId, name) - end -end - -function r2:updateSequenceRepeatingOption(uiName, instance) - - local sequenceUI = r2:getSelectedSequ(uiName) - - if sequenceUI.Env.sequenceId == instance.InstanceId then - - local eltsUI = getUI("ui:interface:"..uiName) - local repeatButton = eltsUI:find("repeat_group"):find("repeat"):find("toggle_butt") - repeatButton.pushed = (instance.Repeating == 0) - end -end - - --------------------------------------------------------------------------------------------------- --------------------------- ACTIVE LOGIC ENTITY DisplayerProperties ----------------------------------------- --------------------------------------------------------------------------------------------------- - -local activeLogicEntityPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function activeLogicEntityPropertySheetDisplayerTable:onPostCreate(instance) -end ------------------------------------------------- -function activeLogicEntityPropertySheetDisplayerTable:onErase(instance) -end ------------------------------------------------- -function activeLogicEntityPropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function activeLogicEntityPropertySheetDisplayerTable:onPostHrcMove(instance) -end ------------------------------------------------- -function activeLogicEntityPropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -r2.activitiesAndChatsUIUpdate = false -function activeLogicEntityPropertySheetDisplayerTable:onSelect(instance, isSelected) - - r2:logicEntityPropertySheetDisplayer():onSelect(instance, isSelected) - - local triggersUI = getUI("ui:interface:r2ed_triggers") - assert(triggersUI) - - if not isSelected then - triggersUI.active = false - r2:closeMiniActivityView() - r2:closeChatSequencesUI() - - r2:cleanActivitiesAndChatsUI() - r2:cleanLogicEntityUI() - else - r2.activitiesAndChatsUIUpdate = false - end -end - -r2.callSetSaysWhat = true ------------------------------------------------- -function r2:cleanActivitiesAndChatsUI() - - -- update chat sequence combo box - local triggersUI = getUI("ui:interface:r2ed_triggers") - assert(triggersUI) - local chatSequencesUI = getUI("ui:interface:r2ed_chat_sequence") - assert(chatSequencesUI) - - -- remove all tabs - local sequenceMenu = triggersUI:find("sequence_menu") - assert(sequenceMenu) - - local tabActivities = triggersUI:find("sequence_tabs") - assert(tabActivities) - - for i=0, tabActivities.tabButtonNb-1 do - local groupTab = tabActivities:getGroup(i) - assert(groupTab) - sequenceMenu:delGroup(groupTab) - end - - tabActivities:removeAll() - r2:setSelectedEltUIId("r2ed_triggers", nil) - r2:cleanSequenceEditor(triggersUI) - - -- delete chat sequences - sequenceMenu = chatSequencesUI:find("sequence_menu") - assert(sequenceMenu) - - local tabChats = chatSequencesUI:find("sequence_tabs") - assert(tabChats) - - for i=0, tabChats.tabButtonNb-1 do - local groupTab = tabChats:getGroup(i) - assert(groupTab) - sequenceMenu:delGroup(groupTab) - end - - tabChats:removeAll() - r2:setSelectedEltUIId("r2ed_chat_sequence", nil) - r2:cleanSequenceEditor(chatSequencesUI) -end - -function r2:updateActivitiesAndChatsUI(instance) - - if r2.activitiesAndChatsUIUpdate==true then - return - end - - r2.activitiesAndChatsUIUpdate = true - - if r2.lastSelectedActivitySequence==nil then - - r2:cleanActivitiesAndChatsUI() - - -- update chat sequence combo box - local triggersUI = getUI("ui:interface:r2ed_triggers") - assert(triggersUI) - local chatSequencesUI = getUI("ui:interface:r2ed_chat_sequence") - assert(chatSequencesUI) - - -- remove all tabs - local tabActivities = triggersUI:find("sequence_tabs") - assert(tabActivities) - - -- delete chat sequences - local tabChats = chatSequencesUI:find("sequence_tabs") - assert(tabChats) - - - local activitySequences = instance:getBehavior().Activities - local chatSequences = instance:getBehavior().ChatSequences - - -- build sequences of selected NPC group - local uiName = "r2ed_triggers" - - for s = 0, activitySequences.Size - 1 do - local sequence = activitySequences[s] - r2:newActivitiesSequence(false, sequence, true) - end - - if tabActivities.tabButtonNb>1 then - tabActivities.selection = 0 - r2:selectElementsSequence(uiName, 0) - end - for s=0, tabActivities.tabButtonNb-1 do - local sequenceUI = tabActivities:getGroup(s) - assert(sequenceUI) - - local eltsList = sequenceUI:find("elements_list") - assert(eltsList) - if eltsList.childrenNb > 1 then - local firstElt = eltsList:getChild(1) - local selectedButton = firstElt:find("select") - selectedButton.pushed = true - - r2:selectElement(sequenceUI, uiName, true, selectedButton) - - r2:updateActivityEditor() - - break - end - end - - uiName = "r2ed_chat_sequence" - r2.callSetSaysWhat = false - for s = 0, chatSequences.Size - 1 do - local sequence = chatSequences[s] - r2:newChatsSequence(false, sequence, true) - end - r2.callSetSaysWhat = true - if tabChats.tabButtonNb>1 then - tabChats.selection = 0 - r2:selectElementsSequence(uiName, 0) - end - for s=0, tabChats.tabButtonNb-1 do - local sequenceUI = tabChats:getGroup(s) - assert(sequenceUI) - - local eltsList = sequenceUI:find("elements_list") - assert(eltsList) - if eltsList.childrenNb > 1 then - local firstElt = eltsList:getChild(1) - local selectedButton = firstElt:find("select") - r2.callSetSaysWhat = false - selectedButton.pushed = true - - r2:selectElement(sequenceUI, uiName, true, selectedButton) - - r2.callSetSaysWhat = true - - r2:updateChatEditor() - end - end - - triggersUI.uc_title = tostring(i18n.get("uiR2EDActivitySequenceEditor")) .. r2:getSelectedInstance().Name - chatSequencesUI.uc_title = tostring(i18n.get("uiR2EDChatSequenceEditor")) .. r2:getSelectedInstance().Name - end -end - ------------------------------------------------- -function activeLogicEntityPropertySheetDisplayerTable:onAttrModified(instance, attributeName) - - r2:logicEntityPropertySheetDisplayer():onAttrModified(instance, attributeName) - - if not r2.activitiesAndChatsUIUpdate or instance ~= r2:getSelectedInstance() then - return - end - - if attributeName == "Name" then - - local triggersUI = getUI("ui:interface:r2ed_triggers") - assert(triggersUI) - - local chatSequencesUI = getUI("ui:interface:r2ed_chat_sequence") - assert(chatSequencesUI) - - triggersUI.uc_title = tostring(i18n.get("uiR2EDActivitySequenceEditor")) .. instance[attributeName] - chatSequencesUI.uc_title = tostring(i18n.get("uiR2EDChatSequenceEditor")) .. instance[attributeName] - end -end - ------------------------------------------------- -function r2:activeLogicEntityPropertySheetDisplayer() - return activeLogicEntityPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - --------------------------------------------------------------------------------------------------- --------------------------- NPC GROUP DisplayerProperties ----------------------------------------- --------------------------------------------------------------------------------------------------- - -local npcGroupPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function npcGroupPropertySheetDisplayerTable:onPostCreate(instance) -end ------------------------------------------------- -function npcGroupPropertySheetDisplayerTable:onErase(instance) -end ------------------------------------------------- -function npcGroupPropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function npcGroupPropertySheetDisplayerTable:onPostHrcMove(instance) -end ------------------------------------------------- -function npcGroupPropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function npcGroupPropertySheetDisplayerTable:onSelect(instance, isSelected) - r2:activeLogicEntityPropertySheetDisplayer():onSelect(instance, isSelected) -end - ------------------------------------------------- -function npcGroupPropertySheetDisplayerTable:onAttrModified(instance, attributeName) - r2:activeLogicEntityPropertySheetDisplayer():onAttrModified(instance, attributeName) -end - ------------------------------------------------- -function r2:npcGroupPropertySheetDisplayer() - return npcGroupPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - - - - - --------------------------------------------------------------------------------------------------- --------------------------------- ACTIVITY SEQUENCE DisplayerProperties --------------------------- --------------------------------------------------------------------------------------------------- -local activitySequencePropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function activitySequencePropertySheetDisplayerTable:onPostCreate(instance) - - local activeLogicEntity = r2:getSelectedInstance() - local activeLogicEntityParent = instance.Parent.Parent.Parent - - if not r2.activitiesAndChatsUIUpdate or activeLogicEntity==nil or activeLogicEntity ~= activeLogicEntityParent then - return - end - - r2:newActivitiesSequence(false, instance, false) -end ------------------------------------------------- -function activitySequencePropertySheetDisplayerTable:onErase(instance) - - local activeLogicEntity = r2:getSelectedInstance() - local activeLogicEntityParent = instance.Parent.Parent.Parent - - if not r2.activitiesAndChatsUIUpdate or activeLogicEntity==nil or activeLogicEntity ~= activeLogicEntityParent then - return - end - - local triggersUI = getUI("ui:interface:r2ed_triggers") - assert(triggersUI) - - local sequenceTabs = triggersUI:find("sequence_tabs") - assert(sequenceTabs) - - local sequIndex - for i=0,sequenceTabs.tabButtonNb-1 do - local sequence = sequenceTabs:getGroup(i) - if sequence.Env.sequenceId == instance.InstanceId then - sequIndex = i - break - end - end - - if sequIndex~=nil then - r2:removeActivitiesSequenceUI(sequIndex) - end -end ------------------------------------------------- -function activitySequencePropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function activitySequencePropertySheetDisplayerTable:onPostHrcMove(instance) -end ------------------------------------------------- -function activitySequencePropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function activitySequencePropertySheetDisplayerTable:onSelect(instance, isSelected) -end - ------------------------------------------------- -function activitySequencePropertySheetDisplayerTable:onAttrModified(instance, attributeName) - - local activeLogicEntity = r2:getSelectedInstance() - local activeLogicEntityParent = instance.Parent.Parent.Parent - - if not r2.activitiesAndChatsUIUpdate or activeLogicEntity==nil or activeLogicEntity ~= activeLogicEntityParent then - return - end - - if attributeName == "Name" then - r2:updateSequenceName("r2ed_triggers", instance) - elseif attributeName == "Repeating" then - r2:updateSequenceRepeatingOption("r2ed_triggers", instance) - end -end - ------------------------------------------------- -function r2:activitySequencePropertySheetDisplayer() - return activitySequencePropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - --------------------------------------------------------------------------------------------------- --------------------------------- CHAT SEQUENCE DisplayerProperties --------------------------- --------------------------------------------------------------------------------------------------- -local chatSequencePropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function chatSequencePropertySheetDisplayerTable:onPostCreate(instance) - - local activeLogicEntity = r2:getSelectedInstance() - local activeLogicEntityParent = instance.Parent.Parent.Parent - - if not r2.activitiesAndChatsUIUpdate or activeLogicEntity==nil or activeLogicEntity ~= activeLogicEntityParent then - return - end - - r2:newChatsSequence(false, instance) -end ------------------------------------------------- -function chatSequencePropertySheetDisplayerTable:onErase(instance) - - local activeLogicEntity = r2:getSelectedInstance() - local activeLogicEntityParent = instance.Parent.Parent.Parent - - if not r2.activitiesAndChatsUIUpdate or activeLogicEntity==nil or activeLogicEntity ~= activeLogicEntityParent then - return - end - - local chatsUI = getUI("ui:interface:r2ed_chat_sequence") - assert(chatsUI) - - local sequenceTabs = chatsUI:find("sequence_tabs") - assert(sequenceTabs) - - local sequIndex - for i=0,sequenceTabs.tabButtonNb-1 do - local sequence = sequenceTabs:getGroup(i) - if sequence.Env.sequenceId == instance.InstanceId then - sequIndex = i - break - end - end - - if sequIndex~=nil then - r2:removeChatsSequenceUI(sequIndex) - end - - r2:updateMiniActivityView() -end ------------------------------------------------- -function chatSequencePropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function chatSequencePropertySheetDisplayerTable:onPostHrcMove(instance) -end ------------------------------------------------- -function chatSequencePropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function chatSequencePropertySheetDisplayerTable:onSelect(instance, isSelected) -end - ------------------------------------------------- -function chatSequencePropertySheetDisplayerTable:onAttrModified(instance, attributeName) - - local activeLogicEntity = r2:getSelectedInstance() - local activeLogicEntityParent = instance.Parent.Parent.Parent - - if not r2.activitiesAndChatsUIUpdate or activeLogicEntity==nil or activeLogicEntity ~= activeLogicEntityParent then - return - end - - if attributeName == "Name" then - r2:updateSequenceName("r2ed_chat_sequence", instance) - elseif attributeName == "Repeating" then - r2:updateSequenceRepeatingOption("r2ed_chat_sequence", instance) - end -end - ------------------------------------------------- -function r2:chatSequencePropertySheetDisplayer() - return chatSequencePropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - --------------------------------------------------------------------------------------------------- --------------------------------- ACTIVITY STEP DisplayerProperties-------------------------------- --------------------------------------------------------------------------------------------------- -local activityStepPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onPostCreate(instance) - - local activeLogicEntity = r2:getSelectedInstance() - local activeLogicEntityParent = instance.Parent.Parent.Parent.Parent.Parent - - if not r2.activitiesAndChatsUIUpdate or activeLogicEntity==nil or activeLogicEntity ~= activeLogicEntityParent then - return - end - - local activitySequInst = instance.Parent.Parent - - local triggersUI = getUI("ui:interface:r2ed_triggers") - assert(triggersUI) - - local sequenceTabs = triggersUI:find("sequence_tabs") - assert(sequenceTabs) - - local sequenceUI - for i=0,sequenceTabs.tabButtonNb-1 do - local sequence = sequenceTabs:getGroup(i) - if sequence.Env.sequenceId == activitySequInst.InstanceId then - sequenceUI = sequence - break - end - end - - r2:newActivity(false, nil, instance, sequenceUI) -end ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onErase(instance) - - local activeLogicEntity = r2:getSelectedInstance() - local activeLogicEntityParent = instance.Parent.Parent.Parent.Parent.Parent - - if not r2.activitiesAndChatsUIUpdate or activeLogicEntity==nil or activeLogicEntity ~= activeLogicEntityParent then - return - end - - local sequenceUI, elementUI = r2:findSequenceAndElementUIFromInstance(instance, "r2ed_triggers") - - if elementUI ~= nil then - r2:removeActivityUI(sequenceUI, elementUI) - end -end ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onPostHrcMove(instance) - - local activeLogicEntity = r2:getSelectedInstance() - local activeLogicEntityParent = instance.Parent.Parent.Parent.Parent.Parent - - if not r2.activitiesAndChatsUIUpdate or activeLogicEntity==nil or activeLogicEntity ~= activeLogicEntityParent then - return - end - - local sequenceUI, activityStepUI = r2:findSequenceAndElementUIFromInstance(instance, "r2ed_triggers") - if activityStepUI then - r2:downUpElement(activityStepUI, "r2ed_triggers") - end -end ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onSelect(instance, isSelected) -end - ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onAttrModified(instance, attributeName) - - local activeLogicEntity = r2:getSelectedInstance() - local activeLogicEntityParent = instance.Parent.Parent.Parent.Parent.Parent - - if not r2.activitiesAndChatsUIUpdate or activeLogicEntity==nil or activeLogicEntity ~= activeLogicEntityParent then - return - end - - local sequenceUI, elementUI = r2:findSequenceAndElementUIFromInstance(instance, "r2ed_triggers") - if elementUI then - r2:updateActivityChatSequence(elementUI) - end -end - ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onTargetInstanceEraseRequested(instance, refIdName, refIdIndexInArray) - - if refIdName == "ActivityZoneId" then - r2.requestSetNode(instance.InstanceId, "Activity", "Stand Still") - r2.requestSetNode(instance.InstanceId, "ActivityZoneId", r2.RefId("")) - r2.requestSetNode(instance.InstanceId, "TimeLimit", "No Limit") - r2.requestSetNode(instance.InstanceId, "TimeLimitValue", "") - elseif refIdName == "Chat" then - r2.requestSetNode(instance.InstanceId, "Chat", r2.RefId("")) - end -end ------------------------------------------------- -function activityStepPropertySheetDisplayerTable:onTargetInstanceAttrModified(instance, refIdName, refIdIndexInArray, targetAttrName, targetAttrIndexInArray) -end - -------------------------------------------------- -function r2:activityStepPropertySheetDisplayer() - return activityStepPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - - --------------------------------------------------------------------------------------------------- --------------------------------- CHAT STEP DisplayerProperties------------------------------------ --------------------------------------------------------------------------------------------------- -local chatStepPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function chatStepPropertySheetDisplayerTable:onPostCreate(instance) - - local activeLogicEntity = r2:getSelectedInstance() - local activeLogicEntityParent = instance.Parent.Parent.Parent.Parent.Parent - - if not r2.activitiesAndChatsUIUpdate or activeLogicEntity==nil or activeLogicEntity ~= activeLogicEntityParent then - return - end - - local chatSequInst = instance.Parent.Parent - - local chatsUI = getUI("ui:interface:r2ed_chat_sequence") - assert(chatsUI) - - local sequenceTabs = chatsUI:find("sequence_tabs") - assert(sequenceTabs) - - local sequenceUI - for i=0,sequenceTabs.tabButtonNb-1 do - local sequence = sequenceTabs:getGroup(i) - if sequence.Env.sequenceId == chatSequInst.InstanceId then - sequenceUI = sequence - break - end - end - - r2:newChat(false, instance, sequenceUI) -end ------------------------------------------------- -function chatStepPropertySheetDisplayerTable:onErase(instance) - - local activeLogicEntity = r2:getSelectedInstance() - local activeLogicEntityParent = instance.Parent.Parent.Parent.Parent.Parent - - if not r2.activitiesAndChatsUIUpdate or activeLogicEntity==nil or activeLogicEntity ~= activeLogicEntityParent then - return - end - - local sequenceUI, elementUI = r2:findSequenceAndElementUIFromInstance(instance, "r2ed_chat_sequence") - - if elementUI ~= nil then - local chatStepInst = r2:getInstanceFromId(elementUI.Env.elementId) - assert(chatStepInst) - r2:updateActivitiesWhithThisChatSequence(chatStepInst, true) - r2:removeElementUI(sequenceUI, "r2ed_chat_sequence", elementUI) - end -end ------------------------------------------------- -function chatStepPropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function chatStepPropertySheetDisplayerTable:onPostHrcMove(instance) - - local activeLogicEntity = r2:getSelectedInstance() - local activeLogicEntityParent = instance.Parent.Parent.Parent.Parent.Parent - - if not r2.activitiesAndChatsUIUpdate or activeLogicEntity==nil or activeLogicEntity ~= activeLogicEntityParent then - return - end - - r2:updateActivitiesWhithThisChatSequence(instance, false) - - local sequenceUI, chatStepUI = r2:findSequenceAndElementUIFromInstance(instance, "r2ed_chat_sequence") - if chatStepUI then - r2:downUpElement(chatStepUI, "r2ed_chat_sequence") - end -end ------------------------------------------------- -function chatStepPropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function chatStepPropertySheetDisplayerTable:onSelect(instance, isSelected) -end - ------------------------------------------------- -function chatStepPropertySheetDisplayerTable:onAttrModified(instance, attributeName) - - local activeLogicEntity = r2:getSelectedInstance() - local activeLogicEntityParent = instance.Parent.Parent.Parent.Parent.Parent - - if not r2.activitiesAndChatsUIUpdate or activeLogicEntity==nil or activeLogicEntity ~= activeLogicEntityParent then - return - end - - local sequenceUI, chatStepUI = r2:findSequenceAndElementUIFromInstance(instance, "r2ed_chat_sequence") - if chatStepUI then - r2:updateChatText(chatStepUI) - end -end - -function r2:findSequenceAndElementUIFromInstance(instance, uiName) - - local sequenceInst = instance.Parent.Parent - - local wndUI = getUI("ui:interface:"..uiName) - assert(wndUI) - - local sequenceTabs = wndUI:find("sequence_tabs") - assert(sequenceTabs) - - local sequenceUI - for i=0,sequenceTabs.tabButtonNb-1 do - local sequence = sequenceTabs:getGroup(i) - if sequence.Env.sequenceId == sequenceInst.InstanceId then - sequenceUI = sequence - break - end - end - - if sequenceUI ~= nil then - local eltsList = sequenceUI:find("elements_list") - assert(eltsList) - - for i=0,eltsList.childrenNb-1 do - local element = eltsList:getChild(i) - if element.Env.elementId == instance.InstanceId then - return sequenceUI, element - end - end - end -end - --------------------------------------------------- -function r2:chatStepPropertySheetDisplayer() - return chatStepPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - - --------------------------------------------------------------------------------------------------- --------------------------------- CHAT ACTION DisplayerProperties ----------------------- --------------------------------------------------------------------------------------------------- -local chatActionPropertySheetDisplayerTable = clone(r2:propertySheetDisplayer()) - ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onPostCreate(instance) -end ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onErase(instance) -end ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onPreHrcMove(instance) -end ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onPostHrcMove(instance) -end ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onFocus(instance, hasFocus) -end - ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onSelect(instance, isSelected) -end - ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onAttrModified(instance, attributeName) -end - ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onTargetInstanceEraseRequested(instance, refIdName, refIdIndexInArray) - if refIdName == "Who" then - r2.requestSetNode(instance.InstanceId, "Who", r2.RefId("")) - r2.requestSetNode(instance.InstanceId, "Says", "") - r2.requestSetNode(instance.InstanceId, "Emote", "") - r2.requestSetNode(instance.InstanceId, "Facing", r2.RefId("")) - elseif refIdName == "Facing" then - r2.requestSetNode(instance.InstanceId, "Facing", r2.RefId("")) - end -end ------------------------------------------------- -function chatActionPropertySheetDisplayerTable:onTargetInstanceAttrModified(instance, refIdName, refIdIndexInArray, targetAttrName, targetAttrIndexInArray) -end - ------------------------------------------------- -function r2:chatActionPropertySheetDisplayer() - return chatActionPropertySheetDisplayerTable -- returned shared displayer to avoid wasting memory -end - - - - - - - - - - - -r2.lastSelectedActivitySequence = nil - -r2.activityTexture = { ["Follow Route"] = "r2_mini_activity_follow_road.tga", - ["Patrol"] = "r2_mini_activity_patrol_road.tga", - ["Repeat Road"] = "r2_mini_activity_repeat_road.tga", - ["Wander"] = "r2_mini_activity_wander_zone.tga", - ["Stand Still"] = "r2_mini_activity_stand_still.tga", --- ["Inactive"] = "r2_mini_activity_inactive.tga" - } - ---------------------------------------------------------------------------------------------------------- --- Show the mini activity view for this instance -function r2:setupMiniActivityView(instance) - if instance and instance:isKindOf("ActiveLogicEntity") then - local selectedTab = 0 - if r2.lastSelectedActivitySequence then - selectedTab = r2.lastSelectedActivitySequence - end - r2:selectActivitiesSequence(selectedTab) - r2:updateSequencesButtonBar(selectedTab) - end -end - ------------------- SELECT ACTIVITY SEQUENCE --------------------------------------------------------- -function r2:selectActivitiesSequence(index) - r2:selectElementsSequence("r2ed_triggers", index) - r2:openAndUpdateMiniActivityView(index) -end - ------------------- UPDATE SEQUENCES BUTTON BAR --------------------------------------------------------- -function r2:updateSequencesButtonBar(index, sequenceName) - - local selectBar = getUI("ui:interface:r2ed_select_bar") - assert(selectBar) - - local sequencesButton = selectBar:find("sequences") - assert(sequencesButton) - - local activeLogicEntity = r2:getSelectedInstance() - if activeLogicEntity then - if sequenceName==nil and (index >=0) and (index < activeLogicEntity:getBehavior().Activities.Size) then - local activitySequence = activeLogicEntity:getBehavior().Activities[index] - assert(activitySequence) - --sequencesButton.uc_hardtext = activitySequence.Name - sequencesButton.uc_hardtext = r2:getSequenceName(activitySequence) - elseif sequenceName~= nil then - sequencesButton.uc_hardtext = sequenceName - else - sequencesButton.uc_hardtext = i18n.get("uiR2EDSequences") - end - end -end - - -function r2:newMiniActivitySequence() - return r2:newActivitiesSequence(true) -end - -function r2:openAndUpdateMiniActivityView(index) - r2:openMiniActivityView() - -- update activities list - - r2:updateMiniActivityView(index) -end - -function r2:openMiniActivityView() - local triggersUI = getUI("ui:interface:r2ed_triggers") - assert(triggersUI) - - local selectedInst = r2:getSelectedInstance() - - if selectedInst and not selectedInst:isBotObject() and not selectedInst:isPlant() and not triggersUI.active then - local miniActivityView = getUI("ui:interface:r2ed_mini_activity_view") - assert(miniActivityView) - miniActivityView.active = true - end -end - - -function r2:updateMiniActivityView(index) - - local miniActivityView = getUI("ui:interface:r2ed_mini_activity_view") - assert(miniActivityView) - - local miniActivities = miniActivityView:find("mini_activities") - assert(miniActivities) - - local noActivityLabel = miniActivityView:find("no_activity") - assert(noActivityLabel) - - local startCount = 0 - local sequence - if index~=nil then - local activities = r2:getSelectedInstance():getBehavior().Activities - if index < activities.Size then - sequence = activities[index] - end - else - sequence = r2:getSelectedSequInst("r2ed_triggers") - end - - if sequence~=nil then - - --label "No activity" - if sequence.Components.Size == 0 then - noActivityLabel.active = true - noActivityLabel.uc_hardtext = tostring(i18n.get("uiR2EdNoActivity")) - else - noActivityLabel.active = false - end - - for i=0, sequence.Components.Size-1 do - - local activityInst = sequence.Components[i] - assert(activityInst) - - if activityInst then - - local activityIndex = i - if afterEltEditor==true then activityIndex = i-1 end - - local miniActivity = miniActivities[tostring(activityIndex)] - assert(miniActivity) - - miniActivity.active = true - miniActivity.Env.id = activityIndex - - -- chat button - local chatButton = miniActivity:find("chat_sequence"):find("button") - assert(chatButton) - if tostring(activityInst.Chat) ~= "" then - local chatTexture = "r2_mini_activity_chat.tga" - chatButton.texture = chatTexture - chatButton.texture_pushed = chatTexture - chatButton.texture_over = chatTexture - else - local chatTexture = "r2_mini_activity_empty_chat.tga" - chatButton.texture = chatTexture - chatButton.texture_pushed = chatTexture - chatButton.texture_over = chatTexture - end - - -- activity type button - local activityButton = miniActivity:find("activity"):find("button") - assert(activityButton) - local activityTexture = r2.activityTexture[activityInst.Activity] - if activityTexture then - activityButton.texture = activityTexture - activityButton.texture_pushed = activityTexture - activityButton.texture_over = activityTexture - end - - -- activity type text - local activityText = miniActivity:find("activity_name") - assert(activityText) - activityText.uc_hardtext = activityInst.Activity - end - end - startCount = sequence.Components.Size - else - noActivityLabel.active = true - noActivityLabel.uc_hardtext = tostring(i18n.get("uiR2EdNoSequence")) - end - - -- hide remaining mini activity templates - for i=startCount, r2.maxActivities-1 do - local miniActivity = miniActivities[tostring(i)] - assert(miniActivity) - miniActivity.active = false - end -end - - -function r2:closeMiniActivityView() - local miniActivityView = getUI("ui:interface:r2ed_mini_activity_view") - assert(miniActivityView) - miniActivityView.active = false -end - -function r2:openActivitiesSequence() - - r2:updateActivitiesAndChatsUI(r2:getSelectedInstance()) - - local triggersUI = getUI("ui:interface:r2ed_triggers") - assert(triggersUI) - - triggersUI.active = true - triggersUI:updateCoords() - - if triggersUI.Env.openFirst == nil then - triggersUI:center() - triggersUI.Env.openFirst = true - end - - r2:closeMiniActivityView() -end - - -function r2:chooseOrOpenSelectedChatSequence() - - r2:updateActivitiesAndChatsUI(r2:getSelectedInstance()) - - -- init menu - local menuName = "ui:interface:r2ed_chat_sequences_menu" - launchContextMenuInGame(menuName) - local menu = getUI(menuName) - - local rootMenu = menu:getRootMenu() - assert(rootMenu) - rootMenu:reset() - - -- update menu - local miniActivity = getUICaller().parent.parent.parent - assert(miniActivity) - - local miniActivityNb = tonumber(miniActivity.Env.id) - local activitySequence = r2:getSelectedSequInst("r2ed_triggers") - assert(activitySequence) - local activityInst = activitySequence.Components[miniActivityNb] - - local chatSequenceId = tostring(activityInst.Chat) - - local newLine = 3 - --title "Chat sequence" - local chatSequence - if chatSequenceId ~= "" then - chatSequence = r2:getInstanceFromId(chatSequenceId) - assert(chatSequence) - --rootMenu:addLine(ucstring(tostring(i18n.get("uiR2EDChatSequence")).." " .. chatSequence.Name .." : "), "lua", "", "Title") - rootMenu:addLine(ucstring(tostring(i18n.get("uiR2EDChatSequence")).." " .. r2:getSequenceName(chatSequence) .." : "), "lua", "", "Title") - else - rootMenu:addLine(ucstring(tostring(i18n.get("uiR2EDChatSequence")).." : "), "lua", "", "Title") - end - - rootMenu:addSeparator() - - -- "Open chat sequence" - if chatSequenceId ~= "" then - --rootMenu:addLine(ucstring(tostring(i18n.get("uiR2EDOpen")).." "..chatSequence.Name), "lua", "r2:openMiniActivityChatSequence("..tostring(miniActivityNb)..")", "Open") - rootMenu:addLine(ucstring(tostring(i18n.get("uiR2EDOpen")).." "..r2:getSequenceName(chatSequence)), "lua", "r2:openMiniActivityChatSequence("..tostring(miniActivityNb)..")", "Open") - newLine = newLine + 1 - end - - -- "Any chat sequence" - rootMenu:addLine(ucstring(i18n.get("uiR2EdNoChat")), "lua", "r2:setSequenceChatToMiniActivity("..tostring(miniActivityNb)..")", "None") - - - -- "new chat sequence" - rootMenu:addLine(ucstring(tostring(i18n.get("uiR2EdNewChat")).."..."), "lua", "r2:newChatsSequenceAndSelect("..tostring(miniActivityNb)..")", "None") - local menuButton = createGroupInstance("r2_menu_button", "", { bitmap = "r2_icon_create.tga", size="14" }) - rootMenu:setUserGroupLeft(newLine, menuButton) - - rootMenu:addSeparator() - - local activeLogicEntity = r2:getSelectedInstance() - assert(activeLogicEntity) - - for i=0, activeLogicEntity:getBehavior().ChatSequences.Size-1 do - local sequence = activeLogicEntity:getBehavior().ChatSequences[i] - assert(sequence) - - --rootMenu:addLine(ucstring(sequence.Name), "lua", "r2:setSequenceChatToMiniActivity("..tostring(miniActivityNb)..", " .. tostring(i)..")", sequence.InstanceId) - rootMenu:addLine(ucstring(r2:getSequenceName(sequence)), "lua", "r2:setSequenceChatToMiniActivity("..tostring(miniActivityNb)..", " .. tostring(i)..")", sequence.InstanceId) - end - - -- display menu - menu:updateCoords() - local ref = getUICaller() - menu.y = ref.y_real - (menu.h - ref.h_real) - menu.x = ref.x_real - menu:updateCoords() -end - -function r2:openMiniActivityChatSequence(miniActivityNb, chatSequenceId) - - local activitySequence = r2:getSelectedSequInst("r2ed_triggers") - assert(activitySequence) - local activityInst = activitySequence.Components[miniActivityNb] - - if chatSequenceId == nil then - chatSequenceId = tostring(activityInst.Chat) - end - - r2:openChatSequence(chatSequenceId) -end - -function r2:openChatSequence(chatSequenceId) - - if chatSequenceId == nil then - chatSequenceId = r2:getSelectedEltInst("r2ed_triggers").Chat - end - - local chatSequences = getUI("ui:interface:r2ed_chat_sequence") - assert(chatSequences) - - local tab = chatSequences:find("sequence_tabs") - assert(tab) - - local selectedTab - local sequenceUI - for i=0, tab.tabButtonNb-1 do - sequence = tab:getGroup(i) - assert(sequence) - if sequence.Env.sequenceId == chatSequenceId then - sequenceUI = sequence - selectedTab = i - break - end - end - - if selectedTab then - tab.selection = selectedTab - - local repeatButton = chatSequences:find("repeat_group"):find("repeat"):find("toggle_butt") - assert(repeatButton) - - local sequenceInstId = sequenceUI.Env.sequenceId - local sequenceInst = r2:getInstanceFromId(sequenceInstId) - - repeatButton.pushed = (sequenceInst.Repeating == 0) - end - - r2:openChatSequences() -end - -function r2:newChatsSequenceAndSelect(miniActivityNb) - local chatSequenceId = r2:newChatsSequence(true) - - if chatSequenceName ~= -1 then - r2:setSequenceChatToMiniActivity(miniActivityNb, -1, chatSequenceId) - r2:openMiniActivityChatSequence(miniActivityNb, chatSequenceId) - end -end - -function r2:setSequenceChatToMiniActivity(miniActivityNb, sequenceNb, chatSequenceId) - - local miniActivityView = getUI("ui:interface:r2ed_mini_activity_view") - assert(miniActivityView) - - local miniActivities = miniActivityView:find("mini_activities") - assert(miniActivities) - - local miniActivity = miniActivities[tostring(miniActivityNb)] - assert(miniActivity) - - local activitySequence = r2:getSelectedSequInst("r2ed_triggers") - assert(activitySequence) - local activityInst = activitySequence.Components[miniActivityNb] - - local chatTexture - - if sequenceNb == nil then - r2:selectChatSequence("None", activityInst.InstanceId) - chatTexture = "r2_mini_activity_empty_chat.tga" - else - local activeLogicEntity = r2:getSelectedInstance() - assert(activeLogicEntity) - - if chatSequenceId == nil then - local chatSequence = activeLogicEntity:getBehavior().ChatSequences[tonumber(sequenceNb)] - assert(chatSequence) - chatSequenceId = chatSequence.InstanceId - end - - r2:selectChatSequence(chatSequenceId, activityInst.InstanceId) - - chatTexture = "r2_mini_activity_chat.tga" - end - - local chatButton = miniActivity:find("chat_sequence"):find("button") - assert(chatButton) - chatButton.texture = chatTexture - chatButton.texture_pushed = chatTexture - chatButton.texture_over = chatTexture -end - -function r2:openActivity() - - r2:updateActivitiesAndChatsUI(r2:getSelectedInstance()) - - local miniActivity = getUICaller().parent.parent.parent - assert(miniActivity) - - local sequenceUI = r2:getSelectedSequ("r2ed_triggers") - assert(sequenceUI) - - local activityList = sequenceUI:find("elements_list") - assert(activityList) - - local eltEditor = activityList:find("edit_element") - assert(eltEditor) - local indexEltEditor = activityList:getElementIndex(eltEditor) - - local activityIndex = miniActivity.Env.id - if indexEltEditor<=activityIndex then activityIndex=activityIndex+1 end - - local activityUI = activityList:getChild(activityIndex) - assert(activityUI) - - local selectedButtonElt = activityUI:find("select") - assert(selectedButtonElt) - - selectedButtonElt.pushed = true - r2:selectTriggerElement(nil, "r2ed_triggers", selectedButtonElt) - - r2:updateActivityEditor() - r2:openActivitiesSequence() -end - -function r2:selectSequenceTab(uiName, index) - - if uiName == "r2ed_triggers" then - r2:updateSequencesButtonBar(index) - end - - local eltsUI = getUI("ui:interface:"..uiName) - assert(eltsUI) - - local sequencesTab = eltsUI:find("sequence_tabs") - assert(sequencesTab) - - local repeatButton = eltsUI:find("repeat_group"):find("repeat"):find("toggle_butt") - assert(repeatButton) - - local sequenceUI = sequencesTab:getGroup(index) - assert(sequenceUI) - local sequenceInstId = sequenceUI.Env.sequenceId - - if sequenceInstId and r2:getInstanceFromId(sequenceInstId) then - local sequenceInst = r2:getInstanceFromId(sequenceInstId) - repeatButton.pushed = (sequenceInst.Repeating == 0) - end -end - - - -function r2:getSequenceName(sequenceInst) - - local name = sequenceInst.Name - local index = -1 - if name == "" then - local components = sequenceInst.Parent - for i=0, components.Size-1 do - if components[i].InstanceId == sequenceInst.InstanceId then - index = i - break - end - end - - if index >= 0 then - local startName - if sequenceInst:isKindOf("ChatSequence") then - startName = tostring(i18n.get("uiR2EdSequChat")) - elseif sequenceInst:isKindOf("ActivitySequence") then - startName = tostring(i18n.get("uiR2EdSeq")) - end - - name = startName..(index+1) - end - end - - return name -end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/ryzom/common/data_common/r2/r2_ui_windows.lua b/code/ryzom/common/data_common/r2/r2_ui_windows.lua deleted file mode 100644 index 02e2b7893..000000000 --- a/code/ryzom/common/data_common/r2/r2_ui_windows.lua +++ /dev/null @@ -1,118 +0,0 @@ --- management of visible editor windows - ---------------- --- FUNCTIONS -- ---------------- - -------------------------------------------------------------------------------------- --- refresh the button that allow to toggle a window on / off -function r2:refreshWindowButtons() - -- debugInfo("refreshWindowButtons") -end - - -------------------------------------------------------------------------------------- -function r2:switchWindow(name) - local wnd = getUI(name) - wnd.active = not wnd.active -end - -------------------------------------------------------------------------------------- --- misc windows activation deactivation -function r2:switchPaletteWindow() - self:switchWindow("ui:interface:r2ed_palette") -end - -function r2:switchScenarioWindow() - self:switchWindow("ui:interface:r2ed_scenario") -end - -function r2:switchDebugWindow() - self:switchWindow("ui:interface:debug_info") -end - -function r2:switchChatWindow() - self:switchWindow("ui:interface:main_chat") -end - -function r2:switchWebAdminWindow() - self:switchWindow("ui:interface:r2ed_ring_window") -end - -function r2:switchMailBoxWindow() - self:switchWindow("ui:interface:mailbox") -end - -function r2:switchGuildForumWindow() - self:switchWindow("ui:interface:guild_forum") -end - -function r2:switchMapWindow() - self:switchWindow("ui:interface:map") -end - -function r2:switchPlayerAdminWindow() - self:switchWindow("ui:interface:ring_chars_tracking") -end - -function r2:switchCustomBBoxWindow() - self:switchWindow("ui:interface:r2ed_bbox_edit") - if r2.CustomBBox.FirstDisplay == true then - if r2.CustomBBox:getWindow().active then - r2.CustomBBox:getWindow():center() - end - r2.CustomBBox.FirstDisplay = false - end - if r2.CustomBBox:getWindow().active then - runCommand("showR2EntityBoxes") - else - runCommand("hideR2EntityBoxes") - end -end - - -function r2:isPropertyWindowVisible() - if r2.PropertyWindowVisible == true then - if r2.CurrentPropertyWindow ~= nil then - return true - end - end - return false -end - -function r2:switchPropertiesWindow() - if r2:isPropertyWindowVisible() then - if r2.CurrentPropertyWindow ~= nil then - r2.CurrentPropertyWindow.active = false - end - r2.PropertyWindowVisible = false - else - r2:showProperties(r2:getSelectedInstance()) - end -end - ------------------- --- STATIC DATAS -- ------------------- - -r2.PropertyWindowVisible = false -- not stored in window because there are several "properties" windows (one per class) -r2.CurrentPropertyWindow = nil -- current property window being displayed - - ------------------------------------------ --- INIT OF WINDOW POSITIONS AT STARTUP -- ------------------------------------------ - - --- init default pos for a property window -function r2:initDefaultPropertyWindowPosition(wnd) - if wnd == nil then - return - end - scrW, scrH = getWindowSize() - wnd.x = 4 - wnd.y = scrH - 312 - wnd.w = 225 - wnd.h = 300 -end - diff --git a/code/ryzom/common/data_common/r2/r2_utils.lua b/code/ryzom/common/data_common/r2/r2_utils.lua deleted file mode 100644 index 0c25ba64c..000000000 --- a/code/ryzom/common/data_common/r2/r2_utils.lua +++ /dev/null @@ -1,500 +0,0 @@ -if r2.Utils == nil -then - r2.Utils={} -end - - -r2.Utils.addReaction = function(this,event,action) - local reactions = this.Reactions[event] - if reactions == nil - then - reactions = {} - this.Reactions[event]=reactions - end - table.insert(reactions,action) -end - ------------------------------------------------------- ---Create the states and groups to represent: --- -A counter mission --- -The counters used for this mission -r2.Utils._obsolete_initCounterStates = function(counter,context) - - if counter.Class =="Counter" - then - - local pGroup = r2.createPseudoGroup(context) - context.RtCounters[counter.InstanceId]=pGroup - - for k,v in pairs(counter.Counters) - do - Translator.LogicEntityTranslator(v,context) - end - end -end - - -r2.Utils.createGroup = function(x,y,n,base,name,mode) - - if mode == nil - then - mode = "circle" - end - - local isGeneric = false - - if string.find(base, "palette.entities.players.") ~= nil then - isGeneric = true - end - - - local npcGroup = r2.newComponent("NpcGrpFeature") - assert(npcGroup) - npcGroup.Name = name - - if mode == "circle" - then - - local pas = (2 * math.pi)/n - local r = (n/(2*math.pi))+2 - for i=1,n do - local npc = nil - if ( isGeneric == true) then - npc = r2.newComponent("NpcCustom") - else - npc = r2.newComponent("Npc") - end - - npc.Name = name.."_".."Npc"..i - npc.Base = base - npc.Position.x = x + (r-1) * math.cos((i-1)*pas) - npc.Position.y = y + (r-1) * math.sin((i-1)*pas) - npc.Position.z = r2:snapZToGround(npc.Position.x, npc.Position.y) - npc.Angle = (i-1)*pas + math.pi - table.insert(npcGroup.Components,npc) - end - end - if mode == "line" - then - local pas = 1 - for i=1,n do - local npc = r2.newComponent("Npc") - npc.Name = name.."_".."Npc"..i - npc.Base = base - npc.Position.x = x + i * pas - npc.Position.y = y - npc.Position.z = r2:snapZToGround(npc.Position.x, npc.Position.y) - npc.Angle = 0 - table.insert(npcGroup.Components,npc) - end - end - return npcGroup -end - ---region = region to fill ---x,y = region's center ---r = region's ray ---nbPoints = number of points to create the region -r2.Utils.createRegion = function(region,x, y, r,nbPoints) - region.Points = {} - local tmpPositions = region.Points - local pas = (2 * math.pi)/nbPoints - local Angle = 0 - while nbPoints ~= 0 - do - local tmpVertex = r2.newComponent("RegionVertex") - local tmpPosition = r2.newComponent("Position") - local sx, sy, sz - sx = x + r * math.cos(Angle) - sy = y + r * math.sin(Angle) - sx, sy, sz = r2:snapPosToGround(sx, sy) - tmpPosition.x = sx - tmpPosition.y = sy - tmpPosition.z = sz - tmpVertex.Position = tmpPosition - table.insert(tmpPositions, tmpVertex) - Angle = Angle + pas - nbPoints = nbPoints - 1 - end -end - ---region = region to fill ---x,y = region's center ---r = region's ray ---nbPoints = number of points to create the region -r2.Utils.createNonDeleteableRegion = function(region,x, y, r,nbPoints) - region.Deletable = 0 - region.Points = {} - local tmpPositions = region.Points - local pas = (2 * math.pi)/nbPoints - local Angle = 0 - while nbPoints ~= 0 - do - local tmpVertex = r2.newComponent("RegionVertex") - tmpVertex.Deletable = 0 - local tmpPosition = r2.newComponent("Position") - local sx, sy, sz - sx = x + r * math.cos(Angle) - sy = y + r * math.sin(Angle) - sx, sy, sz = r2:snapPosToGround(sx, sy) - tmpPosition.x = sx - tmpPosition.y = sy - tmpPosition.z = sz - tmpVertex.Position = tmpPosition - table.insert(tmpPositions, tmpVertex) - Angle = Angle + pas - nbPoints = nbPoints - 1 - end -end - ---region = trigger Zone ---x,y = region's center ---r = region's ray ---nbPoints = number of points to create the region -r2.Utils.createTriggerRegion = function(region,x, y, r) - return r2.Utils.createNonDeleteableRegion(region, x, y, r, 4) -end - - - --- Create a Road --- ex local road = createRoad("rout1", { {21570, -1363}, {21570, -1363}, {21570, -1363}) -r2.Utils.createRoute = function(name, positions) - local road = r2.newComponent("Road") - local function wp(x, y, z) - local wayPoint = r2.newComponent("WayPoint") - local pos = r2.newComponent("Position") - pos.x = x - pos.y = y - pos.z = z - wayPoint.Position = pos - return wayPoint - end - --- road.Base = "palette.geom.road" - road.Name = name - local tmpPositions = road.Points -- depart a arrivיe - - for index, points in pairs(positions) - do - table.insert(tmpPositions, wp(points[1], points[2], 0)) - end - - return road -end - - ---function to set an RtAiState with a npc's behavior -r2.Utils.setState = function(context,behavior,rtAiState) - local aiMovement = behavior.Type - rtAiState.Name = rtAiState.Id .. "|" .. aiMovement - rtAiState.AiMovement = aiMovement - if (aiMovement == "wander" or aiMovement == "follow_route" or aiMovement == "patrol_route" or aiMovement == "repeat_road") then - local id = behavior.ZoneId - local zone = context.Components[id] - assert( zone ~= nil) - local points=zone.Points - assert( points ~= nil) - local size = table.getn(points) - rtAiState.Pts = {} - local k,v = next(points, nil) - local i = 0 - while k ~= nil - do - if (k ~= "Keys") - then - -- replacement for getworldPos - assert(v ~= nil) - i = i +1 - rtAiState.Pts[i] = {} - -- ??? v.Position.x ?? - rtAiState.Pts[i].x = r2.getWorldPos(v).x - rtAiState.Pts[i].y = r2.getWorldPos(v).y - rtAiState.Pts[i].z = r2.getWorldPos(v).z - end - k,v = next(points, k) - end - -- do reverse - if (aiMovement == "patrol_route") then - i = 0 - for i = 1, size -1 , 1 - do - local first = size - i - local last = size + i - - rtAiState.Pts[last] = {} - rtAiState.Pts[last].x = rtAiState.Pts[first].x - rtAiState.Pts[last].y = rtAiState.Pts[first].y - rtAiState.Pts[last].z = rtAiState.Pts[first].z - end - end - if (aiMovement == "patrol_route" or aiMovement == "repeat_road") then - rtAiState.AiMovement = "follow_route" - local eventHandler = Actions.createEvent("destination_reached", rtAiState.Id ,"") - assert( eventHandler ~= nil) - local eName = rtAiState.Id .. ":destination_reached" - eventHandler.Name=eName - table.insert(context.RtAct.Events,eventHandler) - - local action = Actions.createAction("begin_state", rtAiState.Id) - action.Name="begin state " .. rtAiState.Id - table.insert(context.RtAct.Actions,action) - table.insert(eventHandler.ActionsId,action.Id) - end - end -end - - -r2.Utils.invertRoad = function(road) - local road2 = r2.newComponent("Road") - local function wp(x, y, z) - local wayPoint = r2.newComponent("WayPoint") - local pos = r2.newComponent("Position") - pos.x = x - pos.y = y - pos.z = z - wayPoint.Position = pos - return wayPoint - end - local max = table.getn(road.Points) - - for i=1,max do - local point = road.Points[max-i+1].Position - table.insert(road2.Points,wp(point.x,point.y,point.z)) - end - return road2 -end - - -r2.Utils.createEntry = function(who,states,event,actions) - local entry = r2.newComponent("EventHandlerEntry") - entry.Who = who - entry.States = states - entry.Event = event - entry.Actions = actions - return entry -end - -r2.Utils.createPlace = function(x,y,z,r) - local place = r2.newComponent("Place") - place.Position.x=x - place.Position.y=y - place.Position.z=z - place.Radius = r - return place -end - -r2.Utils.searchEntry = function(activity,who,event,state) - local max = table.getn(activity.Entries) - for i=1, max do - local entry = activity.Entries[i] - if entry.Who==who and entry.Event == event and (entry.States == state or state=="") - then - return entry - end - end - return nil -end - -r2.Utils.groupActivities = function(activity1,activity2,event1,state1,event2,state2) - local entry - entry = r2.Utils.searchEntry(activity1,activity1.Entries[1].Who,event1,state1) - - if entry == nil - then - entry = r2.Utils.createEntry(activity1.Entries[1].Who,state1,event1,"begin_state\n"..state2) - table.insert(activity1.Entries,entry) - else - entry.Actions = entry.Actions .. "\nbegin_state\n"..state2 - end - - entry = r2.Utils.searchEntry(activity2,activity2.Entries[1].Who,event2,state2) - if entry == nil - then - entry = r2.Utils.createEntry(activity2.Entries[1].Who,state2,event2,"begin_state\n"..state1) - table.insert(activity2.Entries,entry) - else - entry.Actions = entry.Actions .. "\nbegin_state\n"..state - end -end - -r2.Utils.evalCost = function(feature) - --luaObject(feature) - local components = feature.Components - --luaObject(components) - local cost = 0 - if components ~= nil - then - for key,comp in pairs(components) - do - if key~="Keys" and comp.Class == "Npc" - then - cost = cost + 1 - end - end - end - return cost -end - -r2.Utils.createChatAction = function(who,says,emote,face) - local chatStep - - chatStep = r2.newComponent("ChatAction") - chatStep.Who = who - - if says ~= "" - then - local entry=r2.registerText(says) - chatStep.Says = entry.InstanceId - else - chatStep.Says = says - end - - if face ~="" and face ~=nil - then - chatStep.Facing = face - end - - chatStep.Emote = emote - return chatStep -end - - - ---replace each instanceId in the table by the new one -r2.Utils.replaceTab = function(this,ttable) -for k,v in pairs(this) -do - if k ~="Keys" - then - this[k]=ttable[this[k]] - end -end -end ---call the replace function for each object in the table -r2.Utils.callReplace = function(this,ttable) -for k,v in pairs(this) -do - if k ~="Keys" - then - v:replace(ttable) - end -end -end - - -r2.Utils.changeRepere = function(position,center) - position.x=position.x - center.x - position.y=position.y - center.y - position.z = r2:snapZToGround(position.x,position.y) -end - -r2.Utils.changeZoneRepere = function(zone,center) - for i=1,table.getn(zone.Points) - do - r2.Utils.changeRepere(zone.Points[i]) - end -end - -r2.Utils.changeRepereRt = function(npc,center) - local x,y - local position = npc.Position - x = position.x - center.x - y = position.y - center.y - r2.requestSetNode(position.InstanceId,"x",x) - r2.requestSetNode(position.InstanceId,"y",y) - r2.requestSetNode(position.InstanceId,"z",r2:snapZToGround(x,y)) -end - -r2.Utils.setNewGroupCenter = function(group,x,y) - local k,v = next(group.Components,nil) - local center = r2.newComponent("Position") - local first = true - center.x = x - center.y = y - - while k~=nil - do - if first == true - then - first = false - local newCenter = {} - newCenter.x = -(center.x - v.Position.x) - newCenter.y = -(center.y - v.Position.y) - center.z = r2:snapZToGround(center.x,center.y) - r2.requestSetNode(v.Position.InstanceId,"x",center.x) - r2.requestSetNode(v.Position.InstanceId,"y",center.y) - r2.requestSetNode(v.Position.InstanceId,"z",r2:snapZToGround(center.x,center.y)) - center = newCenter - else - r2.Utils.changeRepereRt(v,center) - end - k,v = next(group.Components,k) - end - -end - --- Obsolete -r2.Utils.getRtGroup = function(context,instanceId) - debugInfo("Call obsolete function: call r2.Translator.getRtGroup") - -- use r2.Translator.getRtGroup instead - return r2.Translator.getRtGroup(context, instanceId) -end - -r2.Utils.concat = function(text,textSup) - if text == "" - then - return textSup - else - return text.."\n"..textSup - end -end - - ------------------------------------------------------------ ---return a string like: "group1:Npc1" for use with actions -r2.Utils.getNpcParam = function(npcId, context) - - assert( type(npcId) == "string") - local who = r2:getInstanceFromId(tostring(npcId)) --- local group = who:getParentGroup() - local rtNpcGrp = context.RtGroups[tostring(npcId)] - if rtNpcGrp == nil - then - debugInfo("Err: unable to know the npc's group name ("..npcId..")") - return nil - end - - return rtNpcGrp.Name..":"..tostring(who.Name) -end - - --- --- Returns the RtNpcGrp Id for a given instanceId --- -r2.Utils.getRtIdFromInstanceId = function(context, instanceId) - assert(instanceId ~= nil and type(instanceId) == "string") - local instance = r2:getInstanceFromId(instanceId) - assert(instance) - return context.RtGroups[instanceId].Id -end - - --- vianney tests -function r2.testVianney1() - r2.requestStartAct(1) -end - -function r2.testVianney2() - r2.requestStartAct(2) -end - -function r2.testVianney3() - r2.requestStopAct() -end - -function r2:lowerTranslate(uiR2EdStr) - return string.lower(i18n.get(uiR2EdStr):toUtf8()) -end - - diff --git a/code/ryzom/common/data_common/r2/r2_version.lua b/code/ryzom/common/data_common/r2/r2_version.lua deleted file mode 100644 index 17e709df8..000000000 --- a/code/ryzom/common/data_common/r2/r2_version.lua +++ /dev/null @@ -1,496 +0,0 @@ - -r2.Version = {} - -local version = r2.Version - - -function r2.Version.checkVersion(scenarioVersionList, currentVersionList) - local undef = {} - local older = {} - local newer = {} - local ok = true - - local k,v = next(scenarioVersionList, nil) - while k do - if (v ~= currentVersionList[k]) then - ok = false - if currentVersionList[k] == nil then - table.insert(undef, k) - elseif v < currentVersionList[k] then - table.insert(older, k) - else - table.insert(newer, k) - end - end - k,v = next(scenarioVersionList, k) - end - return ok, undef, older, newer - -end - -function r2.Version.getUndefComponent(scenarioVersionList, currentVersionList) - local undef = {} - local k,v = next(scenarioVersionList, nil) - while k do - if (v ~= currentVersionList[k] and currentVersionList[k] == nil ) then - table.insert(undef, k) - end - k,v = next(scenarioVersionList, k) - end - return true - -end - -local levelToString = -{ - [0] = "20", - [1] = "50", - [2] = "100", - [3] = "150", - [4] = "200", - [5] = "250" -} - -function r2.Version.save(filename) - - local scenario = r2.Scenario - - if scenario then - local scenarioList = r2.Version.getCurrentVersionList() - local update = false - - local k,v = next(scenarioList, nil) - while k do - if (r2.Scenario.Versions[k] ~= v) then update = true end - k,v = next(scenarioList, k) - end - - k,v = next(r2.Scenario.Versions, nil) - while k do - if (scenarioList[k] ~= v) then update = true end - k,v = next(r2.Scenario.Versions, k) - end - - if update then - r2.requestSetGhostNode(scenario.InstanceId, "Versions", scenarioList) - end - local accessList = {} - - - local ok, level, err = r2.RingAccess.verifyScenario() - if not r2.RingAccess.LoadAnimation and not r2.getIsAnimationSession() then - r2.updateScenarioAck(ok, level, err.What) - end - accessList = r2.RingAccess.getAccessListAsString(level) - - - local values = {} - - - - local date = os.date() - - local firstLocationName = "" - local shortDescription = "" - local title = "" - local name = "" - local userName = r2:getUserEntityName() - local modifierMD5 = r2.getCharIdMd5() - local creatorName = "" - local rules = "" - local level = "" - local language = "" - local type = "" - local creatorMD5 ="" - local createUserName = userName - local createDate = date - local otherCharAccess = "Full" - local nevraxScenario = "0" - local trialAllowed = "0" - local scenarioTag = "" - - - if r2.Scenario and r2.Scenario.Locations - and table.getn(r2.Scenario.Locations) > 0 and r2.Scenario.Locations[0].IslandName then - firstLocationName = r2.Scenario.Locations[0].IslandName - end - - if r2.Scenario and r2.Scenario.Description then - --shortDescription =string.gsub(r2.Scenario.Description.ShortDescription, "\n", "\\n") - shortDescription = r2.Scenario.Description.ShortDescription - level = string.gsub(r2.Scenario.Description.LevelId, "\n", "\\n") - level = levelToString[tonumber(level)] - rules = string.gsub(r2.Scenario.AccessRules, "\n", "\\n") - if rules=="liberal" then - rules=i18n.get("uiR2EDliberal"):toUtf8() - elseif rules == "strict" then - rules=i18n.get("uiR2EDstrict"):toUtf8() - end - title = string.gsub(r2.Scenario.Description.Title, "\n", "\\n") - language = r2.Scenario.Language - type = r2.Scenario.Type - name = r2.Scenario.Name - if r2.Scenario.Ghost_Name then - name = r2.Scenario.Ghost_Name - end - if r2.Scenario.Description.Creator then - createUserName = r2.Scenario.Description.Creator - end - if r2.Scenario.Description.CreatorMD5 then - creatorMD5 = r2.Scenario.Description.CreatorMD5 - end - if r2.Scenario.Description.CreationDate then - createDate = r2.Scenario.Description.CreationDate - end - if table.getn(r2.Scenario.Locations) > 0 then - initialIslandLocation = r2.Scenario.Locations[0].IslandName - initialEntryPoint = r2.Scenario.Locations[0].EntryPoint - initialSeason = r2.Scenario.Locations[0].Season - end - - if r2.Scenario.Description.OtherCharAccess then - otherCharAccess = r2.Scenario.Description.OtherCharAccess - if otherCharAccess == "RoSOnly" then - if config.R2EDExtendedDebug ~= 1 then - if filename == "data/r2_buffer.dat" then - return false - else - r2.onSystemMessageReceived("BC_ML", "", "uiR2EDErrorRefuseToSaveRoS") - r2.requestNewAction(i18n.get("uiR2EDUpdatingScenarioToDefaultAccess")) - r2.requestSetNode(r2.Scenario.Description.InstanceId, "OtherCharAccess", "Full") - r2.requestEndAction() - return false - end - else - r2.onSystemMessageReceived("BC_ML", "", "Updating the system of Trial limitation") - r2.requestNewAction(i18n.get("uiR2EDUpdatingScenarioAccess")) - r2.requestSetNode(r2.Scenario.Description.InstanceId, "OtherCharAccess", "Full") - r2.requestSetNode(r2.Scenario.Description.InstanceId, "NevraxScenario", "1") - r2.requestSetNode(r2.Scenario.Description.InstanceId, "TrialAllowed", "1") - r2.requestSetNode(r2.Scenario.Description.InstanceId, "ScenarioTag", "") - r2.requestEndAction() - return false - end - - - end - end - - if r2.Scenario.Description.NevraxScenario == tostring(1) then - nevraxScenario = r2.Scenario.Description.NevraxScenario - trialAllowed = r2.Scenario.Description.TrialAllowed - scenarioTag = r2.Scenario.Description.ScenarioTag - userName = "Ring(Nevrax)" - createUserName = userName - - if config.R2EDExtendedDebug ~= 1 then - - if filename == "data/r2_buffer.dat" then - return false - else - r2.onSystemMessageReceived("BC_ML", "", "uiR2EDErrorRefuseToSaveRoS") - r2.requestNewAction(i18n.get("uiR2EDUpdatingScenarioAccess")) - r2.requestSetNode(r2.Scenario.Description.InstanceId, "NevraxScenario", "0") - r2.requestSetNode(r2.Scenario.Description.InstanceId, "TrialAllowed", "0") - r2.requestSetNode(r2.Scenario.Description.InstanceId, "ScenarioTag", "") - r2.requestEndAction() - - return false - end - - - end - end - - end - - table.insert(values, {Title = title}) - table.insert(values, {Name = name}) - table.insert(values, {ShortDescription = shortDescription}) - table.insert(values, {FirstLocation = firstLocationName}) - table.insert(values, {RingPointLevel = accessList}) - table.insert(values, {CreateBy = createUserName}) - table.insert(values, {CreatorMD5 = creatorMD5}) - table.insert(values, {CreationDate = createDate}) - table.insert(values, {ModifiedBy = userName}) - table.insert(values, {ModifierMD5 = modifierMD5}) - table.insert(values, {OtherCharAccess = otherCharAccess}) - - table.insert(values, {ModificationDate = date}) - table.insert(values, {Rules = rules}) - table.insert(values, {Level = level}) - table.insert(values, {Type = type}) - table.insert(values, {Language = language}) - table.insert(values, {InitialIsland = initialIslandLocation}) - table.insert(values, {InitialEntryPoint = initialEntryPoint}) - table.insert(values, {InitialSeason = initialSeason}) - if nevraxScenario == tostring(1) then - table.insert(values, {NevraxScenario = nevraxScenario}) - table.insert(values, {TrialAllowed = trialAllowed}) - table.insert(values, {ScenarioTag = scenarioTag}) - end - - - r2.save(filename, values) - end - return true -end - - -local function updateVersionImpl(nodeList, scenarioVersionList, currentVersionFullList) - assert(nodeList) - assert(scenarioVersionList) - assert(currentVersionFullList) - - local k,v = next(nodeList, nil) - while k do - - - -- go up in the class hierarchy, calling each redefinition of 'onUpdate' function - -- when a version change is detected - local currClassName = v.Class - - -- look at a update function for this component or one of it's ancester - while currClassName ~= "" and currClassName ~= nil do - local currClass = r2.Classes[currClassName] - if not currClass then - debugInfo(colorTag(255, 0, 0) .. "Error can not update your scenario: the component"..currClassName.." seems to be obsolete") - return false - end - local scenarioVersionNode = defaulting(scenarioVersionList[currClassName], 0) - local currentVersionNode = defaulting(currentVersionFullList[currClassName], 0) - if currentVersionNode ~= scenarioVersionNode then - -- - if scenarioVersionNode == nil then - debugInfo(colorTag(0, 255 ,255) .. "The component (".. v.Class .. ") does not exist anymore") - return false - elseif currentVersionNode == nil then - debugInfo(colorTag(0, 255 ,255) .. "The component (".. v.Class .. ") does not exist anymore") - return false - else - debugInfo(colorTag(0, 255 ,255) .. "Updating the component " .. v.InstanceId .. "(".. v.Class .. "/"..currClassName..") from ".. scenarioVersionNode .. " to " .. currentVersionNode ..".") - - local updateFunc = currClass.updateVersion - if not updateFunc then - debugInfo( "Your scenario can not be updated. Because the component " .. v.Class .. " can not be updated (no update Function?).\n") - return false - end - local ok1, ok2 = pcall(updateFunc, v, scenarioVersionNode, currentVersionNode) - if not ok1 or not ok2 then - debugInfo( "Your scenario can not be updated. Because the component " .. v.Class .. " can not be updated.\n") - if not ok1 then - debugInfo(ok2) - end - return false - end - - end - end - currClassName = currClass.BaseClass - end - - k,v = next(nodeList, k) - end - return true - -end - -function r2.Version.updateVersion() - if r2.Translator == nil then - debugInfo("Syntax error") - return false - end - local scenarioInstance = r2.Scenario - - if not scenarioInstance then return true end - - local currentVersionFullList = r2.Version.getCurrentVersionFullList() - local scenarioVersionList = r2.Version.getScenarioVersionList() - - local versionOk, undef, older, newer = r2.Version.checkVersion(scenarioVersionList, currentVersionFullList) - - local modified = false - if not versionOk then - - debugInfo(colorTag(0,255,25).."Begin Update") - - local scenarioVersionName = scenarioInstance.VersionName - local currentVersionName = r2.Classes["Scenario"].VersionName - - if scenarioVersionName == nil then scenarioVersionName = "0.0.0" end - if currentVersionName == nil then currentVersionName = "0.0.0" end - - local str = "Updating the scenario from '"..scenarioVersionName.."' to '".. currentVersionName .."'.\nThe obsolete scenario will be saved in 'old_scenario.r2'" - printMsg(str) - local nodeList = r2.Version.getScenarioNodes(scenarioInstance) - assert(nodeList) - - do - local k,v = next(undef, nil) - while k do - debugInfo(colorTag(0, 255 ,255) .. "The component ".. v .. " used in this scenario does not exist.") - k,v = next(undef, k) - end - end - - do - local k,v = next(older, nil) - while k do - debugInfo(colorTag(0, 255 ,255) .. "The component ".. v .. " is too old (we will try to update it)") - k,v = next(older, k) - end - end - - do - local k,v = next(newer, nil) - while k do - debugInfo(colorTag(0, 255 ,255) .. "The component ".. v .. " is too new (maybe wrong version?)") - k,v = next(newer, k) - end - end - if table.getn(undef) > 0 then - debugInfo(colorTag(255, 0, 0) .. "Error can not update your scenario: the scenario containse components that are not defined") - return true - end - local oldState = scenarioInstance.Ghost - scenarioInstance.Ghost = false - r2.save("old_scenario.r2") - scenarioInstance = r2.Scenario - - scenarioInstance.Ghost = true - - local syntaxOk, ok = pcall(updateVersionImpl, nodeList, scenarioVersionList, currentVersionFullList) - if not syntaxOk then - r2.print(ok) - ok = false - end - if ok then - -- ok - debugInfo(colorTag(0,255,25).."Update succced") - local currentVersionList = r2.Version.getCurrentVersionList() - r2.requestSetNode(scenarioInstance.InstanceId, "VersionName", currentVersionName) - r2.requestSetNode(scenarioInstance.InstanceId, "Versions", currentVersionList) - scenarioInstance.Ghost = oldState - r2.requestUploadCurrentScenario() - r2.clearActionHistoric() -- undo invalidated after a version update !! - modified = true - else - debugInfo(colorTag(255, 0, 0) .. "Errors occurs while updateing your scenario") - - end - scenarioInstance.Ghost = oldState - debugInfo(colorTag(0,255,25).."End Update") - - end - return not modified; -end - - - - --- return Scenario Nodes - leaf first -function r2.Version.getScenarioNodes(node, nodeListParam) - assert(node) - if nodeListParam then nodeList = nodeListParam else nodeList = {} end - - if not r2.isTable(node) then return nodeList end - local k,v = next(node, nil) - while k do - r2.Version.getScenarioNodes(v, nodeList) - k,v = next(node, k) - end - if node.InstanceId then - table.insert(nodeList, node) - if not node.Class then assert(nil) end - end - return nodeList -end - - --- get the Current Version of sceanrio -function r2.Version.getCurrentVersionList() - local scenarionInstance = r2.Scenario - local versionList = {} - r2.Version._getCurrentVersionListImpl(scenarionInstance, versionList) - return versionList; -end - -function r2.Version.getCurrentVersionFullList() - local versionList = {} - local classes = r2.Classes - local k, v = next(classes, nil) - while k do - if v.Version then - versionList[k] = v.Version - else - versionList[k] = 0 - end - k, v = next(classes, k) - end - return versionList -end - -function r2.Version._getCurrentVersionListImpl(node, versionList) - if ( type (node) == "string" or type(node) == "number") then return end - local k,v = next(node, nil) - if node.Class and not versionList[node.Class] then - if r2.Classes[node.Class] and r2.Classes[node.Class].Version then - versionList[node.Class] = r2.Classes[node.Class].Version - else - versionList[node.Class] = 0 - end - end - while k do - r2.Version._getCurrentVersionListImpl(v, versionList); - k,v = next(node, k) - end -end - - -function r2.Version.getScenarioVersionList(scenarioNode) - local scenario = scenarioNode - if not scenario then scenario = r2.Scenario end - assert(scenario) - local versions = scenario.Versions - local versionList = {} - if versions == nil then - return r2.Version._getScenarioVersionListImpl(scenario, versionList) - else - local k,v = next(versions, nil) - while k do - versionList[k] = v - k,v = next(versions, k) - end - end - return versionList - -end - -function r2.Version._getScenarioVersionListImpl(node, versionList) - if ( type (node) == "string" or type(node) == "number") then return end - local k,v = next(node, nil) - if node.Class and not versionList[node.Class] then - versionList[node.Class] = 0 - end - while k do - r2.Version._getScenarioVersionListImpl(v, versionList); - k,v = next(node, k) - end - return versionList -end - --- Version 0.0.0 -> prior to 7 dec 2005 - --- version 0.0.1 prior to 7 dec 2005 --- Act.Version = 1 --- Act.ManualWeather --- Act.WeatherValue - --- version 0.0.2 19 dec 2005 --- Act.Version = 2 --- Act.Behavior (Because Act changes type from BaseType to LogicAction --- --- version 0.0.3 1 janv 2006 --- ActivityStep.Version=1 --- "Inactive" -> "Stand Still" - diff --git a/code/ryzom/common/data_common/r2/r2_world_object.lua b/code/ryzom/common/data_common/r2/r2_world_object.lua deleted file mode 100644 index 5a5720fa7..000000000 --- a/code/ryzom/common/data_common/r2/r2_world_object.lua +++ /dev/null @@ -1,214 +0,0 @@ ------------------------------------------------------------ --- Base class for objects that have a position in world -- ------------------------------------------------------------ - -local worldObject = -{ - BaseClass = "BaseClass", - Name="WorldObject", - Version = 1, -- Version 1 : removed the 'DisplayMode' field - Prop = - { - {Name="Position", Type="Position"}, - {Name="InheritPos", Type="Number", DefaultValue="1", Visible=false}, - -- DisplayMode : can have one of the following values : - -- 0, Visible -> the object is visible, this is the default - -- 1, Hidden -> the object is not visible (not in scene / not in the minimap) - -- 2, Frozen -> the object can't be selected, but is visible - -- 3, Locked -> the object can be selected, but not moved/rotated - - -- - - --{Name="DisplayMode", - -- Type="Number", - -- DefaultValue="0", - -- Visible=function(instance) return instance:isDisplayModeOptionAvailable() end, - -- WidgetStyle="EnumDropDown", - -- Enum={ "uiR2EDDisplayModeVisible", "uiR2EDDisplayModeHidden", "uiR2EDDisplayFrozen", "uiR2EDDisplayLocked" } - -- } - } -} - - ------------------------------------------------------------------- -function worldObject.updateVersion(this, scenarioValue, currentValue) - local patchValue = scenarioValue - if patchValue < 1 then - -- display mode removed in version 1 - if this.DisplayMode then - r2.requestEraseNode(this.InstanceId, "DisplayMode", -1) - end - patchValue = 1 - end - if patchValue == currentValue then return true end - return false -end - ------------------------------------------------------------------- --- When this function returns 'true', the user is given the choice to change the display mode of the object --- false by default -function worldObject.canChangeDisplayMode(this) - return false -end - ------------------------------------------------------------------- --- get world position as a table { x = , y = , z = } -function worldObject.getWorldPos(this) - if this.InheritPos ~= 0 and this.ParentInstance then - local parentPos = this.ParentInstance:getWorldPos() - assert(parentPos and parentPos.x and parentPos.y and parentPos.z) - return { x = this.Position.x + parentPos.x, - y = this.Position.y + parentPos.y, - z = this.Position.z + parentPos.z } - end - return { x = this.Position.x, - y = this.Position.y, - z = this.Position.z } -end - - - --- tmp fix for translation to primitives -function r2.getWorldPos(table) - local instance = r2:getInstanceFromId(table.InstanceId) - if instance == nil then - dumpCallStack(1) - debugInfo("getInstanceFromId de "..table.InstanceId .." renvoie NIL") - inspect(r2:getCurrentAct()) - assert(false) - end - local result = instance:getWorldPos() - return result -end - ------------------------------------------------------------------- --- Make this object position relative to another position --- & send appropriate network msg --- If the object doesn't herit pos from parent, then its position remains unchanged --- (example of use : grouping & ungrouping) -function worldObject.requestMakePosRelativeTo(this, parent) - if not this.InheritPos then return end - --debugInfo('requestMakePosRelativeTo') - --debugInfo(colorTag(255, 0, 255) .. 'old local pos = ') - --luaObject(this.Position) - --debugInfo(colorTag(255, 0, 255) .. 'old world pos = ') - --luaObject(this:getWorldPos()) - assert(parent) - local worldPos = this:getWorldPos() - if parent.getWorldPos == nil then - debugInfo(debug.traceback()) - inspect(parent) - assert(nil) - end - local parentWorldPos = parent:getWorldPos() - local newLocalPos = clone(this.Position) - newLocalPos.x = worldPos.x - parentWorldPos.x - newLocalPos.y = worldPos.y - parentWorldPos.y - newLocalPos.z = worldPos.z - parentWorldPos.z - --debugInfo(colorTag(255, 0, 255) .. 'parent world pos = ') - --luaObject(parentWorldPos) - --debugInfo(colorTag(255, 0, 255) .. 'new local pos = ') - --luaObject(newLocalPos) - if this.Position:equals(newLocalPos) then - return -- same new pos, no need to send msg - end - r2.requestSetNode(newLocalPos.InstanceId, "", newLocalPos) -end - ------------------------------------------------------------------- --- redefine base class copy : ensure that position is expressed in world coordinates after the copy -function worldObject.copy(this) - local result = r2.Classes.BaseClass.copy(this) - local worldPos = this:getWorldPos() - result.Position.x = worldPos.x - result.Position.y = worldPos.y - result.Position.z = worldPos.z - return result -end - ------------------------------------------------------------------- --- Test if display mode can currenlty be changed by the user (maybe not the case if inherited by parent) -function worldObject.isDisplayModeOptionAvailable(this) - if not this:canChangeDisplayMode() then return false end - -- if inherited from parent and parent not visible then don't give any option - local classDesc= this:getClass() - if classDesc.DisplayerVisualParams and classDesc.DisplayerVisualParams.InheritDisplayMode then - if this.ParentInstance and this.ParentInstance:isKindOf("WorldObject") and this.ParentInstance.DisplayerVisual.DisplayMode ~= 0 then - return false - end - end - return true -end - ------------------------------------------------------------------- --- test if the given display mode toggle is supported for this entity --- 0, -> always supported (can be visible ...) --- 1, -> can this object be hidden ? --- 2, -> can this object be frozen ? --- 3, -> can this object be locked ? -function worldObject.isDisplayModeToggleSupported(this, displayMode) - return false -end - ------------------------------------------------------------------- --- If this entity has option to change its display mode, add them -function worldObject.getAvailableDisplayModeCommands(this, dest) - if not this:isDisplayModeOptionAvailable() then return end - if this.DisplayerVisual.DisplayMode == 0 then - if this:isDisplayModeToggleSupported(1) then - table.insert(dest, this:buildCommand(this.onSetDisplayModeHide, "hide", "uiR2EDDisplayModeHide", "r2ed_toolbar_hide.tga", true)) - end - if this:isDisplayModeToggleSupported(2) then - table.insert(dest, this:buildCommand(this.onSetDisplayModeFreeze, "freeze", "uiR2EDDisplayModeFreeze", "r2ed_toolbar_freeze.tga", false)) - end - if this:isDisplayModeToggleSupported(3) then - table.insert(dest, this:buildCommand(this.onSetDisplayModeLock, "lock", "uiR2EDDisplayModeLock", "r2ed_toolbar_lock.tga", false)) - end - elseif this.DisplayerVisual.DisplayMode == 1 then - if this:isDisplayModeToggleSupported(1) then - table.insert(dest, this:buildCommand(this.onSetDisplayModeShow, "show", "uiR2EDDisplayModeShow", "r2ed_toolbar_show.tga", true)) - end - elseif this.DisplayerVisual.DisplayMode == 2 then - if this:isDisplayModeToggleSupported(2) then - table.insert(dest, this:buildCommand(this.onSetDisplayModeShow, "unfreeze", "uiR2EDDisplayModeUnfreeze", "r2ed_toolbar_unfreeze.tga", false)) - end - elseif this.DisplayerVisual.DisplayMode == 3 then - if this:isDisplayModeToggleSupported(3) then - table.insert(dest, this:buildCommand(this.onSetDisplayModeShow, "unlock", "uiR2EDDisplayModeUnlock", "r2ed_toolbar_unlock.tga", false)) - end - end -end - ------------------------------------------------------------------- --- display modes -function worldObject.onSetDisplayModeShow(this) - --r2.requestNewAction(i18n.get("uiR2EDChangeDisplayAction")) - --r2.requestSetNode(this.InstanceId, "DisplayMode", 0) - this.DisplayerVisual.DisplayMode = 0 - r2.ContextualCommands:update() -end -function worldObject.onSetDisplayModeHide(this) - --r2.requestNewAction(i18n.get("uiR2EDChangeDisplayAction")) - --r2.requestSetNode(this.InstanceId, "DisplayMode", 1) - this.DisplayerVisual.DisplayMode = 1 - r2.ContextualCommands:update() -end -function worldObject.onSetDisplayModeFreeze(this) - --r2.requestNewAction(i18n.get("uiR2EDChangeDisplayAction")) - --r2.requestSetNode(this.InstanceId, "DisplayMode", 2) - this.DisplayerVisual.DisplayMode = 2 - r2.ContextualCommands:update() -end -function worldObject.onSetDisplayModeLock(this) - --r2.requestNewAction(i18n.get("uiR2EDChangeDisplayAction")) - --r2.requestSetNode(this.InstanceId, "DisplayMode", 3) - this.DisplayerVisual.DisplayMode = 3 - r2.ContextualCommands:update() -end - - - -r2.registerComponent(worldObject) - - - diff --git a/code/ryzom/common/data_common/r2/unit_test/r2_client1.lua b/code/ryzom/common/data_common/r2/unit_test/r2_client1.lua deleted file mode 100644 index 0efd768be..000000000 --- a/code/ryzom/common/data_common/r2/unit_test/r2_client1.lua +++ /dev/null @@ -1,4 +0,0 @@ -r2.doFile("r2_unit_test.lua") -UnitTest.testCreateScenario() -r2.show() - diff --git a/code/ryzom/common/data_common/r2/unit_test/r2_client2.lua b/code/ryzom/common/data_common/r2/unit_test/r2_client2.lua deleted file mode 100644 index 4d3159c30..000000000 --- a/code/ryzom/common/data_common/r2/unit_test/r2_client2.lua +++ /dev/null @@ -1,6 +0,0 @@ -doFile("lua/unit_test/unit_test.lua") -UnitTest.testAddDefaultFeature() -UnitTest.testAddNpcGrpFeature() -UnitTest.testAddFaunaFeature() -r2.translateFeatures() -r2.show() diff --git a/code/ryzom/common/data_common/r2/unit_test/r2_client3.lua b/code/ryzom/common/data_common/r2/unit_test/r2_client3.lua deleted file mode 100644 index 7eb1881b9..000000000 --- a/code/ryzom/common/data_common/r2/unit_test/r2_client3.lua +++ /dev/null @@ -1,5 +0,0 @@ -doFile("lua/unit_test/unit_test.lua") -UnitTest.testAddFaunaFeature() -UnitTest.testUpdateScenario() -UnitTest.testTranslateFeatures() - diff --git a/code/ryzom/common/data_common/r2/unit_test/r2_unit_test.lua b/code/ryzom/common/data_common/r2/unit_test/r2_unit_test.lua deleted file mode 100644 index b48e3da5a..000000000 --- a/code/ryzom/common/data_common/r2/unit_test/r2_unit_test.lua +++ /dev/null @@ -1,1509 +0,0 @@ ---BaseY = -32594 -BaseX = 21570 -BaseY = -1363 - -UnitTest = {} - - -UnitTest.testAddSecondaryActUi = function() - function Form_onOk(form) - local act =r2.newComponent("Act") - local features = act.Features - local tmpDefault = r2.newComponent("DefaultFeature") - table.insert(features, tmpDefault) - r2.requestInsertNode(r2.ScenarioInstanceId, "Acts", -1, "", act) - end - - function Form_onCancel(form) - - end - r2:doForm("CreateNewAdventureActDescription", {}, Form_onOk, Form_onCancel) -end - - -UnitTest.testLoadAnimationScenarioUi = function() - - local function onOk(form) - if (form.LoadScenario_Name ~= nil and type(form.LoadScenario_Name) == "string") then - if form.LoadScenario_Name == "" then - local ui = r2:getForm("LoadScenario") - ui.active = true - ui.Env.Choice = nil - r2.CurrentForm = ui - - messageBox(i18n.get("uiR2EDInvalidName")) - return - end - - local filename = form.LoadScenario_Name - if string.find(filename, '.r2', -3) == nil then - - local ui = r2:getForm("LoadScenario") - ui.active = true - ui.Env.Choice = nil - r2.CurrentForm = ui - - messageBox(i18n.get("uiR2EDInvalidName")) - return - end - filename = form.Path .. filename - - - - local header = r2.getFileHeader(filename) - local mainland = not header or header.NevraxScenario ~= "1" or header.TrialAllowed ~= "1" - local trial = isPlayerFreeTrial() - if mainland and getDbProp("SERVER:USER:IS_NEWBIE") == 1 and trial then - local ui = r2:getForm("LoadScenario") - ui.active = true - ui.Env.Choice = nil - r2.CurrentForm = ui - r2.onSystemMessageReceived("ERR", "", "uiRingLoadingNotARoSScenario") - return - end - - - local ok, errStr = r2.RingAccess.loadAnimation(filename) - if not ok then - local ui = r2:getForm("LoadScenario") - ui.active = true - ui.Env.Choice = nil - r2.CurrentForm = ui - - messageBox(i18n.get("uiR2EDInvalidScenario")) - - end - - end - end - - local function onCancel(data, form) - local ui = r2:getForm("LoadScenario") - ui.active = true - ui.Env.Choice = nil - r2.CurrentForm = ui - - end - - local str = r2:getStartingAnimationFilename(); - local ok, errStr = r2.RingAccess.loadAnimation(str) - - if ok and string.len(str) ~= 0 then - local header = r2.getFileHeader(str) - local mainland = not header or header.NevraxScenario ~= "1" or header.TrialAllowed ~= "1" - local newbie = getDbProp("SERVER:USER:IS_NEWBIE") == 1 - if mainland and isPlayerFreeTrial() and newbie then - r2.onSystemMessageReceived("ERR", "", "uiRingLoadingNotARoSScenario") - ok = false - end - end - - if not ok then - r2:doForm("LoadScenario", {}, onOk, onCancel) - if string.len(str) ~= 0 then - messageBox(errStr) - end - - end - -end - - -UnitTest.testWaitAnimationScenarioLoadingUi = function() - --- local ui = getUI("ui:interface:r2ed_animation_waiting") --- ui.active = true ---- setTopWindow(ui) - -end - - -UnitTest.testLoadScenarioUi = function() - - local function onCancel(data, form) - end - - local function onOk(form) - - if (form.LoadScenario_Name ~= nil and type(form.LoadScenario_Name) == "string") then - if form.LoadScenario_Name == "" then - messageBox(i18n.get("uiR2EDLoadScenario_InvalidFileName")) - return - end - - local ucName = ucstring() - ucName:fromUtf8(form.LoadScenario_Name) - local filename = tostring(ucName) - if string.find(filename, '.r2', -3) == nil then - messageBox(i18n.get("uiR2EDLoadScenario_InvalidFileName")) - return - end - --- if string.find(filename, '.r2', -3) == nil then --- filename = form.Name .. ".r2" --- end - - local path = form.Path - local extendedFileName = filename - if path and path ~= "" then - extendedFileName = path..filename - end - - if form.LoadScenario_Level == "" - and form.LoadScenario_Rules == "" - and config.R2EDExtendedDebug == 1 then - messageBox(i18n.get("uiR2EDLoadScenario_LoadScenarioWithoutHeader")) - elseif form.RingAccess and form.RingAccess == 0 then - local ui = r2:getForm("LoadScenario") - ui.active = true - r2.CurrentForm = ui - messageBox(i18n.get("uiR2EDLoadScenario_No")) - return - end - - - - local header = r2.getFileHeader(extendedFileName) - if header then - local locked = header and header.OtherCharAccess == "RunOnly" - - if locked and header.ModifierMD5 and string.len(header.ModifierMD5) > 0 then - if not r2.hasCharacterSameCharacterIdMd5(header.ModifierMD5) then - if config.R2EDExtendedDebug ~=1 then - r2.onSystemMessageReceived("ERR", "", "uiR2EDLoadingLockedScenario") - else - local ui = r2:getForm("LoadScenario") - ui.active = true - r2.CurrentForm = ui - r2.onSystemMessageReceived("ERR", "", "uiR2EDLoadingLockedScenarioOverride") - return - end - else - - end - end - end - - local ok = r2.load(extendedFileName) - if not ok then - messageBox(i18n.get("uiR2EDInvalidScenario")) - else - r2.acts.deleteOldScenario = true - end - end - end - - - - r2:doForm("LoadScenario", {}, onOk, onCancel) -end - -function UnitTest.saveScenario(name, overwrite) - - if (name ~= nil and type(name) == "string") - then - if name == "" then - messageBox(i18n.get("uiR2EDInvalidName")) - return - end - if string.find(name, '.r2', -3) == nil then - name = name .. ".r2" - end - -- update scenario name with the new name - if name ~= r2.Scenario.Ghost_Name then - r2.requestNewAction(i18n.get("uiR2EDChangeScenarioName")) - r2.requestSetNode(r2.Scenario.InstanceId, "Ghost_Name", nlfile.getFilename(name)) - r2.requestEndAction() -- force a flush - end - local extendedFilename = r2.getScenarioSavePath()..name - - -- - if overwrite ~= true then - local file = io.open(extendedFilename, "r") - if file ~= nil then - io.close(file) - validMessageBox(concatUCString(ucstring(name), i18n.get("uiR2EDConfirmOverWrite")), "lua", "UnitTest.saveScenario('" .. name .. "', true )", "", "", "ui:interface") - return - end - end - - local ok, ret = pcall(r2.Version.save, extendedFilename) - local errorMsg = ret - if ok and ret then - displaySystemInfo(concatUCString(i18n.get("uiR2EDSaveSuccessFull"), ucstring(name)), "BC") - else - displaySystemInfo(concatUCString(i18n.get("uiR2EDSaveFailure"), ucstring(name)), "BC") - end - end -end - -UnitTest.testSaveScenarioUi = function() - local function onOk(form) - local smallName = form.Name - uc=ucstring() - uc:fromUtf8(smallName) - local str = uc:toString() - UnitTest.saveScenario(str, false) - end - - local function onCancel(form) - - end - r2:doForm("SaveScenario", {}, onOk, onCancel) -end - - -UnitTest.tesConnectAdventure = function() - local function onOk(form) - if (form.AdventureId ~= nil and type(form.AdventureId) == "number") - then - r2.requestMapConnection(form.AdventureId) - else - debugInfo("R2Lua can't connect adventure") - - end - end - - local function onCancel(form) - - end - r2:doForm("ConnectAdventure", {}, onOk, onCancel) -end - - -UnitTest.createRoad = function(x,y,name) - local road = r2.newComponent("Road") - - local function wp(x, y, z) - local wayPoint = r2.newComponent("WayPoint") - local pos = r2.newComponent("Position") - pos.x = x - pos.y = y - pos.z = z - wayPoint.Position = pos - return wayPoint - end - road.Base = "palette.geom.road" - road.Name = name - local tmpPositions = road.Points - table.insert(tmpPositions, wp(x - 5, y, 0)) - table.insert(tmpPositions, wp(x + 5, y, 0)) - table.insert(tmpPositions, wp(x, y - 5, 0)) - - - return road -end - - ---- UserComponent - - -r2.getUserComponentSourceExtension = function () return "lua" end -r2.getUserComponentExtension = function () return "lua" end -r2.getUserComponentExamplesDirectory= function () return "examples/user_components" end -r2.getUserComponentBinairyDirectory = function () return "ring_features" end - -r2.UserComponentsManager = {} - - -local UserComponentsManager = r2.UserComponentsManager - - - - -function UserComponentsManager:newPackage(identifiant) - local package = {} - package.Name = "UnnamedPackage" - package.Description = "Undescribed Package" - package.Components = {} - - if (not identifiant) then - package.GlobalNamespace = true - else - package.FileInfo = clone(UserComponentsManager.CurrentFileInfo) - - end - - function package:fullname(name) - if package.GlobalNamespace then - return name - else - return name .. "_" .. package.MD5 - end - end - - function package:newComponent(name) - if not package.GlobalNamespace then - if r2.Scenario.UserComponents.UserComponents[self.FileInfo.Md5] then - r2.requestInsertNode(r2.Scenario.InstanceId, "UserComponents", -1, self.Md5, self.FileInfo.Package) - end - end - return r2.newComponent(fullname(name)) - end - - function package:getUniqId() - return self:fullname(self.Name) - end - - return clone(package) - -end - -function UserComponentsManager:newComponent() - local component = { - BaseClass="LogicEntity", - Name = "Unknown", - Menu="ui:interface:r2ed_feature_menu", - DisplayerUI = "R2::CDisplayerLua", - DisplayerUIParams = "defaultUIDisplayer", - DisplayerVisual = "R2::CDisplayerVisualEntity", - Text = "uiR2EDtooltipCreateUnkownComponent", - Tooltip = "uiR2EDtooltipCreateUnkownComponent", - Icon = "r2ed_feature_timer.tga", - IconOver = "r2ed_feature_timer_over.tga", - IconPushed= "r2ed_feature_timer_pushed.tga", - Parameters = {}, - ApplicableActions = {}, - Events = {}, - Conditions = {}, - TextContexts = {}, - TextParameters = {}, - LiveParameters = {}, - Prop = { } - } - function component:registerMenu(logicEntityMenu) - logicEntityMenu:addLine(ucstring(self.Name), "lua", "", self.Name) - end - - function component:createImpl() - - if not r2:checkAiQuota() then return end - - - component:create() - end - - function component:create() - end - - ----------------------------------------------------------------------------------------------- - -- from base class - component.getParentTreeNode = function(this) - return this:getFeatureParentTreeNode() - end - --------------------------------------------------------------------------------------------------------- - -- from base class - component.appendInstancesByType = function(this, destTable, kind) - assert(type(kind) == "string") - --this:delegate():appendInstancesByType(destTable, kind) - r2.Classes.LogicEntity.appendInstancesByType(this, destTable, kind) - for k, component in specPairs(this.Components) do - component:appendInstancesByType(destTable, kind) - end - end - --------------------------------------------------------------------------------------------------------- - -- from base class - component.getSelectBarSons = function(this) - return Components - end - --------------------------------------------------------------------------------------------------------- - -- from base class - component.canHaveSelectBarSons = function(this) - return false; - end - - function component:onPostCreate() end - - function component:translator(context) - r2.Translator.createAiGroup(self, context) - end - - function component:pretranslate(context) - r2.Translator.translateAiGroup(self, context) - end - - return clone(component) -end - -function UserComponentsManager:addUserComponentIntoPalette(componentId, package, component) - - local theText, theTooltip, theIcon, theIconOver, theIconPushed = component.Text, component.Tooltip, component.Icon, component.IconOver, component.IconPushed - if not theText then theText = "uiR2EDtooltipCreateUnkownComponent" end - if not theTooltip then theTooltip = "uiR2EDtooltipCreateUnkownComponent" end - if not theIcon then theIcon = "r2ed_feature_timer.tga" end - if not theIconOver then theIconOver = "r2ed_feature_timer_over.tga" end - if not theIconPushed then theIconPushed = "r2ed_feature_timer_pushed.tga" end - - local palette = getUI("ui:interface:r2ed_palette") - assert(palette) - local menu = palette:find("sbtree_features") - assert(menu) - menu = menu:find("feature_list") - assert(menu) - - local theParent = "parent" - - if componentId == 1 then - theParent = "parent" - else - theParent = "r2_user_component" .. tostring(componentId - 1) - end - - local instance = createGroupInstance("named_r2ed_tool", menu.id , { - id="r2_user_component"..tostring(componentId), - tooltip=theTooltip, - onclick_l="lua", - posparent="parent", - posref="TL TL", x=tostring(componentId * 4), - y=tostring(1 + componentId * -64), - icon = theIcon, - icon_over = theIconOver, - icon_pushed = theIconPushed, - text=theText, - params_l="r2.UserComponentsManager.Packages['".. package:getUniqId() .. "'].Components['".. component.Name.."']:create()" - }) - debugInfo("r2.UserComponentsManager.Packages['".. package:getUniqId() .. "'].Components['".. component.Name.."']:createImpl()") - assert(instance) - menu:addGroup(instance) - -end - - -function UserComponentsManager:updateUserComponentsUi() - local index = 0 - - local k, package = next(self.Packages) - while k do - local kC, component = next(package.Components) - while kC do - UserComponentsManager:addUserComponentIntoPalette(index, package, component) - index = index + 1 - - kC, component = next(package.Components, kC) - end - - k, package = next(self.Packages, k) - end -end - - -function UserComponentsManager:updateUserComponents() - local index = 0 - local k, package = next(self.Packages) - while k do - - local kC, component = next(package.Components) - while kC do - r2.registerComponent(component, package) - kC, component = next(package.Components, kC) - end - - k, package = next(self.Packages, k) - end - self:updateUserComponentsUi(); -end - - -function UserComponentsManager:registerPackageComponents(package) - local kC, component = next(package.Components) - while kC do - r2.registerComponent(component, package) - kC, component = next(package.Components, kC) - end - -end - - -function UserComponentsManager:addUserComponent(filename) - local package = self:loadPackage(filename) - assert(package) - self.Packages[package:getUniqId()] = package - self:registerPackageComponents(package) - UserComponentsManager:updateUserComponentsUi() - -end - -function UserComponentsManager:registerFileInfo(fileinfo) - self.CurrentFileInfo = fileinfo -end - - -function UserComponentsManager:loadPackage(filename) - - self.CurrentPackage = nil - self.CurrentFileInfo = nil - - - - - local str = r2.readUserComponentFile(filename) - if not str then - debugInfo("Error in package '" .. filename .. "'") - return nil - end - - local f, msg = loadstring(str) - if not f then - debugInfo("Syntax error in package '" .. filename .. "': '" .. msg .. "'") - return nil - end - - local ok, msg = pcall(f) - if not ok then - debugInfo("Loading error in package '" .. filename .. "': '" .. msg .. "'") - return nil - end - - if not self.CurrentPackage then - debugInfo("No Package information in '"..filename.."'") - return nil - end - - r2.updateUserComponentsInfo(filename, self.CurrentPackage.Name, self.CurrentPackage.Description, - self.CurrentFileInfo.TimeStamp, self.CurrentFileInfo.MD5) - self.CurrentPackage.fileinfo = clone(self.CurrentFileInfo) - return self.CurrentPackage - -end - -function UserComponentsManager:init() - self.UserComponentDirectory = "./ring_features" - self.Packages = {} - self.CurrentPackage = nil - -- r2.requestSetNode(r2.Scenario.InstanceId, "UserComponents", {}) -- TODO to remove - self.Instanece = self -end - - -function UserComponentsManager:addUserComponentIntoScenario(filename) - local package= self:loadPackage(filename) - if not package then return end - local uniqId = package:getUniqId() --- TODO - if r2.Scenario.UserComponents[ uniqId ] then - debugInfo("The User defined Component '".. package.Name .. "' is already present in the current scenario.") - return - else - r2.requestInsertNode(r2.Scenario.InstanceId, "UserComponents", -1, uniqId, uniqId) - -- TODO: requestUpdateComponent - -- UserComponentsManager:addUserComponent(filename) - r2.registerUserComponent(filename) - end -end - - -function UserComponentsManager:addUserComponentUi() -end - - -function UserComponentsManager:test() --- UserComponentsManager:addUserComponent("./ring_features/r2_features_zone_triggers.lua.r2c") -end - - -function UserComponentsManager:registerPackage(package) - assert(package) - self.CurrentPackage = package -end - -function UserComponentsManager:registerComponent(package, component) - if not package then return end - if not component then return end - package.Components[package:fullname(component.Name)] = component -end - -function UserComponentsManager:compileUserComponent(filename) - local component = self:loadPackage(filename) - if not component then - debugInfo("Can not compile user component.") - return - end - component = nil - r2.saveUserComponentFile(filename, true) -end - - - - -UserComponentsManager:init() - -function UserComponentsManager:createUserComponentUi(otherDirectory) - local directory = otherDirectory - if (directory == nil) then directory= r2.getUserComponentExamplesDirectory() end - local extension = r2.getUserComponentSourceExtension() - - local function onOk(form) - local filename = directory .."/".. form.Name - self:compileUserComponent(filename) - end - local function onCancel() end - - debugInfo(extension) - r2:doForm("LoadUserComponent", {Directory=directory, Extension=extension}, onOk, onCancel) -end - - -function UserComponentsManager:importUserComponentUi(otherDirectory) - - local directory = otherDirectory - if (directory == nil) then directory= r2.getUserComponentBinairyDirectory() end - local extension = r2.getUserComponentExtension() - - local function onOk(form) - local filename = directory.."/".. form.Name - UserComponentsManager:addUserComponentIntoScenario(filename) - end - local function onCancel() end - r2:doForm("LoadUserComponent", {Directory=self.UserComponentDirectory, Extension=extension}, onOk, onCancel) - -end - - ------------------------------------------------------------------------------------------------------------------------------------------ --- Ring Access --- -r2.RingAccess = { } - -local RingAccess = r2.RingAccess - - - -function RingAccess.testAccess(access) - -- always true in local mode - if config.Local == 1 then - return true - end - -- - local t = string.sub(access, 1, 1) - local v = tonumber(string.sub(access, 2)) - - local charAccessMap = r2.getRingAccessAsMap(r2.getCharacterRingAccess()) - if charAccessMap[t] == nil then return false end - if charAccessMap[t] < v then return false end - return true - -end - -function RingAccess.updateLevel(access, level, allowed) - if string.len(access) == 0 then - return true, level - end - - local t = string.sub(access, 1, 1) - local v = tonumber(string.sub(access, 2, string.len(access))) - if level[t] == nil or level[t] < v then - level[t] = v - end - if allowed[t] == nil or allowed[t] < v then - return false, level - end - return true, level -end - -function RingAccess.errorMessageIsland(islandName, accessWanted, accessCharacter) - local accessWantedMap = r2.getRingAccessAsMap(accessWanted) - local accessCharacterMap = accessCharacter - - local k, v = next(accessWantedMap, nil); - assert( k) - local charLevel = accessCharacterMap[k] - if charLevel == nil then charLevel = 0 end - - return RingAccess.errorMessageImpl("InvalidIslandLevel", islandName, k, v, charLevel) - -end - - -function RingAccess.errorMessageBot(entityName, accessWanted, accessCharacter) - local accessWantedMap = r2.getRingAccessAsMap(accessWanted) - local accessCharacterMap = accessCharacter - - local k, v = next(accessWantedMap, nil); - assert( k) - local charLevel = accessCharacterMap[k] - if charLevel == nil then charLevel = 0 end - - return RingAccess.errorMessageImpl("InvalidBotLevel", entityName, k, v, charLevel) - -end - - -function RingAccess.errorMessageGeneric( accessWanted, accessCharacter) - local accessWantedMap = r2.getRingAccessAsMap(accessWanted) - local accessCharacterMap = accessCharacter - - local k, v = next(accessWantedMap, nil); - assert( k) - local charLevel = accessCharacterMap[k] - if charLevel == nil then charLevel = 0 end - - return RingAccess.errorMessageImpl("InvalidLevel", nil, k, v, charLevel) - -end - - -function RingAccess.errorMessageImpl(errorType, name, package, entityLevel, charLevel) - - local trad - local entityName - - if errorType == "InvalidIslandLevel" then - trad = i18n.get("uiR2EDErrMessageNoEnoughRingPointFor".."Island") - entityName = i18n.get(name):toUtf8() - elseif errorType == "InvalidBotLevel" then - trad = i18n.get("uiR2EDErrMessageNoEnoughRingPointFor".."Bot") - entityName = name - elseif errorType =="InvalidLevel" then - trad = i18n.get("uiR2EDErrMessageNoEnoughRingPointFor".."Generic") - else - trad = i18n.get("uiR2EDErrMessageDataCorrupted") - package = nil - entityLevel = nil - chatLevel = nil - entityName = nil - end - - - - local str = trad:toUtf8() - - if package and string.len(package) ~= 0 then - local category = i18n.get(string.format("uiR2EDRingAccessCategory_%s", package)) - str=string.gsub (str, "", category:toUtf8()) - end - if entityLevel then - str=string.gsub (str, "", tostring(entityLevel)) - end - if charLevel then - str=string.gsub (str, "", tostring(charLevel)) - end - if entityName then - str=string.gsub (str, "", entityName) - end - - local err = {} - err.Type = errorType - err.Name = name - err.Package = package - err.CharLevel = charLevel - err.EntityLevel = entityLevel - err.What = str - return err - -end - -function RingAccess.dumpRingAccessLocations(level, allowed, ok) - local k1, v1 = next(r2.Scenario.Locations, nil) - while k1 do - - local access = r2.getIslandRingAccess(v1.IslandName) - local map = r2.getRingAccessAsMap(access) - r2.print(access) - - local k, v = next(map, nil) - if k then - if not level[k] then level[k] = {} end - if not level[k][v] then level[k][v] = {} end - table.insert(level[k][v], { Ok=test, Type="Island", Name=v1.IslandName} ) - end - - - k1, v1 = next(r2.Scenario.Locations, k1) - end - return ok, level -end - - -function RingAccess.dumpRingAccessEntityRec(node, level, allowed, ok, err ) - local isTree = false - - if type(node) == "table" then - isTree = true - elseif type(node) == "userdata" then - local mt = getmetatable(node) - if mt~= nil and mt.__next ~= nil then - isTree = true - end - end - - if isTree then - if node.Class ~= nil then - local access = "" - local access2 = nil - local type = "Unknown" - if node.isKindOf and node:isKindOf("Npc") then - access2 = node.RingAccess - local sheet = "" - if node.Sheet then sheet = node.Sheet end - access = r2.getSheetRingAccess(node.SheetClient, sheet) - type = "Bot" - - - elseif node.RingAccess then - local access = node.RingAccess - type = "Component" - - - end - - local map = r2.getRingAccessAsMap(access) - local k, v = next(map, nil) - if k then - if not level[k] then level[k] = {} end - if not level[k][v] then level[k][v] = {} end - local obj = { Ok=test, Type=type, Name=node.Name, PaletteId=access2} - table.insert(level[k][v], obj) - end - end - - local t = nil - - if node.Components then t = node.Components end - if node.Acts then t = node.Acts end - if node.Features then t = node.Features end - - if t then - local k, v = next(t, nil) - while k do - ok, level, err = RingAccess.dumpRingAccessEntityRec(v, level, allowed, ok, err) - k, v = next(t, k) - end - end - end - return ok, level, err -end - -function RingAccess.dumpRingAccess() - local level = {} -- will be filled - - local allowed = r2.getRingAccessAsMap(r2.getCharacterRingAccess()) - - local ok = true - local err= {} - err.What = "" - ok, level = RingAccess.dumpRingAccessLocations(level, allowed, ok, err) - ok, level, err = RingAccess.dumpRingAccessEntityRec(r2.Scenario, level, allowed, ok, err) - - RingAccess.saveRingAccessLevel(level) - return ok, level, err -end - -function RingAccess.saveRingAccessLevel(data) - local function dumpRec(item, f) - local k,v = next(item) - while k do - f:write(k.."='"..v.."', ") - k,v = next(item, k) - end - end - - local filename = "scenario_level.txt" - local f = io.open(filename, "w") - assert(f) - f:write("-- "..filename.." ".. os.date() .."'\n\n") - f:write("r2.ScenarioRingAccess = {\n\n") - - - local catId, cat = next(data, nil) - while catId do - f:write("\t"..catId.."= {\n") - local levelId, level = next(cat, nil) - while levelId do - f:write("\t\t"..levelId.."= {\n") - local itemId, item = next(level, nil) - while itemId do - f:write("\t\t\t{"); - dumpRec(item,f) - f:write("}\n"); - itemId, item = next(level, itemId) - end - f:write("\t\t}\n") - levelId, level = next(cat, levelId) - end - f:write("\t}\n") - catId, cat = next(data, catId) - end - f:write("}\n") - f:flush() - f:close() - - messageBox("Ring access has been saved in \""..filename.."\"") - - -end - -function RingAccess.verifyLocations(level, allowed, ok, err) - local k, v = next(r2.Scenario.Locations, nil) - while k do - - local access = r2.getIslandRingAccess(v.IslandName) - local test, level = RingAccess.updateLevel(access, level, allowed) - if not test then - if ok then - ok = false - err = RingAccess.errorMessageIsland(v.IslandName, access, allowed) - end - end - k, v = next(r2.Scenario.Locations, k) - end - return ok, level, err -end - -function RingAccess.verifyEntityRec(node, level, allowed, ok, err ) - local isTree = false - - if type(node) == "table" then - isTree = true - elseif type(node) == "userdata" then - local mt = getmetatable(node) - if mt~= nil and mt.__next ~= nil then - isTree = true - end - end - - if isTree then - if node.Class ~= nil then - if node.isKindOf and node:isKindOf("Npc") then - local access = node.RingAccess - local test, level = RingAccess.updateLevel(access, level, allowed) - local sheet = "" - if node.Sheet then sheet = node.Sheet end - local access2 = r2.getSheetRingAccess(node.SheetClient, sheet) - local test2, level = RingAccess.updateLevel(access2, level, allowed) - if not test2 then - test = false - access = access2 - end - - if not test and ok then - ok = false - err = RingAccess.errorMessageBot(node.Name, access, allowed) - end - - - elseif node.RingAccess then - local test = RingAccess.updateLevel(node.RingAccess, level, allowed) - if not test and ok then - ok = false - err = RingAccess.errorMessageGeneric(node.access, allowed) - end - - end - end - - local t = nil - - if node.Components then t = node.Components end - if node.Acts then t = node.Acts end - if node.Features then t = node.Features end - - if t then - local k, v = next(t, nil) - while k do - ok, level, err = RingAccess.verifyEntityRec(v, level, allowed, ok, err) - k, v = next(t, k) - end - end - end - return ok, level, err -end - -function RingAccess.verifyScenario() - - local level = {} -- will be filled - - local allowed = r2.getRingAccessAsMap(r2.getCharacterRingAccess()) - - local ok = true - local err= {} - err.What = "" - ok, level, err = RingAccess.verifyLocations(level, allowed, ok, err) - ok, level, err = RingAccess.verifyEntityRec(r2.Scenario, level, allowed, ok, err) - - return ok, level, err -end - -function RingAccess.verifyRtScenario(rtScenario) - local ok, err = r2.verifyRtScenario(rtScenario) - if not ok then - err = RingAccess.errorMessageImpl(err.Type, err.EntityName, err.Package, err.EntityLevel, err.CharLevel) - end - return ok, err -end - -function RingAccess.getAccessListAsString(list) - local ret = '' - local k,v = next(list) - while k do - if string.len(ret) ~= 0 then ret = ret ..':' end - ret = ret .. k .. tostring(v) - k, v= next(list, k) - end - return ret -end - -function RingAccess.createAccessList() - assert( config.R2EDExtendedDebug == 1) - function createAccessListRec(node, f) - if r2.isTable(node) then - -- each palette entry - if node.Id ~= nil then - local base = r2.getPaletteElement(node.Id) - local access = r2.getPropertyValue(base, "RingAccess") - local sheet = r2.getPropertyValue(base, "Sheet") - local sheetClient = r2.getPropertyValue(base, "SheetClient") - if not sheet then sheet = "" end - if not sheetClient then sheetClient = "" end - - f:write(string.format(" \n", node.Id, access, sheetClient, sheet)) - else - local k,v = next(node, nil) - while k do - createAccessListRec(v, f) - k,v = next(node, k) - end - end - end - end - - local f = io.open("data_common/r2/r2_ring_access.xml", "w") - assert(f) - f:write("\n\n") - f:write("\n\n") - f:write("\n") - createAccessListRec(r2.Palette, f) - f:write("\n") - f:flush() - f:close() - -end - -function RingAccess.loadAnimation(str) - RingAccess.LoadAnimation = true - local ok, msg = r2.loadAnimation(str) - RingAccess.LoadAnimation = false - return ok, msg -end - - - -function r() - resetR2UICache() - runCommand('resetEditorAndReloadUI') --- UserComponentsManager:addUserComponentUi() -end - -function t2() --- UserComponentsManager:loadPackage('./ring_features/r2_features_zone_triggers.lua.r2c.gz') -end - -function t3() --- r2.registerUserComponent('./ring_features/r2_features_zone_triggers.lua.r2c.gz') -end - - -function t5() - local toto = "&ezr_חא'_\\)d //:1' 2 יייא'..)א/:*?\"<>|א)@4 58ftgsfdg\"/:*?\"<>|" - toto = string.gsub(toto, "[\\/:*?\"<>|]", "_") -end - - -r2.UserComponentManager = r2.UserComponentsManager - - -function r2:dumpDialogsAsText(filename, noMessage) - - local function dumpRec(entity, f) - if entity:isKindOf("ChatSequence") then - f:write("{\n\tName=[["..entity.Name.."]], Texts={\n") - local stepId, step = next(entity.Components) - while stepId do - - local who ="" - if tostring(step.Actions[0].Who) == "" then - who = step.Actions[0].WhoNoEntity - else - local whoInst = r2:getInstanceFromId(step.Actions[0].Who) - if whoInst then - who = whoInst.Name - end - end - local what = "" - if tostring(step.Actions[0].Says) ~= "" then - local whatInst = r2:getInstanceFromId(step.Actions[0].Says) - if whatInst then - local tmp = ucstring() - tmp:fromUtf8(whatInst.Text) - what = tmp:toString() - end - end - id = tostring(step.Actions[0].Says) - if id ~= "" then - f:write("\t\t{Id=[["..id.."]], Who=[["..who.."]], Text=[["..what.."]], },\n") - end - stepId, step = next(entity.Components, stepId) - end - - f:write("\t}\n},\n") - end - if entity.Components then - local componentId, comp = next(entity.Components, nil) - while componentId do - dumpRec(comp) - componentId, comp = next(entity.Components, componentId) - end - end - end - - local allNames = r2:getAllNames() - local function dumpBotnameRec(entity, f) - assert(f) - if not entity:isKindOf("Act") and not entity:isKindOf("Scenario") and entity.Name and entity.Name~="" then - local mustPrint = true - -- do not print DefaultName eg "Growling Gingo" - if entity:isKindOf("Npc") then - local basename = entity.Base - if basename then basename = r2.PaletteIdToTranslation[ basename ] end - if basename ~= nil and basename == entity.Name then - mustPrint = false - end - local found = false - local types, names = next (allNames) - while types and mustPrint do - local index, name = next (names) - while index and mustPrint do - if entity.Name == name then mustPrint = false end - index, name = next (names, index) - end - types, names = next (allNames, types) - end - local base = r2.getPaletteElement(entity.Base) - if base and base.Name == entity.Name then mustPrint = false end - end - if mustPrint then - f:write("\t{ Id=[["..entity.InstanceId.."]], Name=[["..entity.Name.."]], },\n"); - end - end - if entity.Components then - local componentId, comp = next(entity.Components, nil) - while componentId do - dumpBotnameRec(comp, f) - componentId, comp = next(entity.Components, componentId) - end - end - end - - local previousEntity = nil - local function dumpVariousPropertyRec(entity, f) - assert(f) - - local function dumpProperty(property, entity, f) - if entity[property] and string.len( entity[property] ) > 0 then - if previousEntity ~= entity.InstanceId then f:write("\n") end - previousEntity = entity.InstanceId - f:write("\t{\tId=[["..entity.InstanceId.."]], Property=[[".. property .. "]], Text=[[".. entity[property] .. "]]},\n"); - end - end - - if not r2.isTable(entity) then return end - - if entity.iKindOf and entity:isKindOf("Location") then - dumpProperty("Name", entity, f) - end - - if entity.iKindOf and entity:isKindOf("PlotItem") then - dumpProperty("Name", entity, f) - dumpProperty("Comment", entity, f) - dumpProperty("Desc", entity, f) - end - - -- Act or Scenenario description - dumpProperty("Title", entity, f) - dumpProperty("ShortDescription", entity, f) - dumpProperty("PreActDescription", entity, f) - - -- Mission - dumpProperty("BroadcastText", entity, f) - dumpProperty("ContextualText", entity, f) - dumpProperty("MissionSucceedText", entity, f) - dumpProperty("MissionText", entity, f) - dumpProperty("WaitValidationText", entity, f) - - - - local k,v = next(entity) - while k do - dumpVariousPropertyRec(v, f) - k,v = next(entity, k) - end - - end - - - if not filename then filename = "scenario_texts.txt" end - local f = io.open(filename, "w") - do - - assert(f) - f:write("-- scenario_texts.txt '".. os.date() .."'\n\n") - f:write("-- Here are the content of differents the dialogs\n") - f:write("-- You must only translate the \"Text\" field (not the \"Who\" or \"Name\")\n") - - f:write("r2.DialogsAsText = {\n") - - - local actId, act = next(r2.Scenario.Acts, nil) - while actId do - local featureId, feature = next(act.Features, nil) - while featureId do - dumpRec(feature, f) - featureId, feature = next(act.Features, featureId) - end - actId, act = next(r2.Scenario.Acts, actId) - end - f:write("}\n\n\n") - end - - do - - assert(f) - f:write("\n-- Here are the content of different component name of the scenario\n") - f:write("-- Generic Fauana name and default botname are not present\n") - f:write("-- You only have to translate the \"Name\" Field\n") - f:write("r2.BotnameAsText = {\n\n") - - - local actId, act = next(r2.Scenario.Acts, nil) - while actId do - local featureId, feature = next(act.Features, nil) - while featureId do - dumpBotnameRec(feature, f) - featureId, feature = next(act.Features, featureId) - end - actId, act = next(r2.Scenario.Acts, actId) - end - f:write("}\n\n\n") - end - - do - - assert(f) - f:write("\n-- Here are the content of different field of the scenario like plot item/act description\n") - f:write("-- or task description/task text\n") - f:write("-- You only have to translate the \"Text\" Field\n") - f:write("r2.DiversText = {\n\n") - - - - dumpVariousPropertyRec(r2.Scenario, f) - - f:write("}\n") - f:flush() - f:close() - end - if not noMessage then - messageBox("Text content has been saved in \"scenario_text.txt\"") - end -end - -function r2:updateDialogsFromText(filename, noMessage) - if not filename then filename = "dialog.txt" end - local f = io.open(filename, "r") - if not f then - if not noMessage then - messageBox("Can not open \""..filename.."\"") - else - ld.log("Can not open \""..filename.."\"") - end - return - end - assert(f) - if f ~= nil then - local content = f:read("*all") - - io.close(f) - - local fun, msg = loadstring(content) - if not fun then - local err = "Syntax error in \""..filename.."\":"..msg - if not noMessage then - messageBox(err) - else - ld.log(err) - end - return - end - r2.DialogsAsText = {} - r2.BotnameAsText = {} - r2.DiversText = {} - fun() - - local dialogId, dialog = next(r2.DialogsAsText, nil) - while dialogId do - local textId, text = next(dialog.Texts, nil) - while textId do - local t = tostring(text.Text) - local uc=ucstring(t) - local utf8=uc:toUtf8() - r2.requestSetNode(tostring(text.Id), "Text", utf8) - textId, text = next(dialog.Texts, textId) - end - dialogId, dialog = next(r2.DialogsAsText, dialogId) - end - - do - local id, value = next(r2.BotnameAsText, nil) - while id do - local t = tostring(value.Name) - local uc=ucstring(t) - local utf8=uc:toUtf8() - r2.requestSetNode(tostring(value.Id), "Name", utf8) - id, value = next(r2.BotnameAsText, id) - end - end - - do - local id, value = next(r2.DiversText, nil) - while id do - local t = tostring(value.Text) - local uc=ucstring(t) - local utf8=uc:toUtf8() - r2.requestSetNode(tostring(value.Id), value.Property, utf8) - id, value = next(r2.DiversText, id) - end - end - end - if not noMessage then - messageBox("Dialogs content has been update with text from \""..filename.."\"") - end - return true -end - - -ld = {} - -ld.WaitingCommands = {} - -function ld.runScript(scriptName) - table.insert(ld.WaitingCommands, {'runScript', scriptName}) -end -function ld.translate(textFilename, fileToSave) - table.insert(ld.WaitingCommands, {'translate', textFilename, fileToSave}) -end - -function ld.saveTexts(fileToSave) - table.insert(ld.WaitingCommands, {'saveTexts', fileToSave}) -end - -function ld.loadScena(fileToLoad) - table.insert(ld.WaitingCommands, {'loadScena', fileToLoad}) -end - -function ld.log(toto) - debugInfo("ld: "..toto) - local f = io.open("ld.log", "a") - f:write(tostring(os.date()).." "..toto.."\n") - f:flush() - f:close() -end -function ld.update() - local command = nil - if ld.lock == 1 then return end - if table.getn( ld.WaitingCommands ) > 0 then - command=table.remove(ld.WaitingCommands, 1) - - else - return - end - - if command[1] == 'saveTexts' then - ld.log("ld.saveTexts " .. command[2]) - r2:dumpDialogsAsText(command[2], true) - elseif command[1] == 'loadScena' then - ld.log("ld.loadScena " .. command[2]) - ld.lock = 1 - r2.load(command[2 ]) - elseif command[1] == 'translate' then - ld.log("ld.translate " .. command[2] .. " " .. command[3]) - r2.requestNewAction("Update") - r2:updateDialogsFromText(command[2], true) - r2.requestEndAction() - r2.requestNewAction("Save") - r2.Version.save(command[3]) - r2.requestEndAction() - elseif command[1] == 'runScript' then - debugInfo("ld.runScript " .. command[2]) - dofile(command[2]) - else - ld.log("Unknown command:" .. command[1]) - - end - ld.log( tostring(table.getn(ld.WaitingCommands)) .. " tasks restantes") - if table.getn(ld.WaitingCommands) == 0 then - ld.log("") - end -end - -function createVisitZone() - r2.Features['VisitZone'].Components.VisitZone:create() -end - -function createAmbush() - r2.Features['Ambush'].Components.Ambush:createProtected() -end - -function createManHunt() - r2.Features['ManHuntFeature'].Components.ManHunt:create() -end - -function createTimedSpawner() - r2.Features['TimedSpawner'].Components.TimedSpawner:create() -end - -function createRandomChest() - r2.Features['RandomChest'].Components.RandomChest:create() -end -function createDelivery() - r2.Features['DeliveryTask'].Components.DeliveryTask:create() -end - -function createKillNpc() - r2.Features['KillNpc'].Components.KillNpc:create() -end - -function createTargetMob() - r2.Features['TargetMob'].Components.TargetMob:create() -end -function testIsInPalette() - if r2.isInPalette("palette.entities.creatures.ccegf4") then - debugInfo("Machin is in palette") - else - debugInfo("Machin is NOT in palette bordel") - end -end - -function createHiddenChest() - r2.Features['HiddenChest'].Components.HiddenChest:create() -end - -function createHunt() - r2.Features['HuntTask'].Components.HuntTask:create() -end - - -function testFiles() - local files = {"r2_translator.lua", "r2_logic.lua", "r2_unit_test.lua", "r2_features.lua", "r2_components.lua", "r2_version.lua"} - local k,v = next(files) - while k do - local f = fileLookup(v) - local fun= loadfile(f) - if not fun then - if f == "" then - debugInfo("Error: "..v.." is an unknown file.") - else - debugInfo("Error: "..f.." has syntax errors.") - end - end - k,v = next(files, k) - end -end diff --git a/code/ryzom/common/data_common/system_files.cfg b/code/ryzom/common/data_common/system_files.cfg deleted file mode 100644 index cadf2c5e5..000000000 --- a/code/ryzom/common/data_common/system_files.cfg +++ /dev/null @@ -1,15 +0,0 @@ - -// List of files to be kept up to date -// This list can't contain more than 20 files approximately - -Files = -{ - // DO NOT REMOVE THIS ENTRY - // THIS MUST ALWAYS BE THE FIRST FILE !! - "system_files.cfg", - // - - "msg.xml", - "database.xml", - "chat_static.cdb" -}; diff --git a/code/ryzom/common/data_common/visual_slot.tab b/code/ryzom/common/data_common/visual_slot.tab deleted file mode 100644 index d0c4dacd975ab81a6b9168605167c64d2a822049..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9972 zcmYk>b#xuo_XY6XNZs89D=j4ymmeHJ7G@y3}Xh`n~ z(1<=7;3E21fQ#uf0WP7>2Dp@V2yhwg7@#qIDZu6QA(Qj(Ln*Or^5o=K!*pokxmM56P+C3W;!Rp zEp%>x7IayFTj}xux6w`(x6_J+xPw+IL`zz^5O>llg}94eD8$_q3EV@AC2%jzNZ>x2 znZW(DW&#h;S_wQzYbWp!t&_mRv~B{A(BTO@O2;Pf7@eHJ<8)>MPtf@ZJV}=(@D$ye zz|(YF0=aa10v6Ex#HG~+upn(+>r@jx?vt!Df>&G;Rf@s^tL2Q}jlX~v({jOS{` z^EBgaHRGXXJYO^ZhGzUt&A8Q!f2bMnrWr5NjDMpU|5h{pn`ZoX&3IqUct6ef5Y70% zn(=X(@$s7R8Jh8#n(;-N@x_|)4w~_jn({GMe#Yn(^a>lJOITlJS#;lJQf8 zlJWAI@d}#pikk6Cn(@k-@p_u^`kL_un(>C3@kW~Qp_=j0n(>L6@#&iJxtj6C3CZ~S zgk*d}LNdNFAsIiLkc?*}CF4a&5L=-T0DlKO=Wg+niXM!`<$L3ci3m}pSi<6le)t`eNVWd>__brg)4tMu0+=6` zJ+au6d*U{oq1$zajLy&tIzwOS41KLLG)8A=tjlpdzv~Qjw{lPXVbPNR{eN1yCwf@9Cwf}BCwf_# zq25+zsE?Hy>T6|&`dPUr`dhgt23WZ#23ol%23ff${<3mU47PGl{B7l)_{YjUF~rI} z@voJ8;y)|*#84~u#4s!O#BeM3#0V=hG}6ipjj}RBqpi%)7%MY0*2)Zxvob^Dt<2B_ zD>F3F$_!1iGDDNC%+M4oGc?u83{A5#L({Fy&;j38-a7PMUrl@i0D>}u5_D4if*@v z=?;r-bf-lT-DU9+-EHwP-DB|y-D~kF-DmL`-EZ+ZJz((#J!tVIJ!J6}J#6tcJ!0_< z%__vVG`kSr(c*>po|Y)Y5A?qTex#!k_=!$P;Ac85fnVsH1b(H968Md-N#J+7Hi7PR zT>^j5GYR}jizU&64o;#c{X2Cxzj3Zwe#mz7$5% z{V9y12T~YK52i4N9!g;>J)FWgdL)JMG&@e8`8iGE^js9dh`_pmV zpUUX|R8jY*YPvtw*8S;8-JhP-{V7lPr;fTm8DGx+>vey+LHDOSb$_}`_os(-e|kjs zCr|e$U-zeWx<9qo{po+YKfS2?(_4D>zpZC~7d`t6_3Zyh&;F0~?Eg;B{_pkd@2>mP zAG$yF*ZpaL?oa>e{xnqgrwO`0P1OBqmhMlpb$?o-`_s}uIzmT1`^)P7R8IG&^144& z(EaJO?oVfQe>$uC(>dLr&KJtrUq$z)s=7Z_)BUNs?oTyze;TIy(-_^KCh7h(L-(h7 zx<4(^{b`f#Pn&gr+M@f@Io+Q!wIhtxjxbR>!c^@DGj)F|AsNrPB2Moz>8zL6J*SrL zISq8rxfJPpB>gp!&cjDK51;Eie53R5lg`8MIuAW{9{TG%4Ay!0Pv>Ej&ck?}hYdOp z8+9Hw={#)KdDx=!uvO<_o6f^_oriKd50!NuYUn)F)p>YA=fT%`Xsz?mUgx2+&coF@ z57+2Cw9t9DRp;S;orec>9-h>BcuMD?wa!Buorlgk4}s3ZYdR0F>pXm*^H8AkkkWaG zbsoOZdH7Q2;TN5UUv(aO>pb+)dH7rB;UArcQ92K!bsnbaJWSVlSfKN;Q0JkY&V#!N zTk;$%rt^@Y^N^|Ya8T#rkj}$lorfbj4@Y$#O6fe5)_EwS^H5gjp`6aczd8>ibsom+ zJWSPjn62}$Q0HN#&ciC5ht)a{r*$6O&HXI@{8_Q=LYM!)vpuOfbxiauV|KE)hxfKS$a2saYPPSstNT9;aEJqFJ7$Sze%7UZz=Iu3288Sw5v%zM$QBw4Uwb z^=zN4XZv(L+cWiSZye)-JG9g1_WoSyum^Ib!ye3)4tpq9I_%+G6z7~A$(0U!G*>$8 zv0Uk}$8)8_p2(FBdoou#?5SMou%~mS!=A~N4tq9NI_$Yz>9FT>rNdsxl@9BgOV#wb zqUUyoCmlA^lMb8ZNr%n$q{FuIq{Ft>4%F<&pO}sq{F`BNr!#c!}a_*yyr=WeczJ~`++ANw!o7PYdz_(A9~VZ3q9$u2@kjN z_fPg@kD2O8hn?n0)~9=t^$VV4-8IF#(?54#I&6k79rh+)I_%B9bl6*b*<)Jx(qUWr z(qZrQrNchuONV{kmk#@eFCF$xUpnktzI52Ped)08`qE+F^QFVS?@NdMz;{V-fBphr zI;{1j!+z+?x!uK=bGy)&4x8|$!}iXT4%;VBI&9xO>9GCsq{H^lLwkPT0eRA4C+10q zos=gXc5|OB?C1WsG##vPL>= zIU^mmypaxD!AOU#Xpru(m5g-Q%0@bD6(b$Cs*w&`%}9r>ZluH3Fw$Xb8tJgLjC9!A zMmlUABOSJ`kq%qWNQbR&q{B8a(qS7K>9CEAbl8iGbl8iHbl6Lbbl6LcblA&`blAp5 zI_%{}I&2do9k!{#ME+c_FqlM}8BC^E8cd-%22<%(2GeMBgX#2YgBkQ1gPHVNgIV-C zgW2?YgE{mDgSqrZgL(8OgZcDkg9Y>!gN3w(!6JIA!D4!w!4i7A!BTpM!7|#?U^%_h zU$wHU_E`%U;}-~U?Y9lU=w}BU^9KxU<-ZB zU@LvxU>kkHU^{)%UD6b*iAiyJ=8bYOXr2yN9TvwPZxwZKo^EMNEd}T zL>GrROqYZ>LYIa(N|%K=Mwf>;PFI9DL05)2Nmqq9MOTM7P1l4tL)V5lOV@=sN7siq zPd9|PKsSczi$7;mh+=L5$k`ksgKi0tNw)=|(7hqb(tRPy(fuLH(*q$Y(1Rf=(nBFC(ZeAs(<33O(4!%$(qkd2(c>Yi(-R?T z(32r*(o-R7(bFMn(=#FJ(6b@x(sLo|(eokd(+eRQP4^gO?{c0jz*Y2A z0h-g(1-P1?DZn-KYyqyN=L&EgJzs$9>4gH^K;3D6BQ55hVbcuv44Y=UXV^5$J;SEi z?in^M?w(=O67Cr`E$Mb$TFO1crls98Y+A-W!={1jZFGlw*GYG}cb#;Xd)G;KyLX** zk9!Y9_qtt|?sK~?-S2i?dcf_v^q|{y=^?l4(!*}orAOSZOOLu;mmYJwE-9?Yi`9x9iex+^$Q9yIq%#aPNWWNcSFyj&kpT=o$AO zh@N%tf#^B+9*CZI?}6wA_a2D4+pse&79pS+5e&_Y@B+<>5Yp@j`LuY1|Irc=UZf=> zyhKYyc$t=t@Cq#x;Z<5T!fUi#gx6{L2yf5|5#FQ~BfLc`MR=Q5j_?kx65(B1HNtze zT7>s$^#~u(8W9R;%?Os(itr(=9ia=Y6QPjSjgX-AA|z@32oY@%p(|||Aw?TSi0MTU zy3vax6wyl}d_*se@G-qC!Y8zGgiq<^5k8|$B79DpM)-nW5#dYPEW%gx$_QW6oCx30 zt0H_$n@9MLULE0kdQF5M=(Q1kq}N6GiC!P!XL>_~U+9eyex)}>_>JBi;dgpVgzmIO zgg@x55&opNMd(3qkI<7o9-$X~B0_KaWQ0ESsR(`P(-Hd7+z9=t7hwSPBMhX^L>NS$ zjqn$JF2Z2iD#G8ib%cLtn+QW_UW9*X+X(;Bb`gfs_7R5B4iSdajuA%CP7y}Z=Oc`w zog<8NoMt{6u@?27R;$34TQEn-Zhcf^=Pd&ihe`^1<+`^K0``^A_>`^T70 z2gH~`2gaC52gR60hsKyqhsBsfhsT&pN5q&%N5+^>N5xn`N5@!5$HZ7f$HrJp$HiDe z$H!PoC&XArC&pM#C&gGnC&ySxr^HxAr^Z-Kr^Q%9r^i@JXT(@XXU14hXT{h+XUEt` z=fv1V=f>Df=f&7U=f~Je7sS{`7sl957sc2?7suF1m&Djbm&Vvlm&Mpam&e#kSH##y zSH{>+yLZC@`e!#Bq&>Rf5bfCwhiR{FI6`}O!%^C&8;;THML14t6yXG|S%j0cRuN9o z+C?}`FDt?s+PDa3>E%T@N1GJkJZ)N(?)*7d6s7y0`z4n_ea_{&ZYDpwu9`(%*UYAw zzI6XAA0_xX+n4TN+?VcO!k6w}(wFXE%9rk6+L!L{I-+}Yj2ze9D$t}a-9PfB`*-!F z`=@;A{;qqayZ`JwRO8pr$&>EycJ&(k>~{5<)a}OZQM5awjC6mui`L<1w~N-LZuhH4 z-R@VPK4awl^|J;I`T046MzocY_t&kByuWT^Hhtb()|Y{rTY&|O7|a>lh6Se_jh-~?fl#_mhOM0{J+o1 HDZ>8&$do2g diff --git a/code/ryzom/common/data_common/weather.cfg b/code/ryzom/common/data_common/weather.cfg deleted file mode 100644 index 897e99e68..000000000 --- a/code/ryzom/common/data_common/weather.cfg +++ /dev/null @@ -1,14 +0,0 @@ -/////////////////////////// -/////////////////////////// -/// Weather CONFIG FILE /// -/////////////////////////// -/////////////////////////// - - -RealDayLength = 3000.0; // real length of the day, in seconds (3000 = 50mn) -NumHours = 24.0; // number of ryzom hours in a day -NightTransitionStartHour = 19.0; // start of night transition -NightTransitionEndHour = 21.0; // end of night transition -DawnTransitionStartHour = 5.0; // start of dawn transition -DawnTransitionEndHour = 7.0; // end of dawn transition -MaxNumColorSteps = 25; // the max number of color steps