The Black Scourge of Candle Cove -- Tchos' development diary
#451
Posté 07 septembre 2012 - 08:28
I currently have no interest in modding for TW2, and I doubt that will change any time soon, primarily because it's a completely different style of game than my favourite kind of game (Single-hero action RPG vs tactical party-based).
Another consideration is the number of resources (placeables, creatures, etc.) Perhaps one day there will be as much content made for it as for NWN2. If it ever reaches that point, I may take another look.
I thought I made it clear that my declaration of "best toolset" was not necessarily universal, but for me and my preferences. If not, then let this statement suffice.
#452
Posté 08 septembre 2012 - 01:01
As mentioned yesterday, all of the scripting for the fight is in the spawn script, bizarrely enough. But it works. Just don't ask me why.
The only thing that's a bit flaky is the transition from idle heartbeat to combat. I have him doing an action and speaking some barks before the fighting begins, and I have a condition in the heartbeat to check GetIsInCombat(), and to stop the actions and barks if he is. But he starts running around as soon as he perceives the player, and continues performing the idle actions and barks until someone actually hits him. So I guess I need to use the perception event instead of the combat check for that.
Also, the notice text fires from the boss' script, but it seems to fail to display sometimes because (I assume) the currently controlled player isn't necessarily the one that hit him last, nor is it the nearest PC. So I'm not sure how to get the currently controlled PC so that I can display the notice text. I'm thinking I'll have to use a loop and display it to every PC in the party in sequence.
Aside from that, I'm pleased at how it came out, and I consider it good progress. This will serve as a template for the other boss fights with different mechanics, as well, so it won't take so long for the others.
#453
Posté 09 septembre 2012 - 10:48
As a basis, I used the resting conversation system from Leira's Trick in SoZ, but adding and subtracting some things, as well as inserting the aforementioned image, and adding the time passing, since it didn't include that for some reason. The SoZ tavern rests were lacking in some respects, especially in the Sword Coast taverns, where you pay the innkeeper and the screen just fades to black and back again and he says "Hope you had a good rest", but the idea and the framework are solid. I think people will like what I've done with it.
Next, I finally modified the necessary scripts for the Thrice-Stupid Elf curse, and applied them to the proper location. This took a few tries. I was basing it on a set of three scripts from the OC, which apply spell failure in Duskwood, and those were an on enter (to apply the curse), on exit (to remove it), and heartbeat (to put it back on if it's removed). Well, reducing ability scores is an additive action, not a constant thing like spell failure, so I saw my characters lose stats on every heartbeat, down to zero. I also forgot to apply the racial check on one of the two scripts, so it happened to everyone.
The heartbeat was listed as necessary because if a character dies, they lose the curse, and it's supposed to be constant in this area. Eventually I determined that the on enter script wasn't necessary at all, since the heartbeat puts it on instantly anyway. Also, it was a bit inefficiently programmed, because it was set to check every creature in the area (and there are dozens in this area), when it only needed to apply to the PC party. So I rescripted it to check each party member for a variable that indicated the curse was already active, and if so, to exit. Works perfectly now. I just wish I could edit the "Cursed" indicator by the character portraits to include more information in the tooltip.
Also made some more tweaks to the boss encounter in the lighthouse. I think it's basically fixed now.
#454
Posté 09 septembre 2012 - 11:19
Tchos wrote...
Next, I finally modified the necessary scripts for the Thrice-Stupid Elf curse, and applied them to the proper location. This took a few tries. I was basing it on a set of three scripts from the OC, which apply spell failure in Duskwood, and those were an on enter (to apply the curse), on exit (to remove it), and heartbeat (to put it back on if it's removed). Well, reducing ability scores is an additive action, not a constant thing like spell failure, so I saw my characters lose stats on every heartbeat, down to zero. I also forgot to apply the racial check on one of the two scripts, so it happened to everyone.
I prefer to apply such area-specific effects only through the area's heartbeat script, and apply it temporarily for 6.1 seconds. That way there's no need to remove it again when you leave the area, and any dispelling or restoration attempts only have fleeting results. Rounds sometimes take slightly more than six seconds, so setting the duration to exactly 6.0 sometimes causes the effect icons to visibly stutter. For skill modifiers, you will still technically get a double-dose for 0.1 of a second though (you'd have to have the character sheet open to notice though - and not blink).
You could also assign a unique spell ID to an effect (SetEffectSpellID), then check whether each party member still has that effect each round (GetHasSpellEffect), only reapplying it if it has gone. You don't need to use a valid spell ID - in fact, it's better to use a line number from spells.2da that isn't being used by any valid spells.
#455
Posté 10 septembre 2012 - 12:05
If not for that, I like the efficiency of that method.
Modifié par Tchos, 10 septembre 2012 - 12:10 .
#456
Posté 10 septembre 2012 - 02:08
For ability penalties, you might want to use the spell ID method. It's a handy way of quickly checking for (or removing) specific effects.
Another option is to equip a blank creature hide on all party members in the OnEnter script that has ability penalties in its blueprint. That way you can't dispell or restore the effects. That's how the penalties are applied to the PC at the beginning of Mask of the Betrayer.
#457
Posté 10 septembre 2012 - 02:28
// get 1st party member
object oFM = GetFirstFactionMember(oPC,FALSE);
while(GetIsObjectValid(oFM))
{
// Is it of elven descent?
int iMe = GetRacialType(oFM);
if(iMe == RACIAL_TYPE_ELF || iMe == RACIAL_TYPE_HALFELF)
{
// Is it not yet cursed?
if (!GetLocalInt(oFM, "ThriceCursed"))
{
// Then curse it
FoLApplyElfCurse(oFM);
SetLocalInt(oFM, "ThriceCursed", 1);
}
}
oFM = GetNextFactionMember(oPC,FALSE);
}
Then, to remove it, I use this on the exiting creature oCreature:
void FoLRemoveElfCurse(object oCreature)
{
effect eEffect = GetFirstEffect(oCreature);
while (GetIsEffectValid(eEffect) == TRUE)
{
if (GetEffectSubType(eEffect) == SUBTYPE_SUPERNATURAL)
{
if (GetEffectType(eEffect) == EFFECT_TYPE_CURSE)
{
RemoveEffect(oCreature, eEffect);
}
}
eEffect = GetNextEffect(oCreature);
}
}
#458
Posté 10 septembre 2012 - 05:10
#459
Posté 11 septembre 2012 - 01:09
I started by doing the lighting for the lighthouse loft, and also some set dressing. I think it still needs some things like a little bit of furniture with maintenance tools and such, but I'll handle that in my final polishing pass.
Next I did a little something else from my polish list, which I just wanted to get off the list, which was to expand the list of drinks that the waitresses of the taverns offer, using Seryn's Drinks of the Forgotten Realms for flavour, replacing the nonspecific drinks like "black beer" and "fruit wine" from UncleFB's scripts.
Next, I applied the necessary scripts and conversation to the first of the recruitable companions. I was surprised it was just a matter of loading the companion saved script set to the NPC, and adding a conversation to handle the joining and dismissal. I used Kaldor Silverwand's companion setup as a basis, but I need to write the companion's backstory, and also set a joining condition to check the current number of members in the party combined with the player-created party members, in the same way SoZ does it. Kaldor's conversation doesn't have any restriction on how many members can be in the party.
The way SoZ does it is that if you want to edit the player-created roster, you have to dismiss your recruitable companions first, and then add them back in after you modify your player-created roster. I'm sure it could be done without that dismissal first, but I expect it makes it less prone to error this way.
I'm not sure if it was this way in the original game, but when I played Baldur's Gate in the BG2 engine via BG tutu, I was able to dismiss companions, and tell them to wait for me right where they were, rather than them going to wait at a specific location like an inn. For the sake of simplicity, I'll do these companions the same way. No designated hangout for them to go to when they're not in the party, just waiting where you leave them. I don't think that'll be a problem, since in most cases you should always be able to go back to where you would have left one, and there's no point where you're forcibly taken anywhere outside of your own control. Especially since you don't have to talk to them directly to have them join or leave the party once they're on the roster. The inn guest registries as well as the player menu roster can handle them fine. But you'd miss out on some dialogue if you do it that way.
#460
Posté 12 septembre 2012 - 01:04
This method also eliminates a problem that I encounter in cutscenes, in that I never know when they're going to end, or whether they'll have a final "end dialogue" option or simply drop me into combat without warning. I also never know how long each line of text is going to display in a cutscene, and typically have to click through to the next line after waiting for a while for it to advance after I've finished reading it. Sometimes that results in me clicking at the same moment it finally gets around to advancing, causing me to miss a line.
Here, all the text is presented at once, for you to read at your own pace. When you're finished and ready to fight, you close the text box and unpause the game.

I've never played any of the Spiderweb Software games, but I took a look at a video of the latest one, and I was surprised to see that it includes very much the same thing! At least in the intro cave, each new development spawned some text to establish what was going on. I like that.
#461
Posté 12 septembre 2012 - 04:01
#462
Posté 12 septembre 2012 - 04:24
#463
Posté 12 septembre 2012 - 10:53
Eguintir Eligard wrote...
You have too many girls in your party
A party can never have too many girls.
There's nothing worse than a sausage-fest...
#464
Posté 13 septembre 2012 - 02:37
Trying a different brand of brewed coffee today, and a different blend. Pleasant aroma, but the flavour's not as intense. I think I'll need to make it stronger than the other brand.
It turns out I wasn't as finished as I thought I was with the AI for the boss. The fight was fine, but his introductory actions weren't working. Also, his initial challenge shout was showing up before I had even entered the game! (I can see this in the readout on Skywing's Client Extension.)
I tracked the shout down to a problem with the way I had programmed the spawning script. Basically, if it existed at full health, it would shout immediately, and this once again speaks to my very recent understanding that the game loads and executes the scripts in every single area in the module before you even go to those areas. So I modified the script to work around that.
The other problem was (is?) that I could either get him to do his introductory actions constantly or not at all. I moved those actions into a case switch heartbeat system of the same sort that I eventually settled on for the other scenes.
The good thing is that his combat script works just fine, in all of its stages...except that sometimes a sound doesn't play. Not sure why.
I also rewrote some of the text in the previous post, and added some more.
#465
Posté 13 septembre 2012 - 03:47
#466
Posté 14 septembre 2012 - 10:13
#467
Posté 15 septembre 2012 - 02:12

Speaking of which, as I indicated in previous posts, I've been working with Eguintir Eligard on some placeables. He models, I texture. Here's the latest work.
Individual placeable potion bottles. There are some normal bottles in the toolset, but nothing fancy. Drab jugs and wine bottles, etc. The toolset comes with several shapes of potion bottles, but they're in groups that you can't separate, and that's no good if you just want to have a single potion that can be picked up by the player or otherwise manipulated in some way. Or you just want more flexibility in how you decorate your tables.
So Eguintir agreed to separate the bottles for me. He said he couldn't save the original texture map, so I had to texture it from scratch, but that's fine, since I like my texture better than the original. I made it fully tintable in three separate channels, and I made a few preset blueprints of several colour combinations.
Now you can put potions alongside your gold piles for treasures, or leave a pretty bottle out on a table in your dungeon with a trap attached to it, or use a special bottle as a prop in a quest. Maybe even use them as fancy decanters for distilled alcoholic beverages with the appropriate tints.
#468
Posté 16 septembre 2012 - 07:17
From there I started assembling a better lighthouse exterior than the stock tower I was using before, from the BCK stuff.
From there I retextured some of the pieces, to better work for the exterior. This involved doing some systematic tests to see exactly where the boundaries were in the too-imprecise template that was provided. That was ultimately successful, so I built most of the lighthouse. It just needs a little more decoration that I don't have time to do before posting this, but will get done first thing tomorrow, and then I can show it. Then I'll get back to the encounter.
Also did some minor flavour polish with sound effects and conversation.
#469
Posté 17 septembre 2012 - 06:23
#470
Posté 17 septembre 2012 - 08:33
Yes, the plan is to release these along with all other new placeables in a separate pack right after this is done.
#471
Posté 18 septembre 2012 - 11:04
Currently, the new lighthouse is very clean-looking, which is unsatisfactory. I can fix that with a simple texture swap, though, now that I know what it looks like assembled.

I finished the lighthouse and prettying up the extended island (I plan to make some non-glowing windows for this purpose, though, which I'll replace these with), but then I ran into that accursed problem with the walkmesh right along the dock again. The line isn't even at the dock, it's a short distance past it. And this is after I fixed up the things that I could see from later experience that I had done wrong. So annoying, and it was necessary to make the changes, too, because I needed a walkable area in a place where there wasn't one before, so it's not like I could have just left it the way it was.
I finally got it working (and better than it was before) with the use of two barely-touching walkmesh helper planes over the docks that I converted to environmental objects.

Right, so the docks had been placeables, and the fact that there were two of them touching may have been the thing that set off the walkmesh troubles, despite that trouble being on the opposite side of one of the docks. Why it worked with butted-up walkmesh helpers and not butted-up docks, I don't know. Previously, I had tried just a simple placeable-to-terrain connection, and when that didn't work, I made many attempts at a placeable-to-walkmesh-ramp/plane-to-terrain connections.
By the way, although I mentioned it a few times in earlier posts, I just want to remind everyone that if there's any placeable, script, or system that I've shown here that you want to use in whatever you're working on, you don't need to wait for this to be released. Just write to me privately and let me know what you want, and I'll send you an advance copy of it.
Modifié par Tchos, 18 septembre 2012 - 11:16 .
#472
Posté 19 septembre 2012 - 01:50
Instead, accept the greetings of Cap'n Peg Powler, the infamous sea hag pirate, and the primary antagonist of this module! She's seen here with First Mate Scoursinge of the Fifty Lashes, who you saw before in the group shot of the other ogres, along with Bosun Fiercejaw the Shrill. Her costume accessory was, I think, my first experience with importing custom content into the toolset.

Yo ho!
There's still one more boss that's been ready to go, but has not yet been seen. More on that one later. ARRRRR!
In other news, I'm experimenting with a script for the town citizens, to handle what happens if you attack them, since you can attack anyone. I was starting to make a replacement On Damaged script, but I saw it had a line in that default script for signaling a user-defined event whenever they're damaged (if that flag is active), so I created a user-defined event script instead, and used the NWMASTER local variable to activate it on the test NPC.
The first thing I tried was to just turn the NPC hostile if you attack it. I used the code in the ga_attack script. This worked, but it had the unintended side effect of causing the town guards to attack the poor NPC right along with you, instead of defending the citizen.

Also, I noticed there's a problem with the ga_attack script. The instructions for the script say that the parameter bMaintainFaction should be set to TRUE if you want the NPC to attack without switching to the hostile faction, but when I looked at the function that the script calls, it actually does the exact opposite. What the ga_ script calls "bMaintainFaction" is called "bSetToHostile" in the function itself, and does as it says.
Anyway, when I made the attack script not change the citizen's faction, it worked better, but this time the guards just stood around without helping anyone. They're in the Defender faction, so I thought their default AI would make them defend a commoner under attack. Maybe I need to activate some kind of signaling for that to happen.
I tried a different strategy of adjusting the reputations of their respective factions to reduce by 20 points each time you attack a citizen (or a merchant). That means you get several chances, but if you keep attacking citizens, then both that faction and the Defender faction will eventually turn against you.
At any rate, it's better than how they were behaving before. Could surely still use development, though.
#473
Posté 19 septembre 2012 - 08:02
i Checked this:Tchos wrote...
In other news, I'm experimenting with a script for the town citizens, to handle what happens if you attack them, since you can attack anyone. I was starting to make a replacement On Damaged script, but I saw it had a line in that default script for signaling a user-defined event whenever they're damaged (if that flag is active), so I created a user-defined event script instead, and used the NWMASTER local variable to activate it on the test NPC.
The first thing I tried was to just turn the NPC hostile if you attack it. I used the code in the ga_attack script. This worked, but it had the unintended side effect of causing the town guards to attack the poor NPC right along with you, instead of defending the citizen.
...
Also, I noticed there's a problem with the ga_attack script. The instructions for the script say that the parameter bMaintainFaction should be set to TRUE if you want the NPC to attack without switching to the hostile faction, but when I looked at the function that the script calls, it actually does the exact opposite. What the ga_ script calls "bMaintainFaction" is called "bSetToHostile" in the function itself, and does as it says.
the game comes w/ 2 'ga_attack' scripts: one in the OC campaign folder, and one in 'Data\\scripts.zip'. The former uses default bSetToHostile=TRUE and the latter passes (not)bMaintainFaction into StandardAttack( )
Doesn't your script have ! bMaintainFaction ?
the calls to attack are sort of buried in the Companion & Monster AI, I've redone the nw_c2_default* scripts (onAttacked, onSpellCastAt) to make it explicit as well as any response (onDialog)Anyway, when I made the attack script not change the citizen's faction, it worked better, but this time the guards just stood around without helping anyone. They're in the Defender faction, so I thought their default AI would make them defend a commoner under attack. Maybe I need to activate some kind of signaling for that to happen.
yes. I started on it here and the basics were working well in Edinmoor, and in test. ( note that the link above was just an attempt to get started; things have been superceded since ) If you want I can PM ya my altered TonyK scripts, for you to have a look at, and either use or perhaps get a deeper jist of what's going on .....I tried a different strategy of adjusting the reputations of their respective factions to reduce by 20 points each time you attack a citizen (or a merchant). That means you get several chances, but if you keep attacking citizens, then both that faction and the Defender faction will eventually turn against you.
At any rate, it's better than how they were behaving before. Could surely still use development, though.
Modifié par kevL, 19 septembre 2012 - 08:20 .
#474
Posté 19 septembre 2012 - 08:27
Looking at the ga_attack script again. (And this is the one in the data zip, not the campaign version, which I wasn't aware of.) You're right. It passes "!bMaintainFaction" into the StandardAttack(). I didn't notice the (NOT). So it's not a problem after all!





Retour en haut




