Aller au contenu

Photo

ColorsFade's Development Journal


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

#426
Dann-J

Dann-J
  • Members
  • 3 161 messages

The reloading adventurers are in Throne of Bhaal. They just returned from you sending them off to get something you need. Their conversation implies they are level one or two. They decide to attack you, you turn into slayer form and slaughter them. They reload and just give you the thing you sent them for.

/Bondari reloads.

 

"Tim can cast Magic Missile!" :D



#427
Dann-J

Dann-J
  • Members
  • 3 161 messages

I took some time and rewrote the random treasure scripting. A couple things about the default mechanisms were annoying me. 

 

 

I also ended up writing my own loot scripts in order to give myself finer control over things, although I avoid having to rely on 2DAs or hardcoded 'switch/case' lists whenever possible.

 

I have an OnOpen script that randomly generates container contents based on local variables. One variable is a comma-delimited string of the templates of the items I want a chance to spawn. Another variable is a comma-delimited string of percentage likelihoods of each spawning. A third variables is a (you guessed it) comma-delimited string of maximum numbers of each item. If there are no percentage likelihoods of 100% then there's a chance the container will be empty.

 

The include file x0_i0_stringlib has some handy 'token' functions (not to be confused with conversation tokens) for dealing with delimited lists. I mostly use GetTokenByPosition() in a loop, with the number of iterations determined by GetNumberTokens().

 

Another OnDeath script I wrote grabs unique items from a chest in an inaccessable part of an area in that module. One of the items is chosen at random, copied to the creature's inventory, then deleted from the chest. That way I can ensure that certain special items only ever spawn once per game. It would have been interesting to have it run from an OnSpawn script so the creature might be able to use the unique item against you, but I've got a morale system for my overland encounters that enables enemies to run away (they disappear and you get half XP if they enter an 'escape' trigger before your finish them off). I didn't want fleeing enemies effectively destroying unique items - although I suppose they could drop them on the ground as they flee. Then again, do you really deserve to get a unique item for letting an enemy escape?

 

Yet another OnDeath script spawns appropriate ammo drops depending on what weapon the enemy was shooting at you with, with variables specifying the minimum and maximum stack size. If you're running low on a certain type of ammo, you simply have an overland encounter with a creature that use the same ranged weapon type you do (crossbow-wielding bandits, xvart slingers, gnoll archers, etc). It makes sense that an enemy that fired at you would still have ammo left when you killed them, but I didn't want stacks of 99 dropping every time.



#428
Tchos

Tchos
  • Members
  • 5 054 messages

I wrote my loot scripts similar to yours, Dann, with comma delimited string loot tables instead of 2DAs, and controlled by local variables on the containers and creatures.  I think I went a little further, though, breaking all possible loot down into 16 categories, and allowing you to enable or disable each category from its table being considered as part of the overall loot table for the object, as well as set minimum and maximum loot, percentage chance, etc.  I also wrote an alternate script for applying the SoZ loot system to a container, if I want to provide a custom loot table on the fly, or ensure a specific item.



#429
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

 

The include file x0_i0_stringlib has some handy 'token' functions (not to be confused with conversation tokens) for dealing with delimited lists. I mostly use GetTokenByPosition() in a loop, with the number of iterations determined by GetNumberTokens().

 

Hey, that's handy! Thanks for pointing that library out DannJ. I'd been wondering if something like that existed. There's some list manipulation I might need to do for mu custom AI later on. 

 

I considered doing something with the loot system that was as elaborate as what you detail here, but in the end what I was mostly after was speed; to just be able to drop a script and variable set on a creature or container and move on. Since I use blueprints for creatures, this ended up being a really fast way to handle random loot. The 2DA's were already there and only required minor tweaking. The whole process is really quick now and does't produce crappy random loot.  

 

