The Black Scourge of Candle Cove -- Tchos' development diary
#501
Posté 04 octobre 2012 - 12:22
#502
Posté 04 octobre 2012 - 12:45
#503
Posté 04 octobre 2012 - 03:15
EDIT: Nevermind, I read better and now realize you found most of the problems.
Modifié par Lugaid of the Red Stripes, 04 octobre 2012 - 03:20 .
#504
Posté 04 octobre 2012 - 11:00
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.
I haven't tried that yet, so don't be shy about speaking up about whether I can expect it to work or not. Once she gets to that waypoint, I'm jumping her to another nearby one through a trigger to get past a break in the walkmesh, and then doing a force exit from there.
#505
Posté 05 octobre 2012 - 01:47
If I were trying to do all the blocking and choreography that you are, I would just make up my own pseudo-action queue to handle the movements. The actions themselves could be stored as local variables on the creature, maybe organized into a pseudo-array. Then you have a script that checks to see what the current action is, if that action has been completed or fulfilled, and then either repeats the action or moves on down the queue. The script could be fired from the heartbeat, or even from a pseudo-heartbeat to speed things up. It's a heavy-handed approach, but it bluntly overrules all the insanity of the AI system and the natural chaos of a battle scene.
It's more work than you originally set out for yourself, but if you can get the system working, then you can do a whole lot more of your choreography, with fewer headaches.
For my own work, I've ended up going through the standard AI and inserting my flags to prevent NPC's from responding to attacks or attacking any perceived enemy. It's like surgery with a hacksaw, but that seems to be what it takes to tame the AI. The default is just too much of a spaghettified mess.
#506
Posté 05 octobre 2012 - 04:28
I think after I've gotten this thing out the door, I'll prepare for my next module by first figuring out a stripped-down set of AI scripts for certain NPCs to have the bare minimum needed to speak to them and have them do what I want, without any of the default actions I don't want.
#507
Posté 05 octobre 2012 - 10:29
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.
#508
Posté 06 octobre 2012 - 09:04
There are a huge no of sound files to go throguh and with Kamal_'s project there will be a huge amount more. Lots on the iternet too.
PJ
#509
Posté 06 octobre 2012 - 09:19
#510
Guest_Iveforgotmypassword_*
Posté 06 octobre 2012 - 10:30
Guest_Iveforgotmypassword_*
You can set the doors to plot to stop the monsters smashing through them but it'll also stop the party. So you can use keys not subtle and a bit tedious but it works also so long as there's a rogue in the party just locking and plotting will do it.
Set all creatures perception ranges to the lowest possible and keep them back from doors.
Use spawns instead of placing.
With regards to talking PC's I'm not bothered and don't think too much about what people from bioware say as they make it up as they go along. I too gave up on them as a company just after I played Dragon Age 1 and got plot hammered with a dark ritual and realised that their story telling involved digging themselves into holes and forced drama, then I watched unsurprised as part 2 bombed and mass effect "alienated" its fans. At least we have a forum..
#511
Posté 06 octobre 2012 - 11:40
Tchos wrote...
True. I've added a few custom sounds myself, too. But in a couple of those cases, I think I could have used the sounds in the default game that I didn't know were there. This is a huge process of discovery, for all of these resources. Models, textures, scripts, sounds...
I find the keywords unituitive in many cases too. I spent hours on the interent trying to getting a good knocking on door sound, I nearly resorted to paying unitl I found it on a free site. I then found it in the toolset - the same sound file.
Another good place to go looking is old game. If you have it there are a lot od useful and accesible sound files in stronghold.
I have mixed feeling about sound dubbing. If it fits your perception of that character it can work very well however it so rarely does that it is a waste in my mind.
PJ
#512
Posté 06 octobre 2012 - 12:01
http://social.biowar...546943#12546943
#513
Posté 06 octobre 2012 - 05:10
1) Neutral faction that is neutral to every other faction, this may be useful for your fleeing NPC.
2)Enemy this faction is hostile to every faction, useful keeping a NPC hostile to the PC and making other hostile attack them too.
#514
Posté 06 octobre 2012 - 10:28
Well, their perception was already set to "short". Is that the shortest there is? There really is a "gap", though, even though the objects are slightly overlapping each other. I can walk a character from one side of the door to the other, and where the enemy is at first in total shadow, at one point during the walk past the door, he suddenly lights up before going dark again, indicating that there's a line of sight there. I'm experimenting with increasing the overlap, because I really don't want to move them back away from the door or turn them to face away from it, since they're supposed to be expecting the player in this particular case.
Is line of sight calculated solely from the two ground dimensions, or does height also matter? Can they see over ridges? Or if they're on a hill, can they see over a wall that would block line of site for those that aren't on the hill?
I know I should just ignore the irritating things they say about their grand vision for the future of RPGs...I try to avoid getting involved in those threads because it's clearly a lost cause for this company. But then we get people like this "Rock Paper Shotgun" article writer who throw the word "nostalgia" around as a means of saying "Your taste and preference isn't actually good. It's just your faulty memory." Never mind that we're talking about memories that started only 2 years ago in my case! The games in my sig really are that good. Argh. You see how it works me up?
PJ:
What was the name of that knocking file, if you recall? I can see where that would be useful, for any module where you don't just break into people's houses, but actually knock on the doors to speak to the people inside.
As for the character perceptions with regard to the player character, it's true that it might be okay if it happens to fit your idea for your character, and if you only play the game once. But if you play it more than once, with different character types, and yet the character sounds exactly the same? That's just scratching the surface, unfortunately...
Kamal:
I am interested in that sound project. I have a question about it, but I'll post it in that thread, where it might be more useful.
Shaughn:
I definitely do need to look into custom factions. It might not be as much of a task as I thought it would be, and it would probably be useful for handling those fights with neutral NPCs.
Modifié par Tchos, 06 octobre 2012 - 10:29 .
#515
Posté 06 octobre 2012 - 10:34
#516
Guest_Iveforgotmypassword_*
Posté 07 octobre 2012 - 10:21
Guest_Iveforgotmypassword_*
As for gaming "journalists" they go where the money is and if liking something means they get an early free copy and advertising money then that's what they like. IGN are a pretty shocking offender on that and although I'm sad about the vault's collapse had no intention of ever putting anything on there again due to their ethics. The real people to listen to are the players on forums if they're all screaming "rubbish" you can be pretty sure that no matter what the gaming press think they haven't got some higher functioning brain that can see the future and the amazing qualities of a game it really is rubbish. Avoid that sort of c**p at all costs and bury yourself in the toolset, buy games when they're already old, patched and/or game of the year versioned and ignore the "know it alls" that's my solution.
#517
Posté 07 octobre 2012 - 11:07
Should have found it sooner really but I did not
I either moved creatures further apart or limted the perception. I tried changing factions but I find the more scripts I do the greater the wind up it is at testing time ... as you are finding I think, though you are much more deft than I in these matters.
PJ
#518
Guest_Iveforgotmypassword_*
Posté 07 octobre 2012 - 07:27
Guest_Iveforgotmypassword_*
#519
Posté 07 octobre 2012 - 10:07
There's a tile variant in one of the tilesets (sunken ruins?) that has a collapsed area in the middle of it. The collapsed area gets clipped out of the walkmesh when you bake it, and is treated as blocking line-of-sight for hostile encounters. You can see the black shapes standing on the other side of the collapsed area, but any attempt to attack them with a ranged weapon causes the player to run around the non-walkable area to shoot them point-blank. Yet there are other tiles with unwalkable centres (like the deep square pit) that you can shoot across without a problem. It seems there's some flag that gets set in non-walkable walkmesh polygons that controls whether they block line-of-sight or not.
Perception isn't just based on vision though. A creature's listen skill can also trigger a response around corners, even through closed doors from an area that has yet to be revealed on the minimap. Giving your creatures listen skills of zero (or even negative values) might help to limit things just to line-of-sight.
#520
Posté 08 octobre 2012 - 12:22
Yes, as far as journalism goes, or PR direct from companies, a grain of salt is no longer sufficient, and I'm tired of hauling in as much bulk rock salt as it takes to swallow what they say. It's an effort to ignore all the threads, though. I started reading another 7-page one today, but had to close it, because the official responses regarding their actual design intentions were angering me again.
That's a very strange result you report about the caves and factions. I'm not sure I understand the layout you're describing, though. I do have some good results to share about what I was dealing with, today, but I'll get into that shortly.
As for sound previews, you can also get that filtered list and sound preview ability if you open the properties of a sound object, and click the button in the "Sounds" field to see the list of sounds. In the "Collection" dialog that pops up, which looks the same as the Variables list for local variables, either add a new sound or select an existing one, and a little dropdown button appears in the "Sound" field on the right pane.
However, there are so many spoken dialogue lines mixed in there, I don't find it convenient. Instead, I just extract the Sounds.zip (and X1 and X2) from the data folder. That doesn't include the spoken dialogue. I can then filter the filenames with Windows tools, and play them with VLC player.
PJ:
Heh, I listened to it, and it's a much more urgent knocking than I was expecting.
Dann:
I wish you had been here yesterday, because I think I came to the same conclusion through experimentation, regarding environmental objects. But it seems to be inconsistent about whether walkmesh = line of sight or not. Still, these results are useful. I know from experience that some placeables are set in the 2DA to block LoS, and others aren't, but if it's also controlled at the polygon level is quite beyond me.
About the other means of spotting, it was definitely LoS and not other means of perception, as I'll illustrate.
These are the results:
I filled the gaps between the doors and the walls, through experimentation. This is what it looked like before. Note that in this video I'm in stealth mode so they won't attack (when my party's not in stealth mode, this happens), but see how they light up and then go dark again as I pass some gap which allows line of sight:
http://www.youtube.c...h?v=IX779tAvJDo
First I tried increasing the overlap between the wooden beams, the walls, and the door as I mentioned before. That didn't help. Next I tried using a walkmesh cutter, to see if that would fix it, because I noticed there was in fact a walkable gap where the wooden beams are, since they're environmental objects. But it didn't help.
Finally, I changed the wooden beams back to placeables, but didn't re-bake the walkmesh. This worked. The beams don't block line of sight as environmental objects, but they do as placeables.
So, that's fixed now, and no more aggroing monsters through these walls.
Modifié par Tchos, 08 octobre 2012 - 12:23 .
#521
Posté 08 octobre 2012 - 06:24
In a space that confined I would have thought they would have heard you anyway so I would nhot be too surprised that they attacked you?
Depends on the context but I would have thought combat in a lighthouse would at the very least alert the critters on other floors.
PJ
#522
Posté 08 octobre 2012 - 06:52
Of course, the player won't actually be surprised here, since we can actually see their silhouettes in the other rooms. Still, they shouldn't set off their own traps, and it looked like that was happening when they bashed the door. Probably the best solution is what Tsongo mentioned earlier, and switching their placed instances for spawns that appear when you open the door, but to be fair to characters with tracking or high spot/listen, I should have a check that spawns them early so you'll know about them if it's appropriate.
#523
Posté 08 octobre 2012 - 12:40
Factions: These may help with the hostile monsters bashing doors and whatnot. Set you creatures to a neutral faction. On the on open script for the door with the group functions you can set them hostile and slaughter the party.
Or you could use the script hidden function. The door opens and you unhide them and start the party slaughter. This will also prevent the player from seeing their outlines when they are outside of the room. To add to that you could put in some triggers that will do a listen check and give you and estimate of how many creatures may be on the other side of the door to assist with buffing. A low check would either greatly under estimate or even better over estimate and cause the player to waste some buffing.
#524
Posté 08 octobre 2012 - 08:31
#525
Posté 08 octobre 2012 - 09:57
Tchos wrote...
Probably the best solution is what Tsongo mentioned earlier, and switching their placed instances for spawns that appear when you open the door, but to be fair to characters with tracking or high spot/listen, I should have a check that spawns them early so you'll know about them if it's appropriate.
I've never understood how tracking works indoors. Then again, I don't suppose ogres bother to wipe their feet when they enter a building.
I often trigger encounters from doors in my modules (such as the cemetery gate in Shaar Moan). Even if you cache all the creatures in the area properties, there's still usually a slight pause when you walk over an encounter trigger on the ground. It's a dead giveaway. That slight pause isn't as noticable if it happens while opening a door though, since it occurs right before the door starts to swing open while the player is standing still.





Retour en haut





