-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsteam_documentation.txt
283 lines (228 loc) · 22.1 KB
/
steam_documentation.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
AI framework documentation (modders)
Aggressive Crisis Engine AI can be applied to any empire if a modder desires to. It is [b]highly preferable[/b] to disable vanilla AI first, otherwise fleet commands will most likely be overridden by vanilla AI.
Currently the only way to disable AI is to edit country type file and set [b]enabled = no[/b] in the [b]ai = { }[/b] block as there is no disable AI effect on country/fleet/ship scope. You might want to try to disable individual components and modules but I received mixed results. Feel free to experiment and tell me the outcome, please.
You can always view the source code online at:
[list]
[*] https://github.com/Fiiral/Improved-Crisis or
[*] https://github.com/OldEnt/stellaris-aggressive-crisis-engine
[/list]
Effects are listed in /events/acemod_fleet_events.txt (always up to date) and in the post below (might be out of date).
---
[h1]List of effects:[/h1]
[code]# Note 1: In order to disable vanilla crisis AI this mod overwrites following keys in 00_country_types.txt:
# swarm
# extradimensional
# extradimensional_2
# extradimensional_3
# ai_empire
#
# Note 2: Vanilla crisis countries are piloted by default. See instructions on how to exclude countries, including vanilla crisis countries.
#
# Note 3: In order to allow crisis factions use vanilla planet killer weapons this mod overwrites planet_is_hostile_or_crisis scripted trigger key in 01_scripted_triggers_planet_killers.txt.
#
# Instructions:
#
# set_global_flag = acemod_activated global Activates ACEMOD fleet AI.
# set_country_flag = acemod_assisted_ai country Only countries with this flag will have their fleets piloted by ACEMOD.
# acemod_set_fleet_piloted_exclusion_on = yes fleet ship Prevents ACEMOD from piloting marked fleets.
# acemod_set_fleet_piloted_exclusion_off = yes fleet ship Resumes default operation.
# acemod_set_country_piloted_exclusion_on = yes country Prevents ACEMOD from piloting fleets of given country. Use this if you don't want vanilla crisis country to be piloted. See acemod_fleet.10 event.
# acemod_set_country_piloted_exclusion_off = yes country Removes exclusion *and* enables ACEMOD for given country. Does not activate global ACEMOD fleet AI (acemod_activated flag) if you had it off.
#
# set_country_flag = acemod_country_flag_disabled_military_ai country Disables ACEMOD AI for military fleets.
# set_country_flag = acemod_country_flag_disabled_constructor_ai country Disables ACEMOD AI for constructor fleets.
# set_country_flag = acemod_country_flag_disabled_army_ai country Disables ACEMOD AI for army fleets.
# set_country_flag = acemod_country_flag_disabled_colonizer_ai country Disables ACEMOD AI for colonizer fleets.
# set_country_flag = acemod_country_flag_disabled_colossus_ai country Disables ACEMOD AI for colossus fleets.
#
# set_global_flag = acemod_constructor_reinforcements_disabled global Disables constructor reinforcements for all countries.
# set_country_flag = acemod_constructor_reinforcements country Enables constructor reinforcements for given country. Vanilla crisis countries receive them by default. Requires acemod_assisted_ai country flag.
# acemod_set_country_constructor_reinforcements_exclusion_on = yes country Prevents ACEMOD from issuing constructor reinforcements.
# acemod_set_country_constructor_reinforcements_exclusion_off = yes country Resumes default operation.
# set_star_flag = acemod_star_flag_is_constructor_reinforcements_system solar_system Designates system to spawn constructor in.
# set_fleet_flag = acemod_fleet_flag_is_constructor_reinforcements_fleet fleet Designates fleet to spawn constructor on.
#
# set_country_flag = acemod_country_flag_custom_starbase_outpost country ACEMOD AI constructors will spawn normal starbases (outpost) using empire's graphical culture.
# set_country_flag = acemod_country_flag_custom_starbase_citadel country ACEMOD AI constructors will spawn normal starbases (citadel) using empire's graphical culture.
#
# set_country_flag = acemod_defensive_jumpdrive_protocol country Enables defensive jumpdrive protocol for given country. Contingency has it by default. Requires acemod_assisted_ai country flag.
# acemod_set_country_acemod_defensive_jumpdrive_protocol_exclusion_on = yes country Prevents ACEMOD from issuing defensive jumpdrive protocol.
# acemod_set_country_acemod_defensive_jumpdrive_protocol_exclusion_off = yes country Resumes default operation.
# set_star_flag = acemod_star_flag_is_defensive_jumpdrive_protocol_system fleet planet Designates defensive jumpdrive protocol protected system.
# set_ambient_object_flag = acemod_ambient_object_flag_defensive_jumpdrive_protocol_target ambient_object Designates ambient object to move fleet to.
# set_global_flag = acemod_defensive_jumpdrive_protocol_disabled global Disables defensive jumpdrive protocol for all countries.
#
# set_global_flag = acemod_technology_disabled global Prevents ACEMOD technologies from rolling (potential).
# set_country_flag = acemod_country_flag_technology_allowed country Enables rolling of ACEMOD technologies for non-default empires (potential). Does not overrride ACEMOD technology disable global flag.
# acemod_set_country_technology_exclusion_on = yes country Prevents ACEMOD technologies from rolling for given country (weight_modifier = 0). Overrides country technology_allowed flag.
# acemod_set_country_technology_exclusion_off = yes country Resumes default operation.
#
# set_global_flag = acemod_crisis_debuff_disabled global Disable applying anti-crisis damage debuffs. Does not remove the ones in place.
# set_global_flag = acemod_fallen_awakened_empire_debuff_disabled global Disable applying anti-relics damage debuffs. Does not remove the ones in place.
#
# set_megastructure_flag = acemod_megastructure_flag_is_active_bypass megastructure Marks megastructure as being an accessible bypass (custom modded wormhole, custom modded gateway etc). Used in pathfinding. See acemod_is_active_bypass scripted trigger.
# set_star_flag = acemod_star_flag_is_active_bypass solar_system Marks star system as being an accessible bypass (custom modded wormhole, custom modded gateway etc). Used in pathfinding. See acemod_is_active_bypass scripted trigger.
#
# set_planet_flag = acemod_planet_flag_bombardment_target_ignore planet Marks planet as excluded from being targeted for bombardment.
# set_planet_flag = acemod_planet_flag_army_target_ignore planet Marks planet as excluded from being targeted for invasion.
# set_planet_flag = acemod_planet_flag_colonizer_target_ignore planet Marks planet as excluded from being targeted for colonization or infestation.
# set_planet_flag = acemod_planet_flag_colossus_target_ignore planet Marks planet as excluded from being targeted for colossus kill.
#
# set_global_flag = acemod_advanced_ai_disabled global Disables some of the fleet events which might require high amount of checks, like reaction to enemy movements. Do not use unless you really want to.
#
# set_fleet_flag = acemod_fleet_flag_starbase_defensive_protocol fleet Marks fleet as a trigger for territorial defensive actions.
# set_star_flag = acemod_star_flag_starbase_defensive_protocol system Marks system as critical and to be defended immediately if needed.
# set_country_flag = acemod_country_flag_starbase_defensive_protocol_disabled country Disables territorial defense for given country.
# set_country_flag = acemod_country_flag_starbase_defensive_protocol_fallback_event_disabled country Disables fallback event (acemod_fleet.132). Use if issues from triggering both 130 132 arise (should not).
#
# set_country_flag = acemod_country_flag_can_spawn_crisis_colossus country Enables automatic Colossus spawns for a given country. Requires specific Colossus type flag and planet flag as well.
# set_country_flag = acemod_country_flag_can_spawn_crisis_ai_colossus country Automatic Colossus spawns are of Contingency type. Required for above to work.
# set_planet_flag = acemod_planet_flag_can_spawn_crisis_ai_colossus planet Sets planet to spawn Contingency Colossus on. Required for above to work if pc_ai is not present.
# set_variable = { which = acemod_var_country_colossus_spawn_limit value = 4 } country Sets game limit of automatic Colossus spawns for a given country (default 4).
# set_country_flag = acemod_can_build_crisis_ai_colossus country Allows given country to build Contingency Colossus.
# acemod_spawn_ai_colossus = yes root = country this = planet, fleet, ship, ambient_object Spawns Contingency Colossus on this scope for root scope country.
#
# set_country_flag = acemod_country_flag_system_pings_disabled country Disables pinging systems to indicate potential high value targets.
#
# set_country_flag = acemod_lib_country_flag_army_strength_modifier_assisted_ai country swarm, ai_empire, and countries with this flag receive Crisis Army Strength multiplier.
# set_country_flag = acemod_lib_country_flag_army_strength_modifier_disabled country Disables automatic Crisis Army Strength multiplier recalculation for given country (usefulf for disabling swarm or ai_empire bonus).
#
# set_country_flag = acemod_country_flag_jumpdrive_order_enabled country Enables use of jumpdrives for a specific country.
# set_global_flag = acemod_global_flag_jumpdrive_order_disabled global Disables globally use of jumpdrives by ACE.
# set_country_flag = acemod_country_flag_jumpdrive_order_disabled country Disables use of jumpdrives for a specific country, overrides acemod_country_flag_jumpdrive_order_enabled.
# set_fleet_flag = acemod_fleet_flag_jumpdrive_order_disabled fleet Disables use of jumpdrives for a specific fleet.
---
[h1]List of overwrites[/h1]
[b]CRITICAL:[/b]
[b]00_country_types.txt (keys) - disables vanilla AI:[/b]
swarm
extradimensional
extradimensional_2
extradimensional_3
ai_empire
[b]01_scripted_triggers_planet_killers.txt (keys) - allow crisis factions use vanilla planet killer weapons. Required to make ACE crisis colossi work.[/b]
planet_is_hostile_or_crisis
[b]crisis_events_2.txt (keys) - fixes Extradimensional reinforcements spawning on RANDOM Dimensional Portals.[/b]
crisis.1265
crisis.1266
crisis.1267
[b]OPTIONAL:[/b]
[b]00_starbase_levels.txt (keys) - allows for Dimensional Anchors to be marked on galactic map.[/b]
starbase_level_exd
---
[h1]Fleet logic structure:[/h1]
Fleet logic is separated into chains of events (modules), one chain for each fleet (ship) type:
shipclass_military
shipclass_constructor
shipclass_transport
shipclass_colonizer
shipclass_military_special
Chains are similar between the classes, but vary, depending on the specific requirements for the class.
[h2]Main event[/h2]
Main fleet type event will trigger (monthly) only when ACEMOD AI is globally on. Effects on executing include iterating through every ACEMOD assisted country which is not specifically excluded from having given fleet type assisted. It will then fire fleet events for given class of fleets, but only if those fleets weren't specifically excluded and are idle (have no queued commands).
[h2]System event[/h2]
Fleets proceed to seek valid target within the system. This might include:
- a valid target to be bombarded (shipclass_military)
- primary star to construct starbase on in a system without owner (shipclass_constructor)
- valid invasion target (shipclass_transport)
- valid colonisation target in a system owned by fleet owner (shipclass_colonizer)
- valid planet killer target (shipclass_military_special)
[h2]Bypass event[/h2]
Fleet without valid target in the system might attempt to cross bypass (wormhole, gateway) if one exists in it.
[h2]Target seeking event[/h2]
Fleets which did not find valid target in the system and did not cross bypass will proceed to seek accessible (i.e. not behind FTL inhibitor) target on a galactic map.
- shipclass_military: nearest system owned by a hostile,
- shipclass_constructor: nearest unowned system without hostiles,
- shipclass_transport: nearest system with a planet which is a valid invasion target,
- shipclass_colonizer: nearest owned system with valid colonisation target, and without hostiles,
- shipclass_military_special: nearest friendly shipclass_military fleet which is not excluded.
---
[h1]Implementation into other mods[/h1]
ACEMOD sets up a global flag [b]acemod_installed[/b] which in itself does nothing but other mods can check against it to see if the mod is present.
[h2]Applying AI to a country[/h2]
Global flag [b]acemod_activated[/b] gates off entirety of ACEMOD fleet logic. Without it no fleet movements are made. It is not present on default (ACEMOD AI is OFF) and only switches on when crisis arrives. Modder has to manually set it up if he intends to use ACEMOD AI with custom country.
To enable ACEMOD AI for your country simply apply country flag [b]acemod_assisted_ai[/b] (and the global flag above). Please note that vanilla AI should be disabled. See initial notes on editing country types.
Please keep in mind that disabling AI by setting [b]enabled = no[/b] in the [b]ai = { }[/b] section will disable ALL of the AI, this includes economy AI (planet management, leaders, diplomacy etc). Crisis countries do not have economy so they remain unaffected. Use of ACEMOD AI with countries which have economy [b]*is not supported*[/b].
Aggressive Crisis Engine AI is a crisis AI (it's in the name), not a default empire AI. Applying it to a typical empire will result in a tactical and strategic disaster.
[h2]Tweaking fleet logic[/h2]
Modder can flip ACEMOD AI exclusion on a fleet/ship/country scope if they want to stop ACEMOD from issuing commands to a given scope. See country_piloted_exclusion effects in the effects list. From a technical standpoint a variable of value 1 is applied which is checked against before executing any command. See acemod_scripted_effects.txt.
Example use:
1. Modder finds desired fleet and executes [b]acemod_set_fleet_piloted_exclusion_on = yes[/b] effect on it.
2. Modder uses fleet as seen fit, as ACEMOD AI won't touch excluded fleet.
3. Modder applies [b]acemod_set_fleet_piloted_exclusion_off = yes[/b] effect to remove exclusion. Fleet will proceed as normal.
[h2]Disabling individual modules[/h2]
Given fleet types can also be excluded from control by ACEMOD AI. For example [b]acemod_country_flag_disabled_constructor_ai[/b] will stop ACEMOD from issuing commands to constructors on a country scope. Modder will have to take care of these excluded fleet types in one way or another.
[h2]Overwriting ACEMOD[/h2]
Any overwrites of ACEMOD files or individual components might affect mods which use ACEMOD AI framework. Please be considerate to other mod authors and mod users and disclose any overwrites on your mod page, preferably with technical details.
Using exclusion effects for a ship/fleet/country scope should provide a lot of flexibility so always consider if these would do instead of an overwrite. Feel free to copy and modify fleet logic code. A clone of an ACEMOD fleet event combined with exclusion effect can save on overwrite.
If there is a feature you think cannot be implemented with exclusion effects and without overwrite just ask, I might be able to accomodate or find a solution.
If you *really* have to do overwrite: remember that you can overwrite individual events instead of the whole file.
---
[h1]Additional fleet actions[/h1]
Override of default fleet movements can happen on:
- Critical system wormhole station fleet recall (on_entering_system_fleet acemod_fleet.610)
- Territorial defense actions (on_space_battle_lost acemod_fleet.130)
- Pinging nearby systems (acemod_fleet.150 monthly random chance)
[h2]Wormhole recall[/h2]
Can be enabled and disabled for a country and on a global scope. Requires setting up a critical system. Refer to acemod_defensive_jumpdrive_protocol list of effects.
[h2]Territorial defense actions[/h2]
This is a functionality always enabled for main crisis factions but any critial fleets can be marked as triggers (acemod_fleet_flag_starbase_defensive_protocol). Response will trigger for any country with acemod_assisted_ai. You can globally disable this feature to save a little bit on performance via country flag (acemod_country_flag_starbase_defensive_protocol_disabled) or global flag (acemod_advanced_ai_disabled). Refer to list of effects.
[h2]Pinging nearby systems[/h2]
Fleets will ping at random chance nearby systems in order to find valuable targets which happen to be too close. This can be disabled via country flag (acemod_country_flag_system_pings_disabled) or global flag (acemod_advanced_ai_disabled). Refer to list of effects.
[h2]Merging fleets[/h2]
Fleets will merge under certain conditions. Action invoked by acemod_custom_on_action_merge_fleets custom on_action.
---
[h1]Harmless error.log entries (do not report):[/h1]
[code][22:29:02][pdx_entity.cpp:2653]: State 'moving' in animated entity 'acemod_ai_colossus_core_entity' is missing an animation!
[22:29:02][pdx_entity.cpp:2653]: State 'death' in animated entity 'acemod_ai_colossus_core_entity' is missing an animation!
[22:29:03][game_singleobjectdatabase.h:147]: Object with key: swarm already exists
[22:29:03][game_singleobjectdatabase.h:147]: Object with key: extradimensional already exists
[22:29:03][game_singleobjectdatabase.h:147]: Object with key: extradimensional_2 already exists
[22:29:03][game_singleobjectdatabase.h:147]: Object with key: extradimensional_3 already exists
[22:29:03][game_singleobjectdatabase.h:147]: Object with key: ai_empire already exists
[22:29:04][game_singleobjectdatabase.h:147]: Object with key: planet_is_hostile_or_crisis already exists
[22:29:04][effect_impl.cpp:6827]: Failed to read key reference fe_omnimech from database file: events/acemod_fleet_events.txt line: 3386
[22:29:04][fleet_actions.cpp:227]: Error: "Malformed token: prev, near line: 4691
" in file: "events/acemod_fleet_events.txt" near line: 4692
[22:29:04][fleet_actions.cpp:227]: Error: "Malformed token: prev, near line: 4725
" in file: "events/acemod_fleet_events.txt" near line: 4726
[22:29:04][fleet_actions.cpp:227]: Error: "Malformed token: prev, near line: 4759
" in file: "events/acemod_fleet_events.txt" near line: 4760
[22:29:04][fleet_actions.cpp:227]: Error: "Malformed token: prev, near line: 4793
" in file: "events/acemod_fleet_events.txt" near line: 4794
[22:29:04][fleet_actions.cpp:227]: Error: "Malformed token: prev, near line: 4827
" in file: "events/acemod_fleet_events.txt" near line: 4828
[22:29:04][fleet_actions.cpp:227]: Error: "Malformed token: prev, near line: 4861
" in file: "events/acemod_fleet_events.txt" near line: 4862
[22:29:04][fleet_actions.cpp:227]: Error: "Malformed token: prev, near line: 4895
" in file: "events/acemod_fleet_events.txt" near line: 4896
[22:29:04][fleet_actions.cpp:227]: Error: "Malformed token: prev, near line: 4929
" in file: "events/acemod_fleet_events.txt" near line: 4930
[22:29:04][fleet_actions.cpp:227]: Error: "Malformed token: prev, near line: 4963
" in file: "events/acemod_fleet_events.txt" near line: 4964
[22:29:04][fleet_actions.cpp:227]: Error: "Malformed token: prev, near line: 4997
" in file: "events/acemod_fleet_events.txt" near line: 4998
[22:29:04][eventmanager.cpp:355]: an event with id [crisis.1265] already exists! file: events/crisis_events_2.txt line: 2664
[22:29:04][eventmanager.cpp:355]: an event with id [crisis.1266] already exists! file: events/crisis_events_2.txt line: 2962
[22:29:04][eventmanager.cpp:355]: an event with id [crisis.1267] already exists! file: events/crisis_events_2.txt line: 3076
[22:29:04][game_singleobjectdatabase.h:147]: Object with key: starbase_level_exd already exists
[22:29:06][trigger_impl.cpp:15435]: Error in [is_country_type] trigger, cannot find country type with key: ascended_empire in, file: events/acemod_crisis_manager_vanilla_substitute_events.txt line: 443
[22:29:06][trigger_impl.cpp:15435]: Error in [is_country_type] trigger, cannot find country type with key: lost_empire in, file: events/acemod_crisis_manager_vanilla_substitute_events.txt line: 444
[22:29:06][metascript.cpp:148]: Compiling source for failed for missing args: DMM_NAME, DMM_FLAG
[22:29:06][metascript.cpp:148]: Compiling source for failed for missing args: DMM_FLAG
[22:29:06][effect_impl.cpp:811]: Script Error: Invalid scripted effect: dmm_register_mod at file: events/acemod_dmm_new_events.txt line: 8
[22:29:06][effect_impl.cpp:811]: Script Error: Invalid scripted effect: dmm_hide_button_all at file: events/acemod_dmm_new_events.txt line: 50
[22:29:06][effect_impl.cpp:811]: Script Error: Invalid scripted effect: dmm_add_button_exception at file: events/acemod_dmm_new_events.txt line: 65
[22:29:06][effect_impl.cpp:811]: Script Error: Invalid scripted effect: dmm_show_button_all at file: events/acemod_dmm_new_events.txt line: 75
[22:29:06][effect_impl.cpp:811]: Script Error: Invalid scripted effect: dmm_remove_button_exception at file: events/acemod_dmm_new_events.txt line: 82
[22:29:06][effect_impl.cpp:6897]: create_army: missing or invalid army type file: events/acemod_fleet_events.txt line: 3383[/code]
---
[h1]Known additional crises support:[/h1]
[b]Overgrowth (Fatal Foundations Story Pack)[/b]
Native support. To disable ACE AI for Overgrowth execute while crisis is active:
[code]effect every_country = { limit = { is_country_type = overgrowth_country } remove_country_flag = acemod_assisted_ai set_country_flag = acemod_do_not_set_assisted_ai }[/code] Wait until new year for the built-in AI to reactivate.
[b]Gray Tempest:[/b]
Execute the following console command once Gray Tempest spawned:
[code]effect every_country = { limit = { is_country_type = gray_goo } set_country_flag = acemod_assisted_ai } set_global_flag = acemod_activated every_system = { limit = { has_star_flag = graygoo_factory_system } set_star_flag = acemod_star_flag_starbase_defensive_protocol every_neighbor_system = { set_star_flag = acemod_star_flag_starbase_defensive_protocol } every_fleet_in_system = { limit = { owner = { is_country_type = gray_goo } } acemod_set_fleet_piloted_exclusion_on = yes } }[/code]
[b]Katzenartig Imperium (Gigastructural Engineering & More):[/b]
Use [url=https://steamcommunity.com/workshop/filedetails/?id=2394377758]KACE patch[/url].