|||| [[Hearts of Iron IV/모딩|모딩]] || ||문서 작성||[[Hearts of Iron IV/모딩/이펙트|이펙트]] • 트리거 • 정의 • 모디파이어 • 모디파이어 목록 • 범위 • 현지화 • 변수 • 배열 • 실행시|| ||스크립팅||AI • [[Hearts of Iron IV/모딩/북마크|북마크]] • 건물 • 국가 외부태그 • 국가 • 사단 • [[Hearts of Iron IV/모딩/디시전|디시전]] • 장비 • [[Hearts of Iron IV/모딩/이벤트|이벤트]] • [[Hearts of Iron IV/모딩/국민정신|국민정신]] • 이념 • [[Hearts of Iron IV/모딩/국가중점|국가중점]] • 자원 • 스크립트 GUI • 기술 • 유닛|| ||지도||지도 • 주 • 보급 구역 • 전략 구역|| ||그래픽||인터페이스 • 그래픽 에셋 • 엔티티 • 포스트이펙트 • 파티클 • 폰트|| ||외형||초상화 • 이름 목록 • 음악 • 소리|| ||기타||[[Hearts of Iron IV/공략#s-8|콘솔 명령어]] • 문제 해결 • 모드의 구조|| 이벤트는/Hearts of Iron IV/events 에서 찾아볼 수 있습니다. 이벤트는 주로 2가지가 쓰입니다. 모든 나라에게 보이는 news_event와 특정 국가에만 보이는 country_event로 나뉩니다. [목차] == 네임스페이스 == 모든 이벤트는 맨 위에 add_namespace를 넣어주어야 합니다 예시)add_namespace = GER 보통 이벤트의 형식은 네임스페이스.숫자 (GER.1과 같은 형식) 이기 때문에 네임스페이스를 넣지 않으면 이벤트가 작동하지 않습니다. == 속성 == === id === 이벤트의 번호를 확인 하기 위해 반드시 넣어야합니다. (예시: id = GER.1) === title === 이벤트의 이름을 지정하기 위해 사용합니다, title = GER.1.t 와 같은 형식이며 이름은 localisation 폴더에서 GER.1.t = "독일 이벤트" 같은 형식으로 넣으면 됩니다. === desc === title과 마찬가지로 이벤트의 설명을 지정하기 위해 사용합니다, desc = GER.1.d 와 같은 형식이며 설명은 localisation 폴더에서 GER.1.d = "독일 이벤트 설명" 같은 형식으로 넣으면 됩니다. === picture === 이벤트에 사용되는 사진을 의미 합니다. picture = GFX_germany_event 와 같은 형식으로 사용되며 interface 내의 .gfx 파일에서 GFX_germany_event가 어떤 사진인지 정해두어야합니다. === trigger === trigger = { } 안의 내용이 통과되었을때 (예시: has_country_flag = rhineland ) 해당 내용이 작동되게 합니다. === mean_time_to_happen === mean_time_to_happen = { day = 일수 } 를 넣어둘시 적혀둔 일수가 지날때마다 이벤트가 나오게 할수 있습니다. day 대신에 넣을수 있는 내용은 아래를 참고해주세요. === fire_only_once === fire_only_once = yes 를 넣어둘시 이벤트가 한 번만 발생합니다. === is_triggered_only === is_triggered_only = yes 를 넣어둘시 이벤트가 특정 효과에 의해서만 작동됩니다. 반대로 is_triggered_only = no 일시 이벤트가 불시에 나타날수 있습니다. === timeout_days === timeout_days = 일수 를 넣어둘시 적어둔 일수가 지날시 자동으로 첫번째 선택지가 선택되게 합니다. === fire_for_sender === (Type : boolean, default : yes) false 인 경우 이벤트가 주요 이벤트 인 경우에도 발신 국가에 표시되지 않습니다. === hidden === 이벤트 혹은 이벤트의 효과를 숨깁니다. 주로 선택지를 골랐을때의 효과를 미리 알수 없게 할때 사용합니다. === exclusive === 현재는 사용하지 않는것 같습니다, 바닐라 원본 파일을 확인 해보았으나 아무 파일에도 사용되지 않았습니다. === major === major = yes 를 넣어둘시 모든 나라에 이벤트가 발생합니다. === show_major === show_major = { NOT = { 국가 테그 } } 를 넣어 특정 국가를 major 에서 제외합니다. 즉 모든 나라중에 특정 나라만 안 뜨게 할 때 사용합니다. === option === 이벤트의 선택지를 정합니다. option = { name = GER.1.a } 와 같은 형식, title, desc와 마찬가지로 localisation 폴더에서 GER.1.a = "독일 선택지" 같은 형식으로 넣습니다. === immediate === 이벤트가 발생했을때 선택지와 상관 없이 무조건 특정 효과가 나오게 합니다. == 옵션 == 아래에 나열된 속성 외에도 옵션에 임의의 효과 가 포함될 수 있습니다 . === name === (Type : string) 옵션 이름의 로케이션 키 입니다. === trigger === (유형 : AND 트리거, 기본값 { }:)이 옵션을 사용할 수 있는지 여부를 제어합니다. === ai_chance === Type : AI chance , 기본값 { base = 1 }:) AI가 이 옵션을 선택하는 가중치입니다. 각 옵션의 확률은 가중치를 모든 가중치의 합으로 나눈 값입니다. === original_recipient_only === (유형 : boolean, default : no) 주요 이벤트의 경우이 옵션은 직접 수신자 만 사용할 수 있습니다. == Mean time to happen == === Attributes === === base === (유형 : 숫자 (소수점 3 자리), 기본값 : 1) 수식어를 적용하기 전의 계산 기본 값입니다. === factor === === days === (Type : number) base지정된 값으로 설정 하지만 소수점 이하 자릿수는 인식하지 못합니다. === months === (Type : number) base값의 30 배로 설정 하지만 소수점 이하 자릿수는 인식하지 못합니다. === years === (Type : number) base값을 365 배로 설정 하지만 소수점 이하 자릿수는 인식하지 못합니다. === modifier === modifier블록은 AND 트리거와 같은 구성 요소를 결합합니다. 유일한 예외는 factor및 add입니다. 둘 다 범위가 지정된 변수이며 트리거 구성 요소가 true로 평가되면 현재 MTTH 값에을 더하기 factor전에 곱합니다 add. 여러 번 나타날 수 있으며 적용 가능한 모든 modifier가 정의 된 순서대로 적용됩니다. modifier를 적용한 후 중간 값이 0이면 계산이 일찍 중지됩니다. 즉 add, 이전 modifier가 값을 0으로 설정 한 후에는 값을 다시 늘릴 수 없습니다 . == 예시 == ||mean_time_to_happen = { days = 500 modifier = { factor = 0.4 # If true multiply 500 by 0.4 = 200 NOT = { country_exists = SOV } } modifier = { factor = 0.4 # If true multiply 200 by 0.4 = 40 NOT = { country_exists = ENG } } modifier = { factor = 0.1 # If true multiply 40 by 0.1 = 4 NOT = { country_exists = ENG } NOT = { country_exists = SOV } } }|| == 예시2 == === Country event === ||country_event = { # A unique event ID. # nuke_dropped is the namespace, which helps with organization. id = nuke_dropped.0 title = nuke_dropped.0.t # The localisable text that appears as a header desc = nuke_dropped.0.d # The localisable main text body that appears picture = GFX_report_event_election_vote # Image displayed alongside the text. is_triggered_only = yes # Optional : if set to "yes" the event will only occur by command hidden = yes # Optional : if set to "yes" no one will see the event fire_only_once = yes # Optional : if set to "yes" the event will never occur more than once immediate = { # Optional : all the following will occur once the event occurs if = { limit = { tag = ITA has_government = fascism FROM = { state = 378 } } set_country_flag = duce_nukedem_flag } news_event = { id = nuke_dropped.1 days = 1 } } option = { # This is an example of an option that has no function name = dummy_nuke_option.1.a # The localisable text that appears on the button. } option = { # This is an example of an option that has a function name = dummy_nuke_option.1.b # The localisable text that appears on the button. add_political_power = 100 } option = { # This is an example of an option that has a trigger trigger = { has_country_flag = nuked_before # This option will only appear if the condition is fulfilled. } name = dummy_nuke_option.1.c # The localisable text that appears on the button. add_stability = 0.05 } }|| === News event === ||news_event = { id = nuke_dropped.0 # The unique id. nuke_dropped is the namespace, which can be used for better organization, and is used in localisation. picture = GFX_news_event_nuke # Image displayed alongside the text. major = yes # Optional : if set to "yes" every country in the world will see this event is_triggered_only = yes # Optional : if set to "yes" the event will only occur by command hidden = yes # Optional : if set to "yes" no one will see the event fire_only_once = yes # Optional : if set to "yes" the event will never occur more than once immediate = { # Optional : all the following will occur once the event occurs if = { limit = { tag = ITA has_government = fascism FROM = { state = 378 } } set_country_flag = duce_nukedem_flag } news_event = { id = nuke_dropped.1 days = 1 } } option = { # This is an example of an option that has no function name = dummy_nuke_option.1.a # The localisable text that appears on the button. } option = { # This is an example of an option that has a function ( usually not done on a news event ) name = dummy_nuke_option.1.b # The localisable text that appears on the button. add_political_power = 100 } } Multiple descriptions desc = { #This is the first description, it will be used if the ace pilot is promoted in any country except the major ones (listed below). text = ace_promoted.1.d #this is the localisable text name, which needs to be unique. trigger = { #this is needed trigger. NOT = { tag = GER } #This means that the description will not trigger if the pilot is promoted in Germany, Italy, France, Japan, the United States, the United Kingdom or the Soviet Union. NOT = { tag = ITA } NOT = { tag = FRA } NOT = { tag = JAP } NOT = { tag = USA } NOT = { tag = ENG } NOT = { tag = SOV } } } desc = { #This is the second description, it will be used if the ace pilot is promoted in any major country (of the ones listed below). text = ace_promoted.1.d_major trigger = { OR = { tag = GER #This means that the description will only trigger if the pilot is promoted in Germany, Italy, France, Japan, the United States, the United Kingdom or the Soviet Union. tag = ITA tag = FRA tag = JAP tag = USA tag = ENG tag = SOV } } }|| [[분류:Hearts of Iron IV/모드]]