Jump to content

The Black Scourge of Candle Cove -- Tchos' development diary


Tchos

Recommended Posts

Primarily troubleshooting today. I was hoping to have them all shot before posting today, but that hasn't happened. I'm dealing with non-working levers, spawn points, doors, and other placeables. And I have to stop for the day!

 

I really want to have this done before I start playing any other modules.

Link to comment
Share on other sites

  • Replies 254
  • Created
  • Last Reply

Top Posters In This Topic

P&P day means no work, as usual.

 

After digging through the scripts, and finding a redundant include to remove (another of the includes had the same file 2 levels deep), I found that the reason for the spawning failure in one of the cases was that I hadn't changed the creature's resref to match the tag, and I was trying to get it to spawn using the name in the tag. I don't know how I got it to work before with the creature in that state!

 

This wasn't the problem with the other spawns, and I'm not sure what's going on. I do have other waypoints with the same tag to spawn at, due to testing everything in Questland, but this script is supposed to spawn the creatures at each waypoint with the specified tag (and does so in other areas), so I don't see what the problem is there.

 

They mentioned one of my mods on the NWN Podcast, except they called me "Tycho" instead of "Tchos". Granted, it may not be obvious how it's supposed to be pronounced, but there is no missing vowel in my writing. There's no English word that rhymes with my name, but it's similar to the German word "Tschüss!" (audio pronunciation available in link), except with a long "o" instead of an "ü". Or similar to the English word "chose", except with a hard "ss" at the end instead of a "zz".

Link to comment
Share on other sites

Maintaining a "groove" is tricky. Most recently, I failed to make significant progress because I had been playing Rochard thanks to the Humble Indie Bundle 6. Fortunately, it's a short game, and I quickly finished it. Its replay value seems low, and I've uninstalled it.

 

Resuming work on this, I had to figure out what I had been trying to do.

 

The problem with one of the other spawns was that the blueprint's resource name had a 0 appended to it (which happens whenever you duplicate a blueprint), and the spawn script uses the name in that field, and not the one called template resref. That's very confusing, because the script specifically uses the word "resref" to refer to what it's looking for! I always try to keep all of those fields identical to avoid problems like this, but in this case I missed that the name had changed.

 

Now, what the hell is wrong with the other spawn script? It's supposed to spawn three creatures at three separate waypoints, and it's only spawning one.

 

Okay, after several hours of troubleshooting, I found that the other two weren't spawning because their waypoints were in non-walkable areas. Again, it was a simple oversight. I had thought that those areas were walkable.

 

After that I dirtied up the texture and set a door to plot to avoid breaking the game, and also made it work. Next up: conversation! What I'm doing here may contradict something I said earlier about not wanting the player to ever be forced into conversation. But that's not entirely true. If someone knows you're there and hails you, then you need to have the opportunity to respond, even if that opportunity is just to wordlessly attack. But it doesn't involve teleporting your party into an ambush.

Link to comment
Share on other sites

I worked on the confrontation dialogue today, and searched through the forums and SoZ for some code.

 

I was trying to find some way to give the player an advantage in a fight under certain conditions. SoZ encounters are supposed to do this. If you're accosted by a wandering monster on the overland map, there's often an option to use Intimidate or Bluff to lower the defenses of the creatures in the encounter. I looked over the script, and I can't see what it's doing in that case, if it's doing anything at all. What I want to do is give the player some kind of bonus initiative, though I must admit I don't even understand how initiative is supposed to work in a non-turn-based game. The point is, if you choose to attack unexpectedly, you should get the first shot.

 

This isn't a necessary thing, I suppose, but it would certainly be nice to have.

Link to comment
Share on other sites

Hmm... Here's a question. If I want a conversation to involve multiple NPCs, how do I specify the speaker and listener if they're not actually in the area at the time that I'm writing the conversation? They will be spawned through a script when an event takes place. Usually I specify speaker and listener via the dropdown list in those fields, selecting them from their placed instance in the area.

 

Perhaps it doesn't matter if they don't actually exist yet, and I can just enter their names in the speaker and listener fields, since the conversation only fires after they've been spawned for a while. I'll test this.

Link to comment
Share on other sites

3 days without an update... Granted, one of those days was a P&P day, but that's still not good.

 

Another thing about my dialogue, which some may enjoy and others may not, is that I'm using a lot of narration in it, à la Planescape: Torment. The narration may set the stage in a conversation, describe the character who's speaking, and mention gestures, expressions, and changes of tone. Such narration is differentiated from the spoken dialogue by being italicised in light blue.

 

My current work is still on the conversation with the main boss. I'm using a case switch script as a control for all actions throughout this conversation, as I saw used in a script in the OC, which is more convenient. Rather than setting several generic scripts on individual conversation nodes, some of which are redundant, this script accepts an integer that's used for the switch, which executes the actions and any necessary delays. This is new to me, and the first time I'm using something like this, but probably not new to many readers.

 

