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.

Monday, August 29, 2005

Life on a Rollercoaster

John Brogden resigned! Yay! That man was an absolute idiot - I truly believe he doesn't understand the way our system of government works - and yet just smart enough to be genuinely dangerous if he was elected. I have just heard overnight that the Federal Libs are moving to scrap Double Jeopardy, so that if the government thinks you are guilty of something, they can keep prosecuting until they get the results they want. Its just frightening. But at least Brogden with his "we don't really have to presume they are innocent, they're crims after all" attitude to justice will never lead this state. Te Deum Laudamus!

I have had a bizarre morning, I woke up c. 6:30 feeling wretched, but not in the throwing up manner of two days ago. Instead, my who upper body ached, my joints and muscles just ached like a bastard, it was horrible. I crawled off to work, felt ill, did the morning shift, told the boss I wouldn't be in this afternoon, booked the doctor, and then headed home. On the way I stopped off to get the paper for dad. The woman at the servo followed me out to the car and said, "are you alright? You normally look so healthy". (Thats a vicious lie btw, pale and unhealthy is my natural demeanor). I told her i was quite ill and on my way to the doctor and we both laughed heartily for 8 minutes, then I left.

I went home and crawled into bed. I lay there feeling like crap for about 2 hours, then got up to answer a knock at the door. It was my Herbalife shipment (I've been off it for a month for one reason or another - easy to see, too, considering my health went straight into the toilet!). When I was wandering through the house, I noticed something.

The sickness was gone. Caput. Muscles, joints felt fine, I was fine.

Bizarre. Utterly bizarre. Some virus in the muscle, I suspect, had that once before many years ago (in my back), came and went just as suddenly.

O well, I still get this afternoon off. :-D

Now, todays little rant... when I was lying there trying to sleep last night, I was thinking for some reason or other about all the things that have been important to me, hobbies, business ideas or whatever that I have fixated on. I remember a couple years ago I was mad on golf, only got to the course a couple times but was crazy about it, read books by Tiger Woods, analyzed my swing, went to the driving range, putted up and down my rooms, took my clubs to work and played on the oval before and after shifts, or spent the shifts chipping balls at the kids with my 7 iron (I would put a bucket in their lap as they sat in their wheel chairs and chip balls into it. Some thought this was hilarious, some just looked puzzled). I had the bug.

Then, suddenly it was gone. I just forgot all about golf. Not sure why, it was just finished.

Many eyars ago I had saved up enough money for a new engine for my car. It was my first car, and I had modified the heck out of it - independant rear end with limited slip diff, heavy duty clutch, new 5 speed, huge disks all round. All it needed was the engine (and sundries ;). Had a 3.0 Turbo from a 300ZX all lined up. I saved up $8000 for it, 2 for the engine and the rest for the engineer to do the conversion. It struck me at that time, I had saved up enough money on this one dream to fulfill ALL the others I ever had: all the childhood things that had seemed important and that I had saved money for in the past (none of which I had actually got to the point of achieving ;-). Lets see, there was my desire to have a really nice train-set, tried as a little kiddy to save up for a Zero-1 train controller (the hottst thing in mmm '79 or so ;), there was my teenage desire for a Fender guitar (I actually ended up BUILDING my own electric guitar, it plays like a pig and doesn't keep tune too well but has very nice DiMarzio pick-ups and sounds phat, thats much more satisfying than buying one), there were numerous other electronic gizmos (inculding a wah-wah pedal) that I started and never finished (also had a glorious little one watt amp I made myself that was my hi-fi system for a long while, damn that thing could pump out music. One watt! Unbelieveable.) One time I was even mad about going on pilgramage to Medjugorje and tried to save for that. So many different priorities.

I never did get the car engine, I quit my job soon after (it was another place with kids, a state-run place that was very unhealthy and was making me ill working there) and ran through the money on little things like rent and food before I got my current job and my PhD scholarship in the same month.

The current bug is, of course, modding. Will I give up on it? Will it just disappear one day? I doubt it. It combines two things that I have loved consistently for decades: D&D and programming. I always come back to them.

I love digital stuff. U get the feeling it will never die: I mean a great painting will fade, and great record or tape will rot, but something that is digital can be kept in its original form forever. Its immortal.

But thats the subject for another day's rant. For now, I have to think of what I am going to tell the doctor when I get there. "Ummm, I'm better?"

Saturday, August 27, 2005

Another day...

another illness. I got sent home from work for vomitting on the kids (they started it). Don't expect anything sensible from me for a day or two.

Friday, August 26, 2005

The Watch

I had an idea I wanted to write down, so it goes up on here!

The Watch will work in twos, so players can't just murder them individually. Using the waypoint settings in ToEEWB, they can wander around patrolling the Keep. If attacked, they will firstly send out an alarm: reinforcements will arrive in 'x' rounds, and a variable will begin to count. If the combat is still going when the variable reaches 'x', the reinforcements will spawn nearby and enter combat. If the Watch r killed before that, the 'x' value subtracted from the variable will be used to determine the distance from the party the reinforcements will spawn, and of course they will KOS (but combat will not be active: the party will be able to avoid them if canny enough). Of course, if the Watch are murdered without getting a go, they will not send out the alarm.

The Watch will have 3 settings: note party's presence when near, detain on sight (initiate dialogue), kill on sight (initiate combat).

Should the party murder some lonely shopkeeper (or whoever), a flag will be set (by san_dying) and a time_event will be added (probably 8 hours). This is the period until the body is discovered (less if out in open on Keep map, for instance if it is one of the traders near the fountain - come to think of it, the length of time will probably be dependant on the map). During this time, if the party go near a member of the Watch (INCLUDING those on the walls) their presence will be noted in the heartbeat and when the time_event occurs, if the 'party's presence noted' flag is set (set in the heartbeat of the Watch by the combined presence of the 'just killed someone' flag and the triggering of the 'find near' thing) then the party will be considered to be 'under suspicion' due to having been seen out and about at the time of the murder. If they are on the same map (just stayed where they were, in the now-empty shop or wherever they performed the murder, or returning to the scene of the crime) they will be considered to have been seen at the scene and will be 'accused'. If they are flagged 'under suspicion' more than once they will be flagged to be detained and be questioned, if they are flagged 'accused' they will be flagged to be detained and imprisoned (Lord Spike will take the story from there ;)) Of course they can be under suspicion for more than one reason (pickpocketing, burglary, breaking curfew etc). Again, if the players sneak around or are invisible - avoid detection - they can carry out dastardly deeds and still remain above suspicion: but each deed may increase the number of the Watch (particularly murdering Watchmen - they will get a KOS flag, not a detain flag, if accused of this!) and add to a global variable which will add to the listen / spot checks of the Watch to demonstrate increased vigilance during the PC's 'crime wave'.

Murdered members of the watch, btw, will simply be replaced by the many guards in the Guardhouse / Fortress (there r 24 guards in the former and 30 cavalrymen in the latter to provide a large, if finite, pool of replacements).

Thursday, August 25, 2005

Writing Dialogue for ToEE Part 4

Ok this is the last major part of the Tutorial, after this you should be able to do most of the necessary dialogue writing for a module. In fact you can do a lot now, even if you don't realise it! But there will be many more tutorial chapters to come, dealing with all sorts of things... if necessary, review the previous chapters, then on with the show!

Quick review:

We know what the various bracketed elements in each line do, and why there will always b the same number in each line no matter what is happening.

We know how to go from one line to the next, and hence can already create great long dialogues if we like full of lots of options.

We know how to add conditions so that the dialogue can reflect the situation, and so that certain lines only occur in certain circumstances (depending on the speaker, or the state of the storyline, or whatever).

We know how to execute certain functions from the dialogue (not many yet ;-)).

What next? Well, lets do quests.

