Aller au contenu

Photo

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


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

#251
MokahTGS

MokahTGS
  • Members
  • 946 messages

Tchos wrote...

Then I started importing resources to use in creating some sailors and dock workers. Here is where I came to understand that there are no separate "pants" in this game, because I wanted the dock workers to be shirtless. I guess I was spoiled by starting out my real modding life with Oblivion, which had many separate and displayable clothing slots. I ended up doing some extensive texture work to make the various resources suitable for my purposes, and combined multiple resources, including some donated by PGB. I ended up using a nude base, and adding pants through Jester's catsuit base, since just painting pants onto the nude base resulted in something too skintight. My result is adequate, but could still use a more convincing material for the pants, and it doesn't quite match up on the side seams, which I'll have to fix.

Image IPB


Do you know that the whole shirtless male thing has been done already in the CC community?  there are also some "sailor" NPC prefabs available on the vault.

#252
Tchos

Tchos
  • Members
  • 5 072 messages
I know of the Shirtless Saga pack, but I wasn't happy with their textures, and didn't like the huge belt. Do you recommend any others? I do have Storyteller's Pirates and Corsairs to use for other characters.

Modifié par Tchos, 23 juillet 2012 - 09:18 .


#253
toptena11

toptena11
  • Members
  • 2 messages
nice

#254
Tchos

Tchos
  • Members
  • 5 072 messages
I should mention that the reason I decided to use a spawning system for my creatures was not because I wanted any to respawn, and not really anything to do with randomness, but was for the same reason I'm using spawn points for normal NPCs -- so that I can edit them from their blueprints, rather than their placed instances. That'll make it easy to tweak things, without having to open the area and hunt for multiple copies of the same creature, for instance.

However, my tests showed this system not to be usable for me, because the creatures that it spawns don't seem to retain the variables that I set on their blueprints -- namely, to walk around, or enter search mode. So I'll have to just use normal, on-enter spawning, which takes longer to set down the waypoints and set the variables, but results in mobile creatures.

On the topic of mobile creatures, though, I also noticed that only the humanoid creatures were actually walking around using the X2_L_SPAWN_USE_AMBIENT variable. Creatures like wolves and bears were not. To make them wander, I had to use the command ActionRandomWalk(); in their spawn script.

I tried using the single-line journal update with the setting to "override higher", for the purpose of updating the custom token in it, but it yielded inconsistent results. It did not update the token every time, but it seemed to only do it when different party members triggered one of the updates. So I'm going back to the previous method of removing the journal entry and then re-adding it. This has the side effect of showing two updates in the chat window.

Another issue I noticed is that when party members other than the main character trigger the floating text, it appears twice over their heads, where it appears only once for the main character. I don't see anything that would cause that. Trying it instead with SpeakString instead of FloatingTextStringOnCreature.

SpeakString worked, though when I first tried it, the object spoke the string instead of the PC, so it prefixed the string with the name of the speaker. I assigned the command to the PC instead, and that worked fine. For the record, I also found that FloatingTextStringOnCreature works without doubling the string if you set the parameter "broadcast to faction" to "false". I had been leaving off that parameter, which defaulted it to "true" and that apparently causes doubling on party members other than the main one. But I like SpeakString better in this case, because it drifts upward before disappearing, while FloatingTextStringOnCreature sticks without moving on top of the player's head before disappearing.

I wanted to have a cursed item, but the "cursed" flag makes it impossible to pick up the cursed item from its container. I looked briefly for a solution, but decided to discard the use of a cursed item, because it was just a throwaway addition for flavour.

Then I found that my script that uses the holy water to sanctify a bowl uses up all holy water in the player's inventory instead of just one. Still working on that. There are a couple of things I can try.

Another thing I noticed is that I'm getting the death prompt (respawn/load) when my main character dies, even if I have party members still alive. That shouldn't happen.

#255
MokahTGS

