==스크립트==
[
(ti_on_weapon_attack, [
(store_trigger_param, ":shooter_agent_no",1),
(init_position, pos51),
(try_begin),
(gt,":shooter_agent_no",-1),
(agent_get_troop_id, ":shooter_troop_no", ":shooter_agent_no"),
(gt,":shooter_troop_no",-1),
(assign, ":ammo", 0),
(try_begin),
(agent_get_item_slot, ":item_id", ":shooter_agent_no", 0),
(item_get_type, ":item_type", ":item_id"),
(eq, ":item_type", 5),
(agent_get_item_cur_ammo, ":ammo", ":shooter_agent_no", 0),
(ge, ":ammo", 9),
(else_try),
(agent_get_item_slot, ":item_id", ":shooter_agent_no", 1),
(item_get_type, ":item_type", ":item_id"),
(eq, ":item_type", 5),
(agent_get_item_cur_ammo, ":ammo", ":shooter_agent_no", 1),
(ge, ":ammo", 9),
(else_try),
(agent_get_item_slot, ":item_id", ":shooter_agent_no", 2),
(item_get_type, ":item_type", ":item_id"),
(eq, ":item_type", 5),
(agent_get_item_cur_ammo, ":ammo", ":shooter_agent_no", 2),
(ge, ":ammo", 9),
(else_try),
(agent_get_item_slot, ":item_id", ":shooter_agent_no", 3),
(item_get_type, ":item_type", ":item_id"),
(eq, ":item_type", 5),
(agent_get_item_cur_ammo, ":ammo", ":shooter_agent_no", 3),
(ge, ":ammo", 9),
(end_try),
(val_sub, ":ammo", 9),
(ge, ":ammo", 0),
(agent_set_ammo,":shooter_agent_no", ":item_id", ":ammo"),
(set_fixed_point_multiplier, 100),
(agent_get_look_position, pos50, ":shooter_agent_no"),
(agent_get_horse, ":is_mounted", ":shooter_agent_no"), # 말 위에서 쏠 때는 270 안탔을 때는 170 높이에서 화살이 나갑니다
(try_begin),
(ge, ":is_mounted", 0),
(position_move_y, pos50, 50),
(position_move_z, pos50, 270,1),
(else_try),
(position_move_y, pos50, 50),
(position_move_z, pos50, 170,1),
(try_end),
(agent_get_wielded_item, ":cur_weapon", ":shooter_agent_no", 0),
(copy_position, pos51, pos50), # 화살이 상하좌우로 -3~3도로 벌어져서 60~70의 속도로 날아갑니다 이렇게 아홉발 반복
(store_random_in_range, ":random_xa", -3, 3),
(store_random_in_range, ":random_za", -3, 3),
(store_random_in_range, ":random_speeda", 6000, 7000),
(position_rotate_x, pos51, ":random_xa"),
(position_rotate_z, pos51, ":random_za"),
(add_missile, ":shooter_agent_no", pos51, ":random_speeda", ":cur_weapon", 0, ":item_id", 0),
(copy_position, pos51, pos50),
(store_random_in_range, ":random_xb", -3, 3),
(store_random_in_range, ":random_zb", -3, 3),
(store_random_in_range, ":random_speedb", 6000, 7000),
(position_rotate_x, pos51, ":random_xb"),
(position_rotate_z, pos51, ":random_zb"),
(add_missile, ":shooter_agent_no", pos51, ":random_speedb", ":cur_weapon", 0, ":item_id", 0),
(copy_position, pos51, pos50),
(store_random_in_range, ":random_xc", -3, 3),
(store_random_in_range, ":random_zc", -3, 3),
(store_random_in_range, ":random_speedc", 6000, 7000),
(position_rotate_x, pos51, ":random_xc"),
(position_rotate_z, pos51, ":random_zc"),
(add_missile, ":shooter_agent_no", pos51, ":random_speedc", ":cur_weapon", 0, ":item_id", 0),
(copy_position, pos51, pos50),
(store_random_in_range, ":random_xd", -3, 3),
(store_random_in_range, ":random_zd", -3, 3),
(store_random_in_range, ":random_speedd", 6000, 7000),
(position_rotate_x, pos51, ":random_xd"),
(position_rotate_z, pos51, ":random_zd"),
(add_missile, ":shooter_agent_no", pos51, ":random_speedd", ":cur_weapon", 0, ":item_id", 0),
(copy_position, pos51, pos50),
(store_random_in_range, ":random_xe", -3, 3),
(store_random_in_range, ":random_ze", -3, 3),
(store_random_in_range, ":random_speede", 6000, 7000),
(position_rotate_x, pos51, ":random_xe"),
(position_rotate_z, pos51, ":random_ze"),
(add_missile, ":shooter_agent_no", pos51, ":random_speede", ":cur_weapon", 0, ":item_id", 0),
(copy_position, pos51, pos50),
(store_random_in_range, ":random_xf", -3, 3),
(store_random_in_range, ":random_zf", -3, 3),
(store_random_in_range, ":random_speedf", 6000, 7000),
(position_rotate_x, pos51, ":random_xf"),
(position_rotate_z, pos51, ":random_zf"),
(add_missile, ":shooter_agent_no", pos51, ":random_speedf", ":cur_weapon", 0, ":item_id", 0),
(copy_position, pos51, pos50),
(store_random_in_range, ":random_xg", -3, 3),
(store_random_in_range, ":random_zg", -3, 3),
(store_random_in_range, ":random_speedg", 6000, 7000),
(position_rotate_x, pos51, ":random_xg"),
(position_rotate_z, pos51, ":random_zg"),
(add_missile, ":shooter_agent_no", pos51, ":random_speedg", ":cur_weapon", 0, ":item_id", 0),
(copy_position, pos51, pos50),
(store_random_in_range, ":random_xh", -3, 3),
(store_random_in_range, ":random_zh", -3, 3),
(store_random_in_range, ":random_speedh", 6000, 7000),
(position_rotate_x, pos51, ":random_xh"),
(position_rotate_z, pos51, ":random_zh"),
(add_missile, ":shooter_agent_no", pos51, ":random_speedh", ":cur_weapon", 0, ":item_id", 0),
(copy_position, pos51, pos50),
(store_random_in_range, ":random_xi", -3, 3),
(store_random_in_range, ":random_zi", -3, 3),
(store_random_in_range, ":random_speedi", 6000, 7000),
(position_rotate_x, pos51, ":random_xi"),
(position_rotate_z, pos51, ":random_zi"),
(add_missile, ":shooter_agent_no", pos51, ":random_speedi", ":cur_weapon", 0, ":item_id", 0),
(try_end),
])]],
==트리거, 샷건용(조금 변경했어요.)==
-51.000000 111 2070 2 1224979098644774912 1 701 1 51 4 0 32 2 1224979098644774912 -1 1718 2 1224979098644774913 1224979098644774912 32 2 1224979098644774913 -1 2133 2 1224979098644774914 0 4 0 1804 3
1224979098644774915 1224979098644774912 0 1570 2 1224979098644774916 1224979098644774915 31 2 1224979098644774916 18 1977 3 1224979098644774914 1224979098644774912 0 30 2 1224979098644774914 0 5 0 1804 3 1224979098644774915 1224979098644774912 1 1570 2 1224979098644774916 1224979098644774915 31 2 1224979098644774916 18 1977 3 1224979098644774914 1224979098644774912 1 30 2 1224979098644774914 0 5 0 1804 3 1224979098644774915 1224979098644774912 2 1570 2 1224979098644774916 1224979098644774915 31 2 1224979098644774916 18 1977 3 1224979098644774914 1224979098644774912 2 30 2 1224979098644774914 0 5 0 1804 3 1224979098644774915 1224979098644774912 3 1570 2 1224979098644774916 1224979098644774915 31 2 1224979098644774916 18 1977 3 1224979098644774914 1224979098644774912 3 30 2 1224979098644774914 0 3 0 2106 2 1224979098644774914 0 30 2 1224979098644774914 0 1776 3 1224979098644774912 1224979098644774915 1224979098644774914 2124 1 100 1709 2 50 1224979098644774912 1714 2 1224979098644774917 1224979098644774912 4 0 30 2 1224979098644774917 0 721 2 50 50 722 3 50 270 1 5 0 721 2 50 50 722 3 50 170 1 3 0 1726 3 1224979098644774918 1224979098644774912 0 700 2 51 50 2136 3 1224979098644774919 -3 3 2136 3 1224979098644774920 -3 3 2136 3 1224979098644774921 8400 8600 723 2 51 1224979098644774919 725 2 51 1224979098644774920 1829 7 1224979098644774912 51 1224979098644774921 1224979098644774918 0 1224979098644774915 0 700 2 51 50 2136 3 1224979098644774922 -3 3 2136 3 1224979098644774923 -3 3 2136 3 1224979098644774924 8400 8600 723 2 51 1224979098644774922 725 2 51 1224979098644774923 1829 7 1224979098644774912 51 1224979098644774924 1224979098644774918 0 1224979098644774915 0 700 2 51 50 2136 3 1224979098644774925 -3 3 2136 3 1224979098644774926 -3 3 2136 3 1224979098644774927 8400 8600 723 2 51 1224979098644774925 725 2 51 1224979098644774926 1829 7 1224979098644774912 51 1224979098644774927 1224979098644774918 0 1224979098644774915 0 700 2 51 50 2136 3 1224979098644774928 -3 3 2136 3 1224979098644774929 -3 3 2136 3 1224979098644774930 8400 8600 723 2 51 1224979098644774928 725 2 51 1224979098644774929 1829 7 1224979098644774912 51 1224979098644774930 1224979098644774918 0 1224979098644774915 0 700 2 51 50 2136 3 1224979098644774931 -3 3 2136 3 1224979098644774932 -3 3 2136 3 1224979098644774933 8400 8600 723 2 51 1224979098644774931 725 2 51 1224979098644774932 1829 7 1224979098644774912 51 1224979098644774933 1224979098644774918 0 1224979098644774915 0 700 2 51 50 2136 3 1224979098644774934 -3 3 2136 3 1224979098644774935 -3 3 2136 3 1224979098644774936 8400 8600 723 2 51 1224979098644774934 725 2 51 1224979098644774935 1829 7 1224979098644774912 51 1224979098644774936 1224979098644774918 0 1224979098644774915 0 700 2 51 50 2136 3 1224979098644774937 -3 3 2136 3 1224979098644774938 -3 3 2136 3 1224979098644774939 8400 8600 723 2 51 1224979098644774937 725 2 51 1224979098644774938 1829 7 1224979098644774912 51 1224979098644774939 1224979098644774918 0 1224979098644774915 0 700 2 51 50 2136 3 1224979098644774940 -3 3 2136 3 1224979098644774941 -3 3 2136 3 1224979098644774942 8400 8600 723 2 51 1224979098644774940 725 2 51 1224979098644774941 1829 7 1224979098644774912 51 1224979098644774942 1224979098644774918 0 1224979098644774915 0 700 2 51 50 2136 3 1224979098644774943 -3 3 2136 3 1224979098644774944 -3 3 2136 3 1224979098644774945 8400 8600 723 2 51 1224979098644774943 725 2 51 1224979098644774944 1829 7 1224979098644774912 51 1224979098644774945 1224979098644774918 0 1224979098644774915 0 3 0
빨간색 숫자 - 탄약 종류, 5= 화살 6= 석궁, 18 = 총알
주황색 숫자 - 탄속 범위, 소수점 둘째짜리까지 표기하므로 8400 = 84.00
초록색 숫자 - -51.000000은 근접 트리거이며 -52.000000은 원거리 트리거에요.
보라색 숫자 - 탄 분산 각도, 기본값인 -3 ~ 3은 발사위치를 기준으로 6도 이내에서 분산이 이뤄진다는 이야기에요.
위 트리거는 샷건용으로 평균탄속 85에 10발이 무작위로 나가는 구조입니다.
저걸 응용해여 자동소총을 만들어보려고 했지만, 게임의 모듈 트리거 자체가 delay 함수와 연발사격을 지원하지 않아 3점사나 샷건이 한계더군요.
2. 마인드 컨트롤 스크립트
==스크립트==
[
(ti_on_missile_hit,[
(store_trigger_param, ":shooter_agent_no",1),
(init_position, pos41),
(assign, ":max_range", 400),
(try_begin),
(gt,":shooter_agent_no",-1),
(agent_get_troop_id, ":shooter_troop_no", ":shooter_agent_no"),
(gt,":shooter_troop_no",-1),
(set_fixed_point_multiplier, 100), # Make sure we have centimeters as the fixed point
(try_for_agents, ":agent_no"),
(agent_is_alive,":agent_no"),
(agent_is_human,":agent_no"),
(neq, ":shooter_agent_no", ":agent_no"),
(neg|agent_is_ally, ":agent_no"),
(copy_position, pos60, pos1),
(agent_get_position, pos40, ":agent_no"),
(copy_position, pos41, pos40),
(position_move_z,pos41,90,1), # Move 90 centimeter up (center of body) for better hit detection
(get_distance_between_positions,":cur_dist",pos41,pos60),
(store_random_in_range, ":damage_prop", 0, 100),
(le, ":cur_dist", ":max_range"), # We are in range.
(try_begin),
(lt, ":damage_prop", 20),
(agent_get_team, ":team", ":shooter_agent_no"),
(agent_set_team, ":agent_no", ":team"),
(try_end),
(try_end),
])]
=== 해석 ===
[
(ti_on_missile_hit,[
(store_trigger_param, ":shooter_agent_no",1),
(init_position, pos41),
(assign, ":max_range", 400), #범위는 4m 입니다.
(try_begin),
(gt,":shooter_agent_no",-1),
(agent_get_troop_id, ":shooter_troop_no", ":shooter_agent_no"),
(gt,":shooter_troop_no",-1),
(set_fixed_point_multiplier, 100), # Make sure we have centimeters as the fixed point
(try_for_agents, ":agent_no"),
# 조건들입니다. 적에게만 실행되야 하므로 다음과 같은 조건을 같습니다.
# 살아있고, 사람이고, 공격자 본인이 아니며, 아군이 아니고 탄착지점 해당 범위내에 있는 에이전트들을 찾습니다.
(agent_is_alive,":agent_no"),
(agent_is_human,":agent_no"),
(neq, ":shooter_agent_no", ":agent_no"),
(neg|agent_is_ally, ":agent_no"),
(copy_position, pos60, pos1),
(agent_get_position, pos40, ":agent_no"),
(copy_position, pos41, pos40),
(position_move_z,pos41,90,1), # Move 90 centimeter up (center of body) for better hit detection
(get_distance_between_positions,":cur_dist",pos41,pos60),
(le, ":cur_dist", ":max_range"), # We are in range.
# 0~99까지 임의의 숫자를 ":damage_prop" 라는 변수에 저장합니다. 확률에 사용되죠.
(store_random_in_range, ":damage_prop", 0, 100),
# "damage_prop"이 20 미만일때,(20% 확률) 해당 에이전트들은 공격자의 팀으로 전환됩니다
(try_begin),
(lt, ":damage_prop", 20),
(agent_get_team, ":team", ":shooter_agent_no"),
(agent_set_team, ":agent_no", ":team"),
(try_end),
(try_end),
])]
=== 트리거 ===
-52.000000 26 2070 2 1224979098644774912 1 701 1 41 2133 2 1224979098644774913 400 4 0 32 2 1224979098644774912 -1 1718 2 1224979098644774914 1224979098644774912 32 2 1224979098644774914 -1 2124 1 100 12 1 1224979098644774915 1702 1 1224979098644774915 1704 1 1224979098644774915 2147483679 2 1224979098644774912 1224979098644774915 2147485354 1 1224979098644774915 700 2 60 1 1710 2 40 1224979098644774915 700 2 41 40 722 3 41 90 1 710 3 1224979098644774916 41 60 2136 3 1224979098644774917 0 100 2147483680 2 1224979098644774916 1224979098644774913 4 0 2147483678 2 1224979098644774917 20 1770 2 1224979098644774918 1224979098644774912 1771 2 1224979098644774915 1224979098644774918 3 0 3 0
400이 범위(100당 1미터입니다.), 20이 확률입니다.
3. 힐링 스크립트
===스크립트===
[
(ti_on_weapon_attack, [
(store_trigger_param, ":shooter_agent_no",1),
(init_position, pos51),
(position_copy_origin, pos51, pos1), # Copy hit position for the script
(assign, ":max_range", 5),
(assign, ":heal_a", 3), #3~8
(assign, ":heal_b", 2), #2~6
(try_begin),
(gt,":shooter_agent_no",-1),
(agent_get_troop_id, ":shooter_troop_no", ":shooter_agent_no"),
(gt,":shooter_troop_no",-1),
(store_skill_level, ":skill", "skl_first_aid", ":shooter_troop_no"),
(val_div, ":skill", 2),
(val_add, ":heal_a", ":skill"),
(store_skill_level, ":skill", "skl_wound_treatment", ":shooter_troop_no"),
(val_mul, ":skill", 2),
(val_div, ":skill", 5),
(val_add, ":heal_b", ":skill"),
(store_skill_level, ":skill", "skl_leadership", ":shooter_troop_no"),
(val_add, ":max_range", ":skill"),
(store_agent_hit_points, ":cur_hit_points", ":shooter_agent_no"),
(val_add, ":cur_hit_points", ":heal_a"),
(try_begin),
(gt, ":cur_hit_points", 100),
(assign, ":cur_hit_points", 100),
(try_end),
(agent_set_hit_points, ":shooter_agent_no", ":cur_hit_points"),
(val_mul, ":max_range", 100), #setting distance from meters to cm
(set_fixed_point_multiplier, 100), # Make sure we have centimeters as the fixed point
(try_for_agents, ":agent_no"),
(agent_is_alive,":agent_no"),
(neq, ":shooter_agent_no", ":agent_no"),
(agent_is_human,":agent_no"),
(agent_is_ally, ":agent_no"),
(agent_get_position,pos41,":agent_no"),
(position_move_z,pos41,90), # Move 90 centimeter up (center of body) for better hit detection
(get_distance_between_positions,":cur_dist",pos41,pos51),
(le, ":cur_dist", ":max_range"), # We are in range.
(store_agent_hit_points, ":cur_hit_points", ":agent_no",0),
(val_add, ":cur_hit_points", ":heal_b"),
(try_begin),
(gt, ":cur_hit_points", 100),
(assign, ":cur_hit_points", 100),
(try_end),
(agent_set_hit_points, ":agent_no", ":cur_hit_points",0),
(try_end),
(try_end),
(set_fixed_point_multiplier, 1)
])]
===해석===
[
(ti_on_weapon_attack, [
(store_trigger_param, ":shooter_agent_no",1),
(init_position, pos51),
(position_copy_origin, pos51, pos1), # Copy hit position for the script
(assign, ":max_range", 5), #기본 범위입니다.
(assign, ":heal_a", 3), #3~8 #무기 장착한 캐릭터의 기본 %
(assign, ":heal_b", 2), #2~6 #부대 힐링 기본 %
(try_begin),
(gt,":shooter_agent_no",-1),
(agent_get_troop_id, ":shooter_troop_no", ":shooter_agent_no"),
(gt,":shooter_troop_no",-1),
#혹시 스킬에 의한 적용이 마음에 들지 않으면 파란 부분을 지웁니다.
(store_skill_level, ":skill", "skl_first_aid", ":shooter_troop_no"), #응급처치에 의한
(val_div, ":skill", 2),
(val_add, ":heal_a", ":skill"),
(store_skill_level, ":skill", "skl_wound_treatment", ":shooter_troop_no"),
(val_mul, ":skill", 2),
(val_div, ":skill", 5),
(val_add, ":heal_b", ":skill"),
(store_skill_level, ":skill", "skl_leadership", ":shooter_troop_no"),
(val_add, ":max_range", ":skill"),
#캐릭터 개인을 위한 힐링 스크립트입니다. 캐릭터의 체력 데이터를 뽑아서 % 더하고 적용하는 과정입니다.
(store_agent_hit_points, ":cur_hit_points", ":shooter_agent_no"),
(val_add, ":cur_hit_points", ":heal_a"),
(try_begin),
(gt, ":cur_hit_points", 100),
(assign, ":cur_hit_points", 100),
(try_end),
(agent_set_hit_points, ":shooter_agent_no", ":cur_hit_points"),
(val_mul, ":max_range", 100), #setting distance from meters to cm
(set_fixed_point_multiplier, 100), # Make sure we have centimeters as the fixed point
(try_for_agents, ":agent_no"), #에이젼트들을 조사합니다.
#조건들. 살아있고, 본인이 아니고 사람이고, 동맹이며, 캐릭터와의 거리가 범위내일 경우 스크립트가 진행됩니다.
(agent_is_alive,":agent_no"),
(neq, ":shooter_agent_no", ":agent_no"),
(agent_is_human,":agent_no"),
(agent_is_ally, ":agent_no"),
(agent_get_position,pos41,":agent_no"),
(position_move_z,pos41,90), # Move 90 centimeter up (center of body) for better hit detection
(get_distance_between_positions,":cur_dist",pos41,pos51),
(le, ":cur_dist", ":max_range"), # We are in range.
#부대 회복 스크립트입니다.
(store_agent_hit_points, ":cur_hit_points", ":agent_no",0),
(val_add, ":cur_hit_points", ":heal_b"),
(try_begin),
(gt, ":cur_hit_points", 100),
(assign, ":cur_hit_points", 100),
(try_end),
(agent_set_hit_points, ":agent_no", ":cur_hit_points",0),
(try_end),
(try_end),
(set_fixed_point_multiplier, 1)
])]
==트리거==
-51.000000 47 2070 2 1224979098644774912 1 701 1 51 719 2 51 1 2133 2 1224979098644774913 5 2133 2 1224979098644774914 3 2133 2 1224979098644774915 2 4 0 32 2 1224979098644774912 -1 1718 2 1224979098644774916 1224979098644774912 32 2 1224979098644774916 -1 2170 3 1224979098644774917 1369094286720630793 1224979098644774916 2108 2 1224979098644774917 2 2105 2 1224979098644774914 1224979098644774917 2170 3 1224979098644774917 1369094286720630795 1224979098644774916 2107 2 1224979098644774917 2 2108 2 1224979098644774917 5 2105 2 1224979098644774915 1224979098644774917 2170 3 1224979098644774917 1369094286720630785 1224979098644774916 2105 2 1224979098644774913 1224979098644774917 1720 2 1224979098644774918 1224979098644774912 2105 2 1224979098644774918 1224979098644774914 4 0 32 2 1224979098644774918 100 2133 2 1224979098644774918 100 3 0 1721 2 1224979098644774912 1224979098644774918 2107 2 1224979098644774913 100 2124 1 100 12 1 1224979098644774919 1702 1 1224979098644774919 2147483679 2 1224979098644774912 1224979098644774919 1704 1 1224979098644774919 1706 1 1224979098644774919 1710 2 41 1224979098644774919 722 2 41 90 710 3 1224979098644774920 41 51 2147483680 2 1224979098644774920 1224979098644774913 1720 3 1224979098644774918 1224979098644774919 0 2105 2 1224979098644774918 1224979098644774915 4 0 32 2 1224979098644774918 100 2133 2 1224979098644774918 100 3 0 1721 3 1224979098644774919 1224979098644774918 0 3 0 3 0 2124 1 1
5 : 범위입니다. m단위입니다.
3 : 기본 개인 힐링량입니다. (3%)
2번째 줄 2 : 기본 부대 힐링량입니다. (2%)
다음 줄의 2 : 개인 힐링은 응급처치 2당 1%씩 증가합니다. 3으로 바꾸면 3당 1씩 4로 바꾸면 4당 1%씩 오릅니다.
다음줄의 2와5, 부대힐링은 부상치료 2.5당 1%씩 증가합니다. 최대치인 10에서 4% 증가하죠. 2는 곱하기, 5는 나눕니다.
예를들어 2를 1으로, 5를 2로 바꾸면 부상치료 2당 1%씩 증가하게 되요.
4. 기타 스크립트
==순간이동==
-51.000000 16 2133 2 1224979098644774912 99999 12 1 1224979098644774913 1702 1 1224979098644774913 1704 1 1224979098644774913 1709 2 2 1224979098644774913 710 3 1224979098644774914 1 2 2147483678 2 1224979098644774914 1224979098644774912 2133 2 1224979098644774915 1224979098644774913 2133 2 1224979098644774912 1224979098644774914 3 0 1709 2 2 1224979098644774915 1969 3 1008806316530991107 2 95 721 2 2 300 791 1 2 1969 3 1008806316530991107 2 95 1711 2 1224979098644774915 2
빨간색 숫자 300이 거리입니다.
100 = 1미터 입니다.
300이면 캐릭터가 바라보는 방향으로 3미터 앞으로 순간이동합니다.
1000이면 10미터
10000이면 100미터 순간이동합니다.
==자가 회복(간이)==
-51.000000 4 2071 1 1224979098644774913 1720 3 72057594037927972 1224979098644774913 0 2105 2 72057594037927972 10 1721 3 1224979098644774913 72057594037927972 0
빨간색 10이 회복 퍼센트입니다.
출처는 네이버 마공카페 식비님이나 ㅇㄴㄷㅎ님 글을 참고하였습니다.
링크 : https://cafe.naver.com/warband/232770
==스크립트==
[
(ti_on_missile_hit,[
(store_trigger_param, ":shooter_agent_no",1),
(init_position, pos41),
(assign, ":max_range", 400),
(try_begin),
(gt,":shooter_agent_no",-1),
(agent_get_troop_id, ":shooter_troop_no", ":shooter_agent_no"),
(gt,":shooter_troop_no",-1),
(set_fixed_point_multiplier, 100), # Make sure we have centimeters as the fixed point
(try_for_agents, ":agent_no"),
(agent_is_alive,":agent_no"),
(agent_is_human,":agent_no"),
(neq, ":shooter_agent_no", ":agent_no"),
(neg|agent_is_ally, ":agent_no"),
(copy_position, pos60, pos1),
(agent_get_position, pos40, ":agent_no"),
(copy_position, pos41, pos40),
(position_move_z,pos41,90,1), # Move 90 centimeter up (center of body) for better hit detection
(get_distance_between_positions,":cur_dist",pos41,pos60),
(store_random_in_range, ":damage_prop", 0, 100),
(le, ":cur_dist", ":max_range"), # We are in range.
(try_begin),
(lt, ":damage_prop", 20),
(agent_get_team, ":team", ":shooter_agent_no"),
(agent_set_team, ":agent_no", ":team"),
(try_end),
(try_end),
])]
=== 해석 ===
[
(ti_on_missile_hit,[
(store_trigger_param, ":shooter_agent_no",1),
(init_position, pos41),
(assign, ":max_range", 400), #범위는 4m 입니다.
(try_begin),
(gt,":shooter_agent_no",-1),
(agent_get_troop_id, ":shooter_troop_no", ":shooter_agent_no"),
(gt,":shooter_troop_no",-1),
(set_fixed_point_multiplier, 100), # Make sure we have centimeters as the fixed point
(try_for_agents, ":agent_no"),
# 조건들입니다. 적에게만 실행되야 하므로 다음과 같은 조건을 같습니다.
# 살아있고, 사람이고, 공격자 본인이 아니며, 아군이 아니고 탄착지점 해당 범위내에 있는 에이전트들을 찾습니다.
(agent_is_alive,":agent_no"),
(agent_is_human,":agent_no"),
(neq, ":shooter_agent_no", ":agent_no"),
(neg|agent_is_ally, ":agent_no"),
(copy_position, pos60, pos1),
(agent_get_position, pos40, ":agent_no"),
(copy_position, pos41, pos40),
(position_move_z,pos41,90,1), # Move 90 centimeter up (center of body) for better hit detection
(get_distance_between_positions,":cur_dist",pos41,pos60),
(le, ":cur_dist", ":max_range"), # We are in range.
# 0~99까지 임의의 숫자를 ":damage_prop" 라는 변수에 저장합니다. 확률에 사용되죠.
(store_random_in_range, ":damage_prop", 0, 100),
# "damage_prop"이 20 미만일때,(20% 확률) 해당 에이전트들은 공격자의 팀으로 전환됩니다
(try_begin),
(lt, ":damage_prop", 20),
(agent_get_team, ":team", ":shooter_agent_no"),
(agent_set_team, ":agent_no", ":team"),
(try_end),
(try_end),
])]
=== 트리거 ===
-52.000000 26 2070 2 1224979098644774912 1 701 1 41 2133 2 1224979098644774913 400 4 0 32 2 1224979098644774912 -1 1718 2 1224979098644774914 1224979098644774912 32 2 1224979098644774914 -1 2124 1 100 12 1 1224979098644774915 1702 1 1224979098644774915 1704 1 1224979098644774915 2147483679 2 1224979098644774912 1224979098644774915 2147485354 1 1224979098644774915 700 2 60 1 1710 2 40 1224979098644774915 700 2 41 40 722 3 41 90 1 710 3 1224979098644774916 41 60 2136 3 1224979098644774917 0 100 2147483680 2 1224979098644774916 1224979098644774913 4 0 2147483678 2 1224979098644774917 20 1770 2 1224979098644774918 1224979098644774912 1771 2 1224979098644774915 1224979098644774918 3 0 3 0
400이 범위(100당 1미터입니다.), 20이 확률입니다.
3. 힐링 스크립트
===스크립트===
[
(ti_on_weapon_attack, [
(store_trigger_param, ":shooter_agent_no",1),
(init_position, pos51),
(position_copy_origin, pos51, pos1), # Copy hit position for the script
(assign, ":max_range", 5),
(assign, ":heal_a", 3), #3~8
(assign, ":heal_b", 2), #2~6
(try_begin),
(gt,":shooter_agent_no",-1),
(agent_get_troop_id, ":shooter_troop_no", ":shooter_agent_no"),
(gt,":shooter_troop_no",-1),
(store_skill_level, ":skill", "skl_first_aid", ":shooter_troop_no"),
(val_div, ":skill", 2),
(val_add, ":heal_a", ":skill"),
(store_skill_level, ":skill", "skl_wound_treatment", ":shooter_troop_no"),
(val_mul, ":skill", 2),
(val_div, ":skill", 5),
(val_add, ":heal_b", ":skill"),
(store_skill_level, ":skill", "skl_leadership", ":shooter_troop_no"),
(val_add, ":max_range", ":skill"),
(store_agent_hit_points, ":cur_hit_points", ":shooter_agent_no"),
(val_add, ":cur_hit_points", ":heal_a"),
(try_begin),
(gt, ":cur_hit_points", 100),
(assign, ":cur_hit_points", 100),
(try_end),
(agent_set_hit_points, ":shooter_agent_no", ":cur_hit_points"),
(val_mul, ":max_range", 100), #setting distance from meters to cm
(set_fixed_point_multiplier, 100), # Make sure we have centimeters as the fixed point
(try_for_agents, ":agent_no"),
(agent_is_alive,":agent_no"),
(neq, ":shooter_agent_no", ":agent_no"),
(agent_is_human,":agent_no"),
(agent_is_ally, ":agent_no"),
(agent_get_position,pos41,":agent_no"),
(position_move_z,pos41,90), # Move 90 centimeter up (center of body) for better hit detection
(get_distance_between_positions,":cur_dist",pos41,pos51),
(le, ":cur_dist", ":max_range"), # We are in range.
(store_agent_hit_points, ":cur_hit_points", ":agent_no",0),
(val_add, ":cur_hit_points", ":heal_b"),
(try_begin),
(gt, ":cur_hit_points", 100),
(assign, ":cur_hit_points", 100),
(try_end),
(agent_set_hit_points, ":agent_no", ":cur_hit_points",0),
(try_end),
(try_end),
(set_fixed_point_multiplier, 1)
])]
===해석===
[
(ti_on_weapon_attack, [
(store_trigger_param, ":shooter_agent_no",1),
(init_position, pos51),
(position_copy_origin, pos51, pos1), # Copy hit position for the script
(assign, ":max_range", 5), #기본 범위입니다.
(assign, ":heal_a", 3), #3~8 #무기 장착한 캐릭터의 기본 %
(assign, ":heal_b", 2), #2~6 #부대 힐링 기본 %
(try_begin),
(gt,":shooter_agent_no",-1),
(agent_get_troop_id, ":shooter_troop_no", ":shooter_agent_no"),
(gt,":shooter_troop_no",-1),
#혹시 스킬에 의한 적용이 마음에 들지 않으면 파란 부분을 지웁니다.
(store_skill_level, ":skill", "skl_first_aid", ":shooter_troop_no"), #응급처치에 의한
(val_div, ":skill", 2),
(val_add, ":heal_a", ":skill"),
(store_skill_level, ":skill", "skl_wound_treatment", ":shooter_troop_no"),
(val_mul, ":skill", 2),
(val_div, ":skill", 5),
(val_add, ":heal_b", ":skill"),
(store_skill_level, ":skill", "skl_leadership", ":shooter_troop_no"),
(val_add, ":max_range", ":skill"),
#캐릭터 개인을 위한 힐링 스크립트입니다. 캐릭터의 체력 데이터를 뽑아서 % 더하고 적용하는 과정입니다.
(store_agent_hit_points, ":cur_hit_points", ":shooter_agent_no"),
(val_add, ":cur_hit_points", ":heal_a"),
(try_begin),
(gt, ":cur_hit_points", 100),
(assign, ":cur_hit_points", 100),
(try_end),
(agent_set_hit_points, ":shooter_agent_no", ":cur_hit_points"),
(val_mul, ":max_range", 100), #setting distance from meters to cm
(set_fixed_point_multiplier, 100), # Make sure we have centimeters as the fixed point
(try_for_agents, ":agent_no"), #에이젼트들을 조사합니다.
#조건들. 살아있고, 본인이 아니고 사람이고, 동맹이며, 캐릭터와의 거리가 범위내일 경우 스크립트가 진행됩니다.
(agent_is_alive,":agent_no"),
(neq, ":shooter_agent_no", ":agent_no"),
(agent_is_human,":agent_no"),
(agent_is_ally, ":agent_no"),
(agent_get_position,pos41,":agent_no"),
(position_move_z,pos41,90), # Move 90 centimeter up (center of body) for better hit detection
(get_distance_between_positions,":cur_dist",pos41,pos51),
(le, ":cur_dist", ":max_range"), # We are in range.
#부대 회복 스크립트입니다.
(store_agent_hit_points, ":cur_hit_points", ":agent_no",0),
(val_add, ":cur_hit_points", ":heal_b"),
(try_begin),
(gt, ":cur_hit_points", 100),
(assign, ":cur_hit_points", 100),
(try_end),
(agent_set_hit_points, ":agent_no", ":cur_hit_points",0),
(try_end),
(try_end),
(set_fixed_point_multiplier, 1)
])]
==트리거==
-51.000000 47 2070 2 1224979098644774912 1 701 1 51 719 2 51 1 2133 2 1224979098644774913 5 2133 2 1224979098644774914 3 2133 2 1224979098644774915 2 4 0 32 2 1224979098644774912 -1 1718 2 1224979098644774916 1224979098644774912 32 2 1224979098644774916 -1 2170 3 1224979098644774917 1369094286720630793 1224979098644774916 2108 2 1224979098644774917 2 2105 2 1224979098644774914 1224979098644774917 2170 3 1224979098644774917 1369094286720630795 1224979098644774916 2107 2 1224979098644774917 2 2108 2 1224979098644774917 5 2105 2 1224979098644774915 1224979098644774917 2170 3 1224979098644774917 1369094286720630785 1224979098644774916 2105 2 1224979098644774913 1224979098644774917 1720 2 1224979098644774918 1224979098644774912 2105 2 1224979098644774918 1224979098644774914 4 0 32 2 1224979098644774918 100 2133 2 1224979098644774918 100 3 0 1721 2 1224979098644774912 1224979098644774918 2107 2 1224979098644774913 100 2124 1 100 12 1 1224979098644774919 1702 1 1224979098644774919 2147483679 2 1224979098644774912 1224979098644774919 1704 1 1224979098644774919 1706 1 1224979098644774919 1710 2 41 1224979098644774919 722 2 41 90 710 3 1224979098644774920 41 51 2147483680 2 1224979098644774920 1224979098644774913 1720 3 1224979098644774918 1224979098644774919 0 2105 2 1224979098644774918 1224979098644774915 4 0 32 2 1224979098644774918 100 2133 2 1224979098644774918 100 3 0 1721 3 1224979098644774919 1224979098644774918 0 3 0 3 0 2124 1 1
5 : 범위입니다. m단위입니다.
3 : 기본 개인 힐링량입니다. (3%)
2번째 줄 2 : 기본 부대 힐링량입니다. (2%)
다음 줄의 2 : 개인 힐링은 응급처치 2당 1%씩 증가합니다. 3으로 바꾸면 3당 1씩 4로 바꾸면 4당 1%씩 오릅니다.
다음줄의 2와5, 부대힐링은 부상치료 2.5당 1%씩 증가합니다. 최대치인 10에서 4% 증가하죠. 2는 곱하기, 5는 나눕니다.
예를들어 2를 1으로, 5를 2로 바꾸면 부상치료 2당 1%씩 증가하게 되요.
4. 기타 스크립트
==순간이동==
-51.000000 16 2133 2 1224979098644774912 99999 12 1 1224979098644774913 1702 1 1224979098644774913 1704 1 1224979098644774913 1709 2 2 1224979098644774913 710 3 1224979098644774914 1 2 2147483678 2 1224979098644774914 1224979098644774912 2133 2 1224979098644774915 1224979098644774913 2133 2 1224979098644774912 1224979098644774914 3 0 1709 2 2 1224979098644774915 1969 3 1008806316530991107 2 95 721 2 2 300 791 1 2 1969 3 1008806316530991107 2 95 1711 2 1224979098644774915 2
빨간색 숫자 300이 거리입니다.
100 = 1미터 입니다.
300이면 캐릭터가 바라보는 방향으로 3미터 앞으로 순간이동합니다.
1000이면 10미터
10000이면 100미터 순간이동합니다.
==자가 회복(간이)==
-51.000000 4 2071 1 1224979098644774913 1720 3 72057594037927972 1224979098644774913 0 2105 2 72057594037927972 10 1721 3 1224979098644774913 72057594037927972 0
빨간색 10이 회복 퍼센트입니다.
출처는 네이버 마공카페 식비님이나 ㅇㄴㄷㅎ님 글을 참고하였습니다.
링크 : https://cafe.naver.com/warband/232770
댓글 없음:
댓글 쓰기
글에 대한 의문점이나 요청점, 남기고 싶은 댓글이 있으시면 남겨 주세요. 단 악성 및 스팸성 댓글일 경우 삭제 및 차단될 수 있습니다.
모든 댓글은 검토 후 게시됩니다.