Aller au contenu

Photo

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


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

#451
Tchos

Tchos
  • Members
  • 5 086 messages
Yes, I read that press release yesterday. I love CD Projekt RED as a company. I think they're doing great work. I own the first game, and eventually I'll also buy the second one, which is a beautiful game. I'll also probably be interested to play mods for it, eventually. As of yet, I have not finished playing the first game.

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
Tchos

Tchos
  • Members
  • 5 086 messages
I created a fairly traditional boss battle of four distinct stages, with several alerts and adds, and a surprise at the end. I just hope it's not too chaotic, because it still seems to move pretty quickly, and with everything going on you might miss the shouted strings, and maybe even the alert text.

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
Tchos

Tchos
  • Members
  • 5 086 messages
I started today by adding one of the systems I've put off until now, which is the resting system at the inn. In town, you can only rest at the inn, though everywhere else you're free to rest, with the risk of wandering monsters. I've set up the inn resting system to work as it does in Baldur's Gate, complete with showing the room you're resting in, and time passing.

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
Dann-J

Dann-J
  • Members
  • 3 161 messages

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
Tchos

Tchos
  • Members
  • 5 086 messages
I think the double-dose effect would cause an additional problem when the attribute being modified is INT or WIS, because when that double-dose would occur, it would have a lasting effect. Spellcasters lose some of their spell slots if their INT/WIS is reduced enough (and that is one of the intended effects of this curse), and when it goes back to normal, they have to re-prepare spells in those slots. I wouldn't want to double the effect, even for the blink of an eye, for that reason.

If not for that, I like the efficiency of that method.

Modifié par Tchos, 10 septembre 2012 - 12:10 .


#456
Dann-J

Dann-J
  • Members
  • 3 161 messages
True. I've been using a similar method for my overland map weather system, but I'm only reducing skills (not abilities). I've also used it in a wild-magic area to apply 25% spell failure. Once you start messing with casting ability scores though, things get more complex.

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
Tchos

Tchos
  • Members
  • 5 086 messages
Do you suggest changing it from the way I have it working currently?  This is how I have it set up, targeting the player's party.  The effect is a curse, and it's defined as a supernatural effect in the function:

    // 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
Dann-J

Dann-J
  • Members
  • 3 161 messages
Associating a dummy spell ID to the effect before applying it (via SetEffectSpellID) would remove the need for the local int on each party member (you could use GetHasSpellEffect instead), and would mean you could remove the effect again with RemoveEffectsFromSpell (defined in nw_i0_spells). You could make FoLRemoveElfCurse completely redundant with a single function.

#459
Tchos

Tchos
  • Members
  • 5 086 messages
@Dann: I certainly see the efficiency in that method.

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
Tchos

Tchos
  • Members
  • 5 086 messages
Today I added some DM text to the loft entry event, to introduce the first of the bosses. This is the sort of thing that in cinematic modules would be handled by a cutscene, but which I am handling with text. The text box pops up, and the game auto-pauses to give you enough time to assess the situation, and let it sink in what's going on, and who this is. In a text box, I can paint a much more descriptive and informative image of the situation than a camera angle and a few lines of conversation could, anyway.

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.

Image IPB

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
Eguintir Eligard

Eguintir Eligard
  • Members
  • 1 832 messages
You have too many girls in your party

#462
Tchos

Tchos
  • Members
  • 5 086 messages
Usually my party is all female, but I made the dwarf to test certain dialogue options, and I've been picking him a lot for the main character because his name begins with the letter A, and so is near the top of the list.

#463
Dann-J

Dann-J
  • Members
  • 3 161 messages

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
Tchos

Tchos
  • Members
  • 5 086 messages
@Dann: Sausages...you know, Eguintir and I are working together on some placeables, and food items are on the list. Maybe we should make a couple of sausages, and then we could have a more literal sausage fest, rather than the other kind. :)

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
Eguintir Eligard

Eguintir Eligard
  • Members
  • 1 832 messages
I've done everything I can. The sausage is now in your hands.

#466
kamal_

kamal_
  • Members
  • 5 260 messages
Is there a new eta for this mod?

#467
Tchos

Tchos
  • Members
  • 5 086 messages
A new ETA on the mod? I think the last time I made such an estimate, it established my inability to make good estimates. But I'd guess this month should see the mod getting released. I'm almost done with my holiday in Fanglewood, and some of my time lately has been used in a diversion of making placeables.

Image IPB

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.

Image IPB Image IPB

#468
Tchos

Tchos
  • Members
  • 5 086 messages
Today's work is rather miscellaneous and uninteresting to the reader, I think. I started work on another of the major plot encounters, and realised I needed to expand the island a bit to give more room for fighting.

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
Alupinu

Alupinu
  • Members
  • 528 messages
Wow I really like those potion bottles. They have a very attractive shape and the three channel tint is nice too. Maybe you can release them separately at a later date - of course.

#470
Tchos

Tchos
  • Members
  • 5 086 messages
Glad someone likes them!  Also, I specifically used bright, rich colours in these example tints to show that they can be this bright, unlike some tintable placeables I've seen that start out at a dull grey, and can thus only get darker from there.  These, of course, can be either as bright and colourful, or as dark and drab, as the situation may require.

Yes, the plan is to release these along with all other new placeables in a separate pack right after this is done.

#471
Tchos

Tchos
  • Members
  • 5 086 messages
One major thing that makes things take longer than they should is that moving placeables doesn't count as an undoable action. I can delete an item and hit undo to bring it back, but if I just move it accidentally, I can't put it back where it was. This is why I should lock things in position, right? Because I had to close without saving when I accidentally moved several dozen assembled pieces of the lighthouse at once, and their heights all got messed up in the move. Lost some work.

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.

Image IPB Image IPB

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.

Image IPB

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
Tchos

Tchos
  • Members
  • 5 086 messages
Gather round, me hearties, for it be International Talk Like a Pirate Day! To celebrate, you could hardly do better than playing this song, and singing along (Thanks, Tom Smith)! It would have been a perfect day to release this module, if it were ready, due to its pirate theme. But even if I had planned ahead, I probably wouldn't have made it.

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.

Image IPB

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.

Image IPB

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
kevL

kevL
  • Members
  • 4 078 messages

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.

i Checked this:
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 ?


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.

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)

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.

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 .....

Modifié par kevL, 19 septembre 2012 - 08:20 .


#474
Tchos

Tchos
  • Members
  • 5 086 messages
Yes, I would like to see those scripts for a better understanding. I'll also look at your thread you linked there. I actually haven't yet tried Tony K's companion and monster AI.

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!

#475
kevL

kevL
  • Members
  • 4 078 messages
okay, give me a day or so

i gotta wrap my head around it again and take care of some aliens