MokahTGS
  • Members
  • 946 messages
Well for shirtless males, that is really it. there are scads of topless female packs...but you can save that for your next module...Pirate Showgirls of the Circle Seas.

#256
Tchos

Tchos
  • Members
  • 5 072 messages
Well, now there'll be one more option out there!

#257
Dann-J

Dann-J
  • Members
  • 3 161 messages
I had the same problem with the duplicated text strings in Isle of Shrines. It seems that 'broadcast to faction' sends it both to the currently controlled character AND the first PC (which are of course one and the same). At the time I built in a check to see whether the controlled character was the first PC, and if not I set the broadcast option to FALSE. I now prefer using SpeakString as well. Great minds, and all that.

The 'cursed' flag in NWN2 is really just another 'plot' flag, as it stops you from dropping items that you'll need to advance the plot. You can always give the item an OnAcquire tag-based script that applies the cursed flag once it's been picked up.

It's a pity that Baldur's-Gate-style cursed items are so hard to emulate in this game (items that, once equipped, can not be removed without a Remove Curse spell). Even then, it's impossible to equip non-identified items - and who would voluntarily put on a Cursed Ring of Stupidity once they knew what it was? Unless you rename the item via an OnEquipped tag-based script (from Happy Ring of Glorious Benefits) - but even then you could still examine it first and see what properties it had. A really sneaky module author could give the ring beneficial properties at first, then have the OnEquipped script change those as well as the name. An OnUnequipped tag-based script could force it back on if you tried to remove it if the cursed flag was still there.

I suppose you could create some cursed items that apply their effects both from the inventory and when equipped. Then they could do their dirty work just by being in your pack (hopefully while unidentified). You'd have to find a way of checking for a Remove Curse spell being cast on a player (spell-hooking perhaps), then setting the cursed item to non-cursed so you could drop it. Picking it up again would reapply the cursed flag via the OnAcquire script (if you were stupid enough not to leave it alone).

Modifié par DannJ, 24 juillet 2012 - 03:23 .


#258
Tchos

Tchos
  • Members
  • 5 072 messages
Right, that's exactly the kind of item I wanted -- the Baldur's Gate kind. And I was disappointed to find that it's not normally possible, especially due to the inability to equip unidentified items. It was a fun feature in BG, just like in many rogue-likes. It was tempting to equip a mystery magic item just to see what it would do, if an identify spell wasn't immediately available, and merchants were far away. Then, surprise! Cursed.

I have a pretty good idea of how I would script the system to work, and probably will do it, but not in this module.

#259
kevL

kevL
  • Members
  • 4 070 messages

Tchos wrote...

Another thing I noticed is that I'm getting the death prompt (respawn/load) when my main character dies, even if I have party members still alive. That shouldn't happen.

that's a rather difficult issue to work around ...

Basically, 'gb_comp_death' fires when the PC dies


