Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_MissionHeader.c
Go to the documentation of this file.
2{
3 [Attribute("", UIWidgets.EditBox, "Name of this mission.")]
4 string m_sName;
5
6 [Attribute("", UIWidgets.EditBox, "Author of this mission.")]
7 string m_sAuthor;
8
9 [Attribute("", UIWidgets.EditBox, "Path to mission.")]
10 string m_sPath;
11
12 [Attribute("", UIWidgets.EditBox, "Brief description of this mission's purpose.")]
13 string m_sDescription;
14
15 [Attribute("", UIWidgets.EditBox, "Detailed description of this mission (i.e. rules).")]
16 string m_sDetails;
17
18 [Attribute("{6CFADAEE9287D1D2}UI/Textures/WorldSelection/Default.edds", UIWidgets.ResourcePickerThumbnail, "Icon texture of this mission visible e.g. in menus.", "edds")]
19 ResourceName m_sIcon;
20
21 [Attribute("{C58FCC06AF13075B}UI/Textures/MissionLoadingScreens/placeholder_1.edds", UIWidgets.ResourcePickerThumbnail, "Texture of this mission visible when loading this mission.", "edds")]
22 ResourceName m_sLoadingScreen;
23
24 [Attribute("{C58FCC06AF13075B}UI/Textures/MissionLoadingScreens/placeholder_1.edds", UIWidgets.ResourcePickerThumbnail, "Texture of this mission visible when loading this mission.", "edds")]
25 ResourceName m_sPreviewImage;
26
27 [Attribute("Sandbox", UIWidgets.EditBox, "Game mode of this mission.")]
28 string m_sGameMode;
29
30 [Attribute("1", UIWidgets.EditBox, "The count of players for this mission")]
31 int m_iPlayerCount;
32
33 [Attribute("15", UIWidgets.Flags, "If all save types are disabled, the entire persistence system is disabled", enumType: ESaveGameType)]
34 ESaveGameType m_eSaveTypes;
35
36 [Attribute("0", uiwidget: UIWidgets.Flags, "Editable Game Flags", "", ParamEnumArray.FromEnum(EGameFlags))]
37 EGameFlags m_eEditableGameFlags;
38
39 [Attribute("0", uiwidget: UIWidgets.Flags, "Default Game Flags", "", ParamEnumArray.FromEnum(EGameFlags))]
40 EGameFlags m_eDefaultGameFlags;
41
42 [Attribute("1", desc: "When true, this scenario will be listed in the scenario menu")]
43 bool m_bShowInScenarioMenu;
44
45 [Attribute("", UIWidgets.ResourceNamePicker, "Configuration file for briefing screen.", "conf")]
46 ResourceName m_sBriefingConfig;
47
48 [Attribute("0", desc: "If the scenario allows it, its daytime and weather will use values from this header. Requires SCR_TimeAndWeatherHandlerComponent on gamemode entity.")];
49 bool m_bOverrideScenarioTimeAndWeather;
50
51 [Attribute("8", UIWidgets.Slider, "Starting time of day (hours)", "0 23 1")]
52 int m_iStartingHours;
53
54 [Attribute("0", UIWidgets.Slider, "Starting time of day (minutes)", "0 59 1")]
55 int m_iStartingMinutes;
56
57 [Attribute("0")]
58 bool m_bRandomStartingDaytime;
59
60 [Attribute("1", UIWidgets.Slider, "Time acceleration during the day (1 = 100%, 2 = 200% etc)", "0.1 12 0.1")]
61 float m_fDayTimeAcceleration;
62
63 [Attribute("1", UIWidgets.Slider, "Time acceleration during the night (1 = 100%, 2 = 200% etc)", "0.1 12 0.1")]
64 float m_fNightTimeAcceleration;
65
66 [Attribute("0")]
67 bool m_bRandomStartingWeather;
68
69 [Attribute("0", desc: "Weather can change during gameplay")];
70 bool m_bRandomWeatherChanges;
71
72 [Attribute("1", UIWidgets.EditBox, "Player XP multiplier (when enabled in gamemode; 1 for default)")]
73 float m_fXpMultiplier;
74
75 [Attribute("", desc: "Determines whether map markers can be deleted only by player who placed them or by anyone within faction")]
76 bool m_bMapMarkerEnableDeleteByAnyone;
77
78 [Attribute("10", desc: "How many map markers per player can exist at a time")];
79 int m_iMapMarkerLimitPerPlayer;
80
81 [Attribute("", UIWidgets.Object, "Player limits per faction")]
82 ref array<ref SCR_FactionLimit> m_aFactionLimits;
83
84 [Attribute("0", desc: "Armavision is allowed for players without elevated rights in multiplayer")];
85 bool m_bIsArmavisionAllowedInMP;
86
87 bool m_bLoadOnStart;
88 string m_sOwner;
89
90 //------------------------------------------------------------------------------------------------
92 bool IsMultiplayer()
93 {
94 return m_iPlayerCount > 1;
95 }
96
101 static SCR_MissionHeader GetMissionHeader(notnull MissionWorkshopItem item, bool blockFromAddons = false)
102 {
103 // Terminate if scenario is from addon and scenarios from addons are marked to be blocked.
104 // Make use in situations like MainMenu, where MissionHeaders in addons are not accessible.
105 if (blockFromAddons && item.GetOwner())
106 return null;
107
108 return SCR_MissionHeader.Cast(MissionHeader.ReadMissionHeader(item.Id()));
109 }
110
111 //------------------------------------------------------------------------------------------------
113 map<FactionKey, int> GetFactionLimitMap()
114 {
115 map<FactionKey, int> missionFactionLimitMap = new map<FactionKey, int>();
116 if (!m_aFactionLimits.IsEmpty())
117 {
118 foreach (SCR_FactionLimit factionLimit : m_aFactionLimits)
119 {
120 Print(factionLimit.m_sFactionKey);
121 if (factionLimit && !factionLimit.m_sFactionKey.IsEmpty())
122 missionFactionLimitMap.Insert(factionLimit.m_sFactionKey, factionLimit.m_iFactionLimit);
123 }
124 }
125 return missionFactionLimitMap;
126 }
127};
EGameFlags
GameMode Game Flags represented by bit mask.
Definition game.c:17
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition Types.c:486
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
SCR_FieldOfViewSettings Attribute
ESaveGameType