Custom creatures
We could make the final goblin be just another Goblin Fighter. But instead, let's go the extra mile and give it its own creature type. The game lets you define your own custom creatures, and give them unique appearance and abilities. For the pesky goblin's graphics, download this image (the goblin graphics in the original Nethergate) and save it in the scenario directory as G500.bmp. Macintosh users will have to follow a different process.
![[IMAGE]](/static/tutorial/custom-creatures/G500.bmp)
We'll also have to create a scenario data script. Data scripts contain definitions for all the custom creatures, floors, terrains, and items in a scenario. Their name needs to match up with the scenario file: since our scenario file is pesky.bas, the scenario data file needs to be peskydata.txt. Create that file in the scenario directory and copy the following:
beginscendatascript; begindefinecreature 234; import = 134; // Goblin Fighter cr_name = "Pesky Goblin"; cr_hp_bonus = 50; cr_which_sheet = 500;
Let's go through the data script, line by line:
- beginscendatascript; This is the first line of the script, and tells Blades of Avernum that this is a scenario data script, rather than some other type of script.
- begindefinecreature 234; This is the start of a creature definition. All the following lines of code (until the next begindefine... line, if any) will define creature number 234. Creature numbers 234 to 255 are blank. You can other numbers, but this will overwrite a default creature.
- import = 134; Virtually all defined objects start by copying the values of a default object. In this case, we want our creature to start as a copy of creature number 134 (a Goblin Fighter).
- // Goblin Fighter Remember, // means the start of a comment. It doesn't have any effect in-game, but just serves as a useful note for you, the designer.
- cr_name = "Pesky Goblin"; This sets the name of the creature.
- cr_hp_bonus = 50; This gives the creature fifty bonus hit points. We want the player to spend a bit longer fighting the final goblin.
- cr_which_sheet = 500; Remember downloading G500.bmp? This tells the game to use that as the pesky goblin's graphic. You can also use one of the default graphics in Blades of Avernum\Data. The Character Graphics folder has creature graphics, the Item Graphics folder has item graphics, and the Terrain Graphics folder has graphics for both floors and terrains.
We could tweak the goblin a lot more if we wanted to. Page 56 of the documentation has a list of every possible thing you can alter in a creature definition. But now it's time for our goblin to meet the player.