Here's a few notes on the inner working of the engine that I'd like to share with the community. (Please note that this is aimed at advanced users only. This isn't a tutorial for beginners.) How prototypes are generated: Let's take a look at how the engine generates prototypes. First, the engine creates empty templates (which are based on the object type) with default values and also assigns the prototype and description (linked to description.mes) numbers to each of them. Next it fills the templates with content. Most of the content is hardcoded and cannot be easily altered, moreover, it's all included in one long subroutine, which patches only required object fields and sometimes patches several prototypes at once. E.g. it can assign the same WIELD_ON and WIELD_OFF scripts to three suits of armor (all sizes) at once, so if you hex edit the script numbers in the code it will affect all three suits of armor. (In theory, the subroutine can be exported to a .DLL, so that we can recompile it, but it's a lot of work.) Fortunately, not all content is hardcoded. The generation of the critter prototypes (NPCs, monsters and unique NPCs) is controlled by the three corresponding files in the 'rules' folder (monster.txt, npc.txt and unique.txt). Prototype ranges: The number of generated prototypes is controlled by the hardcoded ranges. The vanilla version has the following ranges: NOTE: The last prototype in a range is already considered 'wrong'. Thus, e.g. walls go only up to 1007. <table border="1" width="100%"> <tr><td><td>Offsets (Arcanum.exe 18.104.22.168)<td>Offsets (WorldEd.exe 22.214.171.124) <tr><td>Wall: 1000-1008<td>1B37FC, 1B384C<td>178138, 178188 <tr><td>Portal: 2008-2023<td>1B3800, 1B3850<td>17813C, 17818C <tr><td>Container: 3023-3061<td>1B3804, 1B3854<td>178140, 178190 <tr><td>Scenery: 4006-4051<td>1B3808, 1B3858<td>178144, 178194 <tr><td>Projectile: 5028-5029<td>1B380C, 1B385C<td>178148, 178198 <tr><td>Weapon: 6029-6179<td>1B3810, 1B3860<td>17814C, 17819C <tr><td>Ammo: 7038-7042<td>1B3814, 1B3864<td>178150, 1781A0 <tr><td>Armor: 8042-8293<td>1B3818, 1B3868<td>178154, 1781A4 <tr><td>Gold: 9056-9057<td>1B381C, 1B386C<td>178158, 1781A8 <tr><td>Food: 10057-10145<td>1B3820, 1B3870<td>17815C, 1781AC <tr><td>Scroll: 11059-11143<td>1B3824, 1B3874<td>178160, 1781B0 <tr><td>Key: 12060-12063<td>1B3828, 1B3878<td>178164, 1781B4 <tr><td>Key Ring: 13061-13062<td>1B382C, 1B387C<td>178168, 1781B8 <tr><td>Written: 14062-14130<td>1B3830, 1B3880<td>17816C, 1781BC <tr><td>Generic Item: 15065-15213<td>1B3834, 1B3884<td>178170, 1781C0 <tr><td>PC: 16066-16080<td>1B3838, 1B3888<td>178174, 1781C4 <tr><td>NPC: 17067-17317<td>1B383C, 1B388C<td>178178, 1781C8 <tr><td>Trap: 26000-26008<td>1B3840, 1B3890<td>17817C, 1781CC <tr><td>Unique NPC: 27309-27394<td>1B3844, 1B3894<td>178180, 1781D0 <tr><td>Monster: 28310-28472<td>1B3848, 1B3898<td>178184, 1781D4 </table> You can notice that once you increase a range, the game starts generating new, empty prototypes (from templates). Using this table you can edit the proto ranges, and thus add entirely new prototypes to the game, the proper way. If you add new item prototypes without increasing a range, then InvenSource won't accept them. Adding new prototypes: The critter prototypes are the easiest to add. All you need to do is just increase a range, add a new entry to description.mes and a new entry to one of the critter tables in the 'rules' folder. However, in order for the game to read new entries in the critter tables, another set of ranges must be increased: <table border="1" width="100%"> <tr><td><td>Offsets (Arcanum.exe 126.96.36.199)<td>Offsets (WorldEd.exe 188.8.131.52) <tr><td>monster.txt: 28310-28472<td>9B34C, 9B354<td>50BCC, 50BD4 <tr><td>unique.txt: 27309-27394<td>9B37B, 9B383<td>50BFB, 50C03 <tr><td>npc.txt: 17067-17317<td>9B3A8, 9B3B4<td>50C28, 50C34 </table> For other object types, you will have to edit .pro files by hand.