]> git.localhorst.tv Git - l2e.git/blobdiff - original-data/monsters-format.txt
added (processed) original lufia 2 data
[l2e.git] / original-data / monsters-format.txt
diff --git a/original-data/monsters-format.txt b/original-data/monsters-format.txt
new file mode 100644 (file)
index 0000000..b5a1788
--- /dev/null
@@ -0,0 +1,162 @@
+**********************************************************************\r
+Monsters\r
+**********************************************************************\r
+\r
+There are 224 enemies in Lufia 2. Most of their properties are stored \r
+in what I call the "Monster Compendium".\r
+\r
+-----------------------------------------------------------------------\r
+Monster data - the "Monster Compendium"\r
+-----------------------------------------------------------------------\r
+\r
+[$0B07C0 -> $0B097F]:  pointers to data at [$0B0980]\r
+                       (2 bytes, little-endian (i.e. "least significant \r
+                                                      byte first"))\r
+\r
+                       448 bytes => 224 pointers.\r
+                       Add $0B07C0 to the pointers to find the offsets\r
+                       of the Monster Compendium "entries".\r
+\r
+                       Example:\r
+                       [$0B07C0 -> $0B07C1]: $C0 01\r
+                       => pointer: $01C0\r
+                       => offset: $01C0 + $0B07C0 = $0B0980\r
+                       => The first Monster Compendium entry starts \r
+                          at offset [$0B0980]\r
+\r
+[$0B0980 -> $0B5168]:  "Monster Compendium"\r
+\r
+                       224 entries:\r
+                       [$0B0980]:  Goblin       \r
+                       [$0B09A5]:  Armor goblin \r
+                       ...\r
+                       [$0B5087]:  Gades        \r
+                       [$0B50F1]:  Master       \r
+\r
+- - - - - - - - - - - - - - - - - - -  - - - - - - - - - - - - - - - - \r
+Format of the Monster Compendium entries:\r
+- - - - - - - - - - - - - - - - - - -  - - - - - - - - - - - - - - - - \r
+\r
+   13 "name bytes"\r
+ + 20 "stats bytes"\r
+[+  3 "gift bytes"]\r
+[+  3 bytes for the pointer to the attack script]\r
+[+  3 bytes for the pointer to the defense script]\r
+ +  1 "end byte" ($00)\r
+[+  a variable number of bytes for the attack script]\r
+[+  a variable number of bytes for the defense script]\r
+\r
+\r
+([+ ...] = optional)\r
+\r
+\r
+Start offset of the Monster Compendium entry: \r
+[+$0000]\r
+\r
+- - - - - - - - - - - - - - - - - - -  - - - - - - - - - - - - - - - - \r
+"Name bytes":\r
+- - - - - - - - - - - - - - - - - - -  - - - - - - - - - - - - - - - - \r
+\r
+[+$0000 -> +$000C] (bytes  0 -> 12):  Name of the monster\r
+\r
+    13 characters.\r
+\r
+    Example:\r
+    $ 52   65   64   20   A4   65   6C   6C   79   20   20   20   20\r
+     "R"  "e"  "d"  " "  "J"  "e"  "l"  "l"  "y"  " "  " "  " "  " "\r
+\r
+- - - - - - - - - - - - - - - - - - -  - - - - - - - - - - - - - - - - \r
+"Stats bytes":\r
+- - - - - - - - - - - - - - - - - - -  - - - - - - - - - - - - - - - - \r
\r
+[+$000D]           (byte 13)       :  Level\r
+\r
+[+$000E]           (byte 14)       :  ???\r
+\r
+    The use of this byte is unkown.\r
+    Encountered values:\r
+\r
+    $36 for 'Armor goblin' and 'Regal Goblin'\r
+    $32 for all other monsters\r
+\r
+[+$000F]           (byte 15)       :  Battle sprite\r
+\r
+    There are 134 enemy battle sprites ($01 -> $86)\r
+\r
+[+$0010]           (byte 16)       :  Palette for battle sprite\r
+    \r
+    Some examples:\r
+\r
+    Monster:        Battle sprite number:       Palette number:\r
+\r
+    Torrent         $4D                         $00\r
+    Mad Ent         $4D                         $01\r
+\r
+    Red Jelly       $6E                         $00\r
+    Blue Jelly      $6E                         $01\r
+    Bili Jelly      $6E                         $02\r
+\r
+    Tank            $7E                         $00\r
+\r
+    !!! This doesn't mean that 'Torrent', 'Red Jelly' and 'Tank' \r
+        share the same palette (this is not the case).\r
+\r
+[+$0011 -> +$0012] (bytes 17 -> 18):  Max HP\r
+\r
+    2 bytes, little-endian.\r
+\r
+[+$0013 -> +$0014] (bytes 19 -> 20):  Max MP\r
+\r
+    2 bytes, little-endian.\r
+\r
+[+$0015 -> +$0016] (bytes 21 -> 22):  ATP\r
+\r
+    2 bytes, little-endian.\r
+\r
+[+$0017 -> +$0018] (bytes 23 -> 24):  DFP\r
+\r
+    2 bytes, little-endian.\r
+\r
+[+$0019]           (byte 25)       :  AGL / 2\r
+\r
+[+$001A]           (byte 26)       :  INT / 2\r
+\r
+[+$001B]           (byte 27)       :  GUT / 2\r
+\r
+[+$001C]           (byte 28)       :  MGR / 2\r
+\r
+[+$001D -> +$001E] (bytes 29 -> 30):  EXP\r
+\r
+    2 bytes, little-endian.\r
+\r
+[+$001F -> +$0020] (bytes 31 -> 32):  GOLD\r
+\r
+    2 bytes, little-endian.\r
+\r
+- - - - - - - - - - - - - - - - - - -  - - - - - - - - - - - - - - - - \r
+"Gift bytes":\r
+- - - - - - - - - - - - - - - - - - -  - - - - - - - - - - - - - - - - \r
+\r
+If there's a $03 after the EXP and GOLD bytes (=> at offset [+$0021], \r
+it means that the enemy can drop an item. \r
+\r
+Format of the "gift bytes" \r
+\r
+$03 XX YY \r
+(!!! this $03 is not the L2BASM opcode $03) \r
+\r
+$XX = the low byte of the item number \r
+\r
+$YY = high byte of the item number (always $00 or $01) + p \r
+\r
+      p is a number related to the probability of getting \r
+      the item, maybe probability * 4. It's always an even number. \r
+\r
+Example:\r
+\r
+Gift bytes of the Vampire: $03 73 65 \r
+  $65 = $64 + $01 \r
+  => item number: $0173 (Bat rock) \r
+  => p = $64 = 100 = 4 * 25 \r
+     => 25 % (?) chances that a defeated Vampire \r
+        will drop a Bat rock \r