Hearts of Iron IV/모딩/이벤트

역사 raw
대문 랜덤 문서 최근 토론
문서 작성
이펙트 • 트리거 • 정의 • 모디파이어 • 모디파이어 목록 • 범위 • 현지화 • 변수 • 배열 • 실행시
스크립팅
AI • 북마크 • 건물 • 국가 외부태그 • 국가 • 사단 • 디시전 • 장비 • 이벤트국민정신 • 이념 • 국가중점 • 자원 • 스크립트 GUI • 기술 • 유닛
지도
지도 • 주 • 보급 구역 • 전략 구역
그래픽
인터페이스 • 그래픽 에셋 • 엔티티 • 포스트이펙트 • 파티클 • 폰트
외형
초상화 • 이름 목록 • 음악 • 소리
기타
콘솔 명령어 • 문제 해결 • 모드의 구조

이벤트는/Hearts of Iron IV/events 에서 찾아볼 수 있습니다. 이벤트는 주로 2가지가 쓰입니다.
모든 나라에게 보이는 news_event와 특정 국가에만 보이는 country_event로 나뉩니다.


1. 네임스페이스2. 속성
2.1. id2.2. title2.3. desc2.4. picture2.5. trigger2.6. mean_time_to_happen2.7. fire_only_once2.8. is_triggered_only2.9. timeout_days2.10. fire_for_sender2.11. hidden2.12. exclusive2.13. major2.14. show_major2.15. option2.16. immediate
3. 옵션
3.1. name3.2. trigger3.3. ai_chance3.4. original_recipient_only
4. Mean time to happen
4.1. Attributes4.2. base4.3. factor4.4. days4.5. months4.6. years4.7. modifier
5. 예시6. 예시2
6.1. Country event6.2. News event

1. 네임스페이스[편집]

모든 이벤트는 맨 위에 add_namespace를 넣어주어야 합니다
예시)add_namespace = GER

보통 이벤트의 형식은 네임스페이스.숫자 (GER.1과 같은 형식) 이기 때문에 네임스페이스를 넣지 않으면 이벤트가 작동하지 않습니다.

2. 속성[편집]

2.1. id[편집]

이벤트의 번호를 확인 하기 위해 반드시 넣어야합니다. (예시: id = GER.1)

2.2. title[편집]

이벤트의 이름을 지정하기 위해 사용합니다, title = GER.1.t 와 같은 형식이며
이름은 localisation 폴더에서 GER.1.t = "독일 이벤트" 같은 형식으로 넣으면 됩니다.

2.3. desc[편집]

title과 마찬가지로 이벤트의 설명을 지정하기 위해 사용합니다, desc = GER.1.d 와 같은 형식이며
설명은 localisation 폴더에서 GER.1.d = "독일 이벤트 설명" 같은 형식으로 넣으면 됩니다.

2.4. picture[편집]

이벤트에 사용되는 사진을 의미 합니다. picture = GFX_germany_event 와 같은 형식으로 사용되며
interface 내의 .gfx 파일에서 GFX_germany_event가 어떤 사진인지 정해두어야합니다.

2.5. trigger[편집]

trigger = { } 안의 내용이 통과되었을때 (예시: has_country_flag = rhineland ) 해당 내용이 작동되게 합니다.

2.6. mean_time_to_happen[편집]

mean_time_to_happen = { day = 일수 } 를 넣어둘시 적혀둔 일수가 지날때마다 이벤트가 나오게 할수 있습니다.
day 대신에 넣을수 있는 내용은 아래를 참고해주세요.

2.7. fire_only_once[편집]

fire_only_once = yes 를 넣어둘시 이벤트가 한 번만 발생합니다.

2.8. is_triggered_only[편집]

is_triggered_only = yes 를 넣어둘시 이벤트가 특정 효과에 의해서만 작동됩니다.
반대로 is_triggered_only = no 일시 이벤트가 불시에 나타날수 있습니다.

2.9. timeout_days[편집]

timeout_days = 일수 를 넣어둘시 적어둔 일수가 지날시 자동으로 첫번째 선택지가 선택되게 합니다.

2.10. fire_for_sender[편집]

(Type : boolean, default : yes) false 인 경우 이벤트가 주요 이벤트 인 경우에도 발신 국가에 표시되지 않습니다.

2.11. hidden[편집]

이벤트 혹은 이벤트의 효과를 숨깁니다. 주로 선택지를 골랐을때의 효과를 미리 알수 없게 할때 사용합니다.

2.12. exclusive[편집]

현재는 사용하지 않는것 같습니다, 바닐라 원본 파일을 확인 해보았으나 아무 파일에도 사용되지 않았습니다.

2.13. major[편집]

major = yes 를 넣어둘시 모든 나라에 이벤트가 발생합니다.

2.14. show_major[편집]

show_major = { NOT = { 국가 테그 } } 를 넣어 특정 국가를 major 에서 제외합니다.
즉 모든 나라중에 특정 나라만 안 뜨게 할 때 사용합니다.

2.15. option[편집]

이벤트의 선택지를 정합니다.

option = { name = GER.1.a }

와 같은 형식, title, desc와 마찬가지로 localisation 폴더에서 GER.1.a = "독일 선택지" 같은 형식으로 넣습니다.

2.16. immediate[편집]

이벤트가 발생했을때 선택지와 상관 없이 무조건 특정 효과가 나오게 합니다.

3. 옵션[편집]

아래에 나열된 속성 외에도 옵션에 임의의 효과 가 포함될 수 있습니다 .

3.1. name[편집]

(Type : string) 옵션 이름의 로케이션 키 입니다.

3.2. trigger[편집]

(유형 : AND 트리거, 기본값 { }:)이 옵션을 사용할 수 있는지 여부를 제어합니다.

3.3. ai_chance[편집]

Type : AI chance , 기본값 { base = 1 }:) AI가 이 옵션을 선택하는 가중치입니다. 각 옵션의 확률은 가중치를 모든 가중치의 합으로 나눈 값입니다.

3.4. original_recipient_only[편집]

(유형 : boolean, default : no) 주요 이벤트의 경우이 옵션은 직접 수신자 만 사용할 수 있습니다.

4. Mean time to happen[편집]

4.1. Attributes[편집]

4.2. base[편집]

(유형 : 숫자 (소수점 3 자리), 기본값 : 1) 수식어를 적용하기 전의 계산 기본 값입니다.

4.3. factor[편집]

4.4. days[편집]

(Type : number) base지정된 값으로 설정 하지만 소수점 이하 자릿수는 인식하지 못합니다.

4.5. months[편집]

(Type : number) base값의 30 배로 설정 하지만 소수점 이하 자릿수는 인식하지 못합니다.

4.6. years[편집]

(Type : number) base값을 365 배로 설정 하지만 소수점 이하 자릿수는 인식하지 못합니다.

4.7. modifier[편집]

modifier블록은 AND 트리거와 같은 구성 요소를 결합합니다. 유일한 예외는 factor및 add입니다. 둘 다 범위가 지정된 변수이며 트리거 구성 요소가 true로 평가되면 현재 MTTH 값에을 더하기 factor전에 곱합니다 add. 여러 번 나타날 수 있으며 적용 가능한 모든 modifier가 정의 된 순서대로 적용됩니다. modifier를 적용한 후 중간 값이 0이면 계산이 일찍 중지됩니다. 즉 add, 이전 modifier가 값을 0으로 설정 한 후에는 값을 다시 늘릴 수 없습니다 .

5. 예시[편집]

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 }
}
}

6. 예시2[편집]

6.1. 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
}
}

6.2. 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
}
}
}