Quests can be activated from inside the dialogue files: indeed, this is pretty much the primary way of doing so. They can be set as mentioned, accepted, botched, completed or unknown. First, we need to assign the quest a number, then we can deal with it.

Numbers are assigned in gamequest.mes and gamequestlog.mes. The one accesses the other, and the relevance of the stuff in them is at the top (the 1st is the number and CR rating, the 2nd has the brief and full descriptions, numbered 200 apart). Its pretty self-explanatory. Open them up and look! Find a spare number (check the Co8 modding forum here, to see if anyone has claimed any new quests for an upcoming mod) and add:

1) The name of the quest (that will appear in the game in the quest log).

2) A description of the quest (ditto).

3) The CR number of the quest.

Note: these files are ornery! Take careful note where previous modders have left gaps between numbers and emulate these: if you get a CTD ingame when opening the logbook, you haven't been careful enough!

But enough cheerful thoughts, lets start adding quests to the .dlg files. The command for quests is game.quests[#].state (so if you are using quest nmber 180, that'll be game.quests[180].state). So, to change the state of a quest it would be:

game.quests[#].state = qs_mentioned
game.quests[#].state = qs_accepted
game.quests[#].state = qs_completed
game.quests[#].state = qs_botched

Of course, quests start off as qs_unknown. You could probably turn it back if bugtesting (or cheating, tsk tsk tsk) otherwise I can't think of any reason to do it.

Now, these commands would go in the 'execute command' section in the last brackets in a line. Comparative commands to see if a quest is accepted or completed or whatever will look like this:

game.quests[#].state == qs_mentioned
game.quests[#].state == qs_accepted
game.quests[#].state == qs_completed
game.quests[#].state == qs_botched
game.quests[#].state == qs_unknown

Note that other than the extra equals sign these are identical to the executable commands. You may find yourself using 'copy & paste' a lot for some of them: it is easier, and 'safer' than typing out lines that might then contain typos. If a line doesn't work, chances are you forgot to add the extra equals sign: I have done it many times!

There's one other:

game.quests[#].state <= qs_mentioned

I've seen this, I assume it means 'mentioned or unknown'. Interesting :-)

Comparatives can also be 'not', eg:

game.quests[#].state != qs_botched
game.quests[#].state != qs_unknown

Damn handy these! So, lets see them in action:

{10}{Do my new quest?}{Do my new quest?}{}{}{}{}

{11}{I know it}{}{1}{game.quests[120].state == qs_mentioned}{20}{}
{12}{I'm doing it}{}{1}{game.quests[120].state == qs_accepted}{20}{}
{13}{I done it}{}{1}{game.quests[120].state == qs_completed}{20}{}
{14}{I stuffed it}{}{1}{game.quests[120].state == qs_botched}{20}{}
{15}{What was that?}{}{1}{game.quests[120].state == qs_unknown}{20}{}

{20}{Just do it}{Just do it}{}{}{}{game.quests[120].state = qs_accepted}

{21}{Bite me}{}{1}{}{0}{}

Simple. Lets look now at flags and variables.

I have listed which ones I am using in the guide in my mod, and Liv has said which ones she is using. Again, check the modding forum at Co8 to see which ones people are using. Some of them are set aside for internal stuff like the random encounters. Others are simply used as counters for the various characters, flagging when you have done something they will react to or whatever. Any time a character dies for instance, it gets flagged. Just go beyond the ones Liv set aside and you should be fine.

The global flags are straight 'on / off' (0/1) thing. For instance, when Meleney dies, it gets flagged by her san_dying script. Go see Filliken, and his san_dialog script has a thing in it that if that flag is there, the conversation starts with him weeping (and finishes soon after with him attacking you). If she gets resurrected it should reset the flag to off (0).

The global variables are counters, so you can use them the same as flags, only with more than one return. For instance, with my mod, rather than wasting a whole bunch of different flags for all the various items you bring Lila, I just used a variable counter. When you brought something to Lila, the counter went up by one. When it hit 8, it meant you had finished. Of course, to stop people bringing 8 pieces of hemlock, I had to flag that one :-)

To use them, just use the following scripts: (these are examples of course)

game.global_vars[#] = game.global_vars[#] + 1 (increases variable by 1)
game.global_vars[#] = 5 (sets it to 5)
game.global_vars[#] == 0 (sees if it is 0, the default value)
game.global_vars[#] >= 2 (sees if it is greater than or equal to 2)
game.global_flags[#] = 1 (sets flag)

Again, note the difference between the comparative and executable commands.

I should mention, the game seems to save 'quest complete' etc for the .dlg files: in the .py files (the scripts) it prefers to use flags. So it might use a flag to indicate a finished quest. But you can certainly handle the flags and variables in the .dlg files as well as the .py files.

What next? Well, we should have a good look at the other default options for dialogues. We have seen {G:} the default greeting for NPCs, and {E:} the default goodbye line for PCs. Here are the others as Phalzyr lists them:

{A:} = Appreciation Response (Thank You)
{B:} = Barter Response
{F:} = Forget it response
{K:} = More Questions Response
{N:} = "No" Response
{Q:} = Crash To Desktop When Displayed.
{R:} = Any Rumors? Auto asks for money.
{S:} = Sorry Response
{Y:} = Yes Response

Straightforward? Before I go into possible complications, lets see them in action. This is from Liv's addition of the gnoll attack. (Hard woman, that Liv - the only good gnoll is a dead gnoll and if you show mercy, Liv doesn't!)

{5000}{It must have been those gnolls that we encountered back in the moathouse. Maybe paying them off wasn't such a good idea.}{It must have been those gnolls that we encountered back in the moathouse. Maybe paying them off wasn't such a good idea.}{}{}{}{}

On the screen, this will show up as something like this:

Spugnoir: It must have been those gnolls that we encountered back in the moathouse. Maybe paying them off wasn't such a good idea.
1. I am sorry.
2. I must go.
3. Yes, of course.

Now, the details: the main one to consider is {B:}, because you need to use it to initiate bartering: but you don't have to use the default comment, you can add one.

{11}{B:Ok Lodriss, show me your goodies!}{}{1}{}{0}{}

Note the use of 0 in the line section, you are terminating dialogue and entering barter phase.

The {K:} response is used in the template, you can use it to take you to a 'default' dialogue bit where the player has a few options to talk about different things. Eg, in Jaroo's .dlg, {K:} takes you to line 80:

{80}{How can I help you, my son?}{How can I help you, my daughter?}{}{80}{}{}

{81}{Can you look at something I found?}{}{8}{pc.item_find( 3000 ) != OBJ_HANDLE_NULL or pc.item_find(5800) != OBJ_HANDLE_NULL}{160}{}
{82}{Me find stuff. You look at it?}{}{-7}{pc.item_find( 3000 ) != OBJ_HANDLE_NULL or pc.item_find(5800) != OBJ_HANDLE_NULL}{160}{}

{83}{I am in need of healing.}{}{8}{}{370}{}
{84}{Me have ouchies.}{}{-7}{}{370}{}

{85}{I would like to donate some gold.}{}{8}{}{40}{}
{86}{Me want to give gold.}{}{-7}{}{40}{}

{87}{I am trying to help Mytch the Miller.}{}{8}{game.global_flags[12] == 1 and game.quests[8].state == qs_accepted and game.global_flags[13] == 0}{240}{}
{88}{Me helping miller!}{}{-7}{game.global_flags[12] == 1 and game.quests[8].state == qs_accepted and game.global_flags[13] == 0}{240}{}

{89}{I've finally done it, Jaroo. I've gotten Terjon to agree to convert Marek, the carpenter's brother, to the Old Faith!}{}{8}{game.global_flags[17] == 1 and game.quests[5].state != qs_completed}{336}{}
{90}{Terjon say it OK for carpet man brother to join you.}{}{-7}{game.global_flags[17] == 1 and game.quests[5].state != qs_completed}{336}{}

{91}{I have some questions about the Old Faith.}{}{8}{}{200}{}
{92}{Me learn about Old Faith.}{}{-7}{}{200}{}

{93}{Why haven't you sent in your monthly report to Hrudek in the Gnarley Forest?}{}{8}{game.party_alignment == TRUE_NEUTRAL and game.global_flags[18] == 0}{318}{game.global_flags[18] = 1; game.global_flags[67] = 1}
{94}{Hrudey wants report.}{}{-7}{game.party_alignment == TRUE_NEUTRAL and game.global_flags[18] == 0}{318}{game.global_flags[18] = 1; game.global_flags[67] = 1}

{95}{Why don't you help Tarim with the Deklo Spiders?}{}{8}{game.quests[2].state == qs_mentioned}{920}{}
{96}{Jaroo, do you mind if we kill the spiders that have infested the Deklo Grove?}{}{8}{game.quests[2].state == qs_accepted}{920}{}
{97}{Jawoo care about Decklow spiders?}{}{-7}{game.quests[2].state == qs_mentioned or game.quests[2].state == qs_accepted}{920}{}


Simple enough. :-) If you have a 'default' dialogue tree, makes things easier and then you can flesh out each branch as appropriate.

Phalzyr also mentions {C:} = Story state response. Having scanned the .dlg files, I don't believe this is ever used. But there are still default lines for it, which as Phalzyr mentions can be found in the mes folder in gd_cls_pc2m.mes and gd_cls_pc2f.mes. We'll go into scripting for story state later.

For the moment, thats it! You can now create .dlg files, have them show dialogue appropriate to the situation as decreed by a wide number of parameters, keep track of things with flags and variables, initiate and complete quests and even initiate bartering or have the NPC attack! There's plenty more, but this is the main stuff.

Enjoy, and check back regularly for more stuff. In a couple days we will look at some more complicated scripts for the .py file.

The next chapter is now here.

Monday, August 22, 2005

A rant

Well, sorry part 4 in the dialogue writing thing is taking so long, but for those who are hanging for it, let me just say, once you have done part 4 you will be able to write 90% of dialogue in the game. There will be many more parts dealing with all sorts of little things you can do, particularly with scripts (eg reputations, the story state, showing new areas of the world map, teleporting, all sorts of stuff!) but basic dialogue writing will be done. So hang in there!

I have been distracted by the 'world map' (well, first important one anyway) for the new module. I started adding the textures to the basic design today and it is looking MIGHTY nice. I tried to put it up on my homepage for people to see, but my stupid ISP is having conniptions. I click on 'my account', I go to the page where I can fiddle with my home page layout (among other things). Then I put the pic up, then publish - but all I have is the dreaded red 'x'. So I go back to the ISP homepage, click 'my account', and I go to a DIFFERENT page with my usage stats but nothing about changing my homepage.

Thats right, click the same button twice, go to 2 different pages.

I mean if you sat around in a committee and TRIED to think these idiotic things up, you couldn't.

Will be doing more texturing after this shift, will have a nice (if compressed) pic of the main map up within 24 hours. And an address for where to see it too, for those who don't know ;)

Friday, August 19, 2005

Writing Dialogue for ToEE Part 3

Today we're actually going to write some dialogue! Pop 00275demo.dlg again, and lets go back to line 1.


You should know what each of these are, though you might wonder why the opening line of this NPC is simply 'G:'. The brighter folks reading this will have figured out:

a) G: is a command of some sort (you don't usually see colons in dialogue ;-))

b) It is short for 'greeting' and is a shortcut to add greetings.

Or you might have picked that up from looking at Phalzyr's thread. Whatever, them's the facts!

By using the letter 'G:', you can have the one single greeting line, and it will change to suit the circumstances of the greeting. If it is the first time the player has chatted to this NPC, you can have an introductory comment: if they have met before, it can be a 'welcome back' comment, if the PC has done something to anger the NPC it can be reflected in the greeting. These comments are all stored at the end in specific line numbers. Scroll down the template and you will see them, line numbers 10008-11004. By specific line numbers, I mean the comment for greeting a naked PC is 10015 in every dlg file. Why is this? So the 'G:' command can access them of course! If you have been doing your homework, you may have noticed many .dlg files don't have these lines at the end: there are also default ones that can be used. So you don't HAVE to add them, you can still use 'G:' and the game will then supply an appropriate, if generic comment.

What benefit is there in using 'G:' if you just then have to write in the appropriate lines at the end of the file anyway? Well, it allows you to simplify the scripting that accesses the dlg file. You will remember we are starting with a very simple script:

def san_dialog( attachee, triggerer ):
______________triggerer.begin_dialog( attachee, 1 )
______________return SKIP_DEFAULT

This always starts the dialogue at line 1. By using G: we can get away with this, always start at the same line but still have a dialogue that changes to suit circumstances.

What about the PC's comment, how do they change? Well, looking at the template this is apparent:

{2}{Hello, I am @pcname@.}{}{8}{not npc.has_met(pc)}{10}{}
{3}{Hi! Me @pcname@!}{}{-7}{not npc.has_met(pc)}{10}{}

Note that npc.has_met(pc) and not npc.has_met(pc) are in the conditional brackets as we defined them in the last tutorial: that is, these are conditions that have to be met to see these lines. Obviously, the introductory lines 2 & 3 are for when the PC & NPC have never met before: or, to use logical langaue, when the condition 'npc.has_met(pc)' is NOT true. Now, write some dialogue! Write in your own greeting. Note the '8' and '-7' for the intelligence condition: also note the use of '@pcname@': whatever the name of the PC who does the talking, will be substituted here. This is how the game knows to call you by name, whatever that name may be.

Done a couple greetings? Well, when you feel like it, you can do all the ones down the bottom of the template as well. You don;t have to, you can always delete these when the time comes and the game will insert the generic onces, but you should at least have some idiosyncratic introductory lines at 10008 and 10009.

Perhaps you want to add a few more specific greetings: have different comments for evil or good parties, or for specific races or classes. Perhaps the NPC is an Elf and you want Elven PCs to acknowledge their kinsman, or perhaps the NPC is a priest of Hextor and you want PC Paladins or followers of Heironeous to have a few choice words to say. To do this, we add conditional lines similar to those we saw last time. I will copy Phalzyr's list here.

pc.skill_level_get(npc, skill_gather_information) == #
pc.stat_level_get( stat_deity ) == #
pc.stat_level_get( stat_gender ) == gender_male //gender_female
pc.stat_level_get(stat_alignment) == LAWFUL_GOOD
(for instance)
pc.stat_level_get(stat_level_paladin) == #
pc.stat_level_get(stat_level_wizard) == #
pc.stat_level_get(stat_race) == race_orc
(for instance)
pc.stat_level_get(stat_strength) >= #

Notice some have spaces and some don't - they are irrelevant, Python is a bit smarter than that. Also notice that 'stat' is used in a wider sense than D&D devotees might use it (ie just for attributes like Strength). Those above are pretty obvious since we have already seen the skills in action. 'Stat_deity' is checked by number according to deity.mes (this is in the Rules folder in ToEE3.dat, if you are serious about ToEE modding you HAVE to crack open those .dat files! Ask at Co8 for how).

Some other handy ones are:

anyone( pc.group_list(), "has_follower", # ) This checks for a specific follower in the party (eg when doing the Preston Wetz 'sore tooth' quest, if you have Bertram in the party you are not only a worry, but you also have the option at that point of saying, hey I have a dentist right here! Or was that a ranger... :-/)

anyone( pc.group_list(), "has_item", # ) This checks if any PC has a particular item in their inventory: ideal for quests, since you don't have to worry about whether the speaker has the item or whether perhaps the strongest PC carries everything but someone else does all the talking.

In both these cases, the # is from protos.tab. However, the number is from col 22 (in Proto-Ed) which is the 'name' of the object. If you open the protos.tab in Proto-Ed for, say, Elmo, you will discover his proto number is 14013, his 'name' in col 22 is 8000 and his id # is 20008! Confusing? Unfortunately, yes it is! In many cases these 3 numbers will be identical, but for NPCs (particularly followers) it can be awkward, because the game has seperate id #s for when they are a stranger and when you have met them. So if you click on Elmo from a distance, he should show up as 'drunk villager' but once u have met him, it will be Elmo. Just be aware of this.

One more condition to introduce here (that I didn't see in Phalzyr's thread but is probably there somewhere) is:

game.party_alignment == CHAOTIC_EVIL (for instance). This is for the alignment you chose for the beginning, ideal for things affecting the opening vignette quests.

Ok, thats it for now, I will try to update this with another post after work. In the mean time, get writing dialogue! Use those conditions to add lines 6, 7, 8 and 9 to the opening dialogue. Also, write some specific dialogue for the various greetings at the end: its that attention to detail (not bothering with the generic default stuff) that makes for an immersive game!

One more thing: you can group conditions with Boolean stuff like 'and' & 'or'. So for the opening lines, you might want something like:

{8}{I'll do the talking, runt.}{}{8}{not npc.has_met(pc) and game.party_alignment == CHAOTIC_EVIL}{50}{}

Note you need '==' for conditions, one '=' won't cut it! This is another very common error.

On to chapter 4: click [THIS].

Thursday, August 18, 2005

Writing Dialogue for ToEE part 2

Lets jump straight into writing dialogue today. Open up 00275Demo.dlg. Also, open up Phalzyr's thread you downloaded (or copied out somewhere) last time, or go to www.Co8.org and look at it again.

The very first thing on the dlg page is {1}. This is, not surprisingly, a line number. The game accesses the file by line numbers, and the dlg file advances the dialogue by going to different line numbers. Easy, init. You may remember that our script, in py00275Demo.py, will start the dialogue at line 1 each time the player clicks on this character. So lets see what line 1 is.

{1}{G:}{G:}{}{}{}{} // a greetings line from the end, as circumstances dictate.

The stuff beyond the '//' is a comment, you can erase that when you are ready to put this file into action or leave it there, it doesn't matter. Its what goes before it that is the juicy stuff that the game accesses.


Lets go through those in order.

{--LINE NUMBER--} You will notice that in this template, and in most dlg files in the game, the comments from the NPCs are in 'tens', and the replies from the player are in the unit between. Ie, the NPC comments are in line numbers 10, 20, 30 etc and the player's comments are in 11-15, 21-25, 31-35 etc. This is NOT essential, but is very handy in keeping track of what is happening. It IS necessary that the line numbers be sequential, because the game accesses the file sequentially, it does not parse the file and put all the numbers in order. If there is some catastrophic screw-up in the dlg file somewhere, the game will generally run the dlg file normally until that point, then everything after it will come up blank.

You may notice Phalzyr says, "you are limited to showing 5 PC replies at a time". This means only 5 will show up on the screen at any one time. You can have more than 5 replies, you can have as many as you want if you script them to occur under different circumstances (and, generally speaking, more is better!) But there is only room in the dlg box for 5 to show up at any one time. Don't believe me? Do my mod, and try taking all 8 of Lila's requested items to her at once. When she asks you what you have for her, all 8 (plus a 'never mind' response) will trigger a comment from the PC, but only the first 5 will be seen on screen. As you hand over each item, something else will takes its place in the list until there is room for the 'never mind' response to occur.

{--COMMENT TO MALE PC--}{--COMENT TO FEMALE PC--} Ever wondered how the NPC knows to call your cute little Elven maidens "lass" and your big boofy barbarian blokes "sir"? Simple - they have seperate dlg entries. In the majority of cases they will be identical (and I can tell you from bug-hunting, the writers of ToEE used copy-n-paste a LOT!). But the option is there for them to be different, and indeed they can be wildly different and talking about two completely different things if you like (likewise, you can script the replies to only discuss certain options if the PC is of a particular gender. We will get to that shortly. Its a good example of why you might want to have a lot more than 5 replies available.)

Note: one of the most COMMON mistakes you can make in writing dlg files, is forgetting to do both of these. If there is very little variation between your male and female comments, and you are copy-n-pasting a lot (nothing wrong with that btw), you can easily forget to do it once, and since it will be surrounded on both sides by a number of single comment PC replies, the line looks normal. BUT, when you run the file, it screws up immediately after that point. Why is that?

Lets see how the game views it. The game is looking for:

{--#--}{--REPLY--}{}{--#--}{}{--#--}{} etc

What all those other brackets do we will get to in a minute.

BUT, if we leave out a comment, what does the game see?


When it goes for the missing NPC comment, it accesses the empty brackets in its place, and everything moves forward one. So in the next line number there is instead a comment, nothing where the next line number to go to should be (don't worry, I haven't told you where that is yet, just take my word for it) and so the game can't continue. It will probably just show nothing on the screen, and default the last (blank) line to be an 'exit' comment.

Don't worry if you make this mistake btw, we all have ;-)

Identifying these mistakes is much easier in something like Notepad++ than just normal ol' Notepad. Or, if you are like me and enjoy the spectacular simplicity of Notepad, try opening your .dlg files in Phalzyr's Proto-Ed when bug-hunting. This makes them MUCH easier to see, and also quickly picks up the other easy mistake to make, using the wrong shape brackets. If you are writing a big .dlg file and typing quickly it is all too easy to type '(' instead of '{' and screw everything right up.

Lets move on to those last 4 sets of brackets. In many .dlg files in the game these will all be blank, and the NPC comment line will end with {}{}{}{}. In other files, you may notice the line number gets repeated in the second bracket: eg for our first line, they would be {}{1}{}{}. You can do that or not as you like: I haven't met anyone who is entirely sure why it does or doesn't have to be there. I know I stopped bothering with it a while back and have noticed no ill effects whatsoever. Just be aware that sometimes the game has it.

The last set of brackets are important: here is where you can stick a function or script you want to execute at this point. A good example is from Liv's reworking of the tower encounter:

{366}{To arms my troops!}{To arms my troops!}{}{}{}{}
{368}{Ready your spells! Draw your swords! Mark your targets!}{Ready your spells! Draw your swords! Mark your targets!}{}{}{}{buff_npc(npc,pc)}
{370}{These fools killed Lareth!! Let us avenge his death!}{These fools killed Lareth!! Let us avenge his death!}{}{}{}{buff_npc_two(npc,pc); game.global_flags[833] = 1}

Ok: since this is a pretty linear 'dialogue' where the players only option is to click '[more]', Liv has not bothered spacing the line numbers by 10. For the moment, ignore the odd numbered lines (they are the players replies in this case, we will get to them next) and focus on the NPC comments. You will notice that each one starts with the line number, repeats the comment twice (once for male, once for female) and then has 3 empty sets of brackets, followed by (for the latter two) a command that should remind you of some of the scripts we have already seen in the .py file: buff_npc(npc, pc).

So... what do you suppose happens when the game executes these lines? If you answered "it goes looking for buff_npc and buff_npc_two in the .py file", you are completely correct! Have a cookie! We don't have to go into any detail here as to what these commands do, suffice it to say they execute scripts already put in the .py file. The effect should be obvious: the NPCs will buff themselves for the fight!

They also execute another command, game.global_flags[833] = 1. Again, we will look at global flags and variables in depth later. For now, it is enough to know you can set flags and variables and then check them later. Here, Liv assigns the value 1 to flag 833. There are only two values for a flag, 0 and 1, ie the flag, like a flag on a mailbox, is either up or down. Its default is 0, the flag is not set and gets ignored. Here we are 'setting' the flag (or flagging the encounter, or whatever jargon you want to call it). Later, at a specific situation (probably when you chat to Lareth again) you can have a script to check this flag. If it is 0 or unset, then you haven't been to the tower. If it is 1 or set, (as it would be in this case) then you have been to the tower encounter and your dialogue with Lareth can reflect that.

All make sense? For a list of some of the commands you can execute straight from dialogue like this, look at Phalzyr's thread under the section 'Actual Functions: Those with an * in front are known to work directly from dialog execute field.' Damn but he is a handy fella! Be aware that some only seem to function from the player's replies, not from the NPC's line. We will look at the more common ones in depth later, for now try popping some dlg files in the game and seeing how they are used. (The dialogue files, if I have not mentioned this are in Atari/Temple of Elemental Evil/Data/Dlg).

Now to the player replies. They look very similar but are actually quite different. They begin with a line, follow it with a comment and the last one can execute a command, but in between is where the changes happen.

Lets look at them.


The first two are fairly obvious. The third bracket is always empty. The fourth is where the interesting stuff starts: it examines the intelligence of the PC, and displays the appropriate reply. There are 3 common parameters for this;

8 - this means anyone above Int of 8 will get this option. This is the normal conversation options.

-7 - this is for players with an Int of 7 or less. This is commonly called the 'dumb PC' option. The same thing might be said, but phrased in such a way that the PC who says it doesn't sound too bright. (In the game, this is often played for laughs).

1 - this is for anyone with Int 1 or over. This is a 'common' reply option, such as we saw with the '[more]' option above, it doesn't matter what the Int of the PC is. If it is under 1, they would be paralyzed and unable to converse, so it covers everyone. It is used for common replies such as 'goodbye'.

You can also script specific stuff for smarter characters if you like, by adding a reply line that has, say, 15 or 17 (or more) here, so that only really intelligent PCs get the chance to explore this part of the dialogue. An example of that would be in Burne's puzzles, where only smarter PCs are given the option of explaining their correct answer (and therefore winning).

Anyway, the meaning of all this is that just as NPC comments come in male and female varietes, so there are usually TWO versions of each reply: one for normal characters, one for dumb characters. But they are shown on seperate lines, and they are not compulsory for the game (as we saw the male and female ones were). Just remember if you dont have 'above 8/ under 7' options, you have to have a '1' option, or you might create a situation where a character with an unexpected Int happens to be in the dialogue and there is no reply that suits them.

Moving on, the next bracket can contain wider conditions. It can also be left blank if you want that reply to always appear. Lets revisit Liv's tower encounter, the scenario has now moved on a bit, the baddies have buffed themselves and the PCs are claiming Lareth is not dead, he has merely run off:

{390}{You lie! Lareth was many things, but not a coward. You will die for your insolence!}{You lie! Lareth was many things, but a coward? No. You will die for your insolence!}{}{}{}{}
{391}{I think not. We crushed Lareth with ease. And now we will crush you and your band of paltry scum.}{}{8}{}{0}{npc.attack( pc )}
{392}{Me gonna bash yer skull!!}{}{-7}{}{0}{npc.attack( pc )}
{393}{I never said Lareth was a coward. He is waiting for us back at our hideout. Let me go get him.}{}{8}{pc.skill_level_get(npc, skill_bluff) >= 10}{500}{}
{394}{Layrest not cowherd. He wate fer us at da cave. @pcname@ brings him to ya.}{}{-7}{pc.skill_level_get(npc, skill_bluff) >= 10}{500}{}
{395}{Look you moron, Lareth is a friend of ours and he is going to be pretty damn angry with your behavior.}{}{8}{pc.skill_level_get(npc, skill_intimidate) >= 10}{400}{}
{396}{Me Layrest friend. He gonna smash ye fer dis bad stuffs.}{}{-7}{pc.skill_level_get(npc, skill_intimidate) >= 10}{400}{}
{397}{Relax, friend. Lareth is our friend. I'll go get him and we can sort this all out. No problem here.}{}{8}{pc.skill_level_get(npc, skill_diplomacy) >= 10}{500}{}
{398}{Calm. @pcname@ is Layrest friend. Me go gets him. Yous sees.}{}{-7}{pc.skill_level_get(npc, skill_diplomacy) >= 10}{500}{}
{399}{[attack]}{}{1}{}{0}{npc.attack( pc )}

Ok: line 390 is the NPC response. After that, the even numbers are for Intelligent PC responses (note the 8) and the odd numbers are for Dumb PCs (note the -7), except for the last line (399) which is a common 'cut the crap lets just attack' response. There are attack options in the first lines (391-392) too, but it is not obvious that combat will immediatley ensue: if the player chooses this in an attempt to bluff the baddies, he or she will get a shock!

Depending on the circumstances, these may be the only ones that show up, as they are 'unconditional' (the brackets after the Int value '1' are empty), so the players will always have the option of fighting their way out.

Getting ahead of ourselves slightly: you may remember I just said that the last brackets for the PC are the same as for the NPC, they are for a command to be executed. Here, the command is 'npc.attack(pc)'. I won't bother explaining what that does! But note this is one of those that can only be executed from the player's reply, since it terminates the dialogue mode. Anything that terminates the dialogue can only be initiated from the player's reply, since if it was done by the NPC, you would not see their comment, it would flash up and terminate simultaneously.

Now, the conditions: we get a smart PC and dumb PC version of each, and they are;

pc.skill_level_get(npc, skill_bluff) >= 10

pc.skill_level_get(npc, skill_intimidate) >= 10

pc.skill_level_get(npc, skill_diplomacy) >= 10

The command 'get' tells the game to fetch the value at a certain point: it might be a critter flag (different to the global flags we just saw) or an attribute or check for a feat or a class or a gender, or other things. Here, it is checking the different skills. If the PC has a skill level equak to or greater than 10 in any of these, that option would appear. Hence if they have greater than 10 in all 3, all 3 will be given. On the screen, for a smart PC that would look like this:

Brigand leader: You lie! Lareth was many things, but not a coward. You will die for your insolence!

1. I think not. We crushed Lareth with ease. And now we will crush you and your band of paltry scum.

2. I never said Lareth was a coward. He is waiting for us back at our hideout. Let me go get him.

3. Look you moron, Lareth is a friend of ours and he is going to be pretty damn angry with your behavior.

4. Relax, friend. Lareth is our friend. I'll go get him and we can sort this all out. No problem here.

5. [attack]

Obviously there will also be the different colours and the little icons to show you are using a skill.

Conditional statements, as Phalzyr says, can have operands such as == (exclusively equal), >= (greater than or equal), <= (less than or equal), > (greater than), < (less than), != (not equal).

Finally, there is the only set of brackets we have not looked at yet - line number. This is straightforward: if the player chooses this reply, then it will go to the line number in this (second last) bracket. In the examples above, it will go to a different line number depending on the skill used, as the Brigand leader reacts differently to each conversational gambit the player attempts. But the line number will be the same for both smart and dumb PCs: that is not essential btw (you could have both smart- or dumb-specific dialogue) but it is normally the case. The line number must of course be an NPC comment, not a PC reply line, or the dialogue will terminate abruptly. A line number of '0' terminates the dialogue, whether because you are saying goodbye, entering combat, teleporting to a different location, the NPC is running off, you are moving to the barter screen or for whatever reason.

Well... that was a mouthful! And we never did write any dialogue :( We never even got to find out what the {G:} means! That's for next time. For your homework, have a look at the template, and look at some .dlg files in the game: note that they will
ALWAYS conform to this pattern described, no matter what the content, ALWAYS ALWAYS ALWAYS.

To go straight to the next chapter, click [THIS].

Wednesday, August 17, 2005

Writing Dialogue for ToEE part 1

Ok, firstly what do we need? Well, some templates will be handy! So I have made a couple. Download them here.

These can both be opened in Notepad. But we have other things to download first. For starters you will need Phalzyr's 'Proto-Ed'. It can be found here

This is useful for viewing dlg files and essential for adding any new characters you want to use the dialogue files. Well, not essential, you can do both these things in ToEE World Builder as well. But it is a very different tool. Download that too! The latest version is at the last location, or try the thread that accompanies it: here

Once you are comfortable using these tools, you will instictively recognise when one is preferable to the other for certain tasks. One more thing to 'download', and thats a thread from the great man Phalzyr himself, where he lists many of the things that can be found in dialogue and script files: find the thread here.

This tutorial will build on that thread and explain step-by-step how to incorporate the things found in it and the pitfalls that may be encountered.

Now, lets have a quick look at the template files. Notice that the names, 00275DEMO.dlg and py00275DEMO.py are (from the perspective we are concerned with) IDENTICAL. Both are '00275DEMO'. Thats our first lesson, ALWAYS name them the same! Don't think an identical number is enough, I learnt that the hard way when I had a couple of files called 00291tennant.dlg and py00291tenant.py. That one little typo cost me MANY hours of headaches!!!

What do they mean? Well, the .dlg file contains all the dialogue, and the .py file (short for .python) contains the scripts that control things like dialogue :-) It also controls other things which we will examine when the time comes. For now, there is only one script in our template, so lets pop it open. Open it in Notepad (you could also use Notepad++ or another text editor, Agetian also recommends something, try here. For now I will assume you are using Notepad because everyone has it - using other's will simply make all this easier).

You will see the following:

from toee import *

def san_dialog( attachee, triggerer ):
_____________triggerer.begin_dialog( attachee, 1 )
_____________return SKIP_DEFAULT

If you have Proto-Ed, start this too. Open the game's protos.tab (if this is the first time you have ever done it, it is found in Atari/Temple of Elemental Evil/Data/Rules). You can fiddle with this all you like, just DON'T HIT SAVE!!! When you are confortable changing things and saving, make SURE you back it up. This is probably the most fundamental file in the game (well this and temple.dll. And the .dat files ;-))

In the protos.tab, go DOWN to the 14000's - behold, the prototypes of the NPCs! Now go ACROSS to col 277. Here onwards are the script file references for each character. The dialogue script pointer is in the that first col, 277 (its marked 'san_dialog'). You'll notice that this phrase is the same as in the py00275DEMO.py file we just opened.

What does it mean? It means that for whichever NPC whose prototype we assign that value 00275 for (in that column 277) it will go to THAT file 'py00275' to look for the dialogue script. It will ALSO automatically use the asscoiated dialogue file '00275'.

So... when you want to use these template files, you will: save them in the appropriate folders, put 00275 0 0 0 0 in the san_dialog column of the character whom you want to use this dialogue, and THATS IT! Not too hard, is it? Still with us? (Ignore those zeros, they are for parameters not used in dialogue stuff).

Lets reconsider the issue of why 2 files. Again, the dialogue goes in the dlg file. The .py file contains the script that controls how the game accesses that dialogue file. It can be written in such a way that the dialogue starts in different places for different circumstances. Also, the .py file (again) can control other things. Have a look at the names of the other columns in the protos.tab: san_dying, San_enter_combat, san_resurrect etc. What these mean is that when an NPC goes into combat, or dies, or is resurrected, the game goes to its prototype (recorded in protos.tab) and checks to see if there is a specific file to go to: if so, it goes to that file and executes the script in it.

So, when you click on an NPC to talk to them, the game goes to that NPC's prototype, goes along to column 277, and finds what script to execute. Lets imagine it has found '00275'. It will go to file py00275.py and execute the san_dialog script. Lets have a second look at that:

def san_dialog( attachee, triggerer ):
_____________triggerer.begin_dialog( attachee, 1 )
_____________return SKIP_DEFAULT

This is as straightforward as a script gets in the game, but probably looks like gibberish. Lets look carefully at each element (note that this is a 'how to write dialogues for ToEE' tutorial, not a 'how to be a Python scripting expert' tutorial. Its to tell you how to do stuff, not an explanation of the mechanics of Python - Python experts might be aghast by all this, but I am keeping it simple!)

Firstly, the parameters: attachee and triggerer.

Attachee in this case is the NPC. Think of it as whoever the script is attached to. Simple.

Triggerer is whoever has done something to trigger the script. In this case (and in many others) it is the player. You have clicked on the NPC, triggering this script as the game decides how the NPC should react.

So, the first line: triggerer.begin_dialog( attachee, 1 ). This tells the triggerer (the player) to go into dialogue mode: the little window comes up, the screen centres on the speaking character etc. Importantly, it tells the triggerer (the player) to go into dialogue mode with the NPC (the attachee, the 'owner' of the script) and most importantly TO START AT LINE 1. Obviously, more complicated scripts can have the dialogue start at other lines depending on the circumstances.

The next line: attachee.turn_towards(triggerer) Simple enough: it turns the NPC (the attachee) to face the player (triggerer). Always try to include this in your script, the game doesn't have it consistently and it is a bit disconcerting to have people facing the back wall when they talk to u. Another one of those things that drags you out of the game-playing moment.

Final line: return. That tells the game the script is finished, carry on, and skip the default bit (to see a default in action, click on one of the pirates wandering around Nulb).

Soooo... lets recap. Click on NPC in game, game goes to the file associated with that NPC's prototype, and executes the script there, telling it (in this case) to turn the NPC toward the PC and start dialogue from the first line in the dialogue file.

Lets leave it there. Next time, we actually get to write some dialogue! To go straight there, click [THIS].

Tuesday, August 16, 2005

New PC Voices Tutorial

Firstly, let me say the new patch is imminent! Just a few things to take care of online before I change drives and finish testing.

So while I am here, I am going to post my step-by-step on adding new PC voices. I want to post all my tutorials up on here, then create an index post and bookmark it on ths side banner so people can quickly access these things.

If you like my tutorials, feel free to check out my ads ;-)

So without further ado...

There are only 2 files you have to alter as far as I can tell to create new PC voices (though I am still keeping an eye out for others to see if i can fiddle with volume, reverb etc: but these two certainly do the job). These files are both called 'pcvoice.mes', one is in the rules folder, one in the mes folder, and both can be found in ToEE3.dat.

Crack them open! (Notepad will do, 'tools' are for sissies.) In the file from the mes folder we have the familiar names of the current PC voices, "righteous warrior", "zealous healer", "raspy", "gruff" etc. The numbers stop at 21 (or in the 50's if you have my new voices pack ;-)) but you can include up to number 63 if you want: with the instructions at the top about how the 2 pcvoice.mes files interact (the one points at the other), its an interesting indication that this was one area that was always intended to be modded. Hey Troika got something right! Imagine what might have been

Ok, so lets pretend we are adding an "ordinary bloke" voice (because I did). So, lets make him #23, we therefore add {23}{Ordinary bloke}

Thats what will show up on the creation screen. Now for the other pcvoice.mes file in the rule folder.

Open it up. Here we have bizarrely named things like:
Etc. You can probably figure out what they mean, the thing to notice is the male ones start with M and the female with F. Follow this. This is why we can't give our characters cross-gendered voices (c'mon, we've all thought of it...)

So, for our ordinary bloke, lets call him 'MBlokey.mes'. That will show up as
{23}{MBlokey.mes} The 23 part connects it to the previous file of course, but what is this MBlokey.mes thing?

Go back to the mes folder in ToEE3.dat and you should see a folder called pcvoice (anything to do with this exercise seems to be called pcvoice, you get that.} Open it up, and there are the files FHocFtr.mes, MDwfClr.mes etc. So of course we are going to add one called MBlokey.mes. To do this, simply copy one (lets copy MElfRgr.mes so we are both on the same page) and rename it MBlokey.mes.

Ok, open it and lets get on with the fun part. There are a number of different catagories:

// Acknowledging an order (saying yes)
// Unable to perform an action (saying no)
// Encumbered
// Death Cry
// Near Death
// Death of a party member
// Combat start
// Critical hit BY a party member
// Critical hit ON a party member
// Critical miss BY a party member
// Accidental damage
// Opening a chest with a lot of gold
// Entering a map for the first time by Area Number
// Encountering a boss monster
// Tagged scenery (special areas like Thrommel's room or the big bronze doors)
// Bored...zzz (whining when nothing is happening)
// Using the power of a deity (crying out to various Gods)

I list them all because as u can probably see, MOST do not ever appear in the game. "What a fabulous polished piece of software", you say. I agree, have a cookie. The only ones that do seem to appear regularly are saying yes, saying no, encumbrance, death gurgles, accidental damage, and opening a chest with lotsa treasure.

Why not the area ones? They work with NPC's after all... well, heres a fascinating thing. They DO appear here in the dlg files (thats what these are by the way: this stuff will show up on the screen if you switch on subtitles) but there are NO corresponding MP3s in the sound folders! Why not? I'm glad you asked.

I have added appropriate mp3s to 'ordinary bloke' and the others - I mean they are not exact, but if u have an mp3 that plays "what a nice forest" u don't need to be a member of Mensa to figure out it plays better in the deklo grove than the fire node. However, when I play-tested these, they were very erratic: the moathouse ones played the mp3 for Hommlet as often as for the moathouse, the Emridy Meadows didn't play at all, the Ogre cave mp3 played when I went into the traders establishment, and I forget what played when I went up onto the second floor of the Wench but since nothing should have, you get the picture. Anyway, I have left them in since it is easy to 'turn them off', just recruit an NPC and they will trump the party vocals as they normally do. Also, I or someone more knowledgable may be able to fix the whole thing at a later date and it will be good to have them there.

Hopefully a fix will present itself, but I have to say, the erraticness of the playing combined with the lack of mp3 files in the PC's folders for this stuff (they stop at the 1100's) suggest to me Troika couldn't get this working at all due to time constraints and scrapped it. Ho hum. Not something a n00b hacker like myself is going to be able to fix in any hurry.

Back to the 'fun part'. Keep MBlokey.mes open, and then get out your new sound files you want to put in. Doesn't matter if they r .wav or .mp3, if they are .wav we can convert them later. You want to put them all in a folder named, u guessed it, 23. This goes in Temple of Elemental Evil\data\sound\Speech\pcvoice, so in the end you will be working in a folder called:
Temple of Elemental Evil\data\sound\Speech\pcvoice\23

Put all your .wav or .mp3 files in there. (If you want to work on them seperately then convert them and stick them in there later, its not a problem). Now the fun begins: and this is fun, but its also dull and tedious. A bit like sex: lots of fun but goes on and on and on... well at least for me ;-). Probably if there was someone else there with me it would be different lol.

Take your first file. Play it. Check MBlokey.mes. Find somewhere it matches. If it is complaining about encumbrance, it goes in the 200's, if it is just agreeing with you, put it at 0 or 1, if it is saying how they don't like deep dungeons, perhaps 1214 is the go.

Now... change the dialogue of the line number to match what you hear. Then rename the file to match the line number exactly.

Example: my Ordinary bloke has a file where he eulogises a fallen comrade with a mangling of Hamlet. So, lets put that at 500. Change the dialogue line and it will now look like this:

{500}{Alas, poor... hmmm, I didn't really know you.}

Then we change the mp3 file to match: we rename it 500.mp3.

Its that easy.

Then we do it with ALL the mp3 files.

If you have lines left over at the end, extras you have not replaced, best to delete them (if they are in the 0-1100 range). For instance, you may notice there are 5 seperate options for encumbrance (200-204). If you only had one mp3 complaining about encumbrance, stick it in at 200 obviously and then delete the rest. Otherwise, the engine will pick one of these 5 lines randomly, and if its not 200, then nothing will sound (it won't crash or anything but nothing will happen, which sorta defeats the purpose).

Ok, so go through and do that to all the lines. Dull, init?

All that remains now is to convert the .wavs to .mp3 if necessary, and then store the other files in the game itself.

The pcvoice.mes from the mes file goes in Temple of Elemental Evil\data\mes. Also in here should be the pcvoice folder (Temple of Elemental Evil\data\mes\pcvoice) in which to put mblokey.mes. And finally the pcvoice.mes file from the rules folder of course goes in Temple of Elemental Evil\data\rules. These folders should already exist if you have the Co8 patches (but create them if u have to). Folder 23 should already have been created by u since we were working in it: Temple of Elemental Evil\data\sound\Speech\pcvoice\23, remember?

That's that! Remember to download my voices, then put yours after them (u will d/l mine won't u???)

Friday, August 12, 2005

Hidden gems

Firstly, let me say the 3rd patch is up! It is available at Co8, here!! As with the others it fixes a couple little nigglies (needs an additional file download from pg 6)and adds some new content, a fully voiced extra bit in Mother Screng's dlg so you can buy Cujo's magical tattoo's from her. Price, 15 large.

Now, today's rant... I could rant for HOURS about that damn gnoll encounter in the moathouse, I swear they use a set of d40's for the gnolls and d5's for the PC's... but this rant will be far more pleasant :-)

The following is a series of lines from ToEE dlg files that I have come across that you may not have noticed in the game. Or perhaps you have. Many are from the 'stupid NPC' reponse which generally doesn't get used, since you tend to have social skills based on INT and therefore keep your Rogue / Bard talker quite smart. The 'stupid PC' responses are almost always played for laughs one way or another, often would leave you not knowing what was actually being referred to if it was all you relied on (being full of "Leave It To Beaver"-esque mispronunciations, such as always calling Elmo 'Elbow') and on more than one occasion spawns its own series of dialogue thread that ends up with an exasperated NPC having a negative reaction adjustment to something the stupid PC says. The writer doubtless had a lot of fun creating these, but most will never see the light of day in the ordinary person's game.

Here's an example, involving Myella (the church serving woman in the basement of St Cuthbert's) and the flour quest.

PC: You still need pretty flowers?
Myella: Not flowers, you dumb ox. I need flour, you know, for baking?
PC: You bake flowers?
Myella: [She sighs] Look, if you want to help, go to the Miller and say "Calmert would like you to donate flour for church baking needs". OK? Repeat it back to me.
PC: Calmert wants you for his aching needs? // [Lines like this put Bertram in perspective!]
Myella: [She stomps her foot] No, no, no. Tell him Calmert expects a donation!
PC: Calmert expectorated a donut?
Myella: [She throws her hands in the air] Go tell him anything you want! Just go!

I have pulled out a few lines here and there to give a sample. Others are simply obscure lines that made me sit up when I saw them.

"Me give you a golden shower if you want." (Mandy)

PC: What here?
Labourer: Here is where we camp. We are building the castle for Burne and Rufus.
PC: What, here?
Labourer: No, not here, dummy. Across the road here. [points at the tower] Right next to this tower.
PC: [sniffs under arm] Yes, me go take shower.

Y'Dey: Hehehe. But not as old as you think, sonny.
PC: No, you old. You almost dead, I think.
Y'Dey: Now if I didn't hear the wind a-whistlin' between your ears, I'd think you were being rude to Mother Screng. But you are right, sonny. My best days are behind me.
PC: Haha! Me right. You gonna die soon!
Y'Dey: Look, my mentally challenged little friend! [pulls back hood and rubs away some of the wrinkles]. I am under cover here. Now don't blow it for me. Begone!
PC: [looking around] Me not under covers. Where covers? Me not see bed.
Y'Dey: Exactly as I thought. Now run along, sonny. Play time is almost over.
PC: Yay! Play time. Me go play now!

"Oh my! You must be happy to see me because I can clearly see that is no concealed weapon!" (Sunom - and along a similar line...)
"Excuse me, sir, but your...um...banana and berries are showing, if you catch my drift."

And the final word goes to category.mes:

Wednesday, August 10, 2005

What makes a good game plot?

I was planning on publishing this here (its a bit of a rant I had on the Atari forums a while back) and since the issue came up today at Co8, here it is :-) Ted's theories on what makes a good game plot (and where ToEE let us down).

To me, a good plot is genuinely interactive. For instance, while there were all sorts of little stories in Hommlet, they mostly came down to "take object A from character B to character C, get 100Xp". They mockingly got labeled 'fed-ex quests' and very few ever felt like you were really achieving anything in the grander scheme of things in the Greyhawk world. I would call it an example of a mediocre plot (in the sense of interaction I am talking about).

Examples of bad plotting, interaction-wise, would i guess be most RTS games. StarCraft for instance had this whole convoluted plot about Alien-ripoff beasties attacking humanity (or something) but in the end, whatever the plot of each scenario, the situation was one of two things - either escape with a finite number of units, or build a base, defend it, build units and crush the enemy. The plot was irrelevant to the actual gameplay. In a game like AoE, which I enjoyed, maybe u don't mind so much, and if the final scenario is tough enough you feel some minor exultation when the closing cut-scene rolls, but as far as StarCraft went, I twice tried to play it through and both times gave up during the Protoss section - i just DIDN'T CARE. "O look, i have to build a base, defend it against a few attacks then crush the enemy...didn't I just do this five minutes ago?" I mean, u may as well be playing a random encounter / scenario as playing the campaign, there is in effect no difference.

An example of good plotting is my perennial favourite Ultima V. As you wandered around talking to people and picking up clues, you found stuff that opened up other areas of the game. Finishing a quest to find a sextant, or a grappling hook, or learning to play the harpsichord :D all had major effects on the way the game played - BUT there was very little linearity to it, you could just as easily ignore these elements and just wander round beating up monsters and raising your XP.

Did ToEE have any good plot elements? Well, one does come to mind: the gold skull. It got more powerful and useful as you went further along the quest (as you stuck gems in and such) and destroying it had a real impact on the ending of the game (never tried playing the ending without destroying the skull, don't want to!)

Anyways, thats my $0.02 on what makes a good game.

Tuesday, August 09, 2005

A useful rant...

... finally!

Something About Mary 2.0 is out now. I have figured out (thanks to Agetian/Dulcaion) why just adding an inventory to an existing character does nothing. Inventories have to be attached directly to .mobs.

And you can't edit the existing .mobs of NPCs - even the simple ones of the gals in the Snake Pit, which are surely the simplest NPC .mobs in the game - because ToEEWB won't open things it can't understand (very sensible), and there are still things in the .mobs that haven't been figured out. (Because they actually refer to Arcanum? That'd be depressing!)

So how did I do it? Well, at first I powered up the Hex Editor - ahh, how good it felt to be doing some proper hacking!!! - but that was too long winded. So I did something much simpler.

First, I copied over the gals into the modules folder of ToEEWB, then tried to open them. They wouldn't, BUT the start of the .mob did load, so all the relevant stuff was in there - X and Y locations, offsets, rotation etc - and when I clicked 'new (mob)', they wre still there! The X & Y were already in and I only had to select what I wanted (practising the KISS principle again - at one point I tried to include all the little fiddly ones like render height etc, but the gals involved, the twins, didn't spawn properly. They were there but their models weren't, they were just empty circles on the ground).

So, I made my new ladies with attached gear. As you know, the names of the .mob files are based on their guids, and these are used for internal communication (ie .mob of NPC links with .mobs of their inventory items). So you can't just fiddle with the guids.

BUT you can happily fiddle the names of the files. So all I had to do was change the name of the .mob file to match the existing one. The internal guids were unchanged (different) and still happily linked to the .mobs of the inventory items. But the program will now read the new .mob file, with linked inventory, in place of the existing one.

Easy! And also possibly aleady explained in the tutorial section of ToEEWB, I haven't read it that closely ;). Yet another thing on my to-do list! Damn this is a great tool.

Passing time

Here's some silliness til I have time for a proper blog. Gave me a shock, since I am very pale and have always had nicknames like 'albino' and 'snowman'. Yvy's was also spooky, since it is similar to a nickname I have for her (never mind what it was!)

My Porn Star Name is: Albino Kitty

Monday, August 08, 2005

While I'm waiting...

I'm waiting for an upload, may as well do a blog.

I had a good look at the Turuko issue today. If you have played the LE party, you may have noticed when you go to talk to Turuko about Fragarach, a large chunk of his dialogue does not vocalise - one minute you hear his voice, the next there is silence and you have to read it all.

Well, what can I say? The files are not mislabeled or pointing at the wrong lines or something (as happens with ToEE, though you may find it hard to believe ;-)) they are simply NOT THERE. Nothing I can do about it dagnabit. :-(

Oops, upload is in, I'm off!

Saturday, August 06, 2005

Second Patch is here!

Yup, I have released the 2nd patch, and people have tried the new content and it seems to be fine (though not what they expected ;-)). It is available at Co8, here!!

As well as what I said it would contain in the previous post, it also adds Cujo's new clothing items to Jinnerth the tailor's shop inventory, and adds some extra characters to the labour camp consistent with the module, nothing special, just a couple dogs who stand around (should I bother making them wander? We'll see). I tried adding a couple kids, they stood around until sundown, then CTD :-(

BUT as well as kids and stray dogs, the module said the labourers sometimes brought their wives, soooo, I added a new female character called Yvy! She is a tattoo artist and will tattoo you Cujo's new runes if you want. (No prizes for guessing who she is modeled on or why ;-))

Anyways, I think that is pretty much a stable release right there :-) I will leave it for a couple days for further feedback, (and to sort out the ToEEFE issue) then redo a complete upload of the mod. Atm, you have to d/l the mod PLUS the patch. (Just the one patch, it includes everything from the previous one).

Have fun!

Thursday, August 04, 2005

First patch

My mod is here!! You'll forgive me if I start every rant like that for a while ;-)

I would just like to announce to anyone who has not noticed, that there is a patch now for the mod, takes care of a few niggly things. Also, I had to upload a new .dll as I originally patched and included the wrong one in the mod (led to one bug problem and would have led to more). Sorry!

Atm, the second patch is awaiting me having the time and energy to do it. I am a mess atm, very sick and having a day off work (had to go in this morning despite being sick cause we had some very demanding kids and no extra staff to help - if I hadn't turned up, my partner would have been in real trouble). Its just a bad cold but its drained me and I feel crappy.

The second patch will have:

- new temple .dll
- couple dlg file fiddles (they work fine but don't say exactly what I want, and one has a typo).
- new item_creation.mes that includes a fiddle by Allyx.
- new guide that includes step-by-step details to install the mod as a seperate module in ToEE FrontEnd Professional.
- will be cumulative with the first patch (did I get that right? I mean, it will have everything that the first patch has).

Really, the temple.dll is the only essential thing if you are hanging out for it, and can be uploaded now from Co8 at the link for the mod above. So can Allyx's thing of course.

Wednesday, August 03, 2005

Lack of recent rants

For anyone who is wondering, I am not updating this for the moment til I have a completely stable Mod release, all my time is currently spent debugging. Not that the Mod itself was buggy, but the upload was a bit erratic (got confused with some other files I was including, my bad). My rants will be back within a few days. Meanwhile, try my mod! Currently has 1 patch and 2 extra files to upload as well, but they include extra content (new spells, thanks Darmagon). Available here!!