aoe2_probe/prebuilt/config/
effect.rs

1use lazy_static::lazy_static;
2
3pub struct EffectConfig {
4    pub name: &'static str,
5    pub attrs: Vec<&'static str>,
6}
7
8impl EffectConfig {
9    fn new(name: &'static str, attrs: Vec<&'static str>) -> Self {
10        EffectConfig { name, attrs }
11    }
12}
13
14lazy_static! {
15    pub static ref EFFECT_SCHEME: Vec<EffectConfig> = {
16        let mapping = vec![
17            EffectConfig::new("None", vec![]),
18            EffectConfig::new(
19                "CHANGE_DIPLOMACY",
20                vec!["diplomacy", "source_player", "target_player"],
21            ),
22            EffectConfig::new(
23                "RESEARCH_TECHNOLOGY",
24                vec!["source_player", "technology", "force_research_technology"],
25            ),
26            EffectConfig::new(
27                "SEND_CHAT",
28                vec!["source_player", "string_id", "message", "sound_name"],
29            ),
30            EffectConfig::new(
31                "PLAY_SOUND",
32                vec![
33                    "source_player",
34                    "location_x",
35                    "location_y",
36                    "location_object_reference",
37                    "sound_name",
38                ],
39            ),
40            EffectConfig::new(
41                "TRIBUTE",
42                vec!["quantity", "tribute_list", "source_player", "target_player"],
43            ),
44            EffectConfig::new("UNLOCK_GATE", vec!["selected_object_ids"]),
45            EffectConfig::new("LOCK_GATE", vec!["selected_object_ids"]),
46            EffectConfig::new("ACTIVATE_TRIGGER", vec!["trigger_id"]),
47            EffectConfig::new("DEACTIVATE_TRIGGER", vec!["trigger_id"]),
48            EffectConfig::new("AI_SCRIPT_GOAL", vec!["ai_script_goal"]),
49            EffectConfig::new(
50                "CREATE_OBJECT",
51                vec![
52                    "object_list_unit_id",
53                    "source_player",
54                    "location_x",
55                    "location_y",
56                    "facet",
57                ],
58            ),
59            EffectConfig::new(
60                "TASK_OBJECT",
61                vec![
62                    "object_list_unit_id",
63                    "source_player",
64                    "location_x",
65                    "location_y",
66                    "location_object_reference",
67                    "area_x1",
68                    "area_y1",
69                    "area_x2",
70                    "area_y2",
71                    "object_group",
72                    "object_type",
73                    "action_type",
74                    "selected_object_ids",
75                ],
76            ),
77            EffectConfig::new("DECLARE_VICTORY", vec!["source_player", "enabled"]),
78            EffectConfig::new(
79                "KILL_OBJECT",
80                vec![
81                    "object_list_unit_id",
82                    "source_player",
83                    "area_x1",
84                    "area_y1",
85                    "area_x2",
86                    "area_y2",
87                    "object_group",
88                    "object_type",
89                    "selected_object_ids",
90                ],
91            ),
92            EffectConfig::new(
93                "REMOVE_OBJECT",
94                vec![
95                    "object_list_unit_id",
96                    "source_player",
97                    "area_x1",
98                    "area_y1",
99                    "area_x2",
100                    "area_y2",
101                    "object_group",
102                    "object_type",
103                    "object_state",
104                    "selected_object_ids",
105                ],
106            ),
107            EffectConfig::new(
108                "CHANGE_VIEW",
109                vec!["source_player", "location_x", "location_y", "scroll"],
110            ),
111            EffectConfig::new(
112                "UNLOAD",
113                vec![
114                    "object_list_unit_id",
115                    "source_player",
116                    "location_x",
117                    "location_y",
118                    "location_object_reference",
119                    "area_x1",
120                    "area_y1",
121                    "area_x2",
122                    "area_y2",
123                    "object_group",
124                    "object_type",
125                    "selected_object_ids",
126                ],
127            ),
128            EffectConfig::new(
129                "CHANGE_OWNERSHIP",
130                vec![
131                    "object_list_unit_id",
132                    "source_player",
133                    "target_player",
134                    "area_x1",
135                    "area_y1",
136                    "area_x2",
137                    "area_y2",
138                    "object_group",
139                    "object_type",
140                    "flash_object",
141                    "selected_object_ids",
142                ],
143            ),
144            EffectConfig::new(
145                "PATROL",
146                vec![
147                    "object_list_unit_id",
148                    "source_player",
149                    "location_x",
150                    "location_y",
151                    "location_object_reference",
152                    "area_x1",
153                    "area_y1",
154                    "area_x2",
155                    "area_y2",
156                    "object_group",
157                    "object_type",
158                    "selected_object_ids",
159                ],
160            ),
161            EffectConfig::new(
162                "DISPLAY_INSTRUCTIONS",
163                vec![
164                    "object_list_unit_id",
165                    "source_player",
166                    "string_id",
167                    "display_time",
168                    "instruction_panel_position",
169                    "play_sound",
170                    "message",
171                    "sound_name",
172                ],
173            ),
174            EffectConfig::new("CLEAR_INSTRUCTIONS", vec!["instruction_panel_position"]),
175            EffectConfig::new(
176                "FREEZE_OBJECT",
177                vec![
178                    "object_list_unit_id",
179                    "source_player",
180                    "area_x1",
181                    "area_y1",
182                    "area_x2",
183                    "area_y2",
184                    "object_group",
185                    "object_type",
186                    "selected_object_ids",
187                ],
188            ),
189            EffectConfig::new("USE_ADVANCED_BUTTONS", vec![]),
190            EffectConfig::new(
191                "DAMAGE_OBJECT",
192                vec![
193                    "quantity",
194                    "object_list_unit_id",
195                    "source_player",
196                    "area_x1",
197                    "area_y1",
198                    "area_x2",
199                    "area_y2",
200                    "object_group",
201                    "object_type",
202                    "selected_object_ids",
203                ],
204            ),
205            EffectConfig::new(
206                "PLACE_FOUNDATION",
207                vec![
208                    "object_list_unit_id",
209                    "source_player",
210                    "location_x",
211                    "location_y",
212                ],
213            ),
214            EffectConfig::new(
215                "CHANGE_OBJECT_NAME",
216                vec![
217                    "object_list_unit_id",
218                    "source_player",
219                    "string_id",
220                    "area_x1",
221                    "area_y1",
222                    "area_x2",
223                    "area_y2",
224                    "message",
225                    "selected_object_ids",
226                ],
227            ),
228            EffectConfig::new(
229                "CHANGE_OBJECT_HP",
230                vec![
231                    "quantity",
232                    "object_list_unit_id",
233                    "source_player",
234                    "area_x1",
235                    "area_y1",
236                    "area_x2",
237                    "area_y2",
238                    "object_group",
239                    "object_type",
240                    "operation",
241                    "selected_object_ids",
242                ],
243            ),
244            EffectConfig::new(
245                "CHANGE_OBJECT_ATTACK",
246                vec![
247                    "quantity",
248                    "class",
249                    "object_list_unit_id",
250                    "source_player",
251                    "area_x1",
252                    "area_y1",
253                    "area_x2",
254                    "area_y2",
255                    "object_group",
256                    "object_type",
257                    "operation",
258                    "selected_object_ids",
259                ],
260            ),
261            EffectConfig::new(
262                "STOP_OBJECT",
263                vec![
264                    "object_list_unit_id",
265                    "source_player",
266                    "area_x1",
267                    "area_y1",
268                    "area_x2",
269                    "area_y2",
270                    "object_group",
271                    "object_type",
272                    "selected_object_ids",
273                ],
274            ),
275            EffectConfig::new(
276                "ATTACK_MOVE",
277                vec![
278                    "object_list_unit_id",
279                    "source_player",
280                    "location_x",
281                    "location_y",
282                    "location_object_reference",
283                    "area_x1",
284                    "area_y1",
285                    "area_x2",
286                    "area_y2",
287                    "object_group",
288                    "object_type",
289                    "selected_object_ids",
290                ],
291            ),
292            EffectConfig::new(
293                "CHANGE_OBJECT_ARMOR",
294                vec![
295                    "quantity",
296                    "class",
297                    "object_list_unit_id",
298                    "source_player",
299                    "area_x1",
300                    "area_y1",
301                    "area_x2",
302                    "area_y2",
303                    "object_group",
304                    "object_type",
305                    "operation",
306                    "selected_object_ids",
307                ],
308            ),
309            EffectConfig::new(
310                "CHANGE_OBJECT_RANGE",
311                vec![
312                    "quantity",
313                    "object_list_unit_id",
314                    "source_player",
315                    "area_x1",
316                    "area_y1",
317                    "area_x2",
318                    "area_y2",
319                    "object_group",
320                    "object_type",
321                    "operation",
322                    "selected_object_ids",
323                ],
324            ),
325            EffectConfig::new(
326                "CHANGE_OBJECT_SPEED",
327                vec![
328                    "quantity",
329                    "object_list_unit_id",
330                    "source_player",
331                    "area_x1",
332                    "area_y1",
333                    "area_x2",
334                    "area_y2",
335                    "object_group",
336                    "object_type",
337                    "selected_object_ids",
338                ],
339            ),
340            EffectConfig::new(
341                "HEAL_OBJECT",
342                vec![
343                    "quantity",
344                    "object_list_unit_id",
345                    "source_player",
346                    "area_x1",
347                    "area_y1",
348                    "area_x2",
349                    "area_y2",
350                    "object_group",
351                    "object_type",
352                    "selected_object_ids",
353                ],
354            ),
355            EffectConfig::new(
356                "TELEPORT_OBJECT",
357                vec![
358                    "object_list_unit_id",
359                    "source_player",
360                    "location_x",
361                    "location_y",
362                    "area_x1",
363                    "area_y1",
364                    "area_x2",
365                    "area_y2",
366                    "object_group",
367                    "object_type",
368                    "selected_object_ids",
369                ],
370            ),
371            EffectConfig::new(
372                "CHANGE_OBJECT_STANCE",
373                vec![
374                    "object_list_unit_id",
375                    "source_player",
376                    "area_x1",
377                    "area_y1",
378                    "area_y2",
379                    "object_group",
380                    "object_type",
381                    "attack_stance",
382                    "selected_object_ids",
383                ],
384            ),
385            EffectConfig::new(
386                "DISPLAY_TIMER",
387                vec![
388                    "string_id",
389                    "display_time",
390                    "time_unit",
391                    "timer",
392                    "reset_timer",
393                    "message",
394                ],
395            ),
396            EffectConfig::new(
397                "ENABLE_DISABLE_OBJECT",
398                vec!["object_list_unit_id", "source_player", "enabled"],
399            ),
400            EffectConfig::new(
401                "ENABLE_DISABLE_TECHNOLOGY",
402                vec!["source_player", "technology", "enabled"],
403            ),
404            EffectConfig::new(
405                "CHANGE_OBJECT_COST",
406                vec![
407                    "object_list_unit_id",
408                    "source_player",
409                    "food",
410                    "wood",
411                    "stone",
412                    "gold",
413                ],
414            ),
415            EffectConfig::new(
416                "SET_PLAYER_VISIBILITY",
417                vec!["source_player", "target_player", "visibility_state"],
418            ),
419            EffectConfig::new(
420                "CHANGE_OBJECT_ICON",
421                vec![
422                    "object_list_unit_id",
423                    "source_player",
424                    "area_x1",
425                    "area_y1",
426                    "area_x2",
427                    "area_y2",
428                    "object_group",
429                    "object_type",
430                    "object_list_unit_id_2",
431                    "selected_object_ids",
432                ],
433            ),
434            EffectConfig::new(
435                "REPLACE_OBJECT",
436                vec![
437                    "object_list_unit_id",
438                    "source_player",
439                    "target_player",
440                    "area_x1",
441                    "area_y1",
442                    "area_x2",
443                    "area_y2",
444                    "object_group",
445                    "object_type",
446                    "object_list_unit_id_2",
447                    "selected_object_ids",
448                ],
449            ),
450            EffectConfig::new(
451                "CHANGE_OBJECT_DESCRIPTION",
452                vec![
453                    "object_list_unit_id",
454                    "source_player",
455                    "string_id",
456                    "message",
457                ],
458            ),
459            EffectConfig::new(
460                "CHANGE_PLAYER_NAME",
461                vec!["source_player", "string_id", "message"],
462            ),
463            EffectConfig::new(
464                "CHANGE_TRAIN_LOCATION",
465                vec![
466                    "object_list_unit_id",
467                    "source_player",
468                    "object_list_unit_id_2",
469                    "button_location",
470                ],
471            ),
472            EffectConfig::new(
473                "CHANGE_RESEARCH_LOCATION",
474                vec![
475                    "source_player",
476                    "technology",
477                    "object_list_unit_id_2",
478                    "button_location",
479                ],
480            ),
481            EffectConfig::new(
482                "CHANGE_CIVILIZATION_NAME",
483                vec!["source_player", "string_id", "message"],
484            ),
485            EffectConfig::new(
486                "CREATE_GARRISONED_OBJECT",
487                vec![
488                    "object_list_unit_id",
489                    "source_player",
490                    "area_x1",
491                    "area_y1",
492                    "area_x2",
493                    "area_y2",
494                    "object_list_unit_id_2",
495                    "selected_object_ids",
496                ],
497            ),
498            EffectConfig::new("ACKNOWLEDGE_AI_SIGNAL", vec!["ai_signal_value"]),
499            EffectConfig::new(
500                "MODIFY_ATTRIBUTE",
501                vec![
502                    "class",
503                    "quantity",
504                    "object_list_unit_id",
505                    "source_player",
506                    "operation",
507                    "object_attributes",
508                    "message",
509                ],
510            ),
511            EffectConfig::new(
512                "MODIFY_RESOURCE",
513                vec!["quantity", "tribute_list", "source_player", "operation"],
514            ),
515            EffectConfig::new(
516                "MODIFY_RESOURCE_BY_VARIABLE",
517                vec!["tribute_list", "source_player", "operation", "variable"],
518            ),
519            EffectConfig::new(
520                "SET_BUILDING_GATHER_POINT",
521                vec![
522                    "object_list_unit_id",
523                    "source_player",
524                    "location_x",
525                    "location_y",
526                    "area_x1",
527                    "area_y1",
528                    "area_x2",
529                    "area_y2",
530                    "selected_object_ids",
531                ],
532            ),
533            EffectConfig::new("SCRIPT_CALL", vec!["string_id", "message"]),
534            EffectConfig::new(
535                "CHANGE_VARIABLE",
536                vec!["quantity", "operation", "variable", "message"],
537            ),
538            EffectConfig::new("CLEAR_TIMER", vec!["timer"]),
539            EffectConfig::new(
540                "CHANGE_OBJECT_PLAYER_COLOR",
541                vec![
542                    "object_list_unit_id",
543                    "source_player",
544                    "area_x1",
545                    "area_y1",
546                    "area_x2",
547                    "area_y2",
548                    "player_color",
549                    "selected_object_ids",
550                ],
551            ),
552            EffectConfig::new(
553                "CHANGE_OBJECT_CIVILIZATION_NAME",
554                vec![
555                    "string_id",
556                    "area_x1",
557                    "area_y1",
558                    "area_x2",
559                    "area_y2",
560                    "selected_object_ids",
561                ],
562            ),
563            EffectConfig::new(
564                "CHANGE_OBJECT_PLAYER_NAME",
565                vec![
566                    "object_list_unit_id",
567                    "source_player",
568                    "string_id",
569                    "area_x1",
570                    "area_y1",
571                    "area_x2",
572                    "area_y2",
573                    "selected_object_ids",
574                ],
575            ),
576            EffectConfig::new(
577                "DISABLE_UNIT_TARGETING",
578                vec![
579                    "object_list_unit_id",
580                    "source_player",
581                    "area_x1",
582                    "area_y1",
583                    "area_x2",
584                    "area_y2",
585                    "selected_object_ids",
586                ],
587            ),
588            EffectConfig::new(
589                "ENABLE_UNIT_TARGETING",
590                vec![
591                    "object_list_unit_id",
592                    "source_player",
593                    "area_x1",
594                    "area_y1",
595                    "area_x2",
596                    "area_y2",
597                    "selected_object_ids",
598                ],
599            ),
600            EffectConfig::new(
601                "CHANGE_TECHNOLOGY_COST",
602                vec![
603                    "source_player",
604                    "technology",
605                    "food",
606                    "wood",
607                    "stone",
608                    "gold",
609                ],
610            ),
611            EffectConfig::new(
612                "CHANGE_TECHNOLOGY_RESEARCH_TIME",
613                vec!["quantity", "source_player", "technology"],
614            ),
615            EffectConfig::new(
616                "CHANGE_TECHNOLOGY_NAME",
617                vec!["source_player", "technology", "string_id", "message"],
618            ),
619            EffectConfig::new(
620                "CHANGE_TECHNOLOGY_DESCRIPTION",
621                vec!["source_player", "technology", "string_id", "message"],
622            ),
623            EffectConfig::new(
624                "ENABLE_TECHNOLOGY_STACKING",
625                vec!["source_player", "technology"],
626            ),
627            EffectConfig::new(
628                "DISABLE_TECHNOLOGY_STACKING",
629                vec!["source_player", "technology"],
630            ),
631            EffectConfig::new("ACKNOWLEDGE_MULTIPLAYER_AI_SIGNAL", vec!["ai_signal_value"]),
632            EffectConfig::new(
633                "DISABLE_OBJECT_SELECTION",
634                vec![
635                    "object_list_unit_id",
636                    "source_player",
637                    "area_x1",
638                    "area_y1",
639                    "area_x2",
640                    "area_y2",
641                    "selected_object_ids",
642                ],
643            ),
644            EffectConfig::new(
645                "ENABLE_OBJECT_SELECTION",
646                vec![
647                    "object_list_unit_id",
648                    "source_player",
649                    "area_x1",
650                    "area_y1",
651                    "area_x2",
652                    "area_y2",
653                    "selected_object_ids",
654                ],
655            ),
656            EffectConfig::new("CHANGE_COLOR_MOOD", vec!["quantity", "color_mood"]),
657            EffectConfig::new(
658                "ENABLE_OBJECT_DELETION",
659                vec![
660                    "object_list_unit_id",
661                    "source_player",
662                    "area_x1",
663                    "area_y1",
664                    "area_x2",
665                    "area_y2",
666                    "item_id",
667                    "selected_object_ids",
668                ],
669            ),
670            EffectConfig::new(
671                "DISABLE_OBJECT_DELETION",
672                vec![
673                    "object_list_unit_id",
674                    "source_player",
675                    "area_x1",
676                    "area_y1",
677                    "area_x2",
678                    "area_y2",
679                    "item_id",
680                    "selected_object_ids",
681                ],
682            ),
683        ];
684
685        mapping
686    };
687}