For anything other than random loot available in the 2DA files, I specifically place loot in containers. Every treasure chest and boss mob has specific loot. I keep a spreadsheet of all the placed loot so I know if I am overdoing a specific kind of loot, or if I'm not giving enough of certain types of loot. And then there's the shopping aspect of the mod, which should work nicely for filling in the gaps. 



#430
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Well, this was a good one... I'm sure I can't be the only modder who has done this... 

 

I opened an area I had not worked on in a while. I was quite upset and disappointed because about 90% of the placeables were missing. I was at a loss to figure out how it happened. I thought maybe somehow my 2DA had gotten corrupted, or something else weird had happened. 

 

Anyway, I didn't dwell on it for a long time, instead choosing to rebuild the area. 

 

Then I opened another area - a 3rd party area I had imported into a completely different module - and it too had a bunch of missing stuff. So, I decided to do the same thing - rework it, adding in all the stuff I thought was missing. But this area had a lot of trees, so I went to turn off the trees and noticed that somehow the Environmental Objects had gotten turned off... 

 

Turned that knob back on and bingo - placeables showed up. 

 

What a head-scratcher. 



#431
JonnieRS

JonnieRS
  • Members
  • 70 messages

Colorsfade,

 

With the demise of the old vault I can no longer download your prelim mod. Is there another source?

 

JonnieR



#432
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Nexus JonnieRS: http://www.nexusmods...ter2/mods/878/?

 

And it's on the new Vault as well:  http://neverwinterva...ng-sky-prologue



#433
kamal_

kamal_
  • Members
  • 5 250 messages

Nexus JonnieRS: http://www.nexusmods...ter2/mods/878/?

 

And it's on the new Vault as well:  http://neverwinterva...ng-sky-prologue

I just noticed new Vault has links that point to the old Vault for RWS all-in-one.



#434
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Yeah, I loved old Vault... 

 

I'll see if I can't find the link to Nexus or new Vault and get that changed. Unless someone can pass along the link before I find it :)



#435
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

So this was really cool thread I stumbled upon that helped with an idea I have had for a long time. I'm betting some other modders have done something similar. 

 

What I wanted to do was provide "Safe Rooms" in my interior dungeons where your party can rest safely and not be interrupted by the Wandering Monster System (which my campaign uses liberally). The missing piece for me was the call to GetFirstSubArea() which is mentioned in that thread. 

 

I wrote a heartbeat script for a Generic Trigger and printed out a bunch of debug lines to ensure this works.

 

If you gather your party inside the safe room (and close the door, but the door check isn't written yet because I can't get the door to show up in the dungeon; tangential story), then your party will rest and not be interrupted (because the script turns off the Wandering Monster variable). The library ginc_restsys has an internal call to WMGetWanderingMonstersDisabled(), which checks the VAR_WM_DISABLED variable. If it's TRUE, Wandering Monsters are not spawned when the party rests. 

 

 

The only other thing necessary was to also set a local string variable on the Area so that two Safe Rooms don't unset the WM variable. Each HB script is checking to see if anyone in the party is NOT in the room. Well, if you have more than one Safe Room in an Area, then this is always true. So the local string variable ensures that only the safe area last entered can turn the WM variable off and allow wandering monsters to spawn again. 

 

I constructed a dungeon and put two safe areas in it. Then I set the Wandering Monster values to 100% so that they would always spawn if you were not in a safe room. As long as all party members were in one of the safe rooms, it worked, and they rested peacefully. 

 

I really like this... means I can crank up the chances of Wandering Monsters attacking the party in most dungeon locations. For me, this was the missing piece to making Wandering Monsters way more fun. If you really want to rest for 8 hours and memorize spells, you may need to backtrack a bit through a dungeon and find the nearest safe room. 

 

The other thing I plan on doing with the script is having it print one-time message. Should any party member enter the safe room the first time, it will send a floating text saying, "You feel it is safe to rest in this room". That way the player will know which rooms are safe, and which are not. 



#436
JonnieRS

JonnieRS
  • Members
  • 70 messages

Colorsfade,

 

