Hello, everyone! I thought it might be interesting for people to finally figure out at least some way to spawn new creatures and items on maps. Well, I've found out one of the possible ways to do that - it's a little weird (it's definitely not the way it's supposed to be but at least it WORKS. So... 1. You have to have patch 2.0 installed so that you have access to the console (you need the console to find out the player's coordinates). 2. You have to know which creatures already exist on which map. The first thing to do is to find out the (x,y) coordinates for the point where you want to spawn a creature or an item. To do this, you'll have to actually go to that map in the game and position your first hero in the exact place where you want the creature/item to appear. Then, open up the console and type the following: from utilities import * location_to_axis (game.party.location) Note that the first line is essential to plug in the necessary python library. I think you can type it only once per game. You'll be given a pair of (x,y) coordinates with a letter "L" attached to them, e.g. (404L, 513L). I think that the letter "L" stands for "long" (the data type). Anyway, now you'll have to find a script for ANY creature that's already on the map. For example, let's modify the Young Acolyte that appears in the very begin- ning of the game if you play as a Neutral Evil party. The creature we modify will be used as a "spawner" (its heartbeat script will be modified in such a way to spawn creatures into the map, but only once). Find the file "py00195young acolyte.py" in "data\scr" (you should unpack it from TOEE3.dat if you haven't done that before). Open it for editing. Inside, you should find a string that looks like this: def san_heartbeat ( attachee, triggerer ): This line is an entry point for an event which happens when the creature first appears on the map and at certain moments in the future (quite often anyway, every 5-6 seconds or so). So, we have to modify this script. Originally, the heartbeat script for the Young Acolyte looks like this: Code: def san_heartbeat( attachee, triggerer ): if (not game.combat_is_active()): for obj in game.obj_list_vicinity(attachee.location,OLC_PC): if (is_safe_to_talk(attachee,obj)): obj.begin_dialog(attachee,1) game.new_sid = 0 return RUN_DEFAULT return RUN_DEFAULT We'll add an extra "if" branch to spawn our creatures. We're going to use a global game variable to store the information if the creatures were already spawned or not (this is done to prevent consequential spawn of creatures every three-five seconds). I'm using global variable #500 since I think it's not used by anything else in the game. I think it's OK to use numbers 2000-10000 anyway (anything above 10000 might not work correctly !) So, modify our script to look like this: Code: def san_heartbeat( attachee, triggerer ): if (not game.combat_is_active()): for obj in game.obj_list_vicinity(attachee.location,OLC_PC): if (is_safe_to_talk(attachee,obj)): obj.begin_dialog(attachee,1) game.new_sid = 0 return RUN_DEFAULT if (game.global_vars == 0): game.obj_create( 14252, location_from_axis (483L, 503L) ) game.global_vars = game.global_vars + 1 return RUN_DEFAULT The number 14252 is the proto ID of our creature (14252 is a bugbear, by the way). The coordinates (483L, 503L) are close to the starting position on the map. The global variable #500 is tested if it's zero or not. If it's zero, the creature is spawned and the variable is modified in such a way that more bugbears won't be spawned. Note that you can also add a variable to store our creature object so we can make further modifications to it (e.g., rotate it). For example, modify our IF branch to look like this: Code: if (game.global_vars == 0): mycre = game.obj_create( 14252, location_from_axis (483L, 503L) ) mycre.rotation = 1.5 game.global_vars = game.global_vars + 1 You'll see that the creature will have its starting angle modified. P.S. In order to test the new creature, start a new game and create a Neutral Evil party. The new bugbear should walk near the starting point of the neutral evil party! Creature spawning as it should be --------------------------------- Currently I'm very close to disclosing how the creature spawning works in ToEE (I mean, the "real" way of spawning creatures through creating .mob files). It turns out that all the .mob files are named like this: G_xxxxxxxx_xxxx_xxxx_xxxx_xxxxxxxxxxxx.mob Where "x" is a hexadecimal digit. These numbers serve as a GUID - they don't seem to contain any unit data. The internal structure of .mob files is still shrouded for me, though I know where the creature coordinates and creature type are located. By adding a .mob file you spawn a unit. I don't want to disclose all the material I have right now because I might be mistaken in something, but I'll try to keep you informed about my progress.