- a fix is to insert code in that script, that intercepts the default deathgui from popping, specifying conditions what to do
- another might be to change the Player_Default & Companion_Possessed "ScriptDeath" scripts in 'nwn2_scriptsets.2da' ( haven't tried that )

[ edit ] just reread through the link above, this isn't quite right : it's probably your ModuleOnDeath script that needs lookin' at, T. - That's what fires when a controlled PC goes down (iirc, both that and 'gb_comp_death' fire)

Modifié par kevL, 24 juillet 2012 - 07:55 .


#260
Tchos

Tchos
  • Members
  • 5 072 messages
It's okay, I actually got it working, but in a different way. I'll go into more detail in a bit.

#261
Tchos

Tchos
  • Members
  • 5 072 messages
My quest to fix the unintended action of consuming the player's entire inventory of holy water led me far and wide, through wikis, forum posts, and deep within the core includes of the Community Script Library, but nowhere did I find a script that would do quite what I was looking for. It seems like it should be a pretty simple and common event to want to use up a single piece of a stackable item! Am I missing something fundamental?

At any rate, the CSL scripts had some useful checks, and I found something close to what I needed -- a script that splits a stack and distributes the items between players. So I took that and tried changing it so that it would destroy one of the split stacks. I don't know why it didn't work, but I instead lost the whole stack, plus another whole stack minus one.

The fact that it had made a less-one stack was encouraging, though, so I instead set it to delay the creation of the less-one stack until the whole stack had been destroyed. This wouldn't compile. In my search for why, I learned that object functions can't be delayed, but a straight wrapper of an object function can. So I made a wrapper, and this time the script worked. Finally! Starting with a stack of 3 holy waters, after sanctifying the bowl, I'm left with 2. It works by counting the number of a particular item in the PC's inventory, keeping that number as an integer. Then it deletes the inventory supply of the item, subtracts the desired number from the integer (1 in this case), and creates new copies of the item in the PC's inventory equal to the integer with the number subtracted.

After suppressing the feedback that said "Lost Item: Holy Water (3)" followed by "Acquired Item: Holy Water (2)", and manually adding a chat window feedback saying "Lost Item: Holy Water (1)", no one should be the wiser (except for everyone reading this)! Of course, if there was an easier way of doing this, I'd like to have known.

Next, I got the wandering monster on rest system working. You may recall when I was getting started with this, that I couldn't get most of the creatures to appear, and I traced the problem to the fact that the creatures specified in the 2DA file were campaign-specific monsters that didn't exist in the default toolset. I had not yet edited any 2DA files, and was hesitant to do so at the time, but now my hak file contains a full dozen! So I looked at it again, and it made a lot more sense than it did before. I added the blueprint names of some appropriate creatures, including some custom ones, and tried it out. Success -- now I have fully functional MotB-style resting with random encounters. I suppose that does cut into my earlier statement that I wouldn't include any possibility of XP grinding in my module, but I suppose there will be that possibility after all, if anyone really wants to exploit it.

Next was fixing the death system. I found Kaldor Silverwand's instructions on which files from SoZ need to be included for the death system to work, and also looked at his example in King's Festival. That, and the Silverwand Sample Campaign, are real treasures for a beginning modder. This was simply a matter of using the proper scripts from SoZ, though, and once I did that, the death and bleeding system worked perfectly. Party members, including the lead character, fall down bleeding after 0 HP, and lose 1 HP every tick until they acquire a deficit of half their total HP, at which point they die. Even the main PC stays dead, without prompt, until raised from the dead. Talking to other NPCs while the main character is dead works also. I haven't tried a full party wipe yet, though, to see if a prompt shows up in that event.

I'm starting to have more and more trouble loading my main town area, though. Even with everything else shut off and trying to load it first thing, it's crashing the toolset on load. I hope I can get everything hooked up before it stops loading altogether. I had to restart the computer to get it loading at all. I spent some time laying out spawn waypoints, activating doors, and dealing with more walkmesh issues -- more time than I would have otherwise, just because it's so difficult to load this one. I also set an area-specific On Client Enter script instead of the generic one I use for other areas, so that I can edit the NPCs that spawn there without having to open the area and modify the area's local variables, again for stability reasons.

Also changed a flag on a roof piece from BCK, making it so that it does not fade with the trees. The building the roof is on top of does not fade, so it was showing the normal roof underneath, which I covered with this one because the original is not tintable and I thought it would be easier than adding a tint map for it.

I tested the death system with a full party wipe, and it functions as expected. A prompt only appears upon the death of the whole party, saying "You have been defeated", and not offering any respawn. Now we're back to the superior BG/IWD system!

Next I added some more icons and created some more quest items and treasures, and edited some of the conversations to give out those items.

Modifié par Tchos, 24 juillet 2012 - 10:01 .


#262
kevL

kevL
  • Members
  • 4 070 messages
ace

#263
Dann-J

Dann-J
  • Members
  • 3 161 messages

Tchos wrote...

Right, that's exactly the kind of item I wanted -- the Baldur's Gate kind. And I was disappointed to find that it's not normally possible, especially due to the inability to equip unidentified items. It was a fun feature in BG, just like in many rogue-likes. It was tempting to equip a mystery magic item just to see what it would do, if an identify spell wasn't immediately available, and merchants were far away. Then, surprise! Cursed.

I have a pretty good idea of how I would script the system to work, and probably will do it, but not in this module.


By poking around in the MotB modules I've just found two tag-based script suffixes I didn't know about; _hc for custom OnHit scripts (weapons and armour), and _ci for custom OnSpellCastAt scripts. I knew that the enchanters satchel somehow registered what spells where cast at it, and found the script that did it. I suspect that bone wands, blank scrolls, etc, may use similar tag-based OnSpellCastAt scripts.

I've since devised a way of using tag-based scripting to emulate the BG-style cursed items pretty well, including the ability to equip a faux-unidentified item. I'm in the process of writing the scripts now, and they seem to work pretty well so far. Since my next module is heavily influenced by Baldur's Gate, I'll be including these faux-unidentified items - both cursed and beneficial, to encourage you to take a gamble and try equipping them if your lore check isn't high enough or you can't cast Identify.

#264
MokahTGS

MokahTGS
  • Members
  • 946 messages
Proper cursed items are those that are benificial and detrimental, such as the Ring from LotR.  If you aren't already, I'd suggest adding items like this so that the player has to weigh the benefits against the weaknesses for such items.

#265
Tchos

Tchos
  • Members
  • 5 072 messages
What I can do presently, without including a classic "cursed" system at this point, would be to have items like what you describe, Mokah, and are just lacking the property that makes them impossible to remove without a "remove curse" spell. Items like the Backbiter Spear, which is a +3 spear that also inflicts 1d6 points of damage to the wielder on every hit still might be worth equipping for some players at certain levels, if there's nothing better available and they have enough hit points to take the damage. In IWD, it just had the additional property of not being able to be unequipped.

#266
I_Raps

I_Raps
  • Members
  • 1 262 messages
Doesn't the Katana of the Mummylord (from Uncus in the OC) suit this purpose?

#267
Dann-J

Dann-J
  • Members
  • 3 161 messages

MokahTGS wrote...

Proper cursed items are those that are benificial and detrimental, such as the Ring from LotR.  If you aren't already, I'd suggest adding items like this so that the player has to weigh the benefits against the weaknesses for such items.


That's exactly what I had in mind. I remember a sword in Baldur's Gate that I used to give to Minsc that had a chance of sending the wielder beserk while using it, attacking friend or foe. The sword itself had some decent stats, so sending Minsc into melee well away from other party members was worth having him equip it. You sometimes had to wait a while to collect the loot though.

Now that I know how to set up a tag-based OnHit script for an item, I could replicate that sword pretty well. I can even make it unequippable without a Remove Curse spell by using a tag-based OnUnequip script which re-equips it if the cursed flag is set, and a tag-based OnSpellCastAt script to remove the cursed flag from the item, unequip it, then put the flag back on 0.1 second later when Remove Curse is cast on the item.

Modifié par DannJ, 25 juillet 2012 - 01:52 .


#268
Tchos

Tchos
  • Members
  • 5 072 messages
All of that would be very cool, Dann! I know the sword you're talking about, but I rarely used it because I had several characters that fought in close quarters. I never used Minsc's berserking ability either, for the same reason, after the first time I tried it and spent about 5 minutes after the battle making my party members run away from the bloodthirsty Minsc.

I_Raps: I wasn't aware of the item you mention, as I never had a character that used a katana, but I can check it out later. Thanks!

#269
Dann-J

Dann-J
  • Members
  • 3 161 messages
IIRC, the Katana of the Mummylord was restricted to use only by the undead. That meant that only characters with high Use Magic Device skill levels could use it.

Minsc's beserk ability was very useful against enemies who could cast the imprisonment spell (like Kangaxx the lich), since he was immune to the spell while beserking.

Modifié par DannJ, 25 juillet 2012 - 02:56 .


#270
Tchos

Tchos
  • Members
  • 5 072 messages
I never actually fought Kangaxx. ^_^; I did try to fight his later Dragon Age: Origins counterpart, but I don't think I succeeded there, either. That was some time ago, though, and I've learned a lot since then. Maybe I could do it now.

#271
Dorateen

Dorateen
  • Members
  • 477 messages

Tchos wrote...

I tested the death system with a full party wipe, and it functions as expected. A prompt only appears upon the death of the whole party, saying "You have been defeated", and not offering any respawn. Now we're back to the superior BG/IWD system!


Indeed. What I did was simply copy the SoZ on player dying and on player death scripts and put them in the appropriate module properties. But I also originally copied over the SoZ k_mod script for the on load property. I thought this would prevent the problem that on using an area transition, a party member who is dead will return to life with 1 hp.

Later, I switched back to the default on_module_load script because the the k_mod was conflicting with items that could be activated on use such as the blacksmith's hammer or the custom rods of buffing.

Have you experienced any issues with dead party members coming back to life after an area transition?

#272
Guest_Iveforgotmypassword_*

Guest_Iveforgotmypassword_*
  • Guests
Sorry to say but the first thing I do is wipe out custom death scripts and replace them with respawns on any mod that I play as I'm really rubbish at fighting.

#273
Tchos

Tchos
  • Members
  • 5 072 messages
@Dorateen: I hadn't tested it across transitions, but I just tested it now with two dead party members (one of which was the main character), and transitioned using both a conversation teleport and a door teleport, and neither of them brought the dead party members back to life. Their bodies transitioned with me, but they remained dead.

I have hooks in all of my scripts to execute the scripts of custom content, as Kaedrin's module script set recommended, so I'd wager to say that custom rods should still work, though I don't have those mods and haven't tested them. As for the blacksmith's hammer, that's an important thing since I want OC crafting to work, so I'll test that next. Things that work on activation shouldn't be affected at all, if they use the tag-based item script method.

@Tsongo: I fully support your choice to do that. I myself modify modules that I play as well, such as going through all conversations that use the cinematic style and changing them to use the NWN1-style box. And since I'm doing everything in directory mode, it will be easy for you to change the scripts, though I of course can't warrant that something else won't break if you do.

I have had strong negative reactions against some modules I've played that had very unfair combat that came out of nowhere, when the module didn't even suggest that it had anything to do with combat until that point. This one, however, should be fairly balanced, and have combat only where it makes sense to have it.

#274
Tchos

Tchos
  • Members
  • 5 072 messages
I tested the smith hammer with a workbench, and the mortar and pestle on some animal parts, and both seemed to work fine. I'm also using the SoZ Module On Load script.  I'm guessing if you were having trouble with that, which was fixed when you changed the module on load script, then perhaps it was missing the line:

SetModuleSwitch (MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS, TRUE);

which should be in there.

Modifié par Tchos, 25 juillet 2012 - 08:19 .


#275
Dorateen

Dorateen
  • Members
  • 477 messages

Tchos wrote...

I tested the smith hammer with a workbench, and the mortar and pestle on some animal parts, and both seemed to work fine. I'm also using the SoZ Module On Load script.  I'm guessing if you were having trouble with that, which was fixed when you changed the module on load script, then perhaps it was missing the line:

SetModuleSwitch (MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS, TRUE);

which should be in there.


Thank you, I will take a closer look at that. Also, when you have your campaign up, I'm going to compare the death scripts as well and see if I can get that area transition thing worked out.

Of course, this will make me reconsider how to handle low-level party member deaths, without an easy res option.

Hmmm.