Ted's RPG Rant

A place to rant about RPG games, particularly the Temple of Elemental Evil. Co8 members get a free cookie for stopping by. Thats ONE cookie each, no seconds.

Thursday, February 23, 2006

Sectoring Tutorial

Winnings: $851

Has my first loss with the system. Nearly $600. Was prepared for it, but comes at a bad time when I am flying out of the country next week: gave me a cash-flow belt. O well, could rant about it but have to be philosophical, if I lose $600 to make $1400 regularly, its a good deal no matter how shitty the losses feel. Most of the $1400 was made $50 at a time, so its like 25+ wins to one loss. Starting at $600 again (where I have 'upped the ante so I am winning $100 instead of $50, and risking $600 instead of $400), I would only need 6 wins to get that money back. Of course a couple more losses like that and I will throw it in, as I said, won't throw good money after bad.

Now, a tutorial...

Today, we are going to sector a new map from beginning to end. This will allow people to use ToEEWB easily, where atm it may seem a scary and daunting task. Its not, if you actually take the time to RTFM and do the tutorials - ALLANON for instance threw himself into the task and come out with a very nice (and very useful) Forest map that will grace KotB and earn him unending glory. (I also want him to sector a swamp map for me when I have hacked the jpg together - I haven't forgotten dude!)

You will need:

- a new map .jpg

- the latest copy of ToEEWB

- a copy of ed.py in your sec folder

- thats about it

I am doing the ground floor of one of the towers by the Keep Gate. Afficianados will remember this has 12 men-at-arms in its garrison, 3 floors and the roof. Will all 3 floors make it in? Probably not, there is just nothing going on in there... what we ARE going to do is quarter the Corporal of the Watch here (the guy who meets you at the front Gate). The module details where the various officers live, but not this guy - it seems reasonable he should live here. Screeg has done a very useful ground floor map with his quarters, and that is what we shall be concentrating on today. The map looks like this.

First of all, we need somewhere to put the map, so we pop open maplist.mes in the modules/KotB/rules folder. We want an original Hommlet map (ie area 1 in the game) to go over, so lets use the map 5033, the Moneychanger. We'll rename it GateTower-first. The maplist.mes now reads:

{5033}{Map50-Keep-GateTower-first, 482, 485, Flag: DAYNIGHT_XFER, Flag: UNFOGGED}

The numbers are way wrong but its pretty much irrelevant: those are only there for moving by WorldMap, and we ain't gonna be doing that to get in here! We will come in by the door (or down the stairs) and will use the Jumppoint.tab to control that. But lets not get ahead of ourselves.

Now we need to name our map, so we pop Map_names.mes and at line 5033 we modify it thusly:

{5033}{Gate Tower - First Floor}

We can type anything here, its not important, it just shows up in a few places like your little map list in the 'WorldMap' bit of the interface.

Next we do Maplimits.mes. This is currently in modules/KotB/rules, but Agetian tells me the game is not drawing from there and it is the wrong place! Well, its a concern, but thus far it works (drawing from the current one I guess) and you'll forgive me if there are more important things to do: I WILL fix it before the end - Agetian has gone to great lengths to understand the parameters used here - and I will certainly fix it at some point. As I said though, atm it works, and thats all that matters.

What I do here is modify the limits to match the Main Floor map of the Hommlet Church. This is my 'base' map for practically everything I am doing, (a few larger maps being the exceptions) so most of the KotB maplimit parameters are identical. 5033 is now changed to match there, so it now says:

{5033}{1020,-12544,-780,-14084}

What do those limits mean? Well, I do know (because Agetian explained it to me at great length, complete with diagrams), but this tutorial is going to be long enough! Suffice it to say they set the limits where the map stops scrolling.

What next? Well, we need our new map to be accessable by the game. This involves two new folders:

One has the graphics.

One has the other files.

First the graphics. Our new map is defined in maplist.mes as Map50-Keep-GateTower-first, so thats what our Folders will be called. The first one goes in the modules/KotB/art/ground folder, the second in modules/KotB/maps folder. First things first.

I make a new folder in modules/KotB/art/ground called Map50-Keep-GateTower-first. This is where all the actual backround map graphics are kept. There is also a file in that folder called ground.mes - this is the control file that tells the game what maps to look out. Its done in rather a funky way, but we'll get into that in a minute. For the moment, lets just copy over the money-changer's map entry, number 52. Then we will go down to number 1052 and make the same entry. They now read:

{0052}{Map50-Keep-GateTower-first}
{1052}{Map50-Keep-GateTower-first}

These are the day and night entries. Since this is a military tower with no windows, we don't bother with day and night entries, the place is identical inside needing artificial light at all times. Some maps, such as the pub or the outdoor ones, have seperate day and night graphics to differentiate them, and Screeg has done a fantastic job for them. If we WERE to do day and night, we would call them:

{0052}{Map50-Keep-GateTower-first-day}
{1052}{Map50-Keep-GateTower-first-night}

and we would have TWO appropriately-named folders in the modules/KotB/art/ground folder, with different jpgs.

Did I mention I learnt all this bit from Jota's map tutorial in the Co8 forum? Good for him! On the shoulders of giants, I tells ya...

Next, we need our modules/KotB/maps folder, so we make one in there called Map50-Keep-GateTower-first. This folder will contain our sec files, mobs, those recently tamed svbs, lighting files etc, and a sexy little device called map.prp.

What does this file do? I have no idea! Thats another Agetian question. What I have done with it is simply modify one number to get it to point at a different set of jpg images. Thats what we are going to do with it now.

Grab an map.prp from a nearby folder and copy it into our new folder. Open it with a hex editor (this is where we modders earn our money). You'll see a bunch of numbers - the amount can change, I think its because the hex-editor itself will sometimes pad out the file with zeros. Some of the numbers (like c0 03) look familiar from countless hex-hacks of mob files, but in fact the only number we need is the first one. Mine is 30: I'm changing it to 34, thats 0052 in hex. Soooooooooo, lets recap:

Maplist.mes tells the game there is a new map referred to by the title Map50-Keep-GateTower-first and the number 5033. Map_names.mes gives the map a title for when that is necessary.

When you access this map (by teleporting to map 5033, say) the map looks for a folder in the maps folder similarly designated Map50-Keep-GateTower-first.

Inside that folder is map.prp: the game reads this, and hits the number 52 (hex 34). It then goes to art/ground/ground.mes entry 52 (or 1052 at night) to access the appropriate graphics files for the background image of the map. These, entry 52 tells it, are found in the folder Map50-Keep-GateTower-first of the ground folder. So it goes off and gets them, and thus we have our background map onscreen.

That will get our background jpg up on the screen. Lets prepare it.

First, I take the pic and I resize it for the game. In the past, this has involved getting a map from ToEE and comparing it in Photoshop to the new one, then resizing the new one and running a character around on it and seeing if it fits. Try using something like a chair or something definite (again, I use the main Floor map of St Cuthbert's church, some of the furniture in the side room can nicely be compared to the furniture on the new map). There is some trial and error of course, and on occasion Screeg has had to redo stuff (which he has been good about).

For this map, it is on the same scale as the Bailiff's tower so I just have to match that - easy. However, so you know how to do it... the game maps are of course kept in the folders in module/ToEE/art/ground. If you have a look in there though, u find they are all hacked up into little jpgs of identical size. How do we combine them into one map to work off?

Thats where ToEEWB comes in. Run it, and click on '2d Maps'. We want to recombine THE BIG MAP, so do this: click it (go on!) Then navigate to wherever you have unpacked ToEE.dat and find art/ground and whatever map you want to recombine. Note if you wanna recombine the main Hommlet map, u better have a lot of processing power and RAM and some time on your hands ;-) Early P4s with 512Mb (like mine), don't bother!

Now, I don't need to do that, but I DO have to have already done it (hows that for a pluperfect) for reasons we will soon see. I am doing the opposite, instead of combining a map I am splitting it for the game to read from art/ground. So, I resize my map in Photoshop to match the existing tower one and save it into the ToEEWB/2D Maps Folder.

At this point I have a surreal experience - its already there. Apparently I did all this when Screeg first sent me the map becuase I was excited to get it. Hmmmm...

Well I haven't split it, thats for darn sure! Still got ToEEWB open? Yes? Good. Click 'split'. It should bring up the ToEEWB/2D Maps folder. If your jpg isn't in there, stick it in. But don't click split yet.

The reason why I suggested recombining a map first is it will create a .txt file named from that map, explaining how wide and long the map is. When u split your map, u need such a text file to tell ToEEWB how many files to split it into and how to 'name them'. Make sense? No? Trust me... if u open ToEE/art/ground and pop a map, you will see they start with names like 001F001D.jpg. Without the .txt file, ToEEWB will start numbering them as 00000001,jpg, and the game will not know what to do with them. So whatever map u r 'emulating' (as I am with Map-5-Main-Floor in the church), recombine it first for the .txt file!

Now... I copy this .txt file and rename it to match my .jpg - gate_tower_ground.txt in this case (this is for the internal workings of ToEEWB, doesn't have to match the map names of the in-game folders or anything.) NOW I can click split.

Some seconds later (for a map this size) and we now have a new folder in ToEEWB/2D Maps called gate_tower_ground. Copy its contents over to the modules/KotB/art/ground folder, into our folder Map50-Keep-GateTower-first (shoulda called that GateTower-ground - o well, live and learn).

Now it should work. Power up the game. Got ed.py installed in your scr folder? Yes? If not, get it from ToEEWB. Run the game, new party (or whatever) and teleport to our new map, 5033 (go to 500,500, thats always safe). To do this for the newcomers, open the console and enter:

from ed import *

Then hit enter, that loads in the ed.py file. Now type:

tp (5033,500,500)

and hit enter, that teleports you nice n simply :-)

Done it? Yes? No? Well I just did, and it worked - woohoooo!!! After a few seconds running around, I saw this:

All looks a bit cramped to me, but the perspective is right, and after all, its a barracks - not meant to be wide open spaces or anything.

Ok, all good so far, we have a new map and we can run around on it. BUT... we can run around on it a bit too much, straight through walls etc. Lets start sectoring!

This is where ToEEWB comes into its own. With ed.py in there, we can sector in walls etc, and other unpassable areas just by running a character over them in the game. Couldn't have an easier method if u tried (and there is an easy method in ToEEWB itself done by painting, we'll see that in a minute).

To get ed.py to function, once again we type into the console:

from ed import *

and hit enter. Note that you only have to do this once per 'sitting', though if you reload a game u have to do it again (though it will be in the console memory and u only have to scroll up, find it and hit enter).

What we are going to do first is outline the edges of the map: ie, the walls where you want the player to stop. First we are going to activate the script that records the position of the walls as we are going to define them, then we are going to actually define them by moving the leader (the PC in the leftmost position in your party roster at the bottom of the screen) around the places we later want to be 'walls', ie unmovable. So, the first thing to do is move the leader to the edge of a wall, thusly.

Then, we activate the script by typing in

blk_on()

This means we are turning on 'blocking' - marking areas that block all movement (you can't walk through them, fly a familiar over them, shoot through them etc). Walls, for instance. There are also areas you can fly over but not walk over, and areas that provide cover (-4 to hit). We can also define water this way.

If it worked, you should see the following in your console:

If it didn't work, you will see something about an unnamed string or something - its pretty clearly an error, and means you either didn't activate ed.py as above, or there was a typo somewhere.

Once you have it up and running, you then run the character where you want the wall to be, eg:

Be careful, u can't undo mistakes in-game, u have to manually open the sector in ToEEWB and fiddle it. We will do this next, but its a pita, so for the moment just don't make mistakes. Using this method, u should be able to do a nice square around the outside of the room. To turn off blocking, you type:

blk_off()

and should get the following reponse:

Again, u can just scroll up to reuse these commands, you don't have to type them over and over.

If you want to add a single tile, instade of painting an area, just type in

blk()

The other commands are fly() and cov() for fly-over and cover respectively, ditto fly_on(), fly_off(), cov_on() and cov_off(). Run around the map making the desks and beds etc fly-over (or providing cover, if u r nasty enough ;-)). Add puddles (if your map has the graphix for it) with wtr().

Pretty soon, your console will look something like this:

Now we can have a look at what we have done in ToEEWB. The files have automatically been writing themselves in the /sectors folder. To see what you have done, click on the Sectors tab in ToEEWB (second from left), then open - there should be two new sectors in there. Open the first one, then click tools/visual sector analyzer. When it comes up, hit refresh down in the bottom corner: there's a visual image of what you have just made! So easy to use... the blue bits are blocked, light green are providing cover, dark green are fly over etc. Mine looks like this:

I then clean it up a bit, using the painting command. To paint, on the right click on 'paint mode' then what you want to paint ('fully impassable' ie blocked, 'fly over' etc). Note that 'fully passable' can be used now to correct errors. Doorways need to be two tiles wide to get through, btw. Once cleaned up, it looks like this:

After you have cleaned it up or made whatever changes you want to make in the painting tool, don't forget to SAVE THE SECTOR! You can switch off the painter bit without losing anything btw, but save the sector on the ToEEWB interface proper.

Now, to test it, I copy it to the modules\KotB\maps\Map50-Keep-GateTower-first folder: the folder that atm should only have map.prp in it. Just copy it, don't move it - that way while you are testing, if there is anything you want to change, the files are right there in the sectors folder to be easily modified.

Run the game and don't forget to clean the map cache! Then teleport to the map and run around it.

You can't - there are walls to stop u! So teleport this time to 508,487: that should put you comfortably in the room.

Ok... now things get funky. We are going to use the .svbs to make our characters grey out when they are behind walls (so we have a '3d'(ish) interactive environment not just a painted background our characters walk over).

If you haven't read the tutorials in the ToEEWB about svbs, do so - they are very short, and provide one brilliant idea. That is, to see where you want to do your svbs, you should paint them on the map using ed.py by marking them as water.

See, these different things are stored in different files. Sectoring stuff like we have done is stored in the .sec files, svbs in the .svb file, and water in the .hsd file. So, u run around marking everything as water where u want the model to grey out, then in ToEEWB you paint it up as svbs, then presto, just delete the .hsd file (or never copy it over to the map folder) and the water is gone.

We have to do this because svbs can't be painted using ed.py, they can only be added with ToEEWB; so we need a frame of reference so we know where we are putting them. So paint them as water, and you're set.

So what do we do? Well, on the map, put your leader somewhere that s/he should be covered by a wall. Then enter:

wtr_on()

and run around behind the wall, everywhere. When you are finished, do wtr_off(). To do individual tiles, use wtr(). Get out and open the file in ToEEWB. Now, (make sure ur ToEEWB is up to date, only the most recent versions support this!!!) where it says

Sector Visibility Blocking (will be painted over existing tile data)

go into paint mode and click on + extend +. Paint OVER your water tiles (the ones with little light blue squares) and notice you are now ADDING little brown squares to indicate that the .svb dfile is acknowledging this tile (the file will now be created of course). You are not replacing what is already there.

When u have marked up all the 'water' tiles, and any others you may hjave missed or wish to add, you should ALSO do ALL the relevant walls that the player is behind, that is, the wall that is blocking players visibility. Svbs don't just grey out the models so they look like the player is behind a wall, they also (when the map is properly lit) prevent the far side of the wall being lit / seen, to prevent u seeing through walls, very handy.

Here is a pic of what I have done for my map. Note the water tiles I have painted over (and in some additional cases where I have allowed for the leader not being able to 'run' as accurately as I would have liked) and how the southern walls in each room have also been svbed as well as the areas the player runs around in.

I have also done the 'ceilings' (the long black bits indicating the tops of walls - the long lines in each direction).

And here is an image of it all done, with greyed out models in place:

Bit hard to tell from the pic, but when you go from 'normal' to 'behind wall', it is quite noticeable. Ok, lets add an internal door. {Edit: Forgot I did 'internal door sectoring' when I uploaded the pix of the doors! Thought it all felt familiar... o well, you've had the theory, here it is in practise 9^D } First we have to decide where to put it, so we power up the game, go to the map, run our leader to where we want the door to appear, and (with ed.py activated of course) type:

loc()

in the console and hit enter. (You probably knew to do that by now, its a common command). Apparently my door is going at 499, 477.

Now go to ToEEWB and prepare to create a new object. We need a door, so check out THIS tutorial and find one to suit you. I am gonna try one of the first couple. The rotation will be the same as any other mob, lets call it 2.3 for the moment. Lets leave it simple. We'll fiddle it momentarily. Here's all you need:

Your GUID will be different of course ;-) When u r finished, click 'embed'. This writes the door INTO the .sec file (it doesn't save it as a .mob). You CAN save it as a mob if u wanna work on it later, but its not gonna run in the game that way. O and u don't have to click 'save' if u have the sector open or anything: in fact, if you DID have the sector open, click embed, then click save, you will save your already open sector OVER the one with the newly embedded door and it would disappear (done that more than once while fiddling exact door locations. We'll do that in a minute).

Ok, I am gonna copy mine into the game's maps folder and see what it looks like in the game.

Oops... got the rotation WAY wrong... must've been thinking of something else entirely. Lemme see, where have I used a perpendicular door to this? The Guild building? Can't remember... pity, because Screeg's maps tend to be the same camera-angle, so once u have fiddled around getting the rotation perfect once, u can transport that number to other doors (I have that luxury, yay Screeg!).

O well, trial and error time. Lets get the rotation correct before we nudge it into the right location.

I am trying 3.9 this time (shifting the door from SE facing to SW facing). Ok, embed the new door.

Trouble is, now we have two! So, we open the sector file, and click on 'static objects'. There are our 2 doors.

So delete the top one. Now we have one door, our latest one. SAVE the modified sec file, and copy it over to the game.

Run the game (clear the map cache!) and lets take a look.

Ooo nice! Before we see if it needs any minor rotational adjusting, lets get it in the doorframe properly. Have a look at your 'Isometric Schematic View' in the sector section (Agetian thinks of everything ;-)) We want to move our door slightly forward on the x axis, and slightly back on the y. So, we now use the offsets, and I'll do 'em both by 10 for starters. Btw, if u keep the door as the open object in ToEEWB (as I am here) then u can keep fiddling it and re-rembedding it. If not - if u go back and change an embedded object later - u have to extract it as a temporary mob to play with. ToEEWB talks you through it though, its easy enough.

Oooooooooo, so close! Its just a weeee bit too far up the y axis, and sitting off the ground (at least from our perspective, not really of course!) Lets tweak the y by 2 and move it down the z axis by 10.

Don't forget to open the sec file after u have embedded the changes and delete the old door, then save again! Bet u forget to do that at least once... if there is more than one door on the map, thats why! If you go to copy a tinkered .sec file over to the game and it has grown in size even though u have only fiddled the door, not added more stuff, thats a dead giveaway you forgot to delete the old one.

Anyways, that last tweak'll do nicely! (Though I had a screenie of it but apparently not.) The door doesn't actually fit the frame perfectly - slightly too short, tiny gap at top - but seriously, there's nothing we can do about that. The one time I tried to resize an embedded obj like you can resize a mob (to turn lizards into dragons, or quasits into Daemons etc) the game CTDed, alas. An ill-fitting door is a small price to pay though: at least its straight. I AM gonna move the door up ever so slightly to spread the gap AROUND it not just have it at the top like that, but otherwise I think its fine.

Lets leave it there. Later I will probably make the door lockable, give the key to the Corporal, etc - I will also add door and stair icons to allow you to leave the room ;-) and get the Corporal to head off to the pub by night and be here by day (and get rid of him from the front gate!) But thats for later.

Monday, February 20, 2006

Movie Tutorial

Winnings: $1434

Bought a suit today for the wedding, won a mess of money last night after I stuffed up the system, bet way too much and it came up (second time that has happened, when I am close to losing it all I panic... must be careful of that). Sleepy after nightshifts. Finished the NPC .dlg yet again and just have to finish renaming mp3s (yet again) - its now the 3rd biggest .dlg file in the game. O and vis-a-vis Screeg the Anonymous's comment on miniatures - made some simple ones on nightshift the other night, stuck em in to bake at the exact temp and time specified on the SuperSculpey box, and burnt them to a crisp [sigh]. Made another one, put it in for half the time, and still incinerated it [sigh again].

Now, a 30-second tutorial. As you all should know, Brother Gaear has made some new .bik movies for the game and will be called upon in future to do this again for KotB. He asked me to investigate how to get them to function, so here we go.

In ToEE/Movies there is a file called movies.mes. To mod it, copy the FOLDER over to your module folder - modules/Co8 4.0.0 in this case. Pop the file open.

Add a new line:

{1030}{NewMovie.bik;;}

where 'newmovie.bik' is, of course, the name of your new movie in the data/movies folder (with ToEEFE, keeping in mind the Toffee fiddles with these things to make them wok. Non-Toffee installs may not have this folder, I don't remember). Substitute the name of your new movie if you prefer.

Now the game can identify your new movie by this number (1030). So, to fire the movie in game, you then make a call to movie 1030. So, in the maplist.mes file in the MODULE'S rules folder (modules/Co8 4.0.0/rules in this case) you would add the call

Movie: 1030

to the map you want to fire the movie. In this case, it is something for the Moathouse, so we would mod the maplist.mes file to say:

{5002}{Map-7-Ruins-of-the-moathouse, 481, 552, Movie: 1030, Flag: DAYNIGHT_XFER, Flag: OUTDOOR}

Or you can get it to fire from in a dialogue line with this executable:

game.fade_and_teleport(0, 0, 1030, 5002, 481, 592 )

I tested this by copying an existing .bik, renaming the copy appropriately and firing it as described. Worked very nicely once I had got the hang of where to put everything.

Here ends the 30-second tutorial :-)

Friday, February 17, 2006

Fixed Date for KotB Release

Winnings: $1121

Well this update is mainly to update the winnings thing, the money is starting to roll in so fast its hard to keep track of. Been VERY lucky the last couple days: the system doesn't rely on luck but u throw a bit of it in and suddenly the whole thing gets exponential.

One of my many loyal readers made this comment:

Ted: I tried a roulette system when I was living in Melbourne --at the downtown casino with the flaming gas jet towers outside-- but it only worked until the third visit when the whole thing went kablooey.

PS: You are the greatest modder in the universe.


The compliments went on like that for several pages: in the end I deleted them all out of modesty, but you can read the comment below.

I too have tried systems like that. My current 'gambling bug' came from Yvy's uncle showing me a system when I was last in Malaysia, there was no statistical reason for it to work (there never is with roulette) but I tried it on the computer and it won several times so I took it to the casino and won a couple times. Then it lost a couple times, so I stopped using it. Prior to that I had a system which looked glorious on paper but when I ran it on the computer, it died like a punk hairdresser. That one never made it past the simulation stage: I'm not one for throwing good money after bad.

If this one goes belly up a few times and I lose my money, then I will stop. For the moment I am riding it for all it is worth. I got a LOT of expenses coming up - just APPLYING for the visa to bring Yvy out as my spouse will cost over $1300AU (thats about a grand USD) - so suddenly having an additional source of income is, if I may say, a godsend.

Now, the place in Melbourne: 'Crown Casino', as it is knwon, is a place I have had my fair share of luck. On my first trip to the Windy, Rainy and Cold City to photocopy some ancient manuscripts (on microfilm) for my PhD many years ago, I ended up there while driving my rentacar around looking for somewhere to eat: the roads literally conspired to put me into the Casino carpark. And they complain about the cross-city tunnel up here! After dinner I had a blat on the tables and won enough to pay for my rentacar, woohooo! I've won there on a couple other occasions: the most memorable was probably when I was in Melbourne killing time before heading out to my interview with the Fransiscan psychologist who was going to assess whether I was psychologically 'fit' for monastic life (note: this does not mean 'sane', merely 'compatible' ;-)) What else do you do while waiting for an important ecclesiastical interview, if not gamble? While actually stationed at the Priory in Melbourne, though, I had neither the chance nor the money (nor even the incentive, really) to go there.

On to more important things. I am heading out to Malaysia on the 1st March for about 10 days, to do the pre-wedding Church preparation thing. Sooooooo, we have a terminus ad quem (or whatever its called) for the release of the current pack. It will go out at some point before I leave, whatever it takes! Working overnight again tonight and tomorrow night, so should get a lot of modding done. Also, got some modelling clay and tools, wanna get back into an ancient love, making miniatures.

For now, back to the NPC cleric.

Sunday, February 12, 2006

KotB Update

Winnings: $728

Stupid overnight shift: cuts into everything, particularly my chance to gamble. A couple hours earmarked for a trip to the club had to be sacrificed for sleeping time before work: not that I minded too much. My cold went down onto my chest, in no small part, I suspect, to that last trip to the club - sitting in a smokey environment drinking grog while overtired from a long week at work (and a cold) and being denied complimentary juice - BASTARDS! - well, none of it is too good for the immune system of course. So I refrained from going out Friday night and likewise had a nap last night b4 werk rather than the club. Am on antibiotics too for the chest thing, they seem to be working well and will keep me off the grog further.

Now... Endarire's NPC, as I mentioned in the forum, is all done bar the shouting. Just renumbering the mp3s (having today off of course - no modding on Sabbath! Church time soon too.) Will have to get them remastered and maybe one or two redone but am holding off sending them back to Endarire til I know for sure (doing decent quality recording is not something for spur of the moment, but should all be done at once and prepared well beforehand. Imho.)

Soooo, that brings us back to KotB, I will FINALLY be able to get back into it!! WOOHOOOO!! I cheated a little and made a start on Lord Axer's .dlg file at work last night: already did something for the 'other end' with the Master of the Merchants' Guild, so should have that whole later-game quest all set to go soon. Now just gotta do the early game ;-) Concentrating on this briefly since Screeg is doing a map for it.