I also have an ipoint in the scene, just in case, though I'm not sure it's actually necessary.

Link to comment
Share on other sites

Setting up all these character actions really is tiresome. It's taking a long time, and I'm not enjoying it. I like small utility scripts, that I can use in other places, not big, unwieldy scripts that only work in one place, to control a creature or group of creatures.

 

I had to move actions around into different scripts because some things had to be set up before the conversation took place, so they couldn't be in the conversation script. But since they weren't in the conversation script, I couldn't directly execute a script with a parameter. Well, there's the command ExecuteScriptEnhanced(), which seems to be some kind of workaround, but it doesn't provide any documentation on how to use it beyond its syntax. It looks like it might work by setting a local variable on the object that's going to run the script, containing the parameter you want to use, which is how I've gotten around this limitation before, but one of the associated commands claims that these parameters are cleared whenever the module is reloaded, so that's probably not how it's doing it. Not really important, though.

 

I tried using some of the "group" scripts in this case to make things easier, but it doesn't really make things easier for me. If it remembered the groups and their members between functions and script executions, that would be one thing, but it doesn't, so I have to re-add the members to the group each time I want to make something happen. Since I don't really need formations in this case, I just used a loop.

 

I also spent some time working on giving the sea hag the special abilities sea hags are supposed to have. There's no "Horrific Appearance" aura or "Evil Eye" gaze in the toolset that I could find, and I couldn't find any information on how to script one, but I did find a monster pack by Wild Bill which includes a sea hag. I examined it to see how he did it, and his solution was to give her a Death Gaze and Daze Gaze to approximate her Evil Eye, and an Ability Drain Strength Pulse to approximate the Horrific Appearance. That doesn't seem to be quite how the abilities are described, but I'll go with it. Evil Eye is save vs death, and if you make your fortitude save, you're still catatonic and out of the fight unless someone casts Remove Curse on you, so putting it into two separate gazes is troublesome. Likewise, Horrific Appearance is supposed to be limited such that anyone who makes their save can't be affected again, but those who fail the fort save lose 2d8 STR.

Link to comment
Share on other sites

Something's wrong, and I'm growing weary. The creatures aren't spawning, and now the AI of the earlier-working boss is no longer working. Now he just stands there and allows himself to be killed. He wasn't changed, and neither were his scripts. The barricaded door from level 1 of the lighthouse stopped working.

 

I got the spawns working by, again, moving code to another location, outside of the conversation script. It's actually in a better place now, and less prone to unforeseen consequences.

 

I added debug code to send chat messages at every stage of the faulty scripts to see what's wrong, and none of the messages showed up. So it must not be registering the oPC definition. That would not only prevent the debug messages from showing up, but also stop the conversation from firing.

 

For the On Client Enter code, I changed it to GetFirstEnteringPC().

 

For the malfunctioning boss, I removed the generic master variable I had placed on him, in case that had anything to do with his change. I don't remember if I added that before or after it was functioning normally.

 

I checked the barricaded door, and didn't see anything wrong with the trigger, conversation, or placeables. But the tag was duplicated on another door when I made level 2, and the tag was used in setting and checking a local variable. I changed the tag of the other door.

 

In the next test, the debug messages started appearing properly, so that worked.

 

Going inside and checking the barricade, I found that problem was fixed as well.

 

The AI on the boss was not fixed, except that now he doesn't just stand there. But he doesn't do any of the special actions that he successfully did before. And the DM text box didn't pop up this time. This used to be a great, dynamic fight! What could have happened to it? Why would it just stop working? This is extremely demoralising. I'm seriously losing heart.

 

Elsewhere, the conversation failed to start, but since the debug text worked this time, I can see that it's failing on the quest stage condition.

 

Back to working on it. I checked my syntax, since I'm still not that familiar with comparisons in raw code. The syntax was correct, but I was checking for the wrong quest stage number. Should have been 30, not 35.

 

I changed the PC definition in the other On Client Enter script to GetFirstEnteringPC() too. It worked before with a different method, but it definitely wasn't working this time, including with the debug text.

 

I changed a few things in the boss AI code, but I doubt it's going to help.

 

It helped. In the next test, I found that somehow, whatever I did fixed the boss' AI. I don't know what it was.

 

 

The DM text box and debug text worked, too. And later, the conversation started up, too, when it was supposed to. But I found I shouldn't have used the command SetCutsceneMode(). It prevents the player from using the camera, and I don't want that to happen. Especially since it makes the player look at the inside of the placeable they're standing in front of for the whole conversation.

 

The conversation aborted on a particular line unintentionally. On checking the conversation file, I found that the line was set for the "listener" to be the waypoint where the NPC should spawn, not the NPC itself. That probably would have been okay anyway, except that I had renamed those waypoints, so the waypoint didn't actually exist.

 

So, although there are still some problems, I'm at least partially recovering from the despair and exhaustion that was building up here.

 

 

 