I downloaded you mod and followed the instructions. I already has RWS total in my hak folder. When I went start the module I got the message that the file was corrupt. This is form the new vault.

 

Garet Jax



#437
Eguintir Eligard

Eguintir Eligard
  • Members
  • 1 832 messages
I'd just leave a placeable like a bed that you converse with to rest and closed the door for effect. Actually that could be a reason to keep a rogue... Must posess lock door skill! I like it I'll use that

#438
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Colorsfade,

 

I downloaded you mod and followed the instructions. I already has RWS total in my hak folder. When I went start the module I got the message that the file was corrupt. This is form the new vault.

 

Garet Jax

 

The download is most likely corrupted. 

 

You can check the log file to see if there is a more specific error. Log files are located here: 

 

C:\Users\YOUR_USERNAME\AppData\Local\Temp\NWN2\LOGS



#439
JonnieRS

JonnieRS
  • Members
  • 70 messages

Colorsfade,

 

I erased all of the old files and downloaded it again. I go the same message about a corrupt file. Have other people successfully downloaded it from the new Vault? This is the first module I have downloaded from this site. Is there another source for a download? I am looking forward to playing it after reading your blog for the last eighteen months.

 

Garet Jax



#440
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

I'd just leave a placeable like a bed that you converse with to rest and closed the door for effect. Actually that could be a reason to keep a rogue... Must posess lock door skill! I like it I'll use that

 

I don't have a lot of dungeons with beds in them :)



#441
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Colorsfade,

 

I erased all of the old files and downloaded it again. I go the same message about a corrupt file. Have other people successfully downloaded it from the new Vault? This is the first module I have downloaded from this site. Is there another source for a download? I am looking forward to playing it after reading your blog for the last eighteen months.

 

Garet Jax

 

Yep, Nexus: http://www.nexusmods...ter2/mods/878/?

 

Unfortunately, they are down for maintenance right this minute. But many users have downloaded from there and been successful. You're the first person I've heard have troubles with either download location. I don't think a lot of users have got it off the new Vault (only a couple votes there), but there's been a couple hundred downloads on Nexus and I've had a lot of positive feedback from folks. 

 

So try Nexus when they come back up from maintenance. Bet that works for you :-)



#442
Eguintir Eligard

Eguintir Eligard
  • Members
  • 1 832 messages

A bed is an example. A fire pit, cluster of rags or even soft giant rat poo could be clicked on for all I care.



#443
andysks

andysks
  • Members
  • 1 650 messages

I use a more simplified version which I got some time ago from a thread around here.

 

void main()
{
object oPC = GetEnteringObject();
object oArea = GetArea(oPC);

AssignCommand(oPC,ActionSpeakString("This looks like it may be safe enough to sleep here."));
SetLocalInt(oArea,"WM_DISABLED",1);
}
 

 

It just needs one for the OnExit too.



#444
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

I use a more simplified version which I got some time ago from a thread around here.

 

void main()
{
object oPC = GetEnteringObject();
object oArea = GetArea(oPC);

AssignCommand(oPC,ActionSpeakString("This looks like it may be safe enough to sleep here."));
SetLocalInt(oArea,"WM_DISABLED",1);
}
 

 

It just needs one for the OnExit too.

 

That would certainly work, but I wanted it to be a bit more involved. I wanted all the party members to have to be in the room, and for the door to have to be closed for the monsters to get turned off. 

 

My final script wasn't really elaborate, and does exactly what I had hoped for. 

 

The only thing I really need to do now is alert the user to the mechanics of it, and I intend to put those notes in the readme.txt and as a load screen tip. If they don't close the door or gather their entire party into the room and get ambushed by monsters, that's on them :)



#445
rjshae

rjshae
  • Members
  • 4 492 messages

A bed is an example. A fire pit, cluster of rags or even soft giant rat poo could be clicked on for all I care.

 

The skeletal remains of a previous adventuring party laid out on their bed rolls...


  • Eguintir Eligard aime ceci

#446
JonnieRS