Otherwise, I have to stick in the half-dozen characters or so I did dlg files for during my last lot of overnight shifts, and various other little things I have been tinkering with. Got a bunch more maps to sector (as always) and some lighting, some pathnodes maybe. When I have got the current load of stuff polished up - hopefully not too long - I will do an internal release for anyone at Co8 who wants it. People don't HAVE to download it by any means, since it will be a spoiler ;-) and thats why it won't be any sort of public release.

Doing the worldmap - also a priority for the efforts Sherriff has put in - will mean a major overhaul of the maps. Basically I just happily started adding maps at the end. Now I realise I have to copy over existing map locations and make sure they are all in the same 'area' to get all that functioning well (our ability to mod these things is slight, due to them being 'hardcoded', as they say.) Agetian has suggested we might get some help from Steve Moret in this area but if we can do it as is, makes everything easier. I deeply appreciate how much help Steve has given Agetian in various ways, but I don't ever want him put on the spot since there are always legal considerations. Agetian tried to explain all this to me - Atari have the rights, Troika own the code or some such thing - anyways, I appreciate there are boundaries, both legal and ethical, and I much prefer Steve offering help where he is comfortable rather than us poking him (unless we have some sort of relationship with him as Agetian has built). Hacking the .dll is technically a violation of the EULA and if we can get around it by using the existing ToEE structure for KotB, well, so be it.

