Friday, March 16, 2007

Another day, another bug

Well, I didn't get much done tonight.

I spent about two hours working on the character creator tonight. It wasn't terribly productive, though at least I learned something.

I spent a little bit of time polishing off the scripts for the altar (thanks Hugie!), did a couple other touch-up things, and then decided to put together the library. It came together fairly quickly thanks to Cleitanious's Prefabs. After setting up a nice little reading area and placing some of Maerduin's books, I then went in game to test it out.

It's a simple thing to add an inventory to an item, right? First, you make the item non-static and useable. You make sure the "Has Inventory" flag is on, and then open up the inventory and drop in your items. But for some reason, no matter what I did, while the objects would "light up" in-game, my character wouldn't move to them and I could not access their inventory.

After fiddling for a while in the toolset (with many tests in-game) to no avail, I did some searching on the forums. Thankfully, in my second search, I found this thread, which contained a very helpful post by ddaedelus. Apparently, as I was assembling the library, I converted everything to an environmental object (which I find to be a good practice), and then converted back items I wanted to have inventories. It turns out that when you do this, the HP of the item is set to zero, which messes up any onopen scripts (and inventories) associated with the object. Adding 1 HP to the item fixed the problem, and now I have a fully-functional library.

One other oddity... file size for my module dropped from ~11 mb to ~5 mb when I upgraded to 1.04. I have no idea why that might be, but I've tested the whole thing and can't find any errors or signs of corruption. Go figure.

Still to do for the next release: add an NPC from Pool of Radiance to the bar, set up the area transition between the bar and the basement, do a final bit of decorating in the basement (maybe add blacksmith and alchemy stations?), and *maybe* add some sitable chairs in the bar and basement (assuming I can figure out these scripts). My guess is two-three nights of work before it's ready.

No comments:

Post a Comment