-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfallout2.sym
6021 lines (5961 loc) · 155 KB
/
fallout2.sym
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
*enums:
enum Distance : long
{
unset = -1,
stay_close = 0, // the attacker will stay at a distance no more than 5 hexes from the player (behavior only for party members, defined in ai_move_steps_closer, cai_perform_distance_prefs)
charge = 1, // AI will always try to get close to its target before or after attack
snipe = 2, // keep distance, when the distance between the attacker and the target decreases, the attacker will try to move away from the target to a distance of up to 10 hexes
on_your_own = 3, // no special behavior defined for this
stay = 4 // the attacker will, if possible, stay at the hex where the combat started (behavior defined in ai_move_steps_closer, ai_move_away)
};
// presets for party members
enum Disposition : long
{
none = -1,
custom = 0,
coward = 1,
defensive = 2,
aggressive = 3,
berserk = 4
};
enum AttackWho : long
{
no_attack_mode = -1,
whomever_attacking_me = 0, // attack the target that the player is attacking (only for party members)
strongest = 1, // attack stronger targets (will always switch to stronger ones in combat)
weakest = 2, // attack weaker targets (will always switch to weaker ones in combat)
whomever = 3, // anyone, will attack the chosen target until it dies, or until retaliation occurs (combatai_check_retaliation_)
closest = 4, // only attack near targets
};
enum RunAway : long
{
none = -1, // get the value from the cap.min_hp (in cai_get_min_hp_)
coward = 0, // 0%
finger_hurts = 1, // 25% of the lost amount of health
bleeding = 2, // 40% of the lost amount of health
not_feeling_good = 3, // 60% of the lost amount of health
tourniquet = 4, // 75% of the lost amount of health
never = 5 // 100%
};
enum WeaponPref : long
{
unset = -1, // same as no_pref
no_pref = 0, // Guns > ...
melee = 1,
melee_over_ranged = 2,
ranged_over_melee = 3,
ranged = 4,
unarmed = 5,
unarmed_over_thrown = 6, // not available for party member in control panel
random = 7 // not available for party member in control panel
};
enum AreaAttack : long
{
no_pref = -1, // special logic for NPC (not available for party member in control panel)
always = 0,
sometimes = 1, // use random value from cap.secondary_freq
be_sure = 2, // 85% hit chance
be_careful = 3, // 50% hit chance
be_absolutely_sure = 4, // 95% hit chance
};
enum ChemUse : long
{
unset = -1,
clean = 0,
stims_when_hurt_little = 1,
stims_when_hurt_lots = 2,
sometimes = 3,
anytime = 4,
always = 5,
};
enum Animation : long
{
ANIM_stand = 0,
ANIM_walk = 1,
ANIM_jump_begin = 2,
ANIM_jump_end = 3,
ANIM_climb_ladder = 4,
ANIM_falling = 5,
ANIM_up_stairs_right = 6,
ANIM_up_stairs_left = 7,
ANIM_down_stairs_right = 8,
ANIM_down_stairs_left = 9,
ANIM_magic_hands_ground = 10,
ANIM_magic_hands_middle = 11,
ANIM_magic_hands_up = 12,
ANIM_dodge_anim = 13,
ANIM_hit_from_front = 14,
ANIM_hit_from_back = 15,
ANIM_throw_punch = 16,
ANIM_kick_leg = 17,
ANIM_throw_anim = 18,
ANIM_running = 19,
ANIM_fall_back = 20,
ANIM_fall_front = 21,
ANIM_bad_landing = 22,
ANIM_big_hole = 23,
ANIM_charred_body = 24,
ANIM_chunks_of_flesh = 25,
ANIM_dancing_autofire = 26,
ANIM_electrify = 27,
ANIM_sliced_in_half = 28,
ANIM_burned_to_nothing = 29,
ANIM_electrified_to_nothing = 30,
ANIM_exploded_to_nothing = 31,
ANIM_melted_to_nothing = 32,
ANIM_fire_dance = 33,
ANIM_fall_back_blood = 34,
ANIM_fall_front_blood = 35,
ANIM_prone_to_standing = 36,
ANIM_back_to_standing = 37,
ANIM_take_out = 38,
ANIM_put_away = 39,
ANIM_parry_anim = 40,
ANIM_thrust_anim = 41,
ANIM_swing_anim = 42,
ANIM_point = 43,
ANIM_unpoint = 44,
ANIM_fire_single = 45,
ANIM_fire_burst = 46,
ANIM_fire_continuous = 47,
ANIM_fall_back_sf = 48,
ANIM_fall_front_sf = 49,
ANIM_bad_landing_sf = 50,
ANIM_big_hole_sf = 51,
ANIM_charred_body_sf = 52,
ANIM_chunks_of_flesh_sf = 53,
ANIM_dancing_autofire_sf = 54,
ANIM_electrify_sf = 55,
ANIM_sliced_in_half_sf = 56,
ANIM_burned_to_nothing_sf = 57,
ANIM_electrified_to_nothing_sf = 58,
ANIM_exploded_to_nothing_sf = 59,
ANIM_melted_to_nothing_sf = 60,
ANIM_fire_dance_sf = 61,
ANIM_fall_back_blood_sf = 62,
ANIM_fall_front_blood_sf = 63,
ANIM_called_shot_pic = 64,
};
enum MiscFlags : unsigned long
{
Opened = 0x00000001,
CantUse = 0x00000010, // determines whether the weapon can be used in combat (sfall flag)
Locked = 0x02000000,
Jammed = 0x04000000,
};
enum DamageFlag : unsigned long
{
DAM_KNOCKED_OUT = 0x1,
DAM_KNOCKED_DOWN = 0x2,
DAM_CRIP_LEG_LEFT = 0x4,
DAM_CRIP_LEG_RIGHT = 0x8,
DAM_CRIP_ARM_LEFT = 0x10,
DAM_CRIP_ARM_RIGHT = 0x20,
DAM_BLIND = 0x40,
DAM_DEAD = 0x80,
DAM_HIT = 0x100,
DAM_CRITICAL = 0x200,
DAM_ON_FIRE = 0x400,
DAM_BYPASS = 0x800,
DAM_EXPLODE = 0x1000,
DAM_DESTROY = 0x2000,
DAM_DROP = 0x4000,
DAM_LOSE_TURN = 0x8000,
DAM_HIT_SELF = 0x10000,
DAM_LOSE_AMMO = 0x20000,
DAM_DUD = 0x40000,
DAM_HURT_SELF = 0x80000,
DAM_RANDOM_HIT = 0x100000,
DAM_CRIP_RANDOM = 0x200000,
DAM_BACKWASH = 0x400000,
DAM_PERFORM_REVERSE = 0x800000,
// sfall flags
DAM_KNOCKOUT_WOKEN = 0x40000000, // internal for op_critter_state_
DAM_PRESERVE_FLAGS = 0x80000000 // used for attack_complex
};
enum DamageType
{
DMG_normal = 0,
DMG_laser = 1,
DMG_fire = 2,
DMG_plasma = 3,
DMG_electrical = 4,
DMG_emp = 5,
DMG_explosion = 6,
DMG_BYPASS_ARMOR = 256,
DMG_NOANIMATE = 512,
};
enum Gender
{
GENDER_MALE = 0,
GENDER_FEMALE = 1,
};
// Some global variables referenced by engine
enum GlobalVar : long
{
GVAR_PLAYER_REPUTATION = 0,
GVAR_ENEMY_ARROYO = 7,
GVAR_PLAYER_GOT_CAR = 18,
GVAR_NUKA_COLA_ADDICT = 21,
GVAR_BUFF_OUT_ADDICT = 22,
GVAR_MENTATS_ADDICT = 23,
GVAR_PSYCHO_ADDICT = 24,
GVAR_RADAWAY_ADDICT = 25,
GVAR_ALCOHOL_ADDICT = 26,
GVAR_LOAD_MAP_INDEX = 27,
GVAR_TOWN_REP_ARROYO = 47,
GVAR_ADDICT_TRAGIC = 295,
GVAR_ADDICT_JET = 296,
GVAR_CAR_BLOWER = 439,
GVAR_CAR_UPGRADE_FUEL_CELL_REGULATOR = 453,
GVAR_NEW_RENO_CAR_UPGRADE = 455,
GVAR_NEW_RENO_SUPER_CAR = 456,
GVAR_MODOC_SHITTY_DEATH = 491,
GVAR_FALLOUT_2 = 494,
GVAR_CAR_PLACED_TILE = 633,
};
// Physical material type, used for items and tiles.
enum Material : long
{
Glass = 0x0,
Metal = 0x1,
Plastic = 0x2,
Wood = 0x3,
Dirt = 0x4,
Stone = 0x5,
Cement = 0x6,
Leather = 0x7
};
enum ObjType : char
{
OBJ_TYPE_ITEM = 0,
OBJ_TYPE_CRITTER = 1,
OBJ_TYPE_SCENERY = 2,
OBJ_TYPE_WALL = 3,
OBJ_TYPE_TILE = 4,
OBJ_TYPE_MISC = 5,
OBJ_TYPE_SPATIAL = 6
};
enum ArtType : char
{
OBJ_TYPE_INTRFACE = 6,
OBJ_TYPE_INVEN = 7,
OBJ_TYPE_HEAD = 8,
OBJ_TYPE_BACKGROUND = 9,
OBJ_TYPE_SKILLDEX = 10
};
enum Stat : long
{
STAT_st = 0, // strength
STAT_pe = 1, // perception
STAT_en = 2, // endurance
STAT_ch = 3, // charisma
STAT_iq = 4, // intelligence
STAT_ag = 5, // agility
STAT_lu = 6, // luck
// derived stats
STAT_max_hit_points = 7,
STAT_max_move_points = 8,
STAT_ac = 9,
STAT_unused = 10,
STAT_melee_dmg = 11,
STAT_carry_amt = 12,
STAT_sequence = 13,
STAT_heal_rate = 14,
STAT_crit_chance = 15,
STAT_better_crit = 16,
STAT_dmg_thresh = 17,
STAT_dmg_thresh_laser = 18,
STAT_dmg_thresh_fire = 19,
STAT_dmg_thresh_plasma = 20,
STAT_dmg_thresh_electrical = 21,
STAT_dmg_thresh_emp = 22,
STAT_dmg_thresh_explosion = 23,
STAT_dmg_resist = 24,
STAT_dmg_resist_laser = 25,
STAT_dmg_resist_fire = 26,
STAT_dmg_resist_plasma = 27,
STAT_dmg_resist_electrical = 28,
STAT_dmg_resist_emp = 29,
STAT_dmg_resist_explosion = 30,
STAT_rad_resist = 31,
STAT_poison_resist = 32,
// poison_resist MUST be the last derived stat
// non-derived stats
STAT_age = 33,
STAT_gender = 34,
// gender MUST be the last non-derived stat
STAT_current_hp = 35,
STAT_current_poison = 36,
STAT_current_rad = 37,
STAT_real_max_stat = 38,
STAT_base_count = 7
};
enum Perk : long
{
PERK_bonus_awareness = 0,
PERK_bonus_hth_attacks = 1,
PERK_bonus_hth_damage = 2,
PERK_bonus_move = 3,
PERK_bonus_ranged_damage = 4,
PERK_bonus_rate_of_fire = 5,
PERK_earlier_sequence = 6,
PERK_faster_healing = 7,
PERK_more_criticals = 8,
PERK_night_vision = 9,
PERK_presence = 10,
PERK_rad_resistance = 11,
PERK_toughness = 12,
PERK_strong_back = 13,
PERK_sharpshooter = 14,
PERK_silent_running = 15,
PERK_survivalist = 16,
PERK_master_trader = 17,
PERK_educated = 18,
PERK_healer = 19,
PERK_fortune_finder = 20,
PERK_better_criticals = 21,
PERK_empathy = 22,
PERK_slayer = 23,
PERK_sniper = 24,
PERK_silent_death = 25,
PERK_action_boy = 26,
PERK_mental_block = 27,
PERK_lifegiver = 28,
PERK_dodger = 29,
PERK_snakeater = 30,
PERK_mr_fixit = 31,
PERK_medic = 32,
PERK_master_thief = 33,
PERK_speaker = 34,
PERK_heave_ho = 35,
PERK_friendly_foe = 36,
PERK_pickpocket = 37,
PERK_ghost = 38,
PERK_cult_of_personality = 39,
PERK_scrounger = 40,
PERK_explorer = 41,
PERK_flower_child = 42,
PERK_pathfinder = 43,
PERK_animal_friend = 44,
PERK_scout = 45,
PERK_mysterious_stranger = 46,
PERK_ranger = 47,
PERK_quick_pockets = 48,
PERK_smooth_talker = 49,
PERK_swift_learner = 50,
PERK_tag = 51,
PERK_mutate = 52,
PERK_add_nuka = 53,
PERK_add_buffout = 54,
PERK_add_mentats = 55,
PERK_add_psycho = 56,
PERK_add_radaway = 57,
PERK_weapon_long_range = 58,
PERK_weapon_accurate = 59,
PERK_weapon_penetrate = 60,
PERK_weapon_knockback = 61,
PERK_armor_powered = 62,
PERK_armor_combat = 63,
PERK_weapon_scope_range = 64,
PERK_weapon_fast_reload = 65,
PERK_weapon_night_sight = 66,
PERK_weapon_flameboy = 67,
PERK_armor_advanced_1 = 68,
PERK_armor_advanced_2 = 69,
PERK_add_jet = 70,
PERK_add_tragic = 71,
PERK_armor_charisma = 72,
PERK_gecko_skinning_perk = 73,
PERK_dermal_armor_perk = 74,
PERK_dermal_enhancement_perk = 75,
PERK_phoenix_armor_perk = 76,
PERK_phoenix_enhancement_perk = 77,
PERK_vault_city_inoculations_perk = 78,
PERK_adrenaline_rush_perk = 79,
PERK_cautious_nature_perk = 80,
PERK_comprehension_perk = 81,
PERK_demolition_expert_perk = 82,
PERK_gambler_perk = 83,
PERK_gain_strength_perk = 84,
PERK_gain_perception_perk = 85,
PERK_gain_endurance_perk = 86,
PERK_gain_charisma_perk = 87,
PERK_gain_intelligence_perk = 88,
PERK_gain_agility_perk = 89,
PERK_gain_luck_perk = 90,
PERK_harmless_perk = 91,
PERK_here_and_now_perk = 92,
PERK_hth_evade_perk = 93,
PERK_kama_sutra_perk = 94,
PERK_karma_beacon_perk = 95,
PERK_light_step_perk = 96,
PERK_living_anatomy_perk = 97,
PERK_magnetic_personality_perk = 98,
PERK_negotiator_perk = 99,
PERK_pack_rat_perk = 100,
PERK_pyromaniac_perk = 101,
PERK_quick_recovery_perk = 102,
PERK_salesman_perk = 103,
PERK_stonewall_perk = 104,
PERK_thief_perk = 105,
PERK_weapon_handling_perk = 106,
PERK_vault_city_training_perk = 107,
PERK_alcohol_hp_bonus1_perk = 108,
PERK_alcohol_hp_bonus2_perk = 109,
PERK_alcohol_hp_neg1_perk = 110,
PERK_alcohol_hp_neg2_perk = 111,
PERK_autodoc_hp_bonus1_perk = 112,
PERK_autodoc_hp_bonus2_perk = 113,
PERK_autodoc_hp_neg1_perk = 114,
PERK_autodoc_hp_neg2_perk = 115,
PERK_expert_excrement_expediter_perk = 116,
PERK_weapon_knockout_perk = 117,
PERK_jinxed_perk = 118,
PERK_count = 119
};
enum Skill : long
{
SKILL_SMALL_GUNS = 0,
SKILL_BIG_GUNS = 1,
SKILL_ENERGY_WEAPONS = 2,
SKILL_UNARMED_COMBAT = 3,
SKILL_MELEE = 4,
SKILL_THROWING = 5,
SKILL_FIRST_AID = 6,
SKILL_DOCTOR = 7,
SKILL_SNEAK = 8,
SKILL_LOCKPICK = 9,
SKILL_STEAL = 10,
SKILL_TRAPS = 11,
SKILL_SCIENCE = 12,
SKILL_REPAIR = 13,
SKILL_CONVERSANT = 14,
SKILL_BARTER = 15,
SKILL_GAMBLING = 16,
SKILL_OUTDOORSMAN = 17,
SKILL_count = 18
};
enum AttackSubType : long
{
NONE = 0,
UNARMED = 1,
MELEE = 2,
THROWING = 3,
GUNS = 4
};
enum AttackType : long
{
ATKTYPE_LWEAPON_PRIMARY = 0,
ATKTYPE_LWEAPON_SECONDARY = 1,
ATKTYPE_RWEAPON_PRIMARY = 2,
ATKTYPE_RWEAPON_SECONDARY = 3,
ATKTYPE_PUNCH = 4,
ATKTYPE_KICK = 5,
ATKTYPE_LWEAPON_RELOAD = 6,
ATKTYPE_RWEAPON_RELOAD = 7,
ATKTYPE_STRONGPUNCH = 8,
ATKTYPE_HAMMERPUNCH = 9,
ATKTYPE_HAYMAKER = 10,
ATKTYPE_JAB = 11,
ATKTYPE_PALMSTRIKE = 12,
ATKTYPE_PIERCINGSTRIKE = 13,
ATKTYPE_STRONGKICK = 14,
ATKTYPE_SNAPKICK = 15,
ATKTYPE_POWERKICK = 16,
ATKTYPE_HIPKICK = 17,
ATKTYPE_HOOKKICK = 18,
ATKTYPE_PIERCINGKICK = 19
};
enum KillType : long
{
KILL_TYPE_men = 0,
KILL_TYPE_women = 1,
KILL_TYPE_children = 2,
KILL_TYPE_super_mutant = 3,
KILL_TYPE_ghoul = 4,
KILL_TYPE_brahmin = 5,
KILL_TYPE_radscorpion = 6,
KILL_TYPE_rat = 7,
KILL_TYPE_floater = 8,
KILL_TYPE_centaur = 9,
KILL_TYPE_robot = 10,
KILL_TYPE_dog = 11,
KILL_TYPE_manti = 12,
KILL_TYPE_deathclaw = 13,
KILL_TYPE_plant = 14,
KILL_TYPE_gecko = 15,
KILL_TYPE_alien = 16,
KILL_TYPE_giant_ant = 17,
KILL_TYPE_big_bad_boss = 18,
KILL_TYPE_count = 19
};
*structs:
MessageNode {
long number;
long flags;
char* audio;
char* message;
}
MessageList {
long numMsgs;
MessageNode* nodes;
}
GameObject {
long id;
long tile;
long x;
long y;
long sx;
long sy;
long frm; // current frame
long rotation;
long artFid;
long flags;
long elevation;
long invenSize;
long invenMax;
}
GameObjectItem {
char updatedFlags[4];
// for weapons - ammo in magazine, for ammo - amount of ammo in last ammo pack
long charges;
// current type of ammo loaded in magazine
long ammoPid;
char gap_44[32];
}
GameItem {
long id;
long tile;
long x;
long y;
long sx;
long sy;
long frm;
long rotation;
long artFid;
long flags;
long elevation;
long invenSize;
long invenMax;
}
InvenItem {
GameItem *object;
long count;
}
// Different from GameObject* in sfall
Critter {
long id;
long tile;
long x;
long y;
long sx;
long sy;
long frm;
long rotation;
long artFid;
long flags;
long elevation;
long invenSize;
long invenMax;
InvenItem* invenTable;
char updatedFlags[4];
// for weapons - ammo in magazine, for ammo - amount of ammo in last ammo pack
long charges;
// current type of ammo loaded in magazine
long ammoPid;
char gap_44[32];
long reaction;
// 1 - combat, 2 - enemies out of sight, 4 - running away
long combatState;
// aka action points
long movePoints;
long damageFlags;
long damageLastTurn;
long aiPacket;
long teamNum;
long whoHitMe;
long health;
long rads;
long poison;
DWORD protoId;
long cid;
long lightDistance;
long lightIntensity;
DWORD outline;
long scriptId;
Critter* owner;
long scriptIndex;
}
DbFile {
long fileType;
DWORD* handle;
};
ElevatorExit {
long id;
long elevation;
long tile;
};
FrmFile {
long id;
short fps;
short actionFrame;
short frames;
short xshift[6];
short yshift[6];
long oriFrameOffset[6];
long frameAreaSize;
short width;
short height;
long frameSize;
short xoffset;
short yoffset;
BYTE pixels[2880];
};
FrmHeaderData {
DWORD version; // version num
WORD fps; // frames per sec
WORD actionFrame;
WORD numFrames; // number of frames per direction
WORD xCentreShift[6]; // shift in the X direction, of frames with orientations [0-5]
WORD yCentreShift[6]; // shift in the Y direction, of frames with orientations [0-5]
DWORD oriOffset[6]; // offset of first frame for direction [0-5] from begining of frame area
DWORD frameAreaSize; // size of all frames area
};
FrmFrameData {
WORD width;
WORD height;
DWORD size; // width * height
WORD x;
WORD y;
BYTE data[1]; // begin frame image data
};
FrmData {
FrmHeaderData header;
FrmFrameData frame;
};
SkillInfo {
char* name;
char* description;
long attr;
long image;
long base;
long statMulti;
long statA;
long statB;
long skillPointMulti;
// Default experience for using the skill: 25 for Lockpick, Steal, Traps, and First Aid, 50 for Doctor, and 100 for Outdoorsman.
long experience;
// 1 for Lockpick, Steal, Traps; 0 otherwise
long f;
};
StatInfo {
char* dame;
char* description;
long image;
long minValue;
long maxValue;
long defaultValue;
};
TraitInfo {
char* name;
char* description;
long image;
};
PathNode {
char* path;
DWORD* pDat;
long isDat;
PathNode* next;
};
RECT {
long left;
long top;
long right;
long bottom;
}
Window {
long wID; // window position in the _window_index array
long flags;
RECT wRect;
long width;
long height;
long clearColour;
long randX; // not used by engine
long* randY; // used by sfall for additional surfaces
BYTE* surface; // bytes frame data ref to palette
long* buttonsList;
long buttonT1; // buttonptr?
long buttonT2;
long* menuBar;
};
RectList {
RECT wRect;
RectList* nextRect;
};
Program {
const char* fileName; // path and file name of the script "scripts\*.int"
long *codeStackPtr;
long field_8;
long field_C;
long codePosition; // position in the code stack when reading script opcodes
long field_14; // unused?
long field_18; // unused?
long *dStackPtr;
long *aStackPtr;
long *dStackOffs;
long *aStackOffs;
long field_2C;
long *stringRefPtr;
long *procTablePtr;
long *codeStack; // same as codeStackPtr
long savedEnv[12]; // saved register values
long field_6C; // unused?
long field_70; // unused?
long field_74; // unused?
long timerTick; // unused?
long func_7C; // always null?
short flags;
short fetchOpcode;
long currentScriptWin; // current window for executing script
long shouldRemove;
};
MessageList {
long numMsgs;
MessageNode *nodes;
};
Proto {
long pid;
long messageNum;
long fid;
// range 0-8 in hexes
long lightDistance;
// range 0 - 65536
long lightIntensity;
}
ProtoTile {
long pid;
long messageNum;
long fid;
// range 0-8 in hexes
long lightDistance;
// range 0 - 65536
long lightIntensity;
long scriptId;
Material material;
}
ScriptInstance {
long id; // same as sid
long next;
long elevationAndTile; // first 3 bits - elevation, rest - tile number
long spatialRadius;
long flags;
long scriptIdx; // script index in scripts.lst?
Program* program;
long ownerObjectId;
long localVarOffset; // data
long numLocalVars;
long returnValue;
long action;
long fixedParam;
GameObject* selfObject;
GameObject* sourceObject;
GameObject* targetObject;
long actionNum;
long scriptOverrides;
long field_48; // unknown
long howMuch;
long field_50; // unused
long procedureTable[28];
long gap[7];
};
AIcap {
const char* name;
long packet_num;
long max_dist;
long min_to_hit;
long min_hp;
long aggression; // unused
long hurt_too_much;
long secondary_freq;
long called_freq;
long font;
long color;
long outline_color;
long chance_message;
long combat_message_data[24];
AreaAttack area_attack_mode;
RunAway run_away_mode;
WeaponPref pref_weapon;
Distance distance;
AttackWho attack_who;
ChemUse chem_use;
long chem_primary_desire[3];
Disposition disposition;
const char* body_type; // unused
const char* general_type; // unused
};
BlendColorTableData {
BYTE colors[256];
BlendData data[16]; // [0] - without blending (filled values from 0 to 255)
};
Attack {
GameObject* attacker;
int hitMode;
GameObject* weapon;
int attackHitLocation;
int attackerDamage;
int attackerFlags;
int ammoQuantity;
int criticalMessageId;
GameObject* defender;
int tile;
int defenderHitLocation;
int defenderDamage;
int defenderFlags;
int defenderKnockback;
GameObject* oops;
int extrasLength;
GameObject* extras[6];
int extrasHitLocation[6];
int extrasDamage[6];
int extrasFlags[6];
int extrasKnockback[6];
}
*functions:
0x410013 abil_init
0x410058 abil_resize
0x410094 abil_free
0x4100A8 abil_find
0x410130 abil_search
0x410154 abil_insert
0x41021C abil_delete
0x41026C abil_copy
0x4102B0 abil_load
0x4102EC abil_read_ability_data
0x410378 abil_save
0x4103B8 abil_write_ability_data
0x410410 switch_dude
0x410468 action_knockback
0x410568 int action_blood(GameObject* obj, int anim, int delay)
0x41060C DWORD pick_death(GameObject* attacker, GameObject* target, GameObject* weapon, DWORD amount, DWORD anim, DWORD hitFromBack)
0x410814 int check_death(GameObject* obj, int anim, int minViolenceLevel, bool isFallingBack)
0x4108C8 void internal_destroy(GameObject* a1, GameObject* a2)
0x4108D0 show_damage_to_object
0x410E24 int show_death(GameObject* obj, int anim)
0x410F48 show_damage_target
0x410FEC show_damage_extras
0x4110AC void show_damage(Attack* attack, int a2, int a3)
0x411224 int action_attack(void* attack)
0x4112B4 action_melee
0x4115CC throw_change_fid
0x411600 action_ranged
0x411D50 use_an_object
0x411D68 is_next_to
0x411DB4 action_climb_ladder
0x411F2C action_use_an_item_on_object
0x412114 action_use_an_object
0x412120 get_an_object
0x412134 action_get_an_object
0x4123E8 action_loot_container
0x4124E0 action_skill_use
0x412500 action_use_skill_in_combat_error
0x41255C action_use_skill_on
0x4129CC pick_object
0x412A54 pick_hex
0x412BC4 is_hit_from_front
0x412BEC can_see
0x412C1C pick_fall
0x412CE4 action_explode_running
0x412CF4 action_explode
0x413144 report_explosion
0x4132C0 finished_explosion
0x4132CC compute_explosion_damage
0x413330 action_talk_to
0x413420 can_talk_to
0x413488 talk_to
0x413494 action_dmg
0x41363C report_dmg
0x413660 compute_dmg_damage
0x4136EC action_can_be_pushed
0x413790 action_push_critter
0x413970 action_can_talk_to
0x4139C0 autorun_mutex_create
0x413A00 autorun_mutex_destroy
0x413A20 anim_init
0x413A40 anim_reset
0x413AB8 anim_exit
0x413AF4 DWORD register_begin(DWORD regType)
0x413B80 anim_free_slot
0x413C20 register_priority
0x413C4C register_clear
0x413CCC DWORD register_end()
0x413D6C anim_preload
0x413D98 anim_cleanup
0x413E2C check_registry
0x413EC8 anim_busy
0x413F5C DWORD register_object_move_to_object(GameObject* source, GameObject* target, DWORD distance, DWORD delay)
0x41405C DWORD register_object_run_to_object(GameObject* source, GameObject* target, DWORD distance, DWORD delay)
0x414294 register_object_move_to_tile
0x414394 register_object_run_to_tile
0x4145D0 register_object_move_straight_to_tile
0x4146C4 register_object_animate_and_move_straight
0x4147B8 register_object_move_on_stairs
0x4148F0 register_object_check_falling
0x4149D0 DWORD register_object_animate(GameObject* object, DWORD anim, DWORD delay)
0x414AA8 register_object_animate_reverse
0x414B7C DWORD register_object_animate_and_hide(GameObject* object, DWORD anim, DWORD delay)
0x414C50 DWORD register_object_turn_towards(GameObject* object, DWORD tileNum, DWORD nothing)
0x414CC8 DWORD register_object_inc_rotation(GameObject* object)
0x414D38 DWORD register_object_dec_rotation(GameObject* object)
0x414DA8 DWORD register_object_erase(GameObject* object)
0x414E20 DWORD register_object_must_erase(GameObject* object)
0x414E98 void register_object_call(DWORD* target, DWORD* source, void* func, DWORD delay)
0x414F20 register_object_call3
0x414FAC register_object_must_call
0x415034 register_object_fset
0x4150A8 DWORD register_object_funset(GameObject* object, DWORD action, DWORD delay)
0x41511C register_object_flatten
0x41518C DWORD register_object_change_fid(GameObject* object, DWORD artFid, DWORD delay)
0x415238 DWORD register_object_take_out(GameObject* object, DWORD holdFrameId, DWORD nothing)
0x415334 DWORD register_object_light(GameObject* object, DWORD lightRadius, DWORD delay)
0x4153A8 register_object_outline
0x41541C DWORD register_object_play_sfx(GameObject* object, char* sfxName, DWORD delay)
0x4154C4 register_object_animate_forever
0x415598 register_ping
0x4156A8 anim_set_check
0x415B44 anim_set_continue
0x415B9C anim_set_end
0x415E24 DWORD anim_can_use_door(GameObject* critter, GameObject* door)
0x415EE8 int make_path(GameObject* object, int from, int to, unsigned char* rotations, int a5)
0x415EFC DWORD make_path_func(GameObject* objectFrom, DWORD tileFrom, DWORD tileTo, char* pathDataBuffer, DWORD checkTileTo, void* blockingFunc)
0x41633C idist
0x416360 DWORD tile_idistance(DWORD sourceTile, DWORD targetTile)
0x4163AC make_straight_path
0x4163C8 DWORD make_straight_path_func(GameObject* objFrom, DWORD tileFrom, DWORD tileTo, void* arrayPtr, DWORD* outObject, DWORD flags, void* blockingFunc)
0x4167F8 anim_move_to_object
0x41695C make_stair_path
0x416CFC anim_move_to_tile
0x416DFC anim_move
0x416F54 anim_move_straight_to_tile
0x41712C anim_move_on_stairs
0x417248 check_for_falling
0x417360 object_move