/
eddi.json
1401 lines (1401 loc) · 123 KB
/
eddi.json
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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"name": "EDDI",
"description": "A balanced, non-partisan personality",
"scripts": {
"Blueprint make report": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{_ Function to obtain current inventory of a material}\r\n{set _inventory(required) to:\r\n {for material in materials:\r\n {if material.material = required:\r\n {return material}\r\n }\r\n }\r\n}\r\n\r\n{_ Fetch blueprint from state }\r\n{set blueprintname to state.blueprint}\r\n{if blueprintname:\r\n {_ Fetch full blueprint details }\r\n {set blueprint to BlueprintDetails(blueprintname)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'blueprint')}\r\n {SetState('eddi_context_blueprint_name', blueprintname)}\r\n}\r\n\r\n{if !blueprint:\r\n {_ Fetch from context }\r\n {set blueprint to BlueprintDetails(state.eddi_context_blueprint_name)}\r\n}\r\n\r\n{set canbemade to 999}\r\n\r\n{if blueprint:\r\n {_ Find the smallest number of this blueprint that can be made }\r\n \r\n {set cur to 0}\r\n {while cur < len(blueprint.materials):\r\n {set inventory to _inventory(blueprint.materials[cur].material)}\r\n {if !inventory:\r\n {set canbemade to 0}\r\n |else:\r\n {if inventory.amount < canbemade:\r\n {set canbemade to inventory.amount}\r\n }\r\n }\r\n {set cur to cur + 1}\r\n }\r\n\r\n {if canbemade = 0:\r\n You cannot make any {blueprintname}\r\n |elif canbemade = 1:\r\n You can make one {blueprintname}\r\n |else:\r\n You can make {canbemade} {blueprintname}\r\n }\r\n|else:\r\n No information available on materials required for {blueprintname}\r\n}.\r\n",
"default": true,
"name": "Blueprint make report",
"description": "Report on how many of a particular blueprint we can make"
},
"Blueprint material report": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{_ Fetch blueprint from state }\r\n{set blueprintname to state.blueprint}\r\n{if blueprintname:\r\n {_ Fetch full blueprint details }\r\n {set blueprint to BlueprintDetails(blueprintname)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'blueprint')}\r\n {SetState('eddi_context_blueprint_name', blueprintname)}\r\n}\r\n\r\n{if !blueprint:\r\n {_ Fetch from context }\r\n {set blueprint to BlueprintDetails(state.eddi_context_blueprint_name)}\r\n}\r\n\r\n{if blueprint:\r\n {set materials to len(blueprint.materials)}\r\n {blueprintname} requires \r\n {if materials = 1:\r\n {blueprint.materials[0].material}\r\n |elif materials = 2:\r\n {blueprint.materials[0].material} and {blueprint.materials[1].material}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(blueprint.materials):\r\n {if cur = 0:\r\n {blueprint.materials[cur].material}\r\n |elif cur < len(blueprint.materials) - 1:\r\n , {blueprint.materials[cur].material}\r\n |else:\r\n , and {blueprint.materials[cur].material}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n|else:\r\n No information available on materials required for {blueprintname}\r\n}.\r\n",
"default": true,
"name": "Blueprint material report",
"description": "Report on the material requirements for a blueprint"
},
"Body report": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{_ Fetch from context }\r\n{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}\r\n\r\n{if !reportbody.name || reportbody.name = \"\":\r\n I'm not sure which body you are asking about.\r\n|else:\r\n {P(reportbody.name)} is a\r\n {if reportbody.gravity < 0.5:\r\n low-gravity\r\n |elif reportbody.gravity <2:\r\n medium-gravity\r\n |elif reportbody.gravity <4:\r\n high-gravity\r\n |else:\r\n extremely high-gravity\r\n }\r\n\r\n {if reportbody.tidallylocked:\r\n tidally-locked\r\n }\r\n\r\n {if reportbody.terraformstate = \"Terraformable\":\r\n terraformable\r\n |elif reportbody.terraformstate = \"Terraformed\":\r\n terraformed\r\n }\r\n\r\n {if len(reportbody.rings) > 0:\r\n ringed\r\n }\r\n\r\n {reportbody.planettype}\r\n\r\n {if reportbody.terraformstate = \"Terraforming\":\r\n in the process of being terraformed\r\n }\r\n\r\n that is\r\n\r\n {if reportbody.landable:\r\n suitable\r\n |else:\r\n unsuitable\r\n }\r\n for landing.\r\n\r\n {_ Atmosphere? }\r\n\r\n {if reportbody.volcanism:\r\n This planet shows signs of volcanism, with\r\n {if reportbody.volcanism.type = 'Geysers':\r\n {if reportbody.volcanism.amount = 'Major':\r\n high numbers of\r\n |elif reportbody.volcanism.amount = 'Minor':\r\n low numbers of\r\n }\r\n active {reportbody.volcanism.composition} geysers\r\n |else:\r\n {if reportbody.volcanism.amount = 'Major':\r\n high levels of\r\n |elif reportbody.volcanism.amount = 'Minor':\r\n low levels of\r\n }\r\n active {reportbody.volcanism.composition} magma flows\r\n }.\r\n }\r\n\r\n {if reportbody.landable :\r\n It has a\r\n {if reportbody.rotationalperiod < -20.0:\r\n slow retrograde\r\n |elif reportbody.rotationalperiod < -0.5:\r\n retrograde\r\n |elif reportbody.rotationalperiod < 0:\r\n fast retrograde\r\n |elif reportbody.rotationalperiod <= 0.5:\r\n fast\r\n |elif reportbody.rotationalperiod > 20.0:\r\n slow\r\n }\r\n rotational period of {Humanise(reportbody.rotationalperiod)}\r\n day{if Humanise(reportbody.rotationalperiod) != \"1\":s}.\r\n\r\n {set goodmaterials to []}\r\n {set greatmaterials to []}\r\n {for material in reportbody.materials:\r\n {if material.percentage >= MaterialDetails(material.material).greatpctbody:\r\n {set greatmaterials to cat(greatmaterials, [material])}\r\n |elif material.percentage >= MaterialDetails(material.material).goodpctbody:\r\n {set goodmaterials to cat(goodmaterials, [material])}\r\n }\r\n }\r\n\r\n {if len(greatmaterials) > 0:\r\n This body contains very high levels of\r\n {if len(greatmaterials) = 1:\r\n {greatmaterials[0].material}\r\n |elif len(greatmaterials) = 2:\r\n {greatmaterials[0].material} and {greatmaterials[1].material}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(greatmaterials):\r\n {if cur = 0:\r\n {greatmaterials[cur].material}\r\n |elif cur < len(greatmaterials) - 1:\r\n , {greatmaterials[cur].material}\r\n |else:\r\n , and {greatmaterials[cur].material}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n }\r\n {if len(goodmaterials) > 0:\r\n {if len(greatmaterials) > 0:\r\n and high levels of\r\n |else:\r\n This body contains high levels of\r\n }\r\n {if len(goodmaterials) = 1:\r\n {goodmaterials[0].material}\r\n |elif len(goodmaterials) = 2:\r\n {goodmaterials[0].material} and {goodmaterials[1].material}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(goodmaterials):\r\n {if cur = 0:\r\n {goodmaterials[cur].material}\r\n |elif cur < len(goodmaterials) - 1:\r\n , {goodmaterials[cur].material}\r\n |else:\r\n , and {goodmaterials[cur].material}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n }\r\n {if len(greatmaterials) > 0 || len(goodmaterials) > 0:\r\n .\r\n }\r\n }\r\n}",
"default": true,
"name": "Body report",
"description": "Function to report on the details of the contextual body"
},
"Body scanned": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'body')}\r\n{SetState('eddi_context_last_action', 'scan')}\r\n{SetState('eddi_context_body_system', system.name)}\r\n{SetState('eddi_context_body_name', event.name)}\r\n\r\n{Pause(1000)}\r\n\r\nScan {Occasionally(3, \"of body\")} {OneOf(\"complete\", \"completed\", \"finished\")}.\r\n\r\n{F(\"Body report\")}\r\n",
"default": true,
"name": "Body scanned",
"description": "Triggered when you complete a scan of a planetary body"
},
"Bond awarded": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'bond')}\r\n{SetState('eddi_context_last_action', 'award')}\r\n{SetState('eddi_context_bond_amount', event.reward)}\r\n{SetState('eddi_context_bond_faction', event.awardingfaction)}\r\n\r\nThat's another {event.reward} credits in the bank.",
"default": true,
"name": "Bond awarded",
"description": "Triggered when you are awarded a combat bond"
},
"Bond redeemed": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'bond')}\r\n{SetState('eddi_context_last_action', 'redeem')}\r\n{SetState('eddi_context_bond_amount', event.amount)}\r\n\r\nCombat bonds for {Humanise(event.amount)} credits redeemed\r\n{Occasionally(2, \"\r\n {if len(event.rewards) = 1:\r\n by {P(event.rewards[0].faction)}\r\n |else:\r\n by\r\n {set cur to 0}\r\n {while cur < len(event.rewards):\r\n {if cur = 0:\r\n |elif cur < len(event.rewards) - 1:\r\n , \r\n |else:\r\n and\r\n }\r\n {P(event.rewards[cur].faction)}\r\n {set cur to cur + 1}\r\n }\r\n }\r\n\")}.\r\n",
"default": true,
"name": "Bond redeemed",
"description": "Triggered when you redeem a combat bond"
},
"Bounty awarded": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'bounty')}\r\n{SetState('eddi_context_last_action', 'award')}\r\n{SetState('eddi_context_bounty_name', event.target)}\r\n{SetState('eddi_context_bounty_faction', event.faction)}\r\n{SetState('eddi_context_bounty_amount', event.reward)}\r\n\r\n{Pause(500)}\r\n{if len(event.rewards) = 1:\r\n Bounty voucher of {Humanise(event.reward)} credits received from {P(event.rewards[0].faction)}\r\n|elif len(event.rewards) > 1:\r\n {len(event.rewards)} bounty vouchers received for a total of {Humanise(event.reward)} credits\r\n}\r\n{if event.shared:\r\n to share between yourself and your wing-mates\r\n}.\r\n",
"default": true,
"name": "Bounty awarded",
"description": "Triggered when you are awarded a bounty"
},
"Bounty incurred": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'bounty')}\r\n{SetState('eddi_context_last_action', 'incur')}\r\n{SetState('eddi_context_bounty_name', event.victim)}\r\n{SetState('eddi_context_bounty_faction', event.faction)}\r\n{SetState('eddi_context_bounty_amount', event.bounty)}\r\n\r\n{P(event.faction)} just put a bounty of {event.bounty} credits on your head.",
"default": true,
"name": "Bounty incurred",
"description": "Triggered when you incur a bounty"
},
"Bounty redeemed": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'bounty')}\r\n{SetState('eddi_context_last_action', 'redeem')}\r\n{SetState('eddi_context_bounty_amount', event.amount)}\r\n\r\nBounty vouchers for {Humanise(event.amount)} credits redeemed\r\n{Occasionally(2, \"\r\n {if len(event.rewards) = 1:\r\n by {P(event.rewards[0].faction)}\r\n |else:\r\n by\r\n {set cur to 0}\r\n {while cur < len(event.rewards):\r\n {if cur = 0:\r\n |elif cur < len(event.rewards) - 1:\r\n , \r\n |else:\r\n and\r\n }\r\n {P(event.rewards[cur].faction)}\r\n {set cur to cur + 1}\r\n }\r\n }\r\n\")}.\r\n",
"default": true,
"name": "Bounty redeemed",
"description": "Triggered when you redeem a bounty voucher"
},
"Cargo inventory": {
"enabled": true,
"priority": 3,
"responder": true,
"script": null,
"default": true,
"name": "Cargo inventory",
"description": "Triggered when you obtain an inventory of your cargo"
},
"Cleared save": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'save')}\r\n{SetState('eddi_context_last_action', 'clear')}\r\n\r\nGoodbye {F(\"Honorific\")}. It was a pleasure to serve you.",
"default": true,
"name": "Cleared save",
"description": "Triggered when you clear your save"
},
"Cockpit breached": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'cockpit')}\r\n{SetState('eddi_context_last_action', 'breach')}\r\n\r\nIs it me, or is it cold in here?",
"default": true,
"name": "Cockpit breached",
"description": "Triggered when your ship's cockpit is broken"
},
"Combat promotion": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'rank')}\r\n{SetState('eddi_context_last_action', 'promotion')}\r\n{SetState('eddi_context_rank_name', 'combat')}\r\n{SetState('eddi_context_rank_amount', event.rating)}\r\n\r\nYou have been recognised for your combat skills, {F(\"Honorific\")}.",
"default": true,
"name": "Combat promotion",
"description": "Triggered when your combat rank increases"
},
"Commander continued": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "Welcome back {F(\"Honorific\")}.",
"default": true,
"name": "Commander continued",
"description": "Triggered when you continue an existing game"
},
"Commander progress": {
"enabled": true,
"priority": 3,
"responder": true,
"script": null,
"default": true,
"name": "Commander progress",
"description": "Triggered when your progress is reported"
},
"Commander ratings": {
"enabled": true,
"priority": 3,
"responder": true,
"script": null,
"default": true,
"name": "Commander ratings",
"description": "Triggered when your ratings are reported"
},
"Commander started": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "Welcome, Commander.",
"default": true,
"name": "Commander started",
"description": "Triggered when you start a new game"
},
"Commodity collected": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'commodity')}\r\n{SetState('eddi_context_last_action', 'collect')}\r\n{SetState('eddi_context_cargo_name', event.commodity)}\r\n\r\n{event.commodity} now on board.",
"default": true,
"name": "Commodity collected",
"description": "Triggered when you pick up a commodity in your ship or SRV"
},
"Commodity ejected": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'commodity')}\r\n{SetState('eddi_context_last_action', 'eject')}\r\n{SetState('eddi_context_commodity_name', event.commodity)}\r\n",
"default": true,
"name": "Commodity ejected",
"description": "Triggered when you eject a commodity from your ship or SRV"
},
"Commodity purchase check": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{for commodity in station.commodities:\r\n {if commodity.stock > 0 && commodity.buyprice < commodity.avgprice:\r\n {set discount to commodity.avgprice - commodity.buyprice}\r\n {if discount > best.avgprice - best.buyprice:\r\n {set thirdbest to secondbest}\r\n {set secondbest to best}\r\n {set best to commodity}\r\n |elif discount > secondbest.avgprice - secondbest.buyprice:\r\n {set thirdbest to secondbest}\r\n {set secondbest to commodity}\r\n |elif discount > thirdbest.avgprice - thirdbest.buyprice:\r\n {set thirdbest to commodity}\r\n }\r\n }\r\n}\r\n\r\n{if best:\r\n The local market is selling {best.name} at a good price\r\n {if secondbest\r\n , as well as {secondbest.name}\r\n {if thirdbest:\r\n and {thirdbest.name}\r\n }\r\n }\r\n.}\r\n",
"default": true,
"name": "Commodity purchase check",
"description": "Check to see which commodities are the best to purchase"
},
"Commodity purchased": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'commodity')}\r\n{SetState('eddi_context_last_action', 'purchase')}\r\n{SetState('eddi_context_commodity_name', event.commodity)}\r\n{SetState('eddi_context_commodity_amount', event.amount)}\r\n\r\n{if event.amount = 1:\r\n You have just purchased one tonne of {event.commodity} for {event.price} credits.\r\n|elif event.amount > 1:\r\n You have just purchased {event.amount} tonnes of {event.commodity} at {event.price} credits per tonne. Total cost is {event.amount * event.price} credits.\r\n}",
"default": true,
"name": "Commodity purchased",
"description": "Triggered when you buy a commodity from the markets"
},
"Commodity refined": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'commodity')}\r\n{SetState('eddi_context_last_action', 'refine')}\r\n{SetState('eddi_context_commodity_name', event.commodity)}\r\n\r\n",
"default": true,
"name": "Commodity refined",
"description": "Triggered when you refine a commodity from the refinery"
},
"Commodity sale check": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{_ Function to find a given commodity in market}\r\n{set market(commodity) to:\r\n {for marketcommodity in station.commodities:\r\n {if marketcommodity.EDDBID = commodity.EDDBID:\r\n {return marketcommodity}\r\n }\r\n }\r\n}\r\n\r\n{set totalprofit to 0}\r\n{set profitablecommodities to []}\r\n{set stolencommodities to []}\r\n{set unknowncommodities to []}\r\n\r\n{for cargo in ship.cargo:\r\n {if cargo.commodity.name != 'Limpet':\r\n {set marketcommodity to market(cargo.commodity)}\r\n {if !marketcommodity:\r\n {_ We have no market information for this commodity. Add it to the list of unknowns }\r\n {set unknowncommodities to cat(unknowncommodities, [cargo.commodity])}\r\n }\r\n {set profit to (marketcommodity.sellprice - cargo.price) * cargo.amount}\r\n {if cargo.stolen = true:\r\n {set stolencommodities to cat(stolencommodities, [cargo.commodity])}\r\n |elif cargo.missionid:\r\n {_ don't do anything with mission cargo at the moment}\r\n |elif marketcommodity && profit > 0:\r\n {set profitablecommodities to cat(profitablecommodities, [cargo.commodity])}\r\n {set totalprofit to totalprofit + profit}\r\n }\r\n }\r\n}\r\n\r\n{_ Let the user know about any commodities they can sell here for a profit}\r\n{if len(profitablecommodities) > 0:\r\n You can sell your\r\n {if len(profitablecommodities) = 1:\r\n {profitablecommodities[0].name}\r\n |elif len(profitablecommodities) = 2:\r\n {profitablecommodities[0].name} and {profitablecommodities[1].name}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(profitablecommodities):\r\n {if cur = 0:\r\n {profitablecommodities[cur].name}\r\n |elif cur < len(profitablecommodities) - 1:\r\n , {profitablecommodities[cur].name}\r\n |else:\r\n , and {profitablecommodities[cur].name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n for a profit of {totalprofit} credits.\r\n}\r\n\r\n{_ Let the user know about any commodities about which we are unsure if they can sell for a profit}\r\n{if len(unknowncommodities) > 0:\r\n You could {if len(profitablecommodities) > 0: also } sell your\r\n {if len(unknowncommodities) = 1:\r\n {unknowncommodities[0].name}\r\n |elif len(unknowncommodities) = 2:\r\n {unknowncommodities[0].name} and {unknowncommodities[1].name}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(unknowncommodities):\r\n {if cur = 0:\r\n {unknowncommodities[cur].name}\r\n |elif cur < len(profitablecommodities) - 1:\r\n , {unknowncommodities[cur].name}\r\n |else:\r\n , and {unknowncommodities[cur].name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n , although check potential profits for {if len(unknowncommodities) > 1: these |else: this} before confirming the transaction.\r\n}\r\n\r\n{_ Let the user know about any stolen commodities they can sell on the black market}\r\n{if len(stolencommodities) > 0:\r\n {if station.hasblackmarket:\r\n You can {OneOf('offload, dump', 'fence')} your stolen\r\n {if len(stolencommodities) = 1:\r\n {stolencommodities[0].name}\r\n |elif len(stolencommodities) = 2:\r\n {stolencommodities[0].name} and {stolencommodities[1].name}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(stolencommodities):\r\n {if cur = 0:\r\n {stolencommodities[cur].name}\r\n |elif cur < len(stolencommodities) - 1:\r\n , {stolencommodities[cur].name}\r\n |else:\r\n , and {stolencommodities[cur].name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n here.\r\n |else:\r\n Reminder: you {OneOf(\"have stolen cargo on-board\", \"have stolen goods on-board\", \"are carrying stolen goods\", \"are carrying stolen cargo\")}.\r\n }\r\n}\r\n",
"default": true,
"name": "Commodity sale check",
"description": "Check to see which commodities can be sold here"
},
"Commodity sold": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'commodity')}\r\n{SetState('eddi_context_last_action', 'sell')}\r\n{SetState('eddi_context_commodity_name', event.commodity)}\r\n{SetState('eddi_context_commodity_amount', event.amount)}\r\n\r\n{if event.amount = 1:\r\n You have just sold one tonne of {event.commodity} for {event.price} credits\r\n|elif event.amount > 1:\r\n You have just sold {event.amount} tonnes of {event.commodity} at {event.price} credits per tonne for a total of {event.amount * event.price} credits\r\n}\r\n{if event.price != event.profit:\r\n {if event.profit < 0:\r\n with a loss of {-1 * event.profit * event.amount} credits.\r\n |elif event.profit = 0:\r\n and broke even on the trade.\r\n |else:\r\n with a profit of {event.profit * event.amount} credits.\r\n }\r\n}",
"default": true,
"name": "Commodity sold",
"description": "Triggered when you sell a commodity to the markets"
},
"Controlling fighter": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{OneOf(\"Neural link\", \"Link\", \"Uplink\")} {Occasionally(2, \"to fighter\")} {OneOf(\"initiated\", \"established\", \"engaged\")}.",
"default": true,
"name": "Controlling fighter",
"description": "Triggered when you switch control from your ship to your fighter"
},
"Controlling ship": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{OneOf(\"Neural link\", \"Link\", \"Uplink\")} {OneOf(\"terminated\", \"disengaged\")}.",
"default": true,
"name": "Controlling ship",
"description": "Triggered when you switch control from your fighter to your ship"
},
"Crew assigned": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{if event.role = \"Active\":\r\n {event.name} is now on active duty.\r\n|else:\r\n {event.name} standing down from active duty.\r\n}",
"default": true,
"name": "Crew assigned",
"description": "Triggered when you assign crew"
},
"Crew fired": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'fire')}\r\n{SetState('eddi_context_crew_name', event.name)}\r\n\r\n{event.name} has been fired.",
"default": true,
"name": "Crew fired",
"description": "Triggered when you fire crew"
},
"Crew hired": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'hire')}\r\n{SetState('eddi_context_crew_name', event.name)}\r\n\r\n{event.name} has been hired.",
"default": true,
"name": "Crew hired",
"description": "Triggered when you hire crew"
},
"Crew joined": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'join')}\r\n{SetState('eddi_context_crew_name', event.captain)}\r\n\r\nYou have joined {event.captain}'s crew.",
"default": true,
"name": "Crew joined",
"description": "Triggered when you join a crew"
},
"Crew left": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'leave')}\r\n{SetState('eddi_context_crew_name', event.captain)}\r\n\r\nYou have left {event.captain}'s crew.",
"default": true,
"name": "Crew left",
"description": "Triggered when you leave a crew"
},
"Crew member joined": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'join')}\r\n{SetState('eddi_context_crew_name', event.crew)}\r\n\r\n{event.crew} has joined your crew.",
"default": true,
"name": "Crew member joined",
"description": "Triggered when a commander joins your crew"
},
"Crew member launched": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'launch')}\r\n{SetState('eddi_context_crew_name', event.crew)}\r\n\r\n{event.crew} has launched their fighter.",
"default": true,
"name": "Crew member launched",
"description": "Triggered when a crew member launches the fighter"
},
"Crew member left": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'leave')}\r\n{SetState('eddi_context_crew_name', event.crew)}\r\n\r\n{event.crew} has left your crew.",
"default": true,
"name": "Crew member left",
"description": "Triggered when a commander leaves your crew"
},
"Crew member removed": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'remove')}\r\n{SetState('eddi_context_crew_name', event.crew)}\r\n\r\nYou have remove {event.crew} from your crew.",
"default": true,
"name": "Crew member removed",
"description": "Triggered when you remove a commander from your crew"
},
"Crew member role changed": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'role')}\r\n{SetState('eddi_context_crew_name', event.crew)}\r\n{SetState('eddi_context_crew_role', event.role)}\r\n\r\n{if event.role = 'Idle':\r\n {event.crew} is no longer manning a position\r\n|elif event.role = 'Fighter':\r\n {event.crew} is now manning the fighter\r\n|elif event.role = 'Gunner':\r\n {event.crew} is now manning the guns\r\n}.\r\n",
"default": true,
"name": "Crew member role change",
"description": "Triggered when a crew member changes their role"
},
"Crew role changed": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{if event.role = 'Gunner':\r\n You are now this crew's gunner.\r\n|elif event.role = 'Fighter':\r\n You are now this crew's fighter pilot.\r\n|elif event.role = 'Idle':\r\n You have been unassigned from active duty.\r\n}",
"default": true,
"name": "Crew role changed",
"description": "Triggered when your role in the crew changes"
},
"Damage check": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{_ Track if there is any damage}\r\n{set damaged to 0}\r\n\r\n{_ Announce hull health}\r\n{if ship.health < 100:\r\n Hull at {Humanise(ship.health)}%.\r\n {set damaged to 1}\r\n}\r\n\r\n{_ Announce critical module health}\r\n\r\n{set minordamage to []}\r\n{set majordamage to []}\r\n\r\n{if ship.powerplant.health < 60:\r\n {set majordamage to cat(majordamage, [ship.powerplant])}\r\n|elif ship.powerplant.health < 100:\r\n {set minordamage to cat(minordamage, [ship.powerplant])}\r\n}\r\n\r\n{if ship.thrusters.health < 60:\r\n {set majordamage to cat(majordamage, [ship.thrusters])}\r\n|elif ship.thrusters.health < 100:\r\n {set minordamage to cat(minordamage, [ship.thrusters])}\r\n}\r\n\r\n{if ship.frameshiftdrive.health < 60:\r\n {set majordamage to cat(majordamage, [ship.frameshiftdrive])}\r\n|elif ship.frameshiftdrive.health < 100:\r\n {set minordamage to cat(minordamage, [ship.frameshiftdrive])}\r\n}\r\n\r\n{if ship.powerdistributor.health < 60:\r\n {set majordamage to cat(majordamage, [ship.powerdistributor])}\r\n|elif ship.powerdistributor.health < 100:\r\n {set minordamage to cat(minordamage, [ship.powerdistributor])}\r\n}\r\n\r\n{if ship.lifesupport.health < 60:\r\n {set majordamage to cat(majordamage, [ship.lifesupport])}\r\n|elif ship.lifesupport.health < 100:\r\n {set minordamage to cat(minordamage, [ship.lifesupport])}\r\n}\r\n\r\n{if ship.sensors.health < 60:\r\n {set majordamage to cat(majordamage, [ship.sensors])}\r\n|elif ship.sensors.health < 100:\r\n {set minordamage to cat(minordamage, [ship.sensors])}\r\n}\r\n\r\n{if len(majordamage) > 0:\r\n {set damaged to 1}\r\n Major damage to\r\n {if len(majordamage) = 1:\r\n {majordamage[0].name}\r\n |elif len(majordamage) = 2:\r\n {majordamage[0].name} and {majordamage[1].name}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(majordamage):\r\n {if cur = 0:\r\n {majordamage[cur].name}\r\n |elif cur < len(majordamage) - 1:\r\n , {majordamage[cur].name}\r\n |else:\r\n ,and {majordamage[cur].name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }.\r\n}\r\n\r\n{if len(minordamage) > 0:\r\n {set damaged to 1}\r\n Minor damage to\r\n {if len(minordamage) = 1:\r\n {minordamage[0].name}\r\n |elif len(minordamage) = 2:\r\n {minordamage[0].name} and {minordamage[1].name}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(minordamage):\r\n {if cur = 0:\r\n {minordamage[cur].name}\r\n |elif cur < len(minordamage) - 1:\r\n , {minordamage[cur].name}\r\n |else:\r\n ,and {minordamage[cur].name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }.\r\n}\r\n\r\n{_ Announce other module health}\r\n\r\n{set minordamage to []}\r\n{set majordamage to []}\r\n\r\n{for compartment in ship.compartments:\r\n {if compartment.module.health < 60:\r\n {set majordamage to cat(majordamage, [compartment.module.name])}\r\n |elif hardpoint.module.health < 100:\r\n {set minordamage to cat(minordamage, [compartment.module.name])}\r\n }\r\n}\r\n\r\n{for hardpoint in ship.hardpoints:\r\n {if hardpoint.module.health < 60:\r\n {set majordamage to cat(majordamage, [hardpoint.module.name])}\r\n |elif hardpoint.module.health < 100:\r\n {set minordamage to cat(minordamage, [hardpiont.module.name])}\r\n }\r\n}\r\n\r\n{if len(majordamage) > 0:\r\n {set damaged to 1}\r\n {if len(majordamage) = 1:\r\n One other ship component with major damage\r\n |elif len(majordamage) > 1:\r\n {len(majordamage)} other ship components with major damage\r\n }\r\n {if len(minordamage) = 1:\r\n and one other ship component with minor damage\r\n |elif len(minordamage) > 1:\r\n and {len(minordamage)} other ship components with minor damage\r\n }.\r\n|elif len(minordamage) = 1:\r\n {set damaged to 1}\r\n One other ship component with minor damage.\r\n|elif len(minordamage) > 1:\r\n {set damaged to 1}\r\n {len(minordamage)} other ship components with minor damage.\r\n}\r\n\r\n{if damaged = 0:\r\n {OneOf(\"All systems fully operational.\", \"{ShipName()} is fully operational.\", \"{ShipName()} is undamaged.\")}\r\n}\r\n",
"default": true,
"name": "Damage check",
"description": "Check on the levels of damage to your ship"
},
"Data voucher redeemed": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'data_voucher')}\r\n{SetState('eddi_context_last_action', 'redeem')}\r\n{SetState('eddi_context_data_voucher_amount', event.amount)}\r\n\r\nData vouchers for {Humanise(event.amount)} credits redeemed\r\n{Occasionally(2, \"\r\n {if len(event.rewards) = 1:\r\n by {P(event.rewards[0].faction)}\r\n |else:\r\n by\r\n {set cur to 0}\r\n {while cur < len(event.rewards):\r\n {if cur = 0:\r\n |elif cur < len(event.rewards) - 1:\r\n , \r\n |else:\r\n and\r\n }\r\n {P(event.rewards[cur].faction)}\r\n {set cur to cur + 1}\r\n }\r\n }\r\n\")}.\r\n",
"default": true,
"name": "Data voucher redeemed",
"description": "Triggered when you redeem a data voucher"
},
"Died": {
"enabled": true,
"priority": 3,
"responder": true,
"script": null,
"default": true,
"name": "Died",
"description": "Triggered when you have died"
},
"Docked": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "Docking complete.\r\n",
"default": true,
"name": "Docked",
"description": "Triggered when your ship docks at a station or outpost"
},
"Docking cancelled": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "Docking request cancelled.",
"default": true,
"name": "Docking cancelled",
"description": "Triggered when your ship cancels a docking request at a station or outpost"
},
"Docking denied": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{Pause(2000)}\r\n\r\nWe have been denied docking\r\n\r\n{if event.reason = \"ActiveFighter\":\r\n because our fighter is deployed\r\n|elif event.reason = \"Distance\":\r\n because we are too far from the station\r\n|elif event.reason = \"Hostile\":\r\n because the station's controlling faction doesn't like us\r\n|elif event.reason = \"NoSpace\":\r\n because there is no space available\r\n|elif event.reason = \"Offences\":\r\n because we have recently committed an offence against them\r\n|elif event.reason = \"TooLarge\":\r\n because there are no landing pads that can accomodate the size of our ship\r\n}.",
"default": true,
"name": "Docking denied",
"description": "Triggered when your ship is denied docking at a station or outpost"
},
"Docking granted": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'landing pad')}\r\n{SetState('eddi_context_landing_pad_system', system.name)}\r\n{SetState('eddi_context_landing_pad_station', event.station)}\r\n{SetState('eddi_context_landing_pad_pad', event.landingpad)}\r\n\r\n{set station to StationDetails(event.station)}\r\n{if station.model = \"Coriolis Starport\" || station.model = \"Orbis Starport\" || station.model = \"Ocellus Starport\" || station.model = \"Unknown Starport\":\r\n {Pause(8000)}\r\n {F(\"Landing pad report\")}\r\n}\r\n",
"default": true,
"name": "Docking granted",
"description": "Triggered when your ship is granted docking permission at a station or outpost"
},
"Docking requested": {
"enabled": true,
"priority": 3,
"responder": true,
"script": null,
"default": true,
"name": "Docking requested",
"description": "Triggered when your ship requests docking at a station or outpost"
},
"Docking timed out": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "No response to our docking request.",
"default": true,
"name": "Docking timed out",
"description": "Triggered when your docking request times out"
},
"Engineer progressed": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{event.engineer} has given you access to grade {event.rank} blueprints.",
"default": true,
"name": "Engineer progressed",
"description": "Triggered when you reach a new rank with an engineer"
},
"Entered CQC": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "Entering close-quarters combat.",
"default": true,
"name": "Entered CQC",
"description": "Triggered when you enter CQC"
},
"Entered normal space": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'fsd')}\r\n{SetState('eddi_context_last_action', 'disengage')}\r\n{SetState('eddi_context_system_name', event.system)}\r\n{SetState('eddi_context_body_name', event.body)}\r\n{SetState('eddi_context_body_system', event.system)}\r\n\r\n{Pause(5000)}\r\n\r\n{OneOf(\"{ShipName()} has\", \"\")} {OneOf(\"left supercruise\", \"{OneOf(\\\"entered\\\", \\\"returned to\\\", \\\"dropped to\\\")} normal space\")}\r\n\r\n{if event.bodytype = 'Planet':\r\n {OneOf(\"near\", \"close to\", \"in the vicinity of\")} planet {P(event.body)}\r\n|elif event.bodytype = 'Star':\r\n {OneOf(\"near\", \"close to\", \"in the vicinity of\")} star {P(event.body)}\r\n |elif event.bodytype = 'Station':\r\n {OneOf(\"near\", \"close to\", \"in the vicinity of\")} {P(event.body)}\r\n}.\r\n",
"default": true,
"name": "Entered normal space",
"description": "Triggered when your ship enters normal space"
},
"Entered signal source": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{Pause(2000)}\r\n\r\n{if event.threat < 2:\r\n Entered signal source.\r\n|elif event.threat = 2:\r\n Caution: medium-threat signal source.\r\n|elif event.threat = 3:\r\n Warning: high-threat signal source.\r\n|else:\r\n Danger: very high-threat signal source.\r\n}\r\n",
"default": true,
"name": "Entered signal source",
"description": "Triggered when your ship enters a signal source"
},
"Entered supercruise": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'fsd')}\r\n{SetState('eddi_context_last_action', 'engage')}\r\n\r\n{Pause(1000)}\r\n\r\n{OneOf(\"{ShipName()} has\", \"\")} {OneOf(\"entered\", \"jumped to\")} supercruise.\r\n\r\n",
"default": true,
"name": "Entered supercruise",
"description": "Triggered when your ship enters supercruise"
},
"Exploration data purchased": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{OneOf(\"Purchased {OneOf('system', 'exploration')} data for {P(event.system)}\",\r\n \"{OneOf('system', 'exploration')} data for {P(event.system)} now available\",\r\n \"{Occasionally(3, '{ShipName()} has')} Received {OneOf('system', 'exploration')} data for {P(event.system)} from station services\",\r\n \"Receipt of {P(event.system)} {OneOf('system', 'exploration')} data confirmed\")}.",
"default": true,
"name": "Exploration data purchased",
"description": "Triggered when you purchase exploration data"
},
"Exploration data sold": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "Exploration data for {len(event.systems)} systems sold for {Humanise(event.reward)} credits\r\n\r\n{if len(event.firsts) > 0:\r\n , with an additional bonus of {Humanise(event.bonus)} credits for\r\n {if len(event.firsts) = 1:\r\n one first discovery\r\n |else:\r\n {len(event.firsts)} first discoveries\r\n }\r\n}\r\n.",
"default": true,
"name": "Exploration data sold",
"description": "Triggered when you sell exploration data"
},
"Exploration promotion": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "You have been recognised for your exploration skills, {F(\"Honorific\")}.",
"default": true,
"name": "Exploration promotion",
"description": "Triggered when your exploration rank increases"
},
"Fighter docked": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "Fighter {OneOf(\"docked\", \"redocked\")} {Occasionally(2, \"with ship\")}.",
"default": true,
"name": "Fighter docked",
"description": "Triggered when you dock a fighter with your ship"
},
"Fighter launched": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "Fighter {OneOf(\"deploying\", \"launching\")} {Occasionally(2, \"from mothership\")}.",
"default": true,
"name": "Fighter launched",
"description": "Triggered when you launch a fighter from your ship"
},
"File Header": {
"enabled": true,
"priority": 3,
"responder": true,
"script": null,
"default": true,
"name": "File Header",
"description": "Triggered when the file header is read"
},
"Fine incurred": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'fine')}\r\n{SetState('eddi_context_last_action', 'incur')}\r\n{SetState('eddi_context_fine_name', event.victim)}\r\n{SetState('eddi_context_fine_faction', event.faction)}\r\n{SetState('eddi_context_fine_amount', event.fine)}\r\n\r\nYou owe {P(event.faction)} {Humanise(event.fine)} credits for that.",
"default": true,
"name": "Fine incurred",
"description": "Triggered when your incur a fine"
},
"Fine paid": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'fine')}\r\n{SetState('eddi_context_last_action', 'pay')}\r\n{SetState('eddi_context_fine_amount', event.amount)}\r\n\r\n\r\nPaid fine of {Humanise(event.amount)} credits.",
"default": true,
"name": "Fine paid",
"description": "Triggered when you pay a fine"
},
"FSD engaged": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'fsd')}\r\n{SetState('eddi_context_last_action', 'engage')}\r\n{SetState('eddi_context_system_name', event.system)}\r\n{SetState('eddi_context_system_system', event.system)}\r\n\r\n{if event.target = 'Hyperspace':\r\n {_ Rewrite context to represent a jump }\r\n {SetState('eddi_context_last_subject', 'jump')}\r\n {SetState('eddi_context_last_action', 'start')}\r\n\r\n {set system to SystemDetails(event.system)}\r\n\r\n {_ Wait for the FSD countdown and initial jump}\r\n {Pause(6000)}\r\n\r\n {OneOf(\"Destination confirmed\",\"Jump in progress\",\"Telemetry obtained\")}.\r\n {ShipName()} is {OneOf(\"heading to\", \"on route to\", \"travelling to\", \"in transit to\")} the {P(system.name)} system.\r\n {if system.name = homesystem.name:\r\n Welcome home, {F(\"Honorific\")}\r\n |else:\r\n {if event.stellarclass = \"D\":\r\n Caution: white dwarf detected.\r\n |elif event.stellarclass = \"N\":\r\n Caution: neutron star detected.\r\n |elif event.stellarclass = \"H\":\r\n Caution: black hole detected.\r\n |elif event.stellarclass != 'F' && event.stellarclass != 'O' && event.stellarclass != 'G' && event.stellarclass != 'K' && event.stellarclass != 'B' && event.stellarclass != 'A' && event.stellarclass != 'M':\r\n Information: arrival star is not scoopable.\r\n }\r\n\r\n {if lastsystem.allegiance && lastsystem.allegiance != \"None\" && lastsystem.allegiance != \"Independent\" && (!system.allegiance || system.allegiance = \"None\" || system.allegiance = \"Independent\"):\r\n You {OneOf(\"are leaving\", \"have left\", \"are no longer in\")} {lastsystem.allegiance} space.\r\n |elif lastsystem.allegiance && lastsystem.allegiance != system.allegiance && system.allegiance && system.allegiance != \"None\":\r\n You {OneOf(\"are now in\", \"have entered\", \"are entering\")} {system.allegiance} space.\r\n {if cmdr.title != \"Commander\":\r\n Welcome back {F(\"Honorific\")}.\r\n }\r\n }\r\n\r\n {if system.visits = 0:\r\n This is your first visit to this system\r\n |elif system.visits = 1:\r\n This is your second visit to this system\r\n |elif system.visits = 2:\r\n This is your third visit to this system\r\n |elif system.visits = 3:\r\n This is your fourth visit to this system\r\n |else:\r\n You have visited this system {system.visits} times\r\n }.\r\n\r\n {if !system.population:\r\n {OneOf(\"This system is unpopulated\",\"There is no human presence here\", \"Humans have yet to colonise this system\")}.\r\n |else:\r\n {F(\"System report\")}\r\n }\r\n\r\n {if system.distancefromhome:\r\n {Occasionally(7, \"{OneOf(\\\"You are\\\", \\\"Current location is\\\", \\\"You are now\\\")} {Humanise(system.distancefromhome)} lightyears from {OneOf(\\\"home\\\", \\\"{P(homesystem.name)}\\\")}.\")}\r\n }\r\n\r\n {if system.comment:\r\n You made a {OneOf(\"note\", \"comment\", \"remark\")} {OneOf(\"about\", \"for\", \"on\")} this system. It {OneOf(\"is as follows\", \"says\", \"reads\", \"is\")} {system.comment}.\r\n }\r\n }\r\n}",
"default": true,
"name": "FSD engaged",
"description": "Triggered when your FSD has engaged"
},
"Galnet latest news": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{_ Fetch category from state }\r\n{set articlecategory to state.article_category}\r\n\r\n{if articlecategory:\r\n {set articles to GalnetNewsArticles(articlecategory)}\r\n|else:\r\n {set articles to GalnetNewsArticles('Article')}\r\n}\r\n\r\n{if len(articles) = 0:\r\n There is no unread news in that category\r\n|else:\r\n {set article to articles[0]}\r\n {SetState('eddi_context_galnet_news_id', article.id)}\r\n {article.title}: {article.content}\r\n {GalnetNewsMarkRead(article.id)}\r\n}.\r\n",
"default": true,
"name": "Galnet latest news",
"description": "Read the latest unread news in a given category"
},
"Galnet news": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{_ Fetch article from state }\r\n{set articleid to state.articleid}\r\n{if articleid:\r\n {set article to GalnetNews(articleid)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'news')}\r\n {SetState('eddi_context_galnet_news_id', articleid)}\r\n}\r\n\r\n{if !article:\r\n {_ Fetch from context }\r\n {set article to GalnetNews(state.eddi_context_galnet_news_id)}\r\n}\r\n\r\n{if article:\r\n {article.title}: {article.content}\r\n|else:\r\n I don't have any information about that article\r\n}.\r\n\r\n",
"default": true,
"name": "Galnet news",
"description": "Read a particular news article"
},
"Galnet news published": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{set statustitle to \"^(Galactic News: ((Weekly .*)|(Starport Status Update)))|(Powerplay: Incoming Update)\"}\r\n\r\n{if len(event.items) = 1:\r\n A new Galnet article has been published, entitled {event.items[0].title}.\r\n {if !match(event.items[0].title, statustitle):\r\n It reads: {event.items[0].content}.\r\n }\r\n|elif len(event.items) > 1:\r\n {len(event.items)} new Galnet articles have been published.\r\n {set item to 0}\r\n {while item < len(event.items):\r\n {if item = 0:\r\n The first is entitled {event.items[item].title}\r\n {if !match(event.items[item].title, statustitle):\r\n , and reads: {event.items[item].content}\r\n }.\r\n |elif item = 1:\r\n The second is entitled {event.items[item].title}\r\n {if !match(event.items[item].title, statustitle):\r\n , and reads: {event.items[item].content}\r\n }.\r\n |elif item = len(event.items) - 1:\r\n The last is entitled {event.items[item].title}\r\n {if !match(event.items[item].title, statustitle):\r\n , and reads: {event.items[item].content}\r\n }.\r\n |else:\r\n The next is entitled {event.items[item].title}\r\n {if !match(event.items[item].title, statustitle):\r\n , and reads: {event.items[item].content}\r\n }.\r\n }\r\n {set item to item + 1}\r\n {Pause(1000)}\r\n }\r\n}",
"default": true,
"name": "Galnet news published",
"description": "Triggered when news is published on Galnet"
},
"Galnet oldest news": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{_ Fetch category from state }\r\n{set articlecategory to state.article_category}\r\n\r\n{if articlecategory:\r\n {set articles to GalnetNewsArticles(articlecategory)}\r\n|else:\r\n {set articles to GalnetNewsArticles('Article')}\r\n}\r\n\r\n{if len(articles) = 0:\r\n There is no unread news in that category\r\n|else:\r\n {set article to articles[len(articles)-1]}\r\n {SetState('eddi_context_galnet_news_id', article.id)}\r\n {article.title}: {article.content}\r\n {GalnetNewsMarkRead(article.id)}\r\n}.\r\n",
"default": true,
"name": "Galnet oldest news",
"description": "Read the oldest unread news in a given category"
},
"Galnet unread report": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{set articles to GalnetNewsArticles(\"Article\")}\r\n\r\n{if len(articles) = 0:\r\n You have no unread news\r\n|elif len(articles) = 1:\r\n You have one unread news item\r\n|else:\r\n You have {len(articles)} unread news items\r\n}.",
"default": true,
"name": "Galnet unread report",
"description": "Report on unread news"
},
"Heat damage": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{Occasionally(2, \"Danger:\")}\r\nHeat damage.",
"default": true,
"name": "Heat damage",
"description": "Triggered when your ship is taking damage from excessive heat"
},
"Heat warning": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{Occasionally(2, \"Warning:\")}\r\nHeat levels beyond operating tolerance.",
"default": true,
"name": "Heat warning",
"description": "Triggered when your ship's heat exceeds 100%"
},
"Honorific": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{if system.allegiance = \"Empire\":\r\n {if cmdr.empirerating.rank <= 4:\r\n commander\r\n |elif cmdr.empirerating.rank = 5:\r\n sir\r\n |elif cmdr.empirerating.rank <= 11:\r\n my lord\r\n |elif cmdr.empirerating.rank = 12:\r\n your grace\r\n |elif cmdr.empirerating.rank = 13:\r\n your royal highness\r\n |elif cmdr.empirerating.rank = 14:\r\n your majesty\r\n }\r\n|elif system.allegiance = \"Federation\":\r\n {if cmdr.federationrating.rank = 0:\r\n commander\r\n |else:\r\n {cmdr.federationrating.name}\r\n }\r\n|else:\r\n commander\r\n}\r\n",
"default": true,
"name": "Honorific",
"description": "Function to provide a suitable honorific for your commander"
},
"Hull damaged": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{if event.vehicle = vehicle:\r\n {if event.health < 40:\r\n Danger:\r\n |elif event.health < 60:\r\n Warning:\r\n |elif event.health < 80:\r\n Caution:\r\n }\r\n {OneOf(\"Hull\", \"Hull integrity\", \"Integrity\", \"Structural integrity\")} {Occasionally(3, \"is\")} at {event.health}%.\r\n}\r\n",
"default": true,
"name": "Hull damaged",
"description": "Triggered when your hull is damaged to a certain extent"
},
"Insurance check": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{set insurance to round(ship.value * cmdr.insurance / 100)}\r\n\r\n{set covereds to round((cmdr.credits / insurance) - 0.5)}\r\n\r\n{if covereds = 0:\r\n Danger: you do not have enough credits to cover your insurance excess.\r\n|elif covereds = 1:\r\n Caution: you onlt have enough credits to cover a single insurance excess.\r\n|elif covereds < 4:\r\n Note: you only have enough credits to cover {covereds} insurance excesses.\r\n}\r\n",
"default": true,
"name": "Insurance check",
"description": "Check for enough credits to cover your insurance"
},
"Jumped": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'jump')}\r\n{SetState('eddi_context_last_action', 'complete')}\r\n{SetState('eddi_context_system_name', system.name)}\r\n{SetState('eddi_context_system_system', system.name)}\r\n\r\n{set statereport to F(\"System state report\")}\r\n{if statereport:\r\n {Pause(2000)}\r\n Information: {statereport}\r\n}",
"default": true,
"name": "Jumped",
"description": "Triggered when you complete a jump to another system"
},
"Jumping": {
"enabled": true,
"priority": 3,
"responder": true,
"script": null,
"default": true,
"name": "Jumping",
"description": "NO LONGER IN USE"
},
"Killed": {
"enabled": true,
"priority": 3,
"responder": true,
"script": null,
"default": true,
"name": "Killed",
"description": "Triggered when you kill another player"
},
"Landing pad report": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{set landingpad to state.eddi_context_landing_pad_pad}\r\nLanding pad {landingpad} is at\r\n{if landingpad = 1:\r\n six o'clock near\r\n|elif landingpad = 2:\r\n six o'clock near\r\n|elif landingpad = 3:\r\n six o'clock far\r\n|elif landingpad = 4:\r\n six o'clock far\r\n|elif landingpad = 5:\r\n seven o'clock near\r\n|elif landingpad = 6:\r\n seven o'clock near\r\n|elif landingpad = 7:\r\n seven o'clock far\r\n|elif landingpad = 8:\r\n seven o'clock far\r\n|elif landingpad = 9:\r\n eight o'clock near\r\n|elif landingpad = 10:\r\n eight o'clock far\r\n|elif landingpad = 11:\r\n nine o'clock near\r\n|elif landingpad = 12:\r\n nine o'clock near\r\n|elif landingpad = 13:\r\n nine o'clock mid\r\n|elif landingpad = 14:\r\n nine o'clock far\r\n|elif landingpad = 15:\r\n nine o'clock far\r\n|elif landingpad = 16:\r\n ten o'clock near\r\n|elif landingpad = 17:\r\n ten o'clock near\r\n|elif landingpad = 18:\r\n ten o'clock far\r\n|elif landingpad = 19:\r\n ten o'clock far\r\n|elif landingpad = 20:\r\n eleven o'clock near\r\n|elif landingpad = 21:\r\n eleven o'clock near\r\n|elif landingpad = 22:\r\n eleven o'clock far\r\n|elif landingpad = 23:\r\n eleven o'clock far\r\n|elif landingpad = 24:\r\n twelve o'clock near\r\n|elif landingpad = 25:\r\n twelve o'clock far\r\n|elif landingpad = 26:\r\n one o'clock near\r\n|elif landingpad = 27:\r\n one o'clock near\r\n|elif landingpad = 28:\r\n one o'clock mid\r\n|elif landingpad = 29:\r\n one o'clock far\r\n|elif landingpad = 30:\r\n one o'clock far\r\n|elif landingpad = 31:\r\n two o'clock near\r\n|elif landingpad = 32:\r\n two o'clock near\r\n|elif landingpad = 33:\r\n two o'clock far\r\n|elif landingpad = 34:\r\n two o'clock far\r\n|elif landingpad = 35:\r\n three o'clock near\r\n|elif landingpad = 36:\r\n three o'clock near\r\n|elif landingpad = 37:\r\n three o'clock mid\r\n|elif landingpad = 38:\r\n three o'clock far\r\n|elif landingpad = 39:\r\n four o'clock near\r\n|elif landingpad = 40:\r\n four o'clock far\r\n|elif landingpad = 41:\r\n five o'clock near\r\n|elif landingpad = 42:\r\n five o'clock near\r\n|elif landingpad = 43:\r\n five o'clock mid\r\n|elif landingpad = 44:\r\n five o'clock far\r\n|elif landingpad = 45:\r\n five o'clock far\r\n}\r\n, as you enter with the green lights on your right.\r\n\r\n",
"default": true,
"name": "Landing pad report",
"description": "Report on the location of a landing pad"
},
"Liftoff": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{if event.playercontrolled = true:\r\n Lift off.\r\n|else:\r\n {ShipName()} has lifted off.\r\n}",
"default": true,
"name": "Liftoff",
"description": "Triggered when your ship lifts off from a planet's surface"
},
"Limpet check": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{set controllers to 0}\r\n{for compartment in ship.compartments:\r\n {if find(compartment.module.name, \"Controller\") != -1:\r\n {set controllers to controllers + 1}\r\n }\r\n}\r\n\r\n{set limpets to 0}\r\n{for cargo in ship.cargo:\r\n {if cargo.commodity.name = \"Limpet\":\r\n {set limpets to limpets + cargo.amount}\r\n }\r\n}\r\n\r\n{set tenpercent to ship.cargocapacity / 10 - 1}\r\n{if controllers > 0 && limpets = 0:\r\n Reminder: you have a limpet controller but are not carrying any limpets.\r\n|elif controllers = 0 && limpets > 0:\r\n You are carrying limpets but no limpet controller.\r\n|elif controllers > 0 && limpets < tenpercent:\r\n You only have {limpets} {if limpets = 1: limpet |else: limpets} on-board; you might want to consider re-stocking.\r\n}\r\n",
"default": true,
"name": "Limpet check",
"description": "Check for the presence/absence of limpets and limpet controllers"
},
"Limpet purchased": {
"enabled": true,
"priority": 3,
"responder": true,
"script": null,
"default": true,
"name": "Limpet purchased",
"description": "Triggered when you buy limpets from a station"
},
"Limpet sold": {
"enabled": true,
"priority": 3,
"responder": true,
"script": null,
"default": true,
"name": "Limpet sold",
"description": "Triggered when you sell limpets to a station"
},
"Location": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_system_name', event.system)}\r\n{SetState('eddi_context_body_name', event.body)}\r\n{SetState('eddi_context_body_system', event.system)}\r\n\r\nYou are\r\n{if event.docked:\r\n docked at the\r\n {if event.station = event.body:\r\n orbital station {P(event.station)}\r\n |else:\r\n ground station {P(event.station)} on {P(event.body)}\r\n }\r\n|elif event.body:\r\n near {P(event.body)}\r\n}\r\nin the {P(event.system)} system.",
"default": true,
"name": "Location",
"description": "Triggered when the commander's location is reported, usually when they reload their game."
},
"Market information updated": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Find out in advance what we have to say }\r\n{if ship.role = \"Multi-purpose\" || ship.role = \"Trading\":\r\n {set purchasecheck to F(\"Commodity purchase check\")}\r\n}\r\n{set limpetcheck to F(\"Limpet check\")}\r\n{set swapoutcheck to F(\"Swapout check\")}\r\n{set salecheck to F(\"Commodity sale check\")}\r\n\r\n{if purchasecheck || salecheck || limpetcheck || swapoutcheck:\r\n {OneOf(\"Market\", \"Local market\", \"Station services\")}\r\n {OneOf(\"data\", \"information\", \"price\")}\r\n {OneOf(\"update\", \"refresh\", \"changes\")}\r\n {OneOf(\"received\", \"obtained\")}.\r\n\r\n\r\n {salecheck}\r\n {purchasecheck}\r\n {swapoutcheck}\r\n {limpetcheck}\r\n}",
"default": true,
"name": "Market information updated",
"description": "Triggered when market information for the currently docked station has been updated"
},
"Material collected": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'material')}\r\n{SetState('eddi_context_last_action', 'collect')}\r\n{SetState('eddi_context_material_name', event.material)}\r\n",
"default": true,
"name": "Material collected",
"description": "Triggered when you collect a material"
},
"Material discard report": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{_ Function to obtain a material from inventory}\r\n{set _inventory(required) to:\r\n {for material in materials:\r\n {if material.material = required:\r\n {return material}\r\n }\r\n }\r\n}\r\n\r\n{_ Fetch material from state }\r\n{set material to state.material}\r\n{if material:\r\n {_ Fetch full material details }\r\n {set material to MaterialDetails(material)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'material')}\r\n {SetState('eddi_context_material_name', material.name)}\r\n}\r\n\r\n{if !material:\r\n {_ Fetch from context }\r\n {set material to MaterialDetails(state.eddi_context_material_name)}\r\n}\r\n\r\n{set inventory to _inventory(material.name)}\r\n\r\n\r\n{if inventory:\r\n {if inventory.maximum && inventory.maximum < inventory.amount:\r\n {set over to inventory.amount - inventory.maximum}\r\n {if over > 1:\r\n You can discard {over} units of {inventory.material} to reach your maximum level.\r\n |elif over = 1:\r\n You can discard 1 unit of {inventory.material} to reach your maximum level.\r\n }\r\n |elif inventory.desired && inventory.desired < inventory.amount:\r\n {set over to inventory.amount - inventory.desired}\r\n {if over > 1:\r\n You can discard {over} units of {inventory.material} to reach your desired level.\r\n |elif over = 1:\r\n You can discard 1 unit of {inventory.material} to reach your desired level.\r\n }\r\n |elif inventory.desired:\r\n You are below your desired level for {inventory.material}.\r\n |elif inventory.maximum:\r\n You are below your maximum level for {inventory.material}.\r\n |else:\r\n You have not set any levels for {inventory.material}.\r\n }\r\n}\r\n",
"default": true,
"name": "Material discard report",
"description": "Report on how many of a material can be discarded"
},
"Material discarded": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'material')}\r\n{SetState('eddi_context_last_action', 'discard')}\r\n{SetState('eddi_context_material_name', event.material)}\r\n",
"default": true,
"name": "Material discarded",
"description": "Triggered when you discard a material"
},
"Material discovered": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'material')}\r\n{SetState('eddi_context_last_action', 'discover')}\r\n{SetState('eddi_context_material_name', event.material)}\r\n",
"default": true,
"name": "Material discovered",
"description": "Triggered when you discover a material"
},
"Material donated": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'material')}\r\n{SetState('eddi_context_last_action', 'donate')}\r\n{SetState('eddi_context_material_name', event.material)}\r\n",
"default": true,
"name": "Material donated",
"description": "Triggered when you donate a material"
},
"Material inventory": {
"enabled": true,
"priority": 3,
"responder": true,
"script": null,
"default": true,
"name": "Material inventory",
"description": "Triggered when you obtain an inventory of your current materials"
},
"Material inventory report": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{_ Function to obtain a material from inventory}\r\n{set _inventory(required) to:\r\n {for material in materials:\r\n {if material.material = required:\r\n {return material}\r\n }\r\n }\r\n}\r\n\r\n{_ Fetch material from state }\r\n{set material to state.material}\r\n{if material:\r\n {_ Fetch full material details }\r\n {set material to MaterialDetails(material)}\r\n \r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'material')}\r\n {SetState('eddi_context_last_subject', 'inventory')}\r\n {SetState('eddi_context_material_name', material.name)}\r\n}\r\n\r\n{if !material:\r\n {_ Fetch from context }\r\n {set material to MaterialDetails(state.eddi_context_material_name)}\r\n}\r\n\r\n{set inventory to _inventory(material.name)}\r\n\r\n{if inventory && inventory.amount > 0:\r\n {if inventory.amount = 1:\r\n You have {inventory.amount} unit of {inventory.material} on board.\r\n |else:\r\n You have {inventory.amount} units of {inventory.material} on board.\r\n }\r\n|else:\r\n You have no {inventory.material} on board.\r\n}\r\n",
"default": true,
"name": "Material inventory report",
"description": "Report on how many of a material are on-board"
},
"Material location report": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{_ Fetch material from state }\r\n{set material to state.material}\r\n{if material:\r\n {_ Fetch full material details }\r\n {set material to MaterialDetails(material)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'material')}\r\n {SetState('eddi_context_material_name', material.name)}\r\n}\r\n\r\n{if !material:\r\n {_ Fetch from context }\r\n {set material to MaterialDetails(state.eddi_context_material_name)}\r\n}\r\n\r\n{if material.name:\r\n {if material.location:\r\n {material.name} can be {material.location}\r\n |else:\r\n No information available on where to find {material.name}\r\n }\r\n|else:\r\n I don't have any information about that material\r\n}.\r\n",
"default": true,
"name": "Material location report",
"description": "Report on the where to obtain a particular material"
},
"Material required report": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{_ Function to obtain a material from inventory}\r\n{set _inventory(required) to:\r\n {for material in materials:\r\n {if material.material = required:\r\n {return material}\r\n }\r\n }\r\n}\r\n\r\n{_ Fetch material from state }\r\n{set material to state.material}\r\n{if material:\r\n {_ Fetch full material details }\r\n {set material to MaterialDetails(material)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'material')}\r\n {SetState('eddi_context_material_name', material.name)}\r\n}\r\n\r\n{if !material:\r\n {_ Fetch from context }\r\n {set material to MaterialDetails(state.eddi_context_material_name)}\r\n}\r\n\r\n{set inventory to _inventory(material.name)}\r\n\r\n\r\n{if inventory:\r\n {if inventory.minimum && inventory.minimum > inventory.amount:\r\n {set under to inventory.minimum - inventory.amount}\r\n {if under > 1:\r\n You require {under} units of {inventory.material} to reach your minimum level.\r\n |elif under = 1:\r\n You require 1 unit of {inventory.material} to reqach your minimum level.\r\n }\r\n |elif inventory.desired && inventory.desired > inventory.amount:\r\n {set under to inventory.desired - inventory.amount}\r\n {if under > 1:\r\n You require {under} units of {inventory.material} to reach your desired level.\r\n |elif under = 1:\r\n You require 1 unit of {inventory.material} to reach your desired level.\r\n }\r\n |elif inventory.desired:\r\n You are above your desired level for {inventory.material}.\r\n |elif inventory.minimum :\r\n You are above your minimum level for {inventory.material}.\r\n |else:\r\n You have not set any levels for {inventory.material}.\r\n }\r\n}\r\n\r\n",
"default": true,
"name": "Material required report",
"description": "Report on how many of a material are required to reach 'desired' level"
},
"Material threshold": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{if event.level = 'Minimum':\r\n {_ Gone below the minimum level }\r\n {OneOf(\"Stock\", \"Inventory\", \"Supplies\")} of {event.material.name} has fallen below your minimum.\r\n|elif event.level = 'Maximum':\r\n {_ Gone above the maximum level }\r\n {OneOf(\"Stock\", \"Inventory\", \"Supplies\")} of {event.material.name} has grown above your maximum.\r\n|else:\r\n {_ Moved around the desired level }\r\n {if event.change = 'Increase':\r\n You have reached your desired level of {event.material.name}.\r\n |else:\r\n You are below your desired level of {event.material.name}.\r\n }\r\n}\r\n\r\n{OneOf(\"Current stock is {event.amount}\",\r\n \"Currently holding {event.amount}\",\r\n \"{event.amount} on-board\")}.",
"default": true,
"name": "Material threshold",
"description": "Triggered when a material reaches a threshold"
},
"Material use report": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{_ Fetch material from state }\r\n{set material to state.material}\r\n{if material:\r\n {_ Fetch full material details }\r\n {set material to MaterialDetails(material)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'material')}\r\n {SetState('eddi_context_material_name', material.name)}\r\n}\r\n\r\n{if !material:\r\n {_ Fetch from context }\r\n {set material to MaterialDetails(state.eddi_context_material_name)}\r\n}\r\n\r\n{if material && material.name:\r\n {set uses to len(material.blueprints)}\r\n {if slice(material.name, len(material.name)-1) = 's':\r\n {set plural to 'are'}\r\n |else:\r\n {set plural to 'is'}\r\n }\r\n {if uses = 0:\r\n {material.name} {plural} not required for any blueprints\r\n |elif uses = 1:\r\n {set name to cat(material.blueprints[0].name, material.blueprints[0].modulename, 'grade', material.blueprints[0].grade)}\r\n {material.name} {plural} used for the {name} blueprint\r\n |elif uses = 2:\r\n {set name0 to cat(material.blueprints[0].name, material.blueprints[0].modulename, 'grade', material.blueprints[0].grade)}\r\n {set name1 to cat(material.blueprints[1].name, material.blueprints[1].modulename, 'grade', material.blueprints[1].grade)}\r\n {material.name} {plural} used for the {name0} and {name1} blueprints\r\n |else:\r\n {material.name} {plural} used for {len(material.blueprints)} blueprints. These are\r\n {set cur to 0}\r\n {while cur < len(material.blueprints):\r\n {set name to cat(material.blueprints[cur].name, material.blueprints[cur].modulename, 'grade', material.blueprints[cur].grade)}\r\n {if cur = 0:\r\n {name}\r\n |elif cur < len(material.blueprints) - 1:\r\n , {name}\r\n |else:\r\n , and {name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n|else:\r\n I don't have any information about that material\r\n}.\r\n",
"default": true,
"name": "Material use report",
"description": "Report on the use of a material"
},
"Materials discard report": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "\r\n{_ Find those that are above maximum, desired and minimum}\r\n{set shoulddiscardmaterials to []}\r\n{set coulddiscardmaterials to []}\r\n{set lastdiscardmaterials to []}\r\n\r\n{for material in materials:\r\n {if material.maximum && material.amount > material.maximum:\r\n {set shoulddiscardmaterials to cat(shoulddiscardmaterials, [material])}\r\n |elif material.desired && material.amount > material.desired:\r\n {set coulddiscardmaterials to cat(coulddiscardmaterials, [material])}\r\n |elif material.minimum && material.amount > material.minimum:\r\n {set lastdiscardmaterials to cat(lastdiscardmaterials, [material])}\r\n }\r\n}\r\n\r\n{if len(shoulddiscardmaterials) > 0:\r\n You are over your maximum level for {if len(shoulddiscardmaterials) = 1: 1 material |else: {len(shoulddiscardmaterials)} materials}. You can discard\r\n {if len(shoulddiscardmaterials) = 1:\r\n {shoulddiscardmaterials[0].amount - shoulddiscardmaterials[0].maximum} {shoulddiscardmaterials[0].material}\r\n |elif len(shoulddiscardmaterials) = 2:\r\n {shoulddiscardmaterials[0].amount - shoulddiscardmaterials[0].maximum} {shoulddiscardmaterials[0].material} and {shoulddiscardmaterials[1].amount - shoulddiscardmaterials[1].maximum} {shoulddiscardmaterials[1].material}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(shoulddiscardmaterials):\r\n {if cur = 0:\r\n {shoulddiscardmaterials[cur].amount - shoulddiscardmaterials[cur].maximum} {shoulddiscardmaterials[cur].material}\r\n |elif cur < len(shoulddiscardmaterials) - 1:\r\n , {shoulddiscardmaterials[cur].amount - shoulddiscardmaterials[cur].maximum} {shoulddiscardmaterials[cur].material}\r\n |else:\r\n , and {shoulddiscardmaterials[cur].amount - shoulddiscardmaterials[cur].maximum} {shoulddiscardmaterials[cur].material}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }.\r\n|elif len(coulddiscardmaterials) > 0:\r\n You are over your desired level for {if len(coulddiscardmaterials) = 1: 1 material |else: {len(coulddiscardmaterials)} materials}. You can discard\r\n {if len(coulddiscardmaterials) = 1:\r\n {coulddiscardmaterials[0].amount - coulddiscardmaterials[0].desired} {coulddiscardmaterials[0].material}\r\n |elif len(coulddiscardmaterials) = 2:\r\n {coulddiscardmaterials[0].amount - coulddiscardmaterials[0].desired} {coulddiscardmaterials[0].material} and {coulddiscardmaterials[1].amount - coulddiscardmaterials[1].desired} {coulddiscardmaterials[1].material}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(coulddiscardmaterials):\r\n {if cur = 0:\r\n {coulddiscardmaterials[cur].amount - coulddiscardmaterials[cur].desired} {coulddiscardmaterials[cur].material}\r\n |elif cur < len(coulddiscardmaterials) - 1:\r\n , {coulddiscardmaterials[cur].amount - coulddiscardmaterials[cur].desired} {coulddiscardmaterials[cur].material}\r\n |else:\r\n , and {coulddiscardmaterials[cur].amount - coulddiscardmaterials[cur].desired} {coulddiscardmaterials[cur].material}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }.\r\n|elif len(lastdiscardmaterials) > 0:\r\n You are over your minimum level for {if len(lastdiscardmaterials) = 1: 1 material |else: {len(lastdiscardmaterials)} materials}. You can discard\r\n {if len(lastdiscardmaterials) = 1:\r\n {lastdiscardmaterials[0].amount - lastdiscardmaterials[0].minimum} {lastdiscardmaterials[0].material}\r\n |elif len(lastdiscardmaterials) = 2:\r\n {lastdiscardmaterials[0].amount - lastdiscardmaterials[0].minimum} {lastdiscardmaterials[0].material} and {lastdiscardmaterials[1].amount - lastdiscardmaterials[1].minimum} {lastdiscardmaterials[1].material}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(lastdiscardmaterials):\r\n {if cur = 0:\r\n {lastdiscardmaterials[cur].amount - lastdiscardmaterials[cur].minimum} {lastdiscardmaterials[cur].material}\r\n |elif cur < len(lastdiscardmaterials) - 1:\r\n , {lastdiscardmaterials[cur].amount - lastdiscardmaterials[cur].minimum} {lastdiscardmaterials[cur].material}\r\n |else:\r\n , and {lastdiscardmaterials[cur].amount - lastdiscardmaterials[cur].minimum} {lastdiscardmaterials[cur].material}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }.\r\n|else:\r\n No materials can be discarded and remain within minimum levels.\r\n}\r\n",
"default": true,
"name": "Materials discard report",
"description": "Report on which materials can be discarded"
},
"Materials required report": {
"enabled": true,
"priority": 3,
"responder": false,
"script": "{set required to []}\r\n\r\n{for material in materials:\r\n {if material.desired && material.amount < material.desired:\r\n {set required to cat(required, [material])}\r\n }\r\n}\r\n\r\n{if len(required) > 0:\r\n You require\r\n {if len(required) = 1:\r\n {required[0].desired - required[0].amount} {required[0].material}\r\n |elif len(required) = 2:\r\n {required[0].desired - required[0].amount} {required[0].material} and {required[1].desired - required[1].amount} {required[1].material}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(required):\r\n {if cur = 0:\r\n {required[cur].desired - required[cur].amount} {required[cur].material}\r\n |elif cur < len(required) - 1:\r\n , {required[cur].desired - required[cur].amount} {required[cur].material}\r\n |else:\r\n , and {required[cur].desired - required[cur].amount} {required[cur].material}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }.\r\n|else:\r\n You have all the materials you desire.\r\n}",
"default": true,
"name": "Materials required report",
"description": "Report on how many of each material are required to reach 'desired' level"
},
"Message received": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'message')}\r\n{SetState('eddi_context_last_action', 'receive')}\r\n{SetState('eddi_context_message_name', event.from)}\r\n{SetState('eddi_context_message_content', event.message)}\r\n\r\n{if event.player = true:\r\n {if event.message = \"o7\":\r\n {event.from} salutes\r\n {if event.channel = \"player\":\r\n you\r\n }.\r\n |else:\r\n Message received from {event.source} {event.from}. Message reads: {event.message}.\r\n }\r\n}\r\n",
"default": true,
"name": "Message received",
"description": "Triggered when you receive a message"
},
"Message sent": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'message')}\r\n{SetState('eddi_context_last_action', 'send')}\r\n{SetState('eddi_context_message_name', event.to)}\r\n{SetState('eddi_context_message_content', event.message)}\r\n\r\n{OneOf(\"Message away\", \"Message sent\", \"Sent\")}.",
"default": true,
"name": "Message sent",
"description": "Triggered when you send a message"
},
"Mission abandoned": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "Mission abandoned.",
"default": true,
"name": "Mission abandoned",
"description": "Triggered when you abandon a mission"
},
"Mission accepted": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{if event.communal:\r\n Community goal accepted.\r\n|else:\r\n Mission for {P(event.faction)} accepted.\r\n {if event.passengerswanted:\r\n {set wanteddescription to OneOf(\"wanted passengers\", \"known felons\")}\r\n Caution: {OneOf(\"you are carrying {wanteddescription}\",\"{wanteddescription} now on board\")}.\r\n }\r\n}",
"default": true,
"name": "Mission accepted",
"description": "Triggered when you accept a mission"
},
"Mission completed": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{if event.reward > 0:\r\n Payment of {Humanise(event.reward)} credits {Occasionally(2, 'from {P(event.faction)}')} {OneOf('received', 'confirmed')}.\r\n|elif event.donation > 0:\r\n {OneOf(\"Donated {Occasionally(2, '{Humanise(event.donation)} credits')} to {Occasionally(2, 'a grateful')} {P(event.faction)}\",\r\n \"{P(event.faction)} has {Occasionally(2, 'gratefully')} received your donation {Occasionally(2, 'of {Humanise(event.donation)} credits')}\",\r\n \"{P(event.faction)} thanks you for your donation {Occasionally(2, 'of {Humanise(event.donation)} credits')}\"\r\n )}.\r\n|else:\r\n Mission completed.\r\n}\r\n{for commodityreward in event.commodityrewards:\r\n {commodityreward.amount} tonnes of {commodityreward.commodity} {OneOf(\"now on-board\", \"also received\", \"confirmed on-board\")}.\r\n}",
"default": true,
"name": "Mission completed",
"description": "Triggered when you complete a mission"
},
"Mission failed": {
"enabled": true,
"priority": 3,
"responder": true,
"script": null,
"default": true,
"name": "Mission failed",
"description": "Triggered when you fail a mission"
},
"Modification applied": {
"enabled": true,
"priority": 3,
"responder": true,
"script": null,
"default": true,
"name": "Modification applied",
"description": "Triggered when you apply a modification to a module"
},
"Modification crafted": {
"enabled": true,
"priority": 3,
"responder": true,
"script": null,
"default": true,
"name": "Modification crafted",
"description": "Triggered when you craft a modification to a module"
},
"NPC attack commenced": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "Warning: attack \r\n{if event.by:\r\n by {event.by} \r\n}\r\ndetected.",
"default": true,
"name": "NPC attack commenced",
"description": "Triggered when an attack on your ship by an NPC is detected"
},
"NPC cargo scan commenced": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{_ See if we are carrying non-limpet cargo}\r\n{set carryingvaluablecargo to 0}\r\n{for cargo in ship.cargo:\r\n {if cargo.commodity != 'Limpet':\r\n {set carryingvaluablecargo to 1}\r\n }\r\n}\r\n\r\n{if carryingvaluablecargo = 1:\r\n Caution: cargo scan\r\n {if event.by:\r\n by {event.by} \r\n }\r\n detected.\r\n}\r\n",
"default": true,
"name": "NPC cargo scan commenced",
"description": "Triggered when a cargo scan on your ship by an NPC is detected"
},
"NPC interdiction commenced": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "Warning: interdiction attempt\r\n{if event.by:\r\n by {event.by} \r\n}\r\ndetected.\r\n\r\n{Occasionally(3, \"Throttle down or evade.\")}",
"default": true,
"name": "NPC interdiction commenced",
"description": "Triggered when an interdiction attempt on your ship by an NPC is detected"
},
"Power commodity delivered": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{event.amount} units of {event.commodity} delivered {Occasionally(2, \"for {P(event.power)}\")}.",
"default": true,
"name": "Power commodity delivered",
"description": "Triggered when a commander delivers a commodity to a power"
},
"Power commodity fast tracked": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{Humanise(event.amount)} credits spent fast-tracking commodities {Occasionally(2, \"for {P(event.power)}\")}.",
"default": true,
"name": "Power commodity fast tracked",
"description": "Triggered when a commander fast tracks a commodity of a power"
},
"Power commodity obtained": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "{event.amount} units of {event.commodity} obtained {Occasionally(2, \"for {P(event.power)}\")}.",
"default": true,
"name": "Power commodity obtained",
"description": "Triggered when a commander obtains a commodity from a power"
},
"Power defected": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "You have defected from {P(event.frompower)} to {P(event.topower)}.",
"default": true,
"name": "Power defected",
"description": "Triggered when you defect from one power to another"
},
"Power expansion vote cast": {
"enabled": true,
"priority": 3,
"responder": true,
"script": null,
"default": true,
"name": "Power expansion vote cast",
"description": "Triggered when a commander votes for system expansion"
},
"Power joined": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "You have aligned yourself with {P(event.power)}",
"default": true,
"name": "Power joined",
"description": "Triggered when you join a power"
},
"Power left": {
"enabled": true,
"priority": 3,
"responder": true,
"script": "You are no longer aligned with {P(event.power)}",
"default": true,