The Black Scourge of Candle Cove -- Tchos' development diary
#876
Posté 23 juillet 2013 - 01:52
#877
Posté 27 juillet 2013 - 03:10
I searched in vain for a function that would allow me to dynamically adjust a creature's CR via script. I suppose that if I want to do that, I'll have to create duplicate blueprints with the alternate CR, and use a script that selects and destroys the existing creatures, replacing them with their alternate CR counterparts. I hope this doesn't induce a Capgras delusion in my players, though of course in this case, it would not be a delusion.
I was making some edits to the cave to make it usable for the beta despite having a whole section missing, by putting in a way to skip past the unfinished areas, and I since the sahuagin were working, I fixed up the quest involving them. I ended up having 3 deathscripts on them, chained through hooks I put in my custom scripts, so that they would get their barks, the quest updates, and the default death behaviour as well.
I couldn't help it. I wrote another massive script to facilitate a particular archetype of questing -- that being the collection quest, or the gathering quest. I had already written similar scripts to handle kill quests and exploration quests, but the idea is to be able to put an essentially all-in-one script for the archetype that can handle a wide variation of subtypes. My first one was the kill quest, and I used a somewhat rougher method in that first attempt, which requires more variables than it should. I should recode that one later to take advantage of these more compact and self-sufficient routines.
Importantly, this tracker allows an arbitrary number of different kinds of placeables to manipulate, each of which can have a different number of them that need to be used, and different results and feedback when you do, and of course you don't have to do them in any particular order (if you want a specific order, you'd have to make a separate quest stage for that). It's not limited strictly to gathering, but also works for destroying placeables, using items on placeables, or just activating them in some way.
It tracks and displays the quest progress through a combination of the journal, local variables, and custom tokens, and the main goal was to automate as much as possible so that a new quest or a new sub-goal could be added simply, and it requires just a single script to be placed in the placeable's On Used slot, and the addition of some variables on the placeable. I was very happy to see it working. I tested it by starting with a single set of placeables to manipulate, and when that worked, I added a second set, and then a third, just to make sure I could complete the manipulations in any order no matter how many sets I added.
Modifié par Tchos, 27 juillet 2013 - 04:26 .
#878
Posté 27 juillet 2013 - 04:21
Tchos wrote...
I searched in vain for a function that would allow me to dynamically adjust a creature's CR via script. I suppose that if I want to do that, I'll have to create duplicate blueprints with the alternate CR, and use a script that selects and destroys the existing creatures, replacing them with their alternate CR counterparts. I hope this doesn't induce a Capgras delusion in my players, though of course in this case, it would not be a delusion.
Can't you give them a single UTC, a package 2DA and then just give them a scripted number of XP and command them to level up when encountered? It works for adding companions.
Modifié par I_Raps, 27 juillet 2013 - 04:24 .
#879
Posté 27 juillet 2013 - 04:25
#880
Posté 27 juillet 2013 - 10:30
I looked first in the built-in functions and the ginc_time include, and then in all includes through EC's Super Include, but couldn't find what I needed. I did a search online, and found a few proposed solutions, but they seemed too complicated for what I wanted, and I certainly didn't want to deal with delayed commands or heartbeats or temporary object creation. The game is keeping track of the passage of time already, as I can see by it telling me the exact time, plus the day, month, and year when I start the module.
I just wanted an absolute game time function that I could store and compare, so nothing has to be running in the background or making automatic checks or anything -- just set it once, and check it when you need to, comparing the time now with the time then to get the time passed. But all I found were strings and wrap-around hour things that looked more suited to other tasks than what I had in mind.
Finally I found a function that set it up the way I wanted it in the CSL, creating a single integer made from the year, month, day, and hour.
int CSLTimeStamp()
{
int iYear = GetCalendarYear();
int iMonth = GetCalendarMonth();
int iDay = GetCalendarDay();
int iHour = GetTimeHour();
return (iYear)*12*28*24 + (iMonth-1)*28*24 + (iDay-1)*24 + iHour;
} So I made a ga_ script to start the timer (setting a local int on the NPC containing the current time stamp), and a gc_ script to report how many hours had passed (subtracting the stored time stamp from the current time stamp), and I used the same comparison function as is used in the gc_journal_entry and gc_local_int so I could show certain dialogue options only if 24 hours had passed since the timer had started.
It seems like such a basic thing that you'd want for all kinds of things, so I can't believe this wasn't built right in. Maybe there was a function of that sort in the default assets, but I sure couldn't find it, and it probably wouldn't have been needed in CSL if there were one.
#881
Posté 08 août 2013 - 03:12
However, I found that it wasn't generating the gold as it should be. After examining the code and trying a few things, I found it was because the function that generates the random gold in kinc_treasure uses a function called GiveGoldToCreature(). Well, this isn't a creature, so I guess that's why it wasn't working. I moved the problematic function into my gp_ script so I could rewrite it and not use the one in the include file, and changed it to CreateItemOnObject(), which worked.
Also gave one of the companions a slightly modified face texture (the lack of eyelashes makes a lot of the vanilla faces look like pasty dolls), and wrote a little of the missing dialogue for the end of the secondary main quest.
I finally found what the problem was with the barbarian companion not gaining XP. I compared his properties to the properties of the other companions, and a noticeable difference was that he had "Designer XP" set to 0, while the others had it set to 1. I don't know how it got set that way, unless I originally made a copy of a blueprint that was set that way.
I added significantly to the journal entries and associated conversation for the secondary main quest, as well as the scripts that update the quest after the event of the main objective. It occurred to me that since there are two quests associated with the same main objective, a player might not take the secondary one until after already accomplishing the objective, which would lead to strange conversations. I made switches for the objective scripts to update the journal to an appropriate stage based on the current quest stage (including the absence of one). The quest is optional, but you'll get one last-chance warning via a journal update if you don't take it before completing the main objective. And if you don't take it, and complete the main objective, no problem. The journal will reflect that.
I'm personally finding it easier to deal with these conversations by using journal conditional checks on almost every main node, rather than using the fall-through method. With as many quest stages in the journal as I'm using, it seems to be less confusing. Just creating journal entries for every possible permutation of the quest. Still, I'm also haphazardly using local variables for some things rather than the journal, like whether an NPC is angry at you, or how much gold you may have negotiated a deal for. And sometimes I'm storing the variables on the NPC (my preference), other times on the PC (when necessary), and sometimes on a waypoint (when the NPC is going to exit the area and respawn elsewhere, which I expect would cause it to lose any variables I changed on it, since it spawns from its blueprint). Whatever works and seems simplest and most foolproof at the time.
I ran through the module one more time, and this time found only very minor things to fix. I haven't been able to test all permutations of the Merchants' League quest, though, so I hope the beta testers can report on any possible oddities there.
I did find that one of the quest markers wasn't updating, and I thought at first it was because I spawned a new copy of the NPC in another area before I destroyed the original, and that was causing the surviving copy to be considered the second instance for the purposes of GetObjectByTag's nth object parameter even though there was only one instance by that time. In fact, it was because I forgot that I assigned a new tag to the second spawned copy, and wasn't searching for that tag.
I also saw that an animated texture wasn't animating, but that could have been a memory issue.
One more scripted event, I think, and I can send this out.
#882
Posté 08 août 2013 - 12:58
Very interesting diary, I learned a lot of things reading this ! Any idea about the release date of your module ? And do you plan to use some of your Witcher placeables in it ? (sorry, english isn't my first language...)
#883
Posté 08 août 2013 - 05:05
I am using some of the Witcher placeables in it, though not very many, since I had already designed most of the areas before I started those conversions. Looking in my campaign folder, I have only 13 Witcher placeables in the module. I also have 55 other new placeables of my work, either my edits of the original NWN2 assets or in a couple of cases entirely new models. Also there are a few bottles I retextured early on with the aid of Eguintir Eligard, before I was able to work with 3D models.
With 1 more full day to work on it, I could send the beta test out at the end of that day. This day may not be a full day, though, because I have some other activities to attend to, but I'll see if I can do it anyway. I hope for a full release before the end of this month.
Modifié par Tchos, 08 août 2013 - 05:05 .
#884
Posté 08 août 2013 - 10:46
#885
Posté 08 août 2013 - 11:04
I can't remember when it was that I changed my focus from a quick release to a piece that I could be proud to display in a portfolio, but I did decide that a bigger, more varied release would be better. However, I've been very careful to build this with expansions in mind, so that I can release additional, smaller quests that can be played in it (some within the same areas, some in new areas) without starting a new game.
#886
Posté 10 août 2013 - 05:29
The only thing I can think to try now is perhaps destroying him and respawning him in the new location, setting his hit points to match what he had gone down to.
#887
Guest_Iveforgotmypassword_*
Posté 10 août 2013 - 11:04
Guest_Iveforgotmypassword_*
This might sound a bit weird but at the moment I'm trying to figure out what causes Macs to crash and not load certain modules with Frosty44 and testing different combinations. My fist two modules had no 2das in the hak and worked fine but the ones that don't want to load all do especially placeables 2da ( my personal enemy ).
#888
Posté 10 août 2013 - 11:12
#889
Posté 10 août 2013 - 05:24
Tchos wrote...
I had some inconsistent results putting the 2das in the campaign folder, I think mostly because the override folder takes precedence over the campaign folder, but haks supercede all. Karen's going to be beta testing this for me on her Mac, so we should be able to see if it works, but I can easily make a version that has the 2das in the campaign folder and no haks at all. I just can't guarantee that one will work, because I have some 2das that change scripts and item types.
Not all 2DAs work in the Campaign folder as expected and not all 2DAs work in the Hak or Override as expected. I find that 2DAs that are part of systems that require Campaign setup such as Overland maps, parties, or the world map require the 2DAs to be in the campaign folder for proper functionality.
There used to be a list of what 2DAs work best in what folder on the old Bioware forums...but EA took care of that.
#890
Posté 10 août 2013 - 11:48
#891
Posté 11 août 2013 - 04:30
However, the animated placeables are not animating, as mentioned before. These are waterfall placeables with animated textures. They're quite necessary for the theme of the area and the focus of the boss fight. They were working in earlier tests, and they of course work in the toolset, so I can only guess it's because of the number of effects that appear in this area during the fight.
There's a similar design problem in the area, in that if a character is wearing any gear that emits light, like so many magic items in the OC do, it turns a section of water near-black, rather than the mostly transparent it should be. I never liked all that light-emitting gear in the OC when I was just playing, because I saw it as a waste of an enchantment slot, but since it messes up lighting and water in areas, too, I like it even less.
I'll try replacing some of the animated placeables with visual effects instead. I thought the placeables would be more efficient for the engine's memory, but frozen waterfalls aren't what we need here.
I also had occasion to use SetLocalLocation for the first time, since I needed to put a little failsafe in place to allow the player to loot an important plot item from the body, and that would not be possible if the party killed him while he was in one of the isolated locations. So the death script tells the ipoint regulator what his death location was, and the regulator checks its distance from one of the 3 waypoints, and if he was in one of those locations, then it kicks him (or at least his loot) back onto the plateau.
I redesigned the area with placed effects rather than the animated placeables. I had to modify some effects to get what I wanted. It runs fine in-game, and is arguably an improvement.
I ran through the boss fight once again to make sure it was all functioning properly.
I found the epilogue conversation wasn't firing. I was trying to use the spawned IP Speaker method to start this conversation. I went back and reviewed my earlier entry in this diary where I explained how to get it working. I apparently hadn't finished implementing the script for that part. I did it as I described doing it before, by spawning a second ipoint to act as the conversation owner, and that worked. I think I'll make a wrapper script later to automate this process. The only thing the epilogue is missing is a set of images to use to illustrate what's being described.
So now it can be played completely, from beginning to end, including the epilogue, with all major encounters polished up. As mentioned before, there is a section of the cave that I'm leaving out for the beta test, which is used for a side quest, and it's the only side quest that cannot be completed at this time. I'll inform the beta testers which one it is.
I included a pair of cave tunnels to allow the players to skip through the unfinished cave section, so the cave will seem shorter than it should.
#892
Posté 13 août 2013 - 07:42
I filled out the last of the journal entries, added some DM text to the cavern, and set up one of the other companions. I wanted to do another, but I skipped it for the purpose of getting the beta test out.
Also did some optimisation, removing items and textures I wasn't using, including some Photoshop files that I shouldn't have saved in the campaign folder. Also converted some larger (1-4MB) TGA texture files to DDS to cut down on disk space usage, and found a whole collection of wall and floor textures I wasn't using, that saved a lot of space when I deleted them.
I ran through just a couple of areas to make sure the deletions didn't change anything, but I found a problem with the way the companion dialogues are laid out. Notably, if you don't accept them as companions when you first talk to them, they don't get added to the roster. I added some lines to it with conditions to handle it on one companion, and now I'm adding that to the others.
Finished that, after some outside distractions. Fixed a few other last minute things, and now the whole thing's compressing for upload to Dropbox for the beta testers.
#893
Posté 13 août 2013 - 08:01
#894
Posté 13 août 2013 - 08:34
#895
Posté 13 août 2013 - 12:51
NWN2 will display jpg with their extensions changed to tga, at least for area load screens.Tchos wrote...
As I had hoped, the image slideshow function in the conversation nodes, despite saying "TGA to display" don't have to be Targas. Targas are large files.
#896
Posté 13 août 2013 - 06:19
#897
Posté 16 août 2013 - 03:32
I've spent the past few days fixing more bugs and omissions in the beta release based on reports, as well as adding or changing certain minor things based on suggestions. I've also been trying to make a Mac-friendly version with Karen's help.
#898
Posté 16 août 2013 - 04:10
I methodically went through all of my conversation files and checked them for this script, and made sure they were all set to "true". Then I went through all of my scripts in an external editor and searched each one for "xp", and replaced GiveXPToCreature() with the function GiveXPToAll() from "x0_i0_partywide" as appropriate.
#899
Posté 16 août 2013 - 04:48
#900
Posté 16 août 2013 - 04:51





Retour en haut