Link to comment
Share on other sites

I'm still working through all of the problems that showed up when I scripted this encounter, because there were a lot of them, and I wasn't even able to test some of them until I got the earlier ones working. Most recently, I have an enemy set to flee. She does start fleeing, except I think I should not have set her to the Commoner faction while she runs, because this causes the other enemies to start attacking her, which interrupts her flight and brings things to a stop again.

 

I used the function ActionForceMoveToTag() (which is a wrapper of ActionForceMoveToObject()), and since it has the word "force" in there, I thought it wouldn't be possible to interrupt this action. I can't use ForceExit() in this spot because I don't want her to disappear when she gets to the tag.

 

I'll try just keeping her in the hostile faction, and also try to set her AI to ignore combat, and see if that works.

 

Her flight is actually part of a sequence of events that the player might not even see, because the party will be busy fighting, but there is text to alert you what's going on, nonetheless.

Link to comment
Share on other sites

Undesired behaviour: Some walls can still apparently be seen through, at least at seams or edges, because party members are abruptly buffing themselves and monsters are bashing their way through my trapped, locked doors to get to my party once a certain angle is reached. Possibly there's some small seam in there that I missed.

 

I was just going through the game's default sound files to find a suitable one for resting in the tavern (found a few), and there are a few that I had heard before in-game, but had misinterpreted. What I thought was a woman saying "That's some good mead!" and laughing drunkenly sounds more like she's saying "That's a codpiece?!" and laughing drunkenly now that I can hear it isolated from the other sounds. Especially since the filename has the word "lewd" in it. Very different atmosphere!

 

Another has a drunken man saying, "There once was a girl from Baldur's Gate..." before he and the crowd dissolves into laughter. Hmm...

 

Also found a couple that would be useful for the waitress in the tavern, and for the patrons watching the entertainment.

 

Prostitutes, both male and female, of the street-corner variety, also appear in there. Not useful for what I'm doing here, but I thought it was considerate of them to provide both options. I'm not sure how many, if any, of these files are new to NWN2, since I heard many of them in NWN1 as well. I did a little search, and found this list of the sound files in NWN1 with descriptions, and I'd be interested to know which of the NWN2 sounds aren't on that list.

 

Sounds really add a lot to a game, and I try to use them wherever they're appropriate, but looking through the lists actually suggests sounds I hadn't thought of, or didn't know were available. Especially since not all of these are in the toolset as sound objects.

 

Note that I'm referring to ambient sounds adding a lot to the game, and not voice acting of dialogue. As I've expressed before, I strongly oppose the use of voice acting for dialogue in these games, and I will never use it in my modules. I have to mention this in a little tangent here because Mr Gaider said something today in another thread which angered me -- claiming that I wouldn't actually like the next Dragon Age game if it were to reverse the despised (by me) addition in DA2 of the voiced protagonist, because I couldn't have thought about what it would be like (I obviously must not have played and enjoyed Dragon Age: Origins or NWN2). User Amycus expressed some arguments that I agree with, and provided a helpful illustration for certain aspects of the issue, so I don't think I need to get into it again. And, since I've essentially dismissed those upcoming games entirely in the light of games now being made by studios with a better design philosophy, it no longer concerns me.

 

Now, for my next go-through I removed the ipoint I had placed in the area to control the NPC movements and actions, because I don't want its heartbeat to be running throughout the whole game. Now I have it spawning along with the rest of the group at that time, and it'll destroy itself when it's done, like the other ones I used.

 

I've never learned to use that debug mode that gets you all the "PrettyDebug" messages. How do you activate that in the game? In the meantime, I had been using SendMessageToPC(), but it was awkward for scripts that had no other reason to define the PC. It occurred to me now just to use SpeakString, since it doesn't require a PC, with the TALKVOLUME set to "shout", because that puts the message in the chat box even if you're not in the area. I used it so that when the ipoint spawned, it let me know that it spawned successfully.

 

Speaking of spawning, I like the functions in ginc_object for that. Those functions simplify things a lot.

 

I wrote a pair of functions, based on two I found that did something else to a group (can't remember what it was). One scans through an area and turns all hostile creatures in that area to Commoners, with a variable marking them as having previously been hostile. Its sister function scans the area for anyone with that mark, and turns them hostile again. I use this to suspend the hostility of the group of enemies that have decided to have a chat before attacking. The only similar function I found was the HideHostileCreatures() function, but that would not only prevent the attacking, but also make them invisible, which I didn't want. The player should be able to see all of the enemy's forces before the fight in this case.

 

Strangely, in my next test, the fleeing enemy was the only one that didn't switch factions, so she got beaten up by her allies again, like last time. I thought maybe it didn't work on the creature used in the function to specify which area to scan, then, but in fact the reason was that I had set her to the Commoner faction in her blueprint, so the function wasn't changing her, and thus not marking her as needing to be changed back. This is fixable by just making her hostile in her blueprint.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...