-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup-SirinesCall.tp2
1451 lines (1261 loc) · 49 KB
/
setup-SirinesCall.tp2
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
BACKUP ~sirinescall/backup~
SUPPORT ~http://forums.pocketplane.net/index.php/topic,17901.0.html~
//AUTHOR ~http://forums.pocketplane.net/index.php/topic,17901.0.html~ /* [email protected]~ */
VERSION ~v16.4~
README ~sirinescall/readme/sirine_readme.%LANGUAGE%.html~ ~sirinescall/readme/sirine_readme.english.html~
ALWAYS
/* check for a ready SoD */
ACTION_IF ((FILE_EXISTS ~dlc/sod-dlc.zip~) OR (FILE_EXISTS ~sod-dlc.zip~)) THEN BEGIN
FAIL @1006
END
/////////////////////////////////////
/* These actions are processed for every component: reading of variables */
ACTION_IF GAME_IS ~tutu tutu_totsc~ THEN BEGIN
/* Tell the player it is using Tutu stuff */
PRINT @1000
INCLUDE ~sirinescall/lib/g3_tutu_cpmvars.tpa~
INCLUDE ~sirinescall/lib/rr_tutubgt_addvars.tpa~
OUTER_SPRINT ~Lighthouse_bcs~ ~_AR3600~
OUTER_SPRINT ~J#sirin1~ ~J#sirin1~
OUTER_SPRINT ~EscapeArea_Move~ ~EscapeAreaMove("J#Hall",311,229,8)~
OUTER_SPRINT ~creatures_folder~ ~creatures~
OUTER_SPRINT ~Lighthouse_tis~ ~_AR3600~
END
ACTION_IF GAME_IS ~bgt~ THEN BEGIN
/* Tell the player it is using BGT stuff */
PRINT @1001
INCLUDE ~sirinescall/lib/g3_bgt_cpmvars.tpa~
INCLUDE ~sirinescall/lib/rr_tutubgt_addvars.tpa~
OUTER_SPRINT ~Lighthouse_bcs~ ~AR9500~
OUTER_SPRINT ~J#sirin1~ ~J#sirin1~
OUTER_SPRINT ~EscapeArea_Move~ ~EscapeAreaMove("J#Hall",311,229,8)~
OUTER_SPRINT ~creatures_folder~ ~creatures~
OUTER_SPRINT ~Lighthouse_tis~ ~AR9500~
END
ACTION_IF GAME_IS ~bg1 totsc~ THEN BEGIN
PRINT @1007
INCLUDE ~sirinescall/lib/g3_bg_cpmvars.tpa~
OUTER_SPRINT ~Lighthouse_bcs~ ~AR3600~
OUTER_SPRINT ~J#sirin1~ ~J#siribg~
OUTER_SPRINT ~EscapeArea_Move~ ~EscapeArea()~
OUTER_SPRINT ~creatures_folder~ ~creatures/bg1~
ACTION_IF GAME_IS ~totsc~ THEN BEGIN
INCLUDE ~sirinescall/lib/rr_totsc_addvars.tpa~
OUTER_SPRINT ~STARTDIALOGNOSET~ ~StartDialogueNoSet~
END
ACTION_IF GAME_IS ~bg1~ THEN BEGIN
INCLUDE ~sirinescall/lib/rr_bg1_addvars.tpa~
OUTER_SPRINT ~STARTDIALOGNOSET~ ~Dialogue~
END
END
/* BG:EE version! ---------------------- */
ACTION_IF GAME_IS ~bgee~ THEN BEGIN
/* Tell the player it is using bgee */
PRINT @1008
INCLUDE ~sirinescall/lib/g3_bgee_cpmvars.tpa~
INCLUDE ~sirinescall/lib/rr_tutubgt_addvars.tpa~
OUTER_SPRINT ~Lighthouse_bcs~ ~AR3600~
OUTER_SPRINT ~J#sirin1~ ~J#sirin1~
OUTER_SPRINT ~EscapeArea_Move~ ~EscapeAreaMove("J#Hall",311,229,8)~
OUTER_SPRINT ~creatures_folder~ ~creatures~
END
/* EET version! ---------------------- */
ACTION_IF GAME_IS ~eet~ THEN BEGIN
/* Tell the player it is using eet */
PRINT @1009
INCLUDE ~EET/other/cpmvars/eet_cpmvars.tpa~
INCLUDE ~sirinescall/lib/rr_tutubgt_addvars.tpa~
OUTER_SPRINT ~Lighthouse_bcs~ ~BG3600~
OUTER_SPRINT ~J#sirin1~ ~J#sirin1~
OUTER_SPRINT ~EscapeArea_Move~ ~EscapeAreaMove("J#Hall",311,229,8)~
OUTER_SPRINT ~creatures_folder~ ~creatures~
END
//////////////////////////////////////////////////////////////////////
/* all following actions are only processed ONCE for the whole mod, independent of un- and reinstalling of single components */
ACTION_IF !FILE_EXISTS ~sirinescall/Install/sirinescallreinstall.mrk~ BEGIN
// CD_STATE_NOTVALID - custom state from CamDawg
APPEND ~STATE.IDS~ ~0x80101FEF CD_STATE_NOTVALID~
UNLESS ~CD_STATE_NOTVALID~
ACTION_IF GAME_IS ~bg1 totsc~ THEN BEGIN
PRINT @1007
INCLUDE ~sirinescall/lib/c#_bg_npcjdlg.tpa~
APPEND ~action.ids~ ~160 ApplySpellRES(S:ResRef*,O:Target*)~
UNLESS ~ApplySpellRES~
APPEND ~action.ids~ ~272 CreateVisualEffect(S:Object*,P:Location*)~
UNLESS ~CreateVisualEffect~
/* this doesn't work yet - could be activated if needed */
/*ACTION_IF ("%LANGUAGE%" STRING_EQUAL "polish") BEGIN
// Copies BG1-encoded tra files over the normal ones, for use with AUTO_TRA
DEFINE_ACTION_FUNCTION autotra_polishbg1 BEGIN
COPY ~sirinescall/translations/polish_Vanilla_BG1~ ~sirinescall/translations/autotra/polish~
END
LAF autotra_polishbg1 END
//setup.tra must be reloaded
LOAD_TRA "sirinescall/Translations/autotra/polish/setup.tra"
END*/
ACTION_IF "%LANGUAGE%" STR_EQ "polish" BEGIN
COPY "sirinescall/Translations/polish" "sirinescall/Translations/polish"
PATCH_INCLUDE "sirinescall/lib/BG1polish_fonts.tpa"
BUT_ONLY
END
END
/* BG:EE version! ---------------------- */
//ACTION_IF GAME_IS ~bgee eet~ THEN BEGIN
/* Copies UTF8-encoded tra files over the normal ones, for use with AUTO_TRA */
/*DEFINE_ACTION_FUNCTION autotra_workaround BEGIN
COPY ~sirinescall/translations/utf8/%LANGUAGE%~ ~sirinescall/translations/%LANGUAGE%~
END
LAF autotra_workaround END*/
DEFINE_ACTION_FUNCTION autotra_workaround BEGIN
COPY ~sirinescall/translations/english~ ~sirinescall/translations/autotra/%LANGUAGE%~
COPY ~sirinescall/translations/%LANGUAGE%~ ~sirinescall/translations/autotra/%LANGUAGE%~
END
LAF autotra_workaround END
ACTION_DEFINE_ARRAY tra#reload BEGIN setup-sirinescall END
ACTION_DEFINE_ARRAY tra#noconvert BEGIN install END
LAF HANDLE_CHARSETS
INT_VAR
infer_charset = 1
STR_VAR
tra_path = ~sirinescall/translations/autotra~
noconvert_array = tra#noconvert
reload_array = tra#reload
iconv_path = ~sirinescall/tools/iconv~
END
//TRAs declared in LANGUAGE must be reloaded
LOAD_TRA "sirinescall/Translations/autotra/%LANGUAGE%/setup-sirinescall.tra"
/*ACTION_IF GAME_IS ~bg1 totsc bgee~ THEN BEGIN
// BG1 and BG:EE: AR3600.are has the wrong script assigned
COPY_EXISTING ~%Lighthouse%.are~ ~override~
WRITE_ASCII SCRIPT_AREA ~AR3600~
BUT_ONLY_IF_IT_CHANGES
END*/
//ACTION_IF GAME_IS ~eet~ BEGIN
//Same problem in EET
COPY_EXISTING ~%Lighthouse%.are~ ~override~
WRITE_EVALUATED_ASCII 0x94 ~%Lighthouse_bcs%~ #7
BUT_ONLY
//END
COPY_EXISTING sw1h01.itm ~sirinescall/Install/sirinescallreinstall.mrk~
END
INCLUDE ~SirinesCall/lib/a7_tools.tpa~
INCLUDE ~SirinesCall/lib/alter_searchmap.tpa~
//Variables for the mos file folders
ACTION_IF GAME_IS ~bgee eet~ BEGIN
OUTER_SPRINT "ee-folder" "ee"
END ELSE BEGIN
OUTER_SPRINT "ee-folder" "non-ee"
END
//Variables for OS specific things
ACTION_IF ~%WEIDU_OS%~ STRING_EQUAL_CASE ~win32~ BEGIN
OUTER_SPRINT os_slash ~\~
OUTER_SPRINT exe ~.exe~
END ELSE BEGIN
OUTER_SPRINT os_slash ~/~
OUTER_SPRINT exe ~~
END
//Sprint code for tis2bg2 executable
OUTER_SPRINT tis2bg2 ~sirinescall%os_slash%tools%os_slash%tis2bg2%os_slash%%WEIDU_OS%%os_slash%tis2bg2%exe%~
END //ALWAYS
/* --------------------------------------------- */
AUTO_TRA "sirinescall/translations/autotra/%s"//%"
LANGUAGE ~English~
~english~
~sirinescall/translations/english/setup-sirinescall.TRA~
LANGUAGE ~Castellano (Castilian/Spanish)~
~castilian~
~sirinescall/translations/castilian/setup-sirinescall.TRA~
LANGUAGE ~Francais (French)~
~french~
~sirinescall/translations/french/setup-sirinescall.TRA~
LANGUAGE ~Deutsch (German)~
~german~
~sirinescall/translations/german/setup-sirinescall.TRA~
LANGUAGE ~Italiano (Italian) - by Ilot (rtt.altervista.org)~
~italian~
~sirinescall/translations/italian/setup-sirinescall.TRA~
LANGUAGE ~Polski (Polish) - by Regis~
~polish~
~sirinescall/translations/polish/setup-sirinescall.TRA~
LANGUAGE ~D¢¤¤ˆŠ‚ (Russian) - Badgert, iopden & aerie.ru~
~russian~
~sirinescall/translations/russian/setup-sirinescall.tra~
LANGUAGE ~Simplified Chinese~
~schinese~
~sirinescall/translations/schinese/setup-sirinescall.tra~
~sirinescall/translations/schinese/install.TRA~
BEGIN @0
LABEL "SirinesCall-Main"
REQUIRE_PREDICATE GAME_IS ~totsc tutu tutu_totsc bgt bgee eet~ @1005 /* ~This mod is not compatible with your game.~ */
FORBID_COMPONENT ~EET_end.tp2~ ~0~ @1004 /* ~The mod needs to be installed before EET_End.~ */
FORBID_COMPONENT ~EET_end.tp2~ ~1~ @1004 /* ~The mod needs to be installed before EET_End.~ */
// Dialogue
INCLUDE ~SirinesCall/lib/func_fetch_journal_entries.tph~
COPY_EXISTING ~%tutu_var%cordyr.dlg~ ~override~
LPF ~READ_JOURNAL_STRREF~
INT_VAR
state = "1" // state index
stateResponse = 0 // relative response index (e.g. 0 for first response associated with the state, 1 for second response, and so on...)
RET
strref // returned string reference, or -1 if not available
END
SET unsolved_strref = strref
LPF ~READ_JOURNAL_STRREF~
INT_VAR
state = "3" // state index
stateResponse = 0 // relative response index (e.g. 0 for first response associated with the state, 1 for second response, and so on...)
RET
strref // returned string reference, or -1 if not available
END
SET solved_strref = strref
COMPILE EVALUATE_BUFFER ~SirinesCall/Dialogue/ardrou.d~
COMPILE EVALUATE_BUFFER ~SirinesCall/Dialogue/pirates.d~
COMPILE EVALUATE_BUFFER ~SirinesCall/Dialogue/sil.d~
ACTION_IF GAME_IS ~bg1 totsc~ THEN BEGIN
COMPILE EVALUATE_BUFFER ~SirinesCall/Dialogue/acordyr.d~
END ELSE BEGIN
COMPILE EVALUATE_BUFFER ~SirinesCall/Dialogue/acordyr_add.d~
~SirinesCall/Dialogue/acordyr.d~ USING ~SirinesCall/translations/autotra/%LANGUAGE%/acordyr.tra~
END
// Scripts
COMPILE EVALUATE_BUFFER ~SirinesCall/Scripts~
ACTION_IF GAME_IS ~tutu tutu_totsc bgt bgee eet~ THEN BEGIN
COMPILE EVALUATE_BUFFER ~SirinesCall/scriptsar/J#sirin1.baf~
END
ACTION_IF GAME_IS ~bg1 totsc~ THEN BEGIN
COMPILE EVALUATE_BUFFER ~SirinesCall/scriptsar/J#siribg.baf~
EXTEND_TOP ~J#Hall.bcs~ ~sirinescall/scriptsar/J#Hall_bgadd.baf~
EVALUATE_BUFFER
END
EXTEND_TOP ~%Lighthouse_bcs%.bcs~ ~sirinescall/scriptsar/_AR3600.baf~
EVALUATE_BUFFER
// Areas
COPY ~sirinescall/areas/storage~ ~override~
~sirinescall/areas/lighthouse~ ~override~
~sirinescall/areas/longhall~ ~override~
INCLUDE ~%MOD_FOLDER%/areas/J#Lig2_are.tpa~
INCLUDE ~%MOD_FOLDER%/areas/J#Ligh_are.tpa~
INCLUDE ~%MOD_FOLDER%/areas/J#Hall_are.tpa~
INCLUDE ~%MOD_FOLDER%/areas/J#Stor_are.tpa~
/* ACTION_IF GAME_IS ~tutu tutu_totsc~ THEN BEGIN
COPY ~sirinescall/areas/ar3600sr.bmp~ ~override/fw3600sr.bmp~
// J#ligh.are
COPY_EXISTING ~J#ligh.are~ ~override~
LAUNCH_PATCH_FUNCTION ~fj_are_structure~
INT_VAR
fj_type = 2 //travel
fj_box_left = 94
fj_box_top = 485
fj_box_right = 259
fj_box_bottom = 573
fj_cursor_idx = 30 //door
fj_vertex_0 = 94 + (485 << 16)
fj_vertex_1 = 259 + (485 << 16)
fj_vertex_2 = 259 + (573 << 16)
fj_vertex_3 = 94 + (573 << 16)
STR_VAR
fj_structure_type = region
fj_name = Door3600
fj_destination_area = FW3600
fj_destination_name = J#LighEx
END
BUT_ONLY
// J#hall.are
COPY_EXISTING ~J#hall.are~ ~override~
WRITE_EVALUATED_ASCII 0x8 ~%EBaldursGate_House2%~ #6
LAUNCH_PATCH_FUNCTION ~fj_are_structure~
INT_VAR
fj_type = 2 //travel
fj_box_left = 222
fj_box_top = 298
fj_box_right = 309
fj_box_bottom = 380
fj_cursor_idx = 30 //door
fj_vertex_0 = 222 + (298 << 16)
fj_vertex_1 = 309 + (298 << 16)
fj_vertex_2 = 309 + (380 << 16)
fj_vertex_3 = 222 + (380 << 16)
STR_VAR
fj_structure_type = region
fj_name = Door3600
fj_destination_area = FW3600
fj_destination_name = J#HallEx
END
BUT_ONLY
// J#Stor.are
COPY_EXISTING ~J#Stor.are~ ~override~
LAUNCH_PATCH_FUNCTION ~fj_are_structure~
INT_VAR
fj_type = 2 //travel
fj_box_left = 286
fj_box_top = 343
fj_box_right = 430
fj_box_bottom = 470
fj_cursor_idx = 30 //door
fj_vertex_0 = 286 + (343 << 16)
fj_vertex_1 = 430 + (343 << 16)
fj_vertex_2 = 430 + (470 << 16)
fj_vertex_3 = 286 + (470 << 16)
STR_VAR
fj_structure_type = region
fj_name = Door3600
fj_destination_area = FW3600
fj_destination_name = J#StorEx
END
BUT_ONLY
END
ACTION_IF GAME_IS ~bgt~ THEN BEGIN
COPY ~sirinescall/areas/ar3600sr.bmp~ ~override/AR9500SR.BMP~
// J#ligh.are
COPY_EXISTING ~J#ligh.are~ ~override~
LAUNCH_PATCH_FUNCTION ~fj_are_structure~
INT_VAR
fj_type = 2 //travel
fj_box_left = 94
fj_box_top = 485
fj_box_right = 259
fj_box_bottom = 573
fj_cursor_idx = 30 //door
fj_vertex_0 = 94 + (485 << 16)
fj_vertex_1 = 259 + (485 << 16)
fj_vertex_2 = 259 + (573 << 16)
fj_vertex_3 = 94 + (573 << 16)
STR_VAR
fj_structure_type = region
fj_name = Door3600
fj_destination_area = AR9500
fj_destination_name = J#LighEx
END
BUT_ONLY
// J#hall.are
COPY_EXISTING ~J#hall.are~ ~override~
WRITE_EVALUATED_ASCII 0x8 ~%EBaldursGate_House2%~ #6
LAUNCH_PATCH_FUNCTION ~fj_are_structure~
INT_VAR
fj_type = 2 //travel
fj_box_left = 222
fj_box_top = 298
fj_box_right = 309
fj_box_bottom = 380
fj_cursor_idx = 30 //door
fj_vertex_0 = 222 + (298 << 16)
fj_vertex_1 = 309 + (298 << 16)
fj_vertex_2 = 309 + (380 << 16)
fj_vertex_3 = 222 + (380 << 16)
STR_VAR
fj_structure_type = region
fj_name = Door3600
fj_destination_area = AR9500
fj_destination_name = J#HallEx
END
BUT_ONLY
// J#Stor.are
COPY_EXISTING ~J#Stor.are~ ~override~
LAUNCH_PATCH_FUNCTION ~fj_are_structure~
INT_VAR
fj_type = 2 //travel
fj_box_left = 286
fj_box_top = 343
fj_box_right = 430
fj_box_bottom = 470
fj_cursor_idx = 30 //door
fj_vertex_0 = 286 + (343 << 16)
fj_vertex_1 = 430 + (343 << 16)
fj_vertex_2 = 430 + (470 << 16)
fj_vertex_3 = 286 + (470 << 16)
STR_VAR
fj_structure_type = region
fj_name = Door3600
fj_destination_area = AR9500
fj_destination_name = J#StorEx
END
BUT_ONLY
END
ACTION_IF GAME_IS ~bg1 totsc bgee~ THEN BEGIN
COPY ~sirinescall/areas/ar3600sr.bmp~ ~override~
// J#ligh.are
COPY_EXISTING ~J#ligh.are~ ~override~
LAUNCH_PATCH_FUNCTION ~fj_are_structure~
INT_VAR
fj_type = 2 //travel
fj_box_left = 94
fj_box_top = 485
fj_box_right = 259
fj_box_bottom = 573
fj_cursor_idx = 30 //door
fj_vertex_0 = 94 + (485 << 16)
fj_vertex_1 = 259 + (485 << 16)
fj_vertex_2 = 259 + (573 << 16)
fj_vertex_3 = 94 + (573 << 16)
STR_VAR
fj_structure_type = region
fj_name = Door3600
fj_destination_area = AR3600
fj_destination_name = J#LighEx
END
BUT_ONLY
// J#hall.are
COPY_EXISTING ~J#hall.are~ ~override~
WRITE_EVALUATED_ASCII 0x8 ~%EBaldursGate_House2%~ #6
LAUNCH_PATCH_FUNCTION ~fj_are_structure~
INT_VAR
fj_type = 2 //travel
fj_box_left = 222
fj_box_top = 298
fj_box_right = 309
fj_box_bottom = 380
fj_cursor_idx = 30 //door
fj_vertex_0 = 222 + (298 << 16)
fj_vertex_1 = 309 + (298 << 16)
fj_vertex_2 = 309 + (380 << 16)
fj_vertex_3 = 222 + (380 << 16)
STR_VAR
fj_structure_type = region
fj_name = Door3600
fj_destination_area = AR3600
fj_destination_name = J#HallEx
END
BUT_ONLY
// J#Stor.are
COPY_EXISTING ~J#Stor.are~ ~override~
LAUNCH_PATCH_FUNCTION ~fj_are_structure~
INT_VAR
fj_type = 2 //travel
fj_box_left = 286
fj_box_top = 343
fj_box_right = 430
fj_box_bottom = 470
fj_cursor_idx = 30 //door
fj_vertex_0 = 286 + (343 << 16)
fj_vertex_1 = 430 + (343 << 16)
fj_vertex_2 = 430 + (470 << 16)
fj_vertex_3 = 286 + (470 << 16)
STR_VAR
fj_structure_type = region
fj_name = Door3600
fj_destination_area = AR3600
fj_destination_name = J#StorEx
END
BUT_ONLY
END*/
//ACTION_IF GAME_IS ~eet~ THEN BEGIN
// COPY ~sirinescall/base/bmp/AR3600SR.bmp~ ~override/BG3600SR.bmp~
LAF ALTER_SEARCHMAP
STR_VAR
path_to_2da_file = ~sirinescall/base/bmp/AR3600SR_changes.2da~ // full path to the *changes.2da file containing your icons, e.g. ~mymod/bam/AR3700SR_changes_ee.2da~
areaname = EVAL ~%Lighthouse%~ // area name, e.g. ~AR3700~
END
/* J#ligh.are */
COPY_EXISTING ~J#ligh.are~ ~override~
LAUNCH_PATCH_FUNCTION ~fj_are_structure~
INT_VAR
fj_type = 2 //travel
fj_box_left = 94
fj_box_top = 485
fj_box_right = 259
fj_box_bottom = 573
fj_cursor_idx = 30 //door
fj_vertex_0 = 94 + (485 << 16)
fj_vertex_1 = 259 + (485 << 16)
fj_vertex_2 = 259 + (573 << 16)
fj_vertex_3 = 94 + (573 << 16)
STR_VAR
fj_structure_type = region
fj_name = Door3600
fj_destination_area = EVAL ~%Lighthouse%~
fj_destination_name = J#LighEx
END
BUT_ONLY
/* J#hall.are */
COPY_EXISTING ~J#hall.are~ ~override~
WRITE_EVALUATED_ASCII 0x8 ~%EBaldursGate_House2%~ #6
LAUNCH_PATCH_FUNCTION ~fj_are_structure~
INT_VAR
fj_type = 2 //travel
fj_box_left = 222
fj_box_top = 298
fj_box_right = 309
fj_box_bottom = 380
fj_cursor_idx = 30 //door
fj_vertex_0 = 222 + (298 << 16)
fj_vertex_1 = 309 + (298 << 16)
fj_vertex_2 = 309 + (380 << 16)
fj_vertex_3 = 222 + (380 << 16)
STR_VAR
fj_structure_type = region
fj_name = Door3600
fj_destination_area = EVAL ~%Lighthouse%~
fj_destination_name = J#HallEx
END
BUT_ONLY
/* J#Stor.are */
COPY_EXISTING ~J#Stor.are~ ~override~
LAUNCH_PATCH_FUNCTION ~fj_are_structure~
INT_VAR
fj_type = 2 //travel
fj_box_left = 286
fj_box_top = 343
fj_box_right = 430
fj_box_bottom = 470
fj_cursor_idx = 30 //door
fj_vertex_0 = 286 + (343 << 16)
fj_vertex_1 = 430 + (343 << 16)
fj_vertex_2 = 430 + (470 << 16)
fj_vertex_3 = 286 + (470 << 16)
STR_VAR
fj_structure_type = region
fj_name = Door3600
fj_destination_area = EVAL ~%Lighthouse%~
fj_destination_name = J#StorEx
END
BUT_ONLY
// END
/* adaption of wed-name für custom areas */
COPY_EXISTING ~J#ptry.are~ ~override~
WRITE_EVALUATED_ASCII 0x8 ~%CloakwoodMines_Storehouse%~ #6
COPY_EXISTING ~%Lighthouse%.are~ ~override~
GET_OFFSET_ARRAY actors_array ARE_V10_ACTORS
PHP_EACH actors_array AS actors_num => actors_offset BEGIN
READ_ASCII actors_offset actors_name (32) NULL
READ_SHORT actors_offset+0x20 actors_pos_x
READ_ASCII actors_offset+0x80 actors_filename (32) NULL
PATCH_IF ((~%actors_name%~ STR_EQ ~Sil~) AND (~%actors_pos_x%~ = 387) AND (~%actors_filename%~ STR_EQ ~%tutu_var%sirine~)) BEGIN
WRITE_ASCII actors_offset+0x80 "J#sirin1" #8
END
PATCH_IF ((~%actors_name%~ STR_EQ ~Sil~) AND (~%actors_pos_x%~ = 416) AND (~%actors_filename%~ STR_EQ ~%tutu_var%sirine~)) BEGIN
WRITE_ASCII actors_offset+0x80 "J#sirin2" #8
END
END
/*
READ_SHORT 0x54 "npc_offset"
READ_SHORT 0x58 "npc_num"
SET "sirinepatch1" = 0
SET "sirinepatch2" = 0
WHILE ("%npc_num%" > 0)
BEGIN
SET "npc_num" = ("%npc_num%" - 1)
READ_ASCII ("%npc_offset%" + ("%npc_num%" * 272)) "name"
READ_ASCII ("%npc_offset%" + ("%npc_num%" * 272) + 128) "filename"
PATCH_IF (("%name%" STRING_COMPARE_CASE "Sil" = 0) AND ("%filename%" STRING_COMPARE_CASE "%tutu_var%sirine" = 0) AND ("%sirinepatch1%" = 0))
BEGIN
SET "sirinepatch1" = 1
WRITE_ASCII ("%npc_offset%" + ("%npc_num%" * 272) - 272 + 128) "J#sirin1"
END
PATCH_IF (("%name%" STRING_COMPARE_CASE "Sil" = 0) AND ("%filename%" STRING_COMPARE_CASE "%tutu_var%sirine" = 0) AND ("%sirinepatch2%" = 0))
BEGIN
SET "sirinepatch2" = 1
WRITE_ASCII ("%npc_offset%" + ("%npc_num%" * 272) + 128) "J#sirin2"
END
END*/
// Changing the info triggers to travel triggers for the lighthouse and aux. buildings
GET_OFFSET_ARRAY region_array ARE_V10_REGIONS
PHP_EACH region_array AS region_num => region_offset BEGIN
READ_ASCII region_offset region_name (32) NULL
READ_SHORT region_offset+0x22 region_bbx_min
PATCH_IF (~%region_name%~ STR_EQ ~InfoLite~)
BEGIN
WRITE_BYTE region_offset+0x20 2
WRITE_SHORT region_offset+0x34 30
WRITE_ASCII region_offset+0x38 ~J#Ligh~ #6
WRITE_ASCII region_offset+0x40 ~J#3600Ex~ #8
WRITE_LONG region_offset+0x64 0
END
PATCH_IF ((~%region_name%~ STR_EQ ~InfoHouse~) AND (~%region_bbx_min%~ = 1086)) BEGIN
WRITE_BYTE region_offset+0x20 2
WRITE_SHORT region_offset+0x34 30
WRITE_ASCII region_offset+0x38 ~J#Hall~ #6
WRITE_ASCII region_offset+0x40 ~J#3600Ex~ #8
WRITE_LONG region_offset+0x64 0
END
PATCH_IF ((~%region_name%~ STR_EQ ~InfoHouse~) AND (~%region_bbx_min%~ = 708)) BEGIN
WRITE_BYTE region_offset+0x20 2
WRITE_SHORT region_offset+0x34 30
WRITE_ASCII region_offset+0x38 ~J#Stor~ #6
WRITE_ASCII region_offset+0x40 ~J#3600Ex~ #8
WRITE_LONG region_offset+0x64 0
END
END
/*
READ_SHORT 0x5a "trig_num"
READ_SHORT 0x5c "trig_off"
SET "trigpatch1" = 0
SET "trigpatch2" = 0
WHILE ("%trig_num%" > 1)
BEGIN
SET "trig_num" = ("%trig_num%" - 1)
READ_ASCII ("%trig_off%" + ("%trig_num%" * 196)) "trigname"
PATCH_IF (("%trigname%" STRING_COMPARE_CASE "infolite") = 0)
BEGIN
WRITE_BYTE ("%trig_off%" + ("%trig_num%" * 196) + 32) 2
WRITE_SHORT ("%trig_off%" + ("%trig_num%" * 196) + 52) 30
WRITE_ASCII ("%trig_off%" + ("%trig_num%" * 196) + 56) ~J#Ligh~
WRITE_ASCII ("%trig_off%" + ("%trig_num%" * 196) + 64) ~J#3600Ex~
WRITE_LONG ("%trig_off%" + ("%trig_num%" * 196) + 100) 0
END
PATCH_IF (("%trigname%" STRING_COMPARE_CASE "infohous") = 0 AND ("%trigpatch1%" = 0))
BEGIN
SET "trigpatch1" = 1
WRITE_BYTE ("%trig_off%" + ("%trig_num%" * 196) + 32 - 196) 2
WRITE_SHORT ("%trig_off%" + ("%trig_num%" * 196) + 52 - 196) 30
WRITE_ASCII ("%trig_off%" + ("%trig_num%" * 196) + 56 - 196) ~J#Hall~
WRITE_ASCII ("%trig_off%" + ("%trig_num%" * 196) + 64 - 196) ~J#3600Ex~
WRITE_LONG ("%trig_off%" + ("%trig_num%" * 196) + 100 - 196) 0
END
PATCH_IF (("%trigname%" STRING_COMPARE_CASE "infohous") = 0 AND ("%trigpatch2%" = 0))
BEGIN
SET "trigpatch2" = 1
WRITE_BYTE ("%trig_off%" + ("%trig_num%" * 196) + 32) 2
WRITE_SHORT ("%trig_off%" + ("%trig_num%" * 196) + 52) 30
WRITE_ASCII ("%trig_off%" + ("%trig_num%" * 196) + 56) ~J#Stor~
WRITE_ASCII ("%trig_off%" + ("%trig_num%" * 196) + 64) ~J#3600Ex~
WRITE_LONG ("%trig_off%" + ("%trig_num%" * 196) + 100) 0
END
END*/
// Adding entry points from the lighthouse and aux. buildings
/*READ_SHORT ~0x058~ ~#ofActor~
READ_SHORT ~0x054~ ~actorOff~
READ_SHORT ~0x05a~ ~#ofTrigg~
READ_SHORT ~0x05c~ ~triggOff~
READ_SHORT ~0x064~ ~#ofSpawn~
READ_SHORT ~0x060~ ~spawnOff~
READ_SHORT ~0x06c~ ~#ofEntra~
READ_SHORT ~0x068~ ~entraOff~
READ_SHORT ~0x074~ ~#ofConta~
READ_SHORT ~0x070~ ~contaOff~
READ_SHORT ~0x076~ ~#ofItems~
READ_SHORT ~0x078~ ~itemsOff~
READ_SHORT ~0x080~ ~#ofVerti~
READ_SHORT ~0x07c~ ~vertiOff~
READ_SHORT ~0x082~ ~#ofAmbia~
READ_SHORT ~0x084~ ~ambiaOff~
READ_SHORT ~0x08c~ ~#ofVaria~
READ_SHORT ~0x088~ ~variaOff~
READ_SHORT ~0x09c~ ~#ofExplo~
READ_SHORT ~0x0A0~ ~exploOff~
READ_SHORT ~0x0A4~ ~#ofDoors~
READ_SHORT ~0x0A8~ ~doorsOff~
READ_SHORT ~0x0AC~ ~#ofAnima~
READ_SHORT ~0x0B0~ ~animaOff~
READ_SHORT ~0x0B4~ ~#ofTiled~
READ_SHORT ~0x0B8~ ~tiledOff~
READ_SHORT ~0x0BC~ ~songsOff~
READ_SHORT ~0x0C0~ ~restcOff~
READ_SHORT ~0x0C8~ ~#ofAutom~
READ_SHORT ~0x0C4~ ~automOff~
WRITE_SHORT 0x06c (~%#ofEntra%~ + 3)
WRITE_SHORT 0x070 (~%contaOff%~ + 312)
WRITE_SHORT 0x078 (~%itemsOff%~ + 312)
WRITE_SHORT 0x07c (~%vertiOff%~ + 312)
WRITE_SHORT 0x084 (~%ambiaOff%~ + 312)
WRITE_SHORT 0x088 (~%variaOff%~ + 312)
WRITE_SHORT 0x0A0 (~%exploOff%~ + 312)
WRITE_SHORT 0x0A8 (~%doorsOff%~ + 312)
WRITE_SHORT 0x0B0 (~%animaOff%~ + 312)
WRITE_SHORT 0x0B8 (~%tiledOff%~ + 312)
WRITE_SHORT 0x0BC (~%songsOff%~ + 312)
WRITE_SHORT 0x0C0 (~%restcOff%~ + 312)
PATCH_IF (~%automOff%~ > 0)
THEN
BEGIN
WRITE_SHORT 0x0C4 (~%automOff%~ + 312)
END
INSERT_BYTES (~%entraOff%~+ ~%#ofEntra%~ * 104) 312
WRITE_ASCII (~%entraOff%~ + ~%#ofEntra%~ * 104 + 0) ~J#LighEx~
WRITE_ASCII (~%entraOff%~ + ~%#ofEntra%~ * 104 + 8) ~~
WRITE_LONG (~%entraOff%~ + ~%#ofEntra%~ * 104 + 32) 914
WRITE_LONG (~%entraOff%~ + ~%#ofEntra%~ * 104 + 34) 2760
WRITE_LONG (~%entraOff%~ + ~%#ofEntra%~ * 104 + 36) 14
WRITE_ASCII (~%entraOff%~ + ~%#ofEntra%~ * 104 + 104) ~J#HallEx~
WRITE_ASCII (~%entraOff%~ + ~%#ofEntra%~ * 104 + 112) ~~
WRITE_LONG (~%entraOff%~ + ~%#ofEntra%~ * 104 + 136) 1059
WRITE_LONG (~%entraOff%~ + ~%#ofEntra%~ * 104 + 138) 2777
WRITE_LONG (~%entraOff%~ + ~%#ofEntra%~ * 104 + 140) 2
WRITE_ASCII (~%entraOff%~ + ~%#ofEntra%~ * 104 + 208) ~J#StorEx~
WRITE_ASCII (~%entraOff%~ + ~%#ofEntra%~ * 104 + 216) ~~
WRITE_LONG (~%entraOff%~ + ~%#ofEntra%~ * 104 + 240) 844
WRITE_LONG (~%entraOff%~ + ~%#ofEntra%~ * 104 + 242) 2845
WRITE_LONG (~%entraOff%~ + ~%#ofEntra%~ * 104 + 244) 12*/
LPF fj_are_structure
INT_VAR
fj_loc_x = 914
fj_loc_y = 2760
fj_orientation = 14
STR_VAR
fj_structure_type = entrance
fj_name = J#LighEx
END
LPF fj_are_structure
INT_VAR
fj_loc_x = 1059
fj_loc_y = 2777
fj_orientation = 2
STR_VAR
fj_structure_type = entrance
fj_name = J#HallEx
END
LPF fj_are_structure
INT_VAR
fj_loc_x = 844
fj_loc_y = 2845
fj_orientation = 12
STR_VAR
fj_structure_type = entrance
fj_name = J#StorEx
END
/*
//Prepare for the area modification.
//---------------------------------DO NOT ALTER FROM HERE TO THE FOLLOWING BREAK.
READ_SHORT ~0x058~ ~#ofActor~
READ_SHORT ~0x054~ ~actorOff~
READ_SHORT ~0x05a~ ~#ofTrigg~
READ_SHORT ~0x05c~ ~triggOff~
READ_SHORT ~0x064~ ~#ofSpawn~
READ_SHORT ~0x060~ ~spawnOff~
READ_SHORT ~0x06c~ ~#ofEntra~
READ_SHORT ~0x068~ ~entraOff~
READ_SHORT ~0x074~ ~#ofConta~
READ_SHORT ~0x070~ ~contaOff~
READ_SHORT ~0x076~ ~#ofItems~
READ_SHORT ~0x078~ ~itemsOff~
READ_SHORT ~0x080~ ~#ofVerti~
READ_SHORT ~0x07c~ ~vertiOff~
READ_SHORT ~0x082~ ~#ofAmbia~
READ_SHORT ~0x084~ ~ambiaOff~
READ_SHORT ~0x08c~ ~#ofVaria~
READ_SHORT ~0x088~ ~variaOff~
READ_SHORT ~0x09c~ ~#ofExplo~
READ_SHORT ~0x0A0~ ~exploOff~
READ_SHORT ~0x0A4~ ~#ofDoors~
READ_SHORT ~0x0A8~ ~doorsOff~
READ_SHORT ~0x0AC~ ~#ofAnima~
READ_SHORT ~0x0B0~ ~animaOff~
READ_SHORT ~0x0B4~ ~#ofTiled~
READ_SHORT ~0x0B8~ ~tiledOff~
READ_SHORT ~0x0BC~ ~songsOff~
READ_SHORT ~0x0C0~ ~restcOff~
READ_SHORT ~0x0C8~ ~#ofAutom~
READ_SHORT ~0x0C4~ ~automOff~
//Increase the number of TRIGGERS and correct the offsets
WRITE_SHORT 0x05a (~%#ofTrigg%~ + 1)
WRITE_SHORT 0x060 (~%spawnOff%~ + 196)
WRITE_SHORT 0x068 (~%entraOff%~ + 196)
WRITE_SHORT 0x070 (~%contaOff%~ + 196)
WRITE_SHORT 0x078 (~%itemsOff%~ + 196)
WRITE_SHORT 0x07c (~%vertiOff%~ + 196)
WRITE_SHORT 0x084 (~%ambiaOff%~ + 196)
WRITE_SHORT 0x088 (~%variaOff%~ + 196)
WRITE_SHORT 0x0A8 (~%doorsOff%~ + 196)
//Complete the prep work by adding a bunch of blank bytes.
INSERT_BYTES (~%triggOff%~ + ~%#ofTrigg%~ * 196) 196
//Prep work is done.
//-----------------------------DO NOT ALTER ANYTHING ABOVE HERE TO THE TOP BREAK.
//Set up the vertices you'll be adding.
WRITE_SHORT 0x080 (~%#ofVerti%~ + 4)
//NOTE: YOU CAN CHANGE THE "8" TO HOWEVER NUMBER OF VERTICES YOU ARE
// ADDING FOR YOUR TRIGGER.
INSERT_BYTES (~%vertiOff%~ + ~%#ofVerti%~ * 4 + 196) 16
//In the above two lines, only change the "32". That numeral should be
//THE NUMBER OF VERTICES YOU'RE ADDING TIMES 4.
//Correct the offsets
WRITE_SHORT 0x0A0 (~%exploOff%~ + 212)
WRITE_SHORT 0x0B0 (~%animaOff%~ + 212)
WRITE_SHORT 0x0B8 (~%tiledOff%~ + 212)
WRITE_SHORT 0x0BC (~%songsOff%~ + 212)
WRITE_SHORT 0x0C0 (~%restcOff%~ + 212)
PATCH_IF (~%automOff%~ > 0)
THEN
BEGIN
WRITE_SHORT 0x0C4 (~%automOff%~ + 212)
END
//IN THE ABOVE SECTION, THE "228"s CAN BE CHANGED.
//IT SHOULD BE (196 + (~#newVertices~ * 4)), so this example adds 8 vertices.
//196 + 8*4 = 228.
//-------------------------------------INSERT SPECIFICS BELOW.
//Now, you can start adding in the actual code for whatever you are inserting.
//Name
WRITE_ASCII (~%triggOff%~ + ~%#ofTrigg%~ * 196) ~DoorHall~
WRITE_ASCII (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 8) ~~
WRITE_ASCII (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 16) ~~
WRITE_ASCII (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 24) ~~
//Trigger Type
WRITE_SHORT (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 32) 02
//01=Info
//02=Travel
//03=Proximity
//Trigger Icon
WRITE_SHORT (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 52) 30
//22=Info Question Mark
//28=Inside Exit (stair)
//30=Outside Exit (door)
//Destination Area RESREF
WRITE_ASCII (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 56) ~J#Hall~
//Exit point
WRITE_ASCII (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 64) ~J#3600Ex~
//Flags:
WRITE_LONG (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 96) 00
//04=Party Required
//Trigger Text
WRITE_LONG (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 100) 0
//Replace the "5185" with your chosen dialog string for Info Points.
//You can use SAY here, just replace "WRITE_LONG" with "SAY" and "5185" with "@#"
//Trap Detection %
WRITE_LONG (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 104) 00
//Trap Removal %
WRITE_LONG (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 106) 00
//Is Trapped Flag
WRITE_LONG (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 108) 00
//0=no
//1=yes
//Trap Already Detected Flag
WRITE_LONG (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 110) 00
//same as above?
//Trap Location:
WRITE_LONG (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 112) 244
WRITE_LONG (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 114) 746
//Key Type
WRITE_ASCII (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 116) ~~
//Associated Script
WRITE_ASCII (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 124) ~~
//Associated Dialog
WRITE_ASCII (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 188) ~~
//Now, we've got to set up the vertices. I suggest you use IETME to make the graphical
// representation, then view the numbers with NI
//bounding box:
WRITE_LONG (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 34) 1089
WRITE_LONG (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 36) 2659
WRITE_LONG (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 38) 1122
WRITE_LONG (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 40) 2753
//CHANGE YOUR POINTS TO THE BOUNDING BOX.
//#vertices
WRITE_SHORT (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 42) 5
//CHANGE THE "8" TO HOWEVER NUMBER OF NEW VERTICES YOU'LL BE ADDING.
//vertex index
WRITE_LONG (~%triggOff%~ + ~%#ofTrigg%~ * 196 + 44) ~%#ofVerti%~
//Now, write the new vertices.
WRITE_SHORT (~%vertiOff%~ + ~%#ofVerti%~ * 4 + 196) 1089
WRITE_SHORT (~%vertiOff%~ + ~%#ofVerti%~ * 4 + 196 + 2) 2658
WRITE_SHORT (~%vertiOff%~ + ~%#ofVerti%~ * 4 + 196 + 4) 1089
WRITE_SHORT (~%vertiOff%~ + ~%#ofVerti%~ * 4 + 196 + 6) 2723
WRITE_SHORT (~%vertiOff%~ + ~%#ofVerti%~ * 4 + 196 + 8) 1122
WRITE_SHORT (~%vertiOff%~ + ~%#ofVerti%~ * 4 + 196 + 10) 2753
WRITE_SHORT (~%vertiOff%~ + ~%#ofVerti%~ * 4 + 196 + 12) 1122
WRITE_SHORT (~%vertiOff%~ + ~%#ofVerti%~ * 4 + 196 + 14) 2687
WRITE_SHORT (~%vertiOff%~ + ~%#ofVerti%~ * 4 + 196 + 16) 1089
WRITE_SHORT (~%vertiOff%~ + ~%#ofVerti%~ * 4 + 196 + 18) 2658
//Of course, you can alter the points above to match your trigger
//as well as add new points, AS LONG AS EVERYTHING FOLLOWS THE PATTERN!
*/
// Creatures
COPY_EXISTING ~%tutu_var%ardrou.cre~ ~override~
WRITE_EVALUATED_ASCII 0x280 ~%tutu_var%Ardrou~ #8
WRITE_EVALUATED_ASCII 0x248 ~%tutu_var%SHOUT~ #8
WRITE_EVALUATED_ASCII 0x258 ~%tutu_scriptr%UNENEMY~ #8
ACTION_IF GAME_IS ~tutu tutu_totsc bgt bgee eet~ THEN BEGIN
COPY_EXISTING ~%tutu_scripts%irine_a.cre~ ~override~
~%tutu_scripts%irine_b.cre~ ~override~
~%tutu_scripts%irine02.cre~ ~override~
~%tutu_var%sirine.cre~ ~override~
WRITE_EVALUATED_ASCII 0x250 ~%J#sirin1%~ #8
END
//give Sil a script so she can call for help if attacked
COPY_EXISTING ~%tutu_var%sil.cre~ ~override~
WRITE_EVALUATED_ASCII 0x250 ~J#sirin0~ #8 // Assigns the script as Class script
BUT_ONLY_IF_IT_CHANGES
COPY ~sirinescall/creatures/J#Bren.CRE~ ~override/J#Bren.CRE~
SAY NAME1 @1
SAY NAME2 @1
WRITE_EVALUATED_ASCII 0x248 ~%tutu_var%SHOUT~ #8
WRITE_EVALUATED_ASCII 0x258 ~%tutu_scriptr%UNENEMY~ #8
COPY ~sirinescall/%creatures_folder%/J#PIRAT1.CRE~ ~override/J#PIRAT1.CRE~
SAY NAME1 @2
SAY NAME2 @2
WRITE_EVALUATED_ASCII 0x250 ~%tutu_scripts%HOUTDLG~ #8