Fallout2 Opcode Playground

Opcodes: 8000-801F, 8020-803F, 8040-805F,
8060-807F, 8080-809F, 80A0-80BF, 80C0-80DF,
80E0-80FF, 8100-811F, 8120-813F, 8140-8155
 
List Opcodes:Used in Fallout 2Named
Known to DecompilerDescribed

Descriptions for 810E

Opcode810E, reg_anim_begin
     subfunction   reg_anim_begin
     subfunction   reg_anim_clear
     subfunction   reg_anim_end
>> subfunction   RegAnimFunc

Author: Wasteland Ghost

08.02.05 15:21:57

Синтаксис оригинального компилятора:
void reg_anim_func(int par1, int par2) - работа со списком анимаций
Аргументы:
par1 - принимает значения:
REG_ANIM_BEGIN (1) - начать формирование списка анимаций
REG_ANIM_CLEAR (2) - очистить список анимаций
REG_ANIM_END (3) - закончить формирование списка анимаций
par2 - принимает значения:
если par1 = REG_ANIM_BEGIN -
RB_UNRESERVED (1) - незарезервированная последовательность, может не воспроизвестись, если отсутствуют свободные слоты
RB_RESERVED (2) - зарезервированная последовательность, должна воспроизвестись в любом случае
если par1 = REG_ANIM_CLEAR - указатель на объект, для которого удаляется список анимаций
если par1 = REG_ANIM_END, то par2 = 0
Author: ABel

14.04.03 13:24:19

From headers\animcomd.h:
/* Anim Commands */
#define RB_UNRESERVED 1 // unreserved animation sequence, may fail if no available slots
#define RB_RESERVED 2 // reserved animation sequence, should never fail

#define REG_ANIM_BEGIN 1
#define REG_ANIM_CLEAR 2
#define REG_ANIM_END 3

#define reg_anim_begin() reg_anim_func(REG_ANIM_BEGIN, RB_UNRESERVED)
#define reg_anim_clear(who) reg_anim_func(REG_ANIM_CLEAR, who)
#define reg_anim_end() reg_anim_func(REG_ANIM_END, 0)
Author: jargo

22.02.03 20:13:33

RegAnimFunc (2, <critter1_addr>);
This function is used to stop/reset animation of a object/entity.
You can use it enywhere, it is a stand alone function(mostly used to stop NPC walk).

RegAnimFunc (1, 1);
This function starts animation sequence.
It is used with RegAnimAnimate and RegAnimFunc (3, 0) to animate some action of a critter or object.

RegAnimFunc (3, 0);
This function is used to lock animation sequence.
If you do not use this function at the end of animation sequence, then animation should play, but any other object move/animation(for example player walk) will stop it.
Author: ABel

12.01.03 10:29:29

This article is based on "Script Animation-1" document by Communist. To animate some action of a critter (punching, falling, running etc) it is sufficient to use the following sequence of commands:
   { Sequencing Critter1 to make some actions: }
   RegAnimFunc (2, ); { Exact purpose is unknown, }
   RegAnimFunc (1, 1); { but this is how the animation is made in FO scripts. }
   RegAnimAnimate (, , -1); { Critter1 does Action1 }
   RegAnimAnimate (, , -1); { Critter1 does Action2 }
   ... and so on ...
   RegAnimAnimate (, , -1); { Critter1 does ActionN }
   RegAnimFunc (3, 0); { This is also a standard call. }

   { Sequencing Critter2: }
   RegAnimFunc (2, );
   RegAnimFunc (1, 1);
   RegAnimAnimate (, , -1);
   RegAnimAnimate (, , -1);
   ...
   RegAnimAnimate (, , -1);
   RegAnimFunc (3, 0);

   { Sequencing Critter3: }
   ...
In the above fragment, critter_addr is the address of any critter, for example, it could be Player (to make Chosen One dance), Self (in some creature's script) and so on. Action_ids are determined from the following table:
  AA  0     AK  10     BA  20     BK  30
  AB  1     AL  11     BB  21     BL  31
  AC  2     AM  12     BC  22     BM  32
  AD  3     AN  13     BD  23     BN  33
  AE  4     AO  14     BE  24     BO  34
  AF  5     AP  15     BF  25     BP  35
  AG  6     AQ  16     BG  26     CH  36
  AH  7     AR  17     BH  27     CJ  37
  AI  8     AS  18     BI  28     GC  38
  AJ  9     AT  19     BJ  29
The two letters here correspond to the suffix of a critter's FRM file, which visualizes the action. Number in the second column is action_id of that action. For example, to show a punching Chosen One, the following code can be used:
   RegAnimFunc (2, Player);
   RegAnimFunc (1, 1);
   RegAnimAnimate (Player, 16, -1); { *** from table: 16 = AQ *** }
   RegAnimFunc (3, 0);
FRM file with punching tribal is called "HMWARRAQ.FRM", where HMWARR means "a tribal", and AQ - "punching". This is why 16 is used in this fragment. When RegAnim* code is executed, all the critters in question start to make specified actions at the same time. For example, critter1 is punching, and critter2 is evading meanwhile. But separate actions for any given critter are made strictly successive. In addition to RegAnimAnimate opcode there are
   RegAnimObjMoveToTile (, , -1); - critter is walking to specified tile
   RegAnimObjRunToTile (, , -1); - running to a tile
   RegAnimAnimateReverse (, , -1); - make a reverse animation for an action
and some other. Also there are SfxBuildCharName and RegAnimPlaySfx opcodes that allow to add sound effects to actions.
Author: legacy information

22.06.02 13:29:01

Анимация осуществляется двумя командами - 810Е и 8126, у каждой по два параметра, первый параметр команды 8126 - криттер-ид, смысл остальных невыяснен.