> First, go into db.c, function parse_mobile(), I think its around line 1020 > or so... but I'm not sure how "stock" my stock version of pl11 still is, > so you'll have to double check... you need to replace this line: > mob_proto[i].player_specials = &dummy_mob; > With this line: > CREATE((mob_proto + i)->player_specials, struct player_special_data, 1); I take it that this is making a new mob in the format of player files. THe problem I have with this is how much will it slow down the MUD, having all mobs with the player_specials taking up memory. > Next, still in db.c, function read_mobile(), after the line: > mob->player.time.logon = time(0); > add this line: > *mob->player_specials = *mob_proto[i].player_specials; Hate to sound like a newbie, but what does all this do? (I wanna know what it does, helps me program better) > Next, still in db.c, function free_char(), where is calls: > free(ch->player_specials); Just add an if (!IS_NPC(ch)) check before that > line, so the special doesnt get free'd .... also, you might want to axe the > annoying "SYSERR: Mob had player_specials allocated!" log message as well. Heh heh...I removed a lot more SYSERR's then that already! :) > Your mob prototypes now have slots to hold spells/skills, note: all mobs > of the same type have the same skills, so if you fiddle one cityguard's > dodge, it'll affect them all (I think of this as a feature). You will need > some way to assign skills to mobs, I'd suggest using the espec feature, > its pretty simple to add both for loading and saving... I'm a pretty lazy > coder, so I simply took the !IS_NPC check out of do_skillset and use that > to set the skills, a tiny snip of code in the medit save routine > (I'm using Oasis OLC) writes any mob skills > 0 into the .mob file as an > espec. Don't worry, all mobs of the same type I want to have the skill. I like the idea of the medit save and stuff....I am not sure which editor I will use in mine, as I was weened on Sammy's. :) ------------------------------------------------------------------ Ryan A.J. Biggs email-ae744@freenet.toronto.on.ca Doppleganger, Charon the Boatman and member of Dieties Anonymous Owner of a 100% organic wibble and Plasma lamp, and rubber chicken Keeper of the sacred butcher knife and the Cloak of Shadows Compiler of the Net.Psionics.Handbook ------------------------------------------------------------------
This archive was generated by hypermail 2b30 : 12/07/00 PST