Aller au contenu

Photo

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


  • Veuillez vous connecter pour répondre
1056 réponses à ce sujet

#476
Tchos

Tchos
  • Members
  • 5 086 messages
So that's X-Com, eh? I'd heard of it, but never saw any footage or screenshots of it.

#477
kevL

kevL
  • Members
  • 4 078 messages
it plays in DOSBox (unless it's a windows version) which has built-in video capture, so there's lots of LP's on uTube. Careful what yer watching tho: most of the LPs haven't fixed the difficulty bug .... (so they're actually playing on beginner)

anyway, will pull out the relevant scripts,

#478
kevL

kevL
  • Members
  • 4 078 messages
PM inc

#479
Tchos

Tchos
  • Members
  • 5 086 messages
Primarily troubleshooting today (and backups). 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.

#480
Tchos

Tchos
  • Members
  • 5 086 messages
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".

Modifié par Tchos, 24 septembre 2012 - 03:57 .


#481
Tchos

Tchos
  • Members
  • 5 086 messages
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.

#482
Shaughn78

Shaughn78
  • Members
  • 637 messages

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
Tchos

Tchos
  • Members
  • 5 086 messages
I don't think I would ever use the kind of conversation that changes the formation of the party just before a fight. That robs the player of the ability to arrange things to their advantage, and/or forcing a stupid decision or surprise on a character who should know better or would not be surprised.

#484
Tchos

Tchos
  • Members
  • 5 086 messages
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.

#485
kamal_

kamal_
  • Members
  • 5 260 messages
I always figured it applied the effects to the creatures in the OnEnter of the encounter areas. Never looked though.

#486
Tchos

Tchos
  • Members
  • 5 086 messages
I've looked at one of the encounter areas, and the enter script only initiates combat with whatever's in the encounter. I don't see it doing any modification of the stats or AI.

#487
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
I know you like to do things by the books, but I would just apply a temporary effect to the monsters once spawned, like 30 seconds of decreased AC.

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
Tchos

Tchos
  • Members
  • 5 086 messages
Yes, or at least as by the books as is possible in this engine. I think the fact that it's not a turn-based system as the books are designed for means I have to do a little bending of the rules to get the effect I want here. I could do a temporary decrease of AC, or a 1-round delay between the time they go hostile and the time they take any action (if the player chooses the option that should take them by surprise). The former would probably be easier.

#489
Tchos

Tchos
  • Members
  • 5 086 messages
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.

#490
kamal_

kamal_
  • Members
  • 5 260 messages

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.

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.

#491
Tchos

Tchos
  • Members
  • 5 086 messages
I think you're thinking of a different situation than what's going on here. The PC is present, and the conversation involves the PC, as well as two NPCs. The conversation is attached to the first of the NPCs, but during the conversation between this NPC and the PC, she will also occasionally speak to the second NPC, and he will answer her. The only difference here in how I usually handle conversations, is that since they're being spawned, I can't select them from the area's dropdown list.

#492
kamal_

kamal_
  • Members
  • 5 260 messages
You can refer to them by tag in the speaker-listener, instead of selecting from drop downs.

Modifié par kamal_, 28 septembre 2012 - 12:31 .


#493
Tchos

Tchos
  • Members
  • 5 086 messages
Okay, that should work fine, then.

#494
Tchos

Tchos
  • Members
  • 5 086 messages
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.

#495
Tchos

Tchos
  • Members
  • 5 086 messages
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.

#496
Dann-J

Dann-J
  • Members
  • 3 161 messages
If you use a custom faction instead of a group, you won't have to re-add creatures every time (or you can use FactionToGroup to do so easily). Ginc_group contains a lot of very useful functions that allow you to do things to entire groups/ factions at once.

#497
Tchos

Tchos
  • Members
  • 5 086 messages
The group scripts I'm talking about are ones in that ginc_group include. I've used them in a different area's script to spawn a group in a particular formation and make them do something all at once, but here they weren't as useful.

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
Tchos

Tchos
  • Members
  • 5 086 messages
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.

#499
kamal_

kamal_
  • Members
  • 5 260 messages
I suspect GetFirstEnteringPC() isn't doing what you think it should be, since it sounds like that's what you changed.

#500
Tchos

Tchos
  • Members
  • 5 086 messages
I may have been unclear. GetFirstEnteringPC() is what made those things start working again, after they had stopped. Those work now.