Jump to content

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


Tchos

Recommended Posts

Yeah, i totally missed that part, :facepalm:

 

Just had to re-read your post, and i ... kind of understand now ... It's just too complicated for my skills for now (remember i'm a beginner), so i settled with the way it works now.

 

Thx Tchos

Link to comment
Share on other sites

  • Replies 254
  • Created
  • Last Reply

Top Posters In This Topic

Well, it'll probably be clearer when you can actually look at the code. But I think I found a simpler and more straightforward way of doing it. I haven't tried this yet, but it might work as is. I hadn't tried this before, because I thought that it just reduced the stack size, splitting things up into smaller stacks, but it seems to actually delete items as necessary to create that many objects and no more.

 

// Reduce stackable object count by 1
int nItemStackSize = GetItemStackSize(oItem);
if (nItemStackSize > 1)
	{
 	SetItemStackSize(oItem, nItemStackSize - 1);
 	}
 	else
 	{
 	// If you only had one, then just destroy the one.
 	DestroyObject(oItem);
 	}

Link to comment
Share on other sites

I didn't want people to think I've been slacking, so I was preparing a video demonstrating the latest work, but it took a while to get the footage I needed due to the element of randomness in the system. I got what I needed, but it's going to take a little while to process and convert the footage and get it uploaded to Youtube, so I'll just post it tomorrow. I'll hold off on the explanation of what I did, as well, because I think it needs the visual aid.

 

In the meantime, I was looking for a suitable treasure chest on the Vault, because there really aren't enough chests available in the toolset. None of them are tintable, and only one of them looks weathered. I have some treasure to place in an outdoor location, that's supposed to have been there for a long time, and most of the chests look brand new. I don't really like the weathered chest that exists, but it'll have to do unless there are any better ones out there. I wasn't able to find any by searching for "chest".

 

There are a fairly wide variety of crates, but I think there are more than enough crates in the module already.

 

I'll just add tint maps to the existing chests, which will help a little.

Link to comment
Share on other sites

After making the tint maps for the chests, and cloning them to new objects with MDB cloner, I made some blueprints for them in the toolset, and found that they were missing their lids. Something to do with the fact that chests are animated placeables, perhaps? MDB cloner is missing something that attaches a moving piece?

 

I created a replacer version of the chests with the same names as the originals instead of my renamed ones. This time the lids appeared, but untinted. So the lids must be separate models somewhere. I looked in the data files again, and saw what I had overlooked the first time, which were additional files with the same name, but with an extra "_01" appended. So I made clones of those, too, and attached them as they were attached in the 2DA.

 

That got the lid in there, but it wasn't attached properly. So just stuck with the replacers, which work, but have the problem that any of these chests that are already placed in the world will be black, because the tints are set to black by default.

 

http://1.bp.blogspot.com/-jalyj1jDv00/UBMrFkNthRI/AAAAAAAADe4/zmotJcgqVS4/s200/bcocc%2Bchest%2Blid.jpg

 

It occurred to me later that maybe the name really needed to be _01 instead of the _lid I used in my clone, so I recloned the lid with the _01 instead to try it out, but it still didn't work. All of the replacers work fine, though, and I created new blueprints for them which are pre-tinted as normal chests.

 

http://1.bp.blogspot.com/-qQumhbt6teo/UBMrFYtKyHI/AAAAAAAADes/2anUgI3LFbE/s200/bcocc%2Btinted%2Breplacers.jpg

 

I also noticed more chests that I had missed because I had been just filtering the list for the word "chest" instead of looking through the categories. Silly me. There was "footlocker", "lockbox", and "trunk". The lockbox is a rectangular chest, and it's a bit weathered, but not completely trashed like that one chest. I ended up using that one for my outdoor area. I also created new blueprints of those three, renaming them as "chests" for easy reference.

 

About yesterday's work: The video here shows what I've done with Heed's Angler Pack.

 

http://www.youtube.com/watch?v=aie8rOSj17A

 