JonnieRS
  • Members
  • 70 messages

Colorsfade,

 

I downloaded you mod file from Nexus and it worked perfectly. One or more files on the new vault are corrupted in some way. I am enjoying the mod thus far.

 

Garet Jax



#447
JonnieRS

JonnieRS
  • Members
  • 70 messages

Colorsfade,

 

Did you implement your "smart" monsters routines for this module? I thought your work on developing the scripts to implement "thinking" enemies was brilliant.

 

 

Garet Jax



#448
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Colorsfade,

 

Did you implement your "smart" monsters routines for this module? I thought your work on developing the scripts to implement "thinking" enemies was brilliant.

 

 

Garet Jax

 

For some monsters, yes.

 

Let me try not to spoil too much with specifics, and say this: 

 

1) Anything that casts spells probably has custom AI.

2) Anything that shoots a bow and arrow or crossbow has custom AI. 

 

In the case of the archers, it's very simple AI - it keeps all the archers from making their first shot at the same PC party member. I found this default behavior annoying; it made more sense to me for archers to take aim at multiple opponents. So when you march into a room with a bunch of archers, they are not all going to shoot at the first person who enters (which is default behavior). Instead, they're going to randomly select targets and shoot. It makes for a better encounter, where archers are concerned, IMO. 

 

In the case of some clerics, they do some smart spell casting: they tend to buff first, before you get into range, and then they cast offensive spells, keeping a watchful eye on nearby melee fighters. They will heal allies when allies drop below a certain health number (which is variable based on my scripting). They will also toggle into Defensive Casting Mode if you get too close tot hem. The healing of allies tends not to have such a big effect in the prologue because you're low level and creatures die fast, but I think it will make a difference in later chapters (and it made a difference in playtesting when I was using level 15 characters). 

 