It DOES mean a lot of work for me though, redoing any number of things. For starters, it looks like the Keep South Map will now go over the Hommlet map. No surprise there, but it means every door u see on that map will have to have its jumppoint redone. I WILL, of course, miss (or mess) a few on the first run through. Running around the map and chatting to people is fun, but I have already done it many times. Having a few other folks wandering around bugtesting will do wonders 8^)

Another step forward: Agetian has fixed svbs, as u will doubtless have heard on the forums. What this means (for those who haven't gone through it before):

We can't clip. Clipping is done when something moves behind something else and it blocks it out, due to the 3/4-view psuedo 3d effect of the game. Clipping, as far as I can tell, is done in proper 3d (at least to some extent). It is why we have a z axis when placing things with ToEEWB. It also explains y the game crashes if u attack that goblin near the church from above - in the game, u are LITERALLY above him on the z axis, and the engine is not ment to deal with this. Another example: When I sectored the slab in Thrommel's room to be passable so I could lay a vampire on it, he sank into the damn thing! Not literally, but he didn't show up: I had to z-axis him above it. The graphic of the slab, despite being a flat image on a jpg (and passable in the .sec file) still clipped the model. A PC standing there got cut-off at the waist.

Anyways, so far as I am told, this 3d format is proprietary (much like the 3d models that we can't mod, just changing the skins / meshes etc) so we don't know whats going on in there. So we are reduced to using SVBs.

Svbs - or sector visibility blocking - means the model and its circle grey out but still show up, so u can see where the NPC or PC is but its obvious they are behind something. Since it is implemented next to walls and such, it also deals with the issue of seeing through walls - it blocks visibility through walls so when u r outside a room, you can't see in unless there is a line of sight. Brilliant :-)

Sooooooo... once we have proper lighting up (also possible now Agetian has improved the lighting editor thingy of ToEEWB) that should all work. And pretty soon when u run behind walls in KotB, u'll get greyed out and it will look like u r genuinely running BEHIND the walls rather than walking over a painted background :-) Damn that will improve the experience!

What else? Nah that'll do for the moment. O, and the vampire? Well, I will stick him in the protos.tab and can mod him in at my leisure, won't have to hold up either 4.1.0 OR KotB.

Friday, February 10, 2006

D'oh

Winnings: $728

Damn well got mugged at the club last night, closest I have ever came to losing and it happened twice. PLUS this particular club is a great place to drink / hang out etc, but as it turns out, a rotten place to gamble. Other places give you free drinks - tea / coffee / juice / soft drinks - indeed the place I was at yesterday between shifts even gives u complimentary bikkies with your tea, coffee or hot chocoalte, and all a bottomless cup of course. This one I was at last night after work gives u WATER, thats it. There's no drinks service button on the roulette games (u gotta ask the nearby pokies players to buzz for you) and instead of the modern civilised 'print a receipt when u win' way of paying, u gotta call some staffmember over to get your payout. Primitive. I'll go there again, but not to gamble. I DID end up winning though, hard bastard of a night though it was, and indeed coup-de-graced the machine at the end when I put a dollar on zero and spun to just see where the numbers were heading to decide where to bet next, and it CAME UP. 35-1 payout, Ted wins, game over.

On a more depressing side, got the reject letter from the Archdiocese. They Express Posted it - whats that about? O well... the job was 'Evangelisation Officer' at my old alma mater Sydney University, converting heathens and arguing with muslims etc. ABSOLUTELY my dream job, I'd do it for free if I had official support. The interview was a shocker, I had a cold and my lack of interviewing experience showed. I don't blame them for not giving me the job, just hope they found someone who will really do it well: someone with a gift for evangelisation, not just management or some shit.

Of course, now I don't have to worry about young Catholics being scandalised that their chaplain is a professional gambler ;-)

Another busy day ahead today, but wanna test the new KotB map and do the new voices for the NPC. First, many domestic duties call.

Wednesday, February 08, 2006

Latest

Winnings: $506

Did I mention I am abandoning the whole 'kitty' thing because I can't keep track of it? Anyway, passed $500 - yippee - though I had planned on spending the whole day at the club emptying their machines, and was there barely 1/2 an hour: I had dropped my car off to have a broken window thingy fixed (the little motor that makes it go up and down) and although they said it wouldn't b ready for many hours, I had barely left and wandered up to the nearest Leagues club when they rang and said it was ready. Didn't cost me anything (under warranty) but did knock about $100 off my planned winnings for the day! Do'h! Have to wait til after work tomorrow night.

Came home and there was a letter from the Archdiocese - a nice thick one. "WOOHOOOO!!!" thinks Ted, "its a letter about my dream job and its not a one page rejection letter!"

In fact, it was nothing to do with the job. Bugger.

Endarire's NPC script is, I believe, done 8^D But he has sent me a whole new version of the voice files, so I have to renumber them. Coupla hours, but not right now - gotta go back to work.

Sunday, February 05, 2006

Goal! Goal to Australia!

That title doesn't mean anything btw, I just can't remember what I was going to have.

Winnings: $463 Kitty: $400

Woohoooo!!! I broke the $400 barrier! Thats the amount I have been betting, I have now more than doubled my money with my system, and more to the point, even if it blows up in my face tomorrow and I lose the $400, I will still be ahead. Weeeeee!!! OTHER PEOPLE'S MONEY!!! The only way to play ;-)

Now... what have I been up to? Well I thought I might have a bit of a rant about making the new NPC cleric for Endarire. In light of the 0rion situation, I thought I might give people a glimpse into what it takes to make a complicated NPC that doesn't crash and, as far as I can tell, consistently does what you want from him.

Its not that hard, it just takes one damn thing really: TESTING.

What does the new cleric do? Well, most of the time, very little ;-) He will just be a standard character you recruit in Hommlet early if you didn't create a cleric, to heal / explode undead. He is first lvl, has some nice stats (like Cujo did with Pishella, Endarire apparently rolled some VERY nice stats, and then toned them down ;-)) and some real character.

What gives him his persona is his hatred of Gruumsh. Endarire recorded over a HUNDRED lines of dialogue and while a lot of it won't turn up in the normal game, there are various special moments that make him interesting. If you try to recruit him with a cleric of Gruumsh in the party, or just an ordinary half-orc, he will react. Likewise, he will react if you have Lareth in the party or him in the party and try to recruit Lareth (as a Cuthbertian should. We need more NPCs reacting to being expected to go against alignment. We need less of this):

PC: Elmo, please kill that innocent for me.
Elmo: [hic] ok lady!

Sooooo... what did I do? Well I used two variables for it:

One to fire on his first heartbeat file, that scans the make-up of the party and returns a value according to the presence of half-orcs, orcs, Gruumsh clerics or Lareth;

The other I think of as his 'story-state' that keeps track of what you have done last, so next time you go talk to him he can react if, say, you last turned up with a cleric of Gruumsh in the party and agreed to ditch him to get Ron (the cleric) to sign up, or if you dumped him from the party in the moathouse to sign Lareth.

Sounds simple enough? Well, in practise, scanning the party for the presence of this or that was a pain. I was not entirely sure how to do it with a "has follower" thing, so I just did it 'by hand', with whopping great scripts like:

_____if ((game.party[0].stat_level_get( stat_deity ) == 7 and game.party[0].stat_level_get(stat_level_cleric) >= 1) or (game.party[1].stat_level_get( stat_deity ) == 7 and game.party[1].stat_level_get(stat_level_cleric) >= 1) or
(game.party[2].stat_level_get( stat_deity ) == 7 and game.party[2].stat_level_get(stat_level_cleric) >= 1) or (game.party[3].stat_level_get( stat_deity ) == 7 and game.party[3].stat_level_get(stat_level_cleric) >= 1) or (game.party[4].stat_level_get( stat_deity ) == 7 and game.party[4].stat_level_get(stat_level_cleric) >= 1) or (game.party[5].stat_level_get( stat_deity ) == 7 and game.party[5].stat_level_get(stat_level_cleric) >= 1) or (game.party[6].stat_level_get( stat_deity ) == 7 and game.party[6].stat_level_get(stat_level_cleric) >= 1) or (game.party[7].stat_level_get( stat_deity ) == 7 and game.party[7].stat_level_get(stat_level_cleric) >= 1)):
_______________game.global_vars[693] = 3


Sexy, eh? It checks if every character one at a time is both a follower of Gruumsh and a cleric. I'm sure there is an easier way to do it, but meh. Meh I say, meh!

But thats not it, as well as checking if anyone is Lareth or Pintark or Tuelk or a half-orc, I had to make sure the correct 'weighting' was allowed for: Ron can only react to one thing at a time and obviously he is more likely to react to Lareth standing there than an LN Cuthbertian who happens to be a half-orc.

So, I needed to test:

With a party with a half-orc.
With a party with a cleric of Gruumsh.
With a party with Tuelk and Pintark.
With a party with Lareth.
With a party with Lareth AND with half-orcs.
Etc...

And boy howdy did I have problems!!! Don't ask me why, I never did work them all out... but in the end I did the Lareth thing seperately from the first_heartbeat check, by using an (anyone( game.party[0].group_list(), "has_follower", 8002 ) conditional in the dlg file itself (even though it was working fine in the .py file for Tuelk and Pintark). The problem changed depending on how I tried to implement it, but suffice it to say while having either Lareth or a Gruumshite in the party alone made him react, having BOTH made him join up without batting an eye! Weird.

Anyway, worked around that. Next thing: all the different ways Lareth could join, and reactions from Ron (you could ask to join Lareth, you could get him to join as part of his surrender terms, or you could get him to give you his gold chain AND join as part of his terms) all on top of Lareth already being in the party when you go to talk to him (unlikely though that is for several reasons).

Sooooo... spawned Lareth a dozen times at the very least, tried each possible variation, found tiny inconsistencies and ironed them out.

Next was Ron's reaction to the Iuz / Cuthbert fight: not surprisingly, if Ron's personal diety shows, he reacts to it (as he should). That was a bugger: I wanted to just get a float_line from Ron, not involve him in the conversation, but as you will know from my recent post in the modding section of the forum, it was coming out silent which defeats the purpose (and does not do justice to the effort Endarire put into recording the dialogue).

So now I have to spawn that damn fight, and do it over and over and over because there is so much moving around among the scripts I need to account for the possibility that Ron is 'in range' of the find_npc_near for one character but not another and the whole thing falls apart. First, I have to levelup a few characters so that I can survive the damn fight long enough to spawn both Iuz and Cuthbert (thank goodness for the console! Giving Scather to Elmo allowed him to deal with Hedrack single-handedly). Then I had to buff them all to make sure ;-)