My changes were largely to make fishing more enjoyable and rewarding, and less of a chore. The original system was a little laconic, in that it wasn't always clear there was anything going on while you were fishing, due to the long casting time and the lack of any kind of progress bar. What I've done here is added the casting animation (the swing of the arm, not the projectile), the sound effect of the fishing pole reeling out, the progress bar so you can see exactly how much longer the fishing will take, and changed the flavour-text feedback messages to appear over the head rather than in the chat window.

 

I also added in a hook (ha ha) to execute a separate script to check what you catch and update the quest journal if you're on a quest and you've fulfilled the requirements. I have several side quests that involve fishing. Ah, and I also changed the icons.

 

My implementation also greatly reduces the length of each cast, and increases the chance of catching a fish, and adds goodies besides fish that you have a chance of fishing up.

 

I wanted to have a better pose during the fishing, but there was no pose with a prop held out in front aside from the torch, and that was a left-handed one-hander.

 

The drawback here is that you can still move while you're fishing, and the progress bar will continue to its completion even if you run away from the fishing spot. I had originally made the player non-commandable during the cast, but this seemed to prevent certain important script events from firing (ones that assign commands to the PC).

 

In other areas, I used a placeable sign in the forest pointing back to town, to use as the means of returning (if the player doesn't want to use a hearthstone), rather than the glowing blue circle on the ground. I had trouble with this, though, because the Crystal Violet sign piece wasn't functioning like the other placeables that I've used with conversations. I had it set as usable, non-static, plot, and able to speak to non-owned characters just in case, and used the same "speak to placeable" script as I've used before, but clicking on it did nothing. I tested things by placing a random placeable down alongside it, with the same settings, and that worked, so I don't know what was preventing it. I worked around it by taking the working placeable and changing its appearance to that of the sign I wanted to use, and that worked. Now I just need to get the town area to load without crashing again do I can place the teleport waypoint. :(

 

I also had some mysterious changed music in two of my locations. Both the Temple of Sune and one of my taverns had different music than I had set previously when I visited them recently. My guess is that it may have been something to do with my recent reinstallation of SoZ. Possibly some of my music had been replaced by some mod here or there, and this reinstallation restored them to normal. In any case, I made new selections for them.

 

After getting the town area to load, the rest of my time today was spent placing more waypoints and map notes, and activating more doors. I'm sad to say that I'm also having to cut out the second tavern and second inn I had planned, for time reasons.

Edited by Tchos
Link to comment
Share on other sites

Even though it was a gaming day, I did manage to get some work done. As usual, I ran into problems and stumbling blocks, and these usually revolve around walkmeshes. This is the sort of thing I typically see, and it's fighting with things like this that occupies so much of my time that could be better spent decorating or writing dialogue or scripting for quests. This is the beginning of one of the levels of the lighthouse interior, currently without decoration or partitions.

 

http://2.bp.blogspot.com/-LZQ8GJiZCQ0/UBR8d44wgyI/AAAAAAAADfs/54MxPCv8nOo/s200/bcocc%2Blighthouse%2Binterior%2B2.jpg

 

Of course, part of it is due to my stubbornness in not wanting to have square rooms when the building outside is round, and that I want to have interior spaces that at least reasonably resemble the dimensions of the exterior. And that I tend to edit and tweak or completely overhaul everything I import. If I'd just go ahead and use prefabs as-is, I might have been done by now. I can also see now why so often modules have open-air marketplaces instead of having all the vendors in their own shops with their own interiors. I regret that it seems I cannot deliver on both timeliness and an accurate adherence to the ideals I outlined near the beginning. I'm pretty close to the end, but I don't believe I can do it in 3 more days.

 

I got the walkmesh under control for now, though I dread re-baking after I add doors, partitions, and furniture.

 

http://2.bp.blogspot.com/-Je_TAaIY9vU/UBR8eBBn_HI/AAAAAAAADf4/rxNEWgPxiDo/s200/bcocc%2Blighthouse%2Binterior%2B3.jpg

 

Some notes on what I'm doing here. I imported Crystal Violet's invisible tile so that I could build the interior space entirely from BCK placeables, in order to have the round lighthouse space the module requires. The tile includes a floor walkmesh, though it has those strange white lines in it when baked. Oddly enough, they don't seem to actually stop my character from walking over them. The visible floor is from BCK, and they're all set to environmental, so as not to interfere. The walls, both inner and outer, are also from BCK. The outer is a placeable, while the inner is environmental, with an invisible sphere in the middle set to static, to create its collision. The inner wall is where the stairwell is, based on the lighthouse map I'm using. There's currently no ceiling, and I'm not sure if I'll have one or not. I need something that'll fade out if you go above it, and I'm not sure if the floor tiles are set to do that or not.

 

http://3.bp.blogspot.com/-n9WMcw08WF8/UBR8dnJqDjI/AAAAAAAADfg/7OA_L1PDkpo/s200/lighthouse%2Bground%2B%2526%2B1st%2Bfloor.jpg

 

I also spent some time on a custom texture for the floor, but the UVs for the BCK floor prop don't use the entire area of the texture map, and instead have a border all around the sides for the "sides" of the prop. Would be nice if I wanted to use it to make stairs, but it already includes stair props, and this only makes it difficult to align the repeating texture on the top! The files come with a texture with a box around the area indicating where the top texture should be, but the box is made using a 4-pixel-wide line, making it unclear exactly where it should end. It didn't come with a UV map template. I made my texture end at exactly the inside edge of the line, and that wasn't correct, so my texture had ugly seams. I abandoned it at that point and went with the default wood texture it came with.

Link to comment
Share on other sites

Well, it'll probably be clearer when you can actually look at the code. But I think I found a simpler and more straightforward way of doing it. I haven't tried this yet, but it might work as is. I hadn't tried this before, because I thought that it just reduced the stack size, splitting things up into smaller stacks, but it seems to actually delete items as necessary to create that many objects and no more.

 

 

Thx for taking the time to explain. It seems so simple when i read your code. Yet i couldn't have written that myself lol. Still got so much to learn. My english is getting better though :rolleyes:

 

Yesterday i read the nwn1 lexicon - not the whole thing, but enough to gain a little more insight in scripting. I'm still SO noob though.

For instance it took hours for me to find the function that plays the animation on placeables :biggrin: (but i did it in the end, very rewarding).

Link to comment
Share on other sites

The biggest beginning hurdle is learning what functions and commands are available to use. After that, proper syntax. I'm including plenty of comments in my code to make it easier to read and understand what I'm doing and why. I hope it'll be helpful, though I'm no expert coder myself.

 

What is the name of the function that plays the animation on a placeable?

Link to comment
Share on other sites

This one works with my floorlever, it switches the handle position (i put it OnUsed i think)

 

PlayAnimation( ANIMATION_PLACEABLE_ACTIVATE );

 

I don't know if this the same as nwn2, is all the same functions available?

 

EDIT: IN ELECTRON It seems it would work, on the lever with _OPEN or _CLOSE instead of _ACTIVATE _UNACTIVATE ... :thumbsup:

Edited by Cluas
Link to comment
Share on other sites

Alignment shifts: I don't like them. In most cases it amounts to the assertion that making a comment can change a person's fundamental nature. In general, I thought SoZ handled this in a much superior manner -- a character is given the option to make a particular kind of comment if they already are of a certain alignment, with the idea that "this is the sort of thing that such a person might say." I like that way much better, because in a diverse party, you probably don't have to worry about not getting that option with at least one of your party members. (There was at least one conversation in SoZ that included alignment shifts, but it seems to be an anomaly, perhaps made early on, or by someone who wasn't yet familiar with the direction of that expansion).) At any rate, I follow this method, and do not include alignment changes in my work.

 

Short day today, but here's the current work on the lighthouse interior.

 

http://1.bp.blogspot.com/--fn8GrwrnH0/UBXN5KFBanI/AAAAAAAADgg/iN5yo_h7XXo/s320/bcocc%2Blighthouse%2Binterior%2B6.jpg

Link to comment
Share on other sites

Cluas, I've heard most of the same functions are available, and most of the time Lilac Soul's stuff and random user-submitted code examples posted by users for NWN1 works in NWN2, but there are some constants that are different or removed, and a whole lot of new functions in NWN2 that aren't in 1. I'll be sure to try that code you posted some time, though.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...