Wizards operate intelligently with their spells, and I think they are much more formidable foes now (and this, honestly, was a huge reason for me doing this campaign, because I love wizards and EK's, and I wanted them to be fearful opponents).  

 

I found in the default AI that wizards tended to cast way too many level 0 spells and not use their useful spells before they are dead. In this module, they will tend to self-buff first (and often by instantly casting spells via a special Rod of Sequencing - more on that later).

 

There is an encounter, for instance, where you will have a cut-scene, and the wizard will be on the other side of the room, blocked by the natural geography of the room's items. When the fight starts, the wizard will immediately buff with level-appropriate, class-specific spells. Then the wizard will begin casting offensive spells in a smart way. It's a much more challenging encounter this way. 

 

For instance, if the wizard has a Charm Person spell memorized, they will target the PC party member with the lowest Will save, since Charm Person is negated by Will. This gives the spell its best chance to succeed. The wizard will continue casting offensive spells until they are left with level 0 spells, at which time I let the default AI take over, and the wizard can either cast a level zero spell or go into melee (if the wizard had a ranged weapon, which it does not, I'd probably write AI for that). 

 

Rods of Sequencing

 

And about the Rods of Sequencing: I have (re)designed three rods for this game, they are Lesser, normal and Greater. The game provides three default properties for Rods of Sequencing, but these only allow you to memorize and cast 1, 2, or 3 spells at a time. My rods allow you to store up to 5, 10 and 15 buff-only spells that you may instantly cast on yourself at the start of a battle. Unfortunately, the rods require some scripting changes that do not make them easily portable to other mods (I'm still looking into that, actually, because I'd love to use them in the OC and MoTB). 

 

I wrote (or re-wrote, depending on your point of view) the rods of sequencing because I normally play an EK in NWN2, and by level 10 I end up with about 10 self-buffs I have to cast on myself before battle; by level 20 I don't even know what the count is, but 15 seemed like a good number for the final rod.

 

I consider buffing a core component to playing a spellcaster, but quite often the game is designed in such a way that it makes it difficult to maintain buffs effectively. For instance,  found in the OC that many battles start at the end of a cut-scene, and buffs, especially at lower levels, wear off before a cut-scene ends. I didn't want the NPC's to be at an advantage and be able to self-buff really quickly, while the PC is then hamstrung and can only get off one buff before the fight. I wanted the odds to be more even, and I wanted both sides to be able to use their spells effectively. 

 

So, I provide the rods of sequencing for the PC party members (and you can find or buy multiple rods during the campaign). NPC spellcasters will instantly cast buffs at the start of fights; I do this because it seems unfair to me that when a battle starts, spellcasters don't have the advantage of having their full arsenal of defensive spells active, but a melee fighter has all their gear equipped and ready to go. So to even things out a bit between melee and casters, I make sure NPC's immediately cast buffs (simulating a rod of sequencing) and the PC has the rod of sequencing to use if they wish. 

 

The idea is, as always, to make encounters more challenging. There are a lot of of wizard spells, like Spell Breach, that don't see very much use because NPC spellcasters in the OC and other mods don't fully buff before battle. I want players to have a chance to use their wide array of buffs and debuffs and maybe that ends up being the difference between winning and losing a battle. I notice as I play the OC again, most spellcasting amounts to "take Qara and cast lots of offensive spells". And that can be fun in isolated incidents, but I want something more complex and varied in a game. 



#449
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Colorsfade,

 

I downloaded you mod file from Nexus and it worked perfectly. One or more files on the new vault are corrupted in some way. I am enjoying the mod thus far.

 

Garet Jax

 

Thanks. 

 

I'll see about uploading a new version to the Vault then. 



#450
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Journal Entry: More AI

 

I spent some time this past week brainstorming encounters. I've done a lot of area building lately, and while nothing is complete, the areas for Chapter 1 are getting to the point where I can start adding encounters and testing them. And I really want to make some interesting encounters. 

 

I ended up putting some thought into different ways, within the constraints of the game engine, that encounters can be made more strategic, interesting, varied, etc. Just to make them different and less of a straight-up wade-into-battle fight. I came up with a laundry list and was pretty happy with the results. I am certain some of this stuff has been done before, but if any of it has not been done, I'm going to be happy to surprise some people. 

 

Most of the ideas are more applicable to higher-level encounters, but one idea ended up being something I thought could be applicable for a lower-level encounter, so I decided to open up an area from the prologue and re-write some battles. 

 

The idea was simply this: NPC's don't often use AoE spells, and when they do, they are employed in a very stupid way that causes everyone to get caught in them, their own allies included. But wouldn't it be much more interesting if you came upon a group of creatures, some carrying crossbows or bows, and as you ran toward them, some spell casters in their group launched an AoE, like Entangle or Grease, out in front of their archer array? If you did this in a confined space, it changes the battlefield geography a bit. Now the PC party is vulnerable to the archers, and they have to decide, do I try and wade across Entangle, and risk getting caught and shot to death, or do I try and take the time to go around the Entangle spells, or do I whip out a ranged weapon of my own (if I have one) and start firing back? 

 

Anyway, I decided to try it out and after a couple scripting snafus I was very happy to see it work. As you approach the enemies, you cross a trigger, and a couple Shaman launch Entangle spells at designated waypoints on the ground. You're not completely cut-off when the spells land - you can go around them because there is some real estate to do so, but your direct path is now cut off and if you do venture into the Entanglement you risk getting stopped (which did happen during a play test). The archers then pummel away, and the Shaman also break out other spells courtesy of the custom AI, like summon creature 1 and Sleep. I found that turning off the PC AI and micromanaging a bit helped to keep party members out of the entangle and made for a more successful ending. 

 

All in all, when it was over, I had one PC party member standing, which was a FAR CRY more intense than how the encounter was before, when my party was able to wipe out the enemies very quickly.  

 

A little change in the encounter made things much better, IMO. 

 

I can see some use for this particular idea in a couple places in the prologue, so I'll be adding it in places, which will give people who played the prologue as stand-alone a little different experience when the next Chapters come out.