Finally got it all done, then I had to do the 'say thanks for a friendly spell' thing which Krunch was kind enough to put together a list of spells for. I ended up using a dozen of the most likely, and happily, this time the float_line works nicely. However, it is only showing up (and sounding) for the first couple I script (cats grace and invisibility, as it happens) and doesn't work for the later ones. More leveluping with a different party to test all this btw, since now I need a reasonable-level wizard: Spuggy, here boy!

Much testing, retesting and stressing: wtf is the matter? Why won't it run? Does it just f*ck up SOME of the time? I think we have all heard rumours of, "I cast Dispel Magic on Pishella and nothing happened" (the same activating script I am using here). Anyways I kept looking and noticed that I spelt 'mage armour' correctly, as opposed to the bastardised pigeon-tongue 'American' the game uses. A quick change to the hideous 'mage armor' and it works. Well every cloud has a silver lining: now I don't HAVE to test all the spells, I only have to test the last one and if its ok, everything before it must be ok too (love it when that happens, its a kwik way of checking the health of your .dlg file too). But the last one, 'protection from arrows' as it happens, stops working when I add some new ones [sigh]. Long story short, I never can get 'hide from animals' and 'enlarge person' working and leave them out.

Well, thats about it. Still have to Standpoint him to return to the Church if you dump him in the moathouse (or if he gets the shits and leaves the party which he will under certain circumstances). Shouldn't be too hard, but I have never done it before. Good practise for KotB though.

The moral of the story? Well DER... test everything!