The Black Scourge of Candle Cove -- Tchos' development diary
#476
Posté 19 septembre 2012 - 10:02
#477
Posté 19 septembre 2012 - 10:40
anyway, will pull out the relevant scripts,
#478
Posté 20 septembre 2012 - 12:37
#479
Posté 21 septembre 2012 - 09:53
I really want to have this done before I start playing any other modules.
#480
Posté 24 septembre 2012 - 01:57
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".
Modifié par Tchos, 24 septembre 2012 - 03:57 .
#481
Posté 25 septembre 2012 - 11:20
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.
#482
Posté 26 septembre 2012 - 12:31
Tchos wrote...
.... But it doesn't involve teleporting your party into an ambush.
I like my conversations and cut scenes, one thing I did for certian battles that were in confined spaces I would have two nodes for the PC at the end of the convo. One would just start the battle with the PC at the head of the party (standerd engine behavior), the other would start the battle but jump the PC to the rear of the party. That way when the cutscene fire and pulled the PC to the trigger they wouldn't have to be in the front of the party taking the brunt of the damage at the start of the battle. I found if useful for casters and ranged-based PCs.
#483
Posté 26 septembre 2012 - 05:36
#484
Posté 26 septembre 2012 - 10:27
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.
#485
Posté 26 septembre 2012 - 10:31
#486
Posté 26 septembre 2012 - 10:51
#487
Posté 27 septembre 2012 - 02:57
Initiative in NWN2 boils down to who gets the first shot in combat. If you fail an initiative check, your attack is made as "passive", which means your opponent gets to attack first, and you have to wait until the next round to deal some damage.
#488
Posté 27 septembre 2012 - 03:07
#489
Posté 27 septembre 2012 - 11:58
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.
#490
Posté 28 septembre 2012 - 12:08
You create a dummy section of your area that the pc can't reach, that has the decor of where the npc not in the area actually is, and put a "conversation copy" of the npc that needs to speak in that area. So you refer to this conversation copy npc, instead of the actual one.Tchos wrote...
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.
#491
Posté 28 septembre 2012 - 12:25
#492
Posté 28 septembre 2012 - 12:30
Modifié par kamal_, 28 septembre 2012 - 12:31 .
#493
Posté 28 septembre 2012 - 01:57
#494
Posté 30 septembre 2012 - 09:54
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.
#495
Posté 02 octobre 2012 - 10:38
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.
#496
Posté 03 octobre 2012 - 01:26
#497
Posté 03 octobre 2012 - 01:35
The custom faction idea sounds like what I should be doing, but of course that's a whole new area for me, and I'm hesitant to research it at this point.
#498
Posté 03 octobre 2012 - 11:59
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.
#499
Posté 04 octobre 2012 - 12:16
#500
Posté 04 octobre 2012 - 12:22





Retour en haut




