Aller au contenu

Photo

Monsters who actually use their Powers


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

#26
JonnieRS

JonnieRS
  • Members
  • 70 messages
Colorsfade,

I have to get this script for testing mods. While the mod I am working has 15 levels in depth it really has about 30 different levels when you consider subsidiary levels. The challenges get to epic levels pretty fast and something like what you described for testing would absolutely be required.

Also I am glad the AI is coming along nicely. Let me know if I can help.

#27
ColorsFade

ColorsFade
  • Members
  • 1 267 messages
I was about to PM you JonnieRS.

I'm probably going to put something up on dropbox this weekend. I figured I'd give you credentials to download. I don't want to push this to a public place yet like the Vault. I'd prefer to do it privately and have you give me some feedback so I can polish.

I think in the state it's in right now it should do quite well. Any features changes or usability changes we can work on together. How's that sound?

#28
JonnieRS

JonnieRS
  • Members
  • 70 messages
Great! My email is jscherzi@cox.net. I 've never used dropbox but I am sure it won't be a problem.

#29
ColorsFade

ColorsFade
  • Members
  • 1 267 messages
I sent you an email a few days ago Jonnie. Did you get it?

AI is getting close to being "done" - at least for what I would want to do with it and a first "release" of sorts. Let me know if you're still interested in it.

#30
JonnieRS

JonnieRS
  • Members
  • 70 messages
Yes I got your email. I have been busy working on conversations for my mod. Very involving and I use the Quest log to update my quest stage through conversations. I remain very interested in everything we have discussed including the "advanced NPC and monster AI" as well as the mod testing system.

I do have all of my areas laid out in the Toolset including the outlying wilderness areas which include a forest, a swamp and a coastal hilly area. I have the ground level areas (2) and level 1 and 2 completely laid out for the main dungeon. I have levels 3, 3A, 1A and Level 4 of the dungeon mapped out on paper with documented encounters but not set up in the Toolset as yet.

As I mentioned I am working on the convos, some of which are pretty complex depending on the alternatives of the participants and the quest stages.

I look forward to helping you test your monster AI system.

#31
JonnieRS

JonnieRS
  • Members
  • 70 messages
Colorsfade,

How is the monster AI coming. I remain interested.

#32
ColorsFade

ColorsFade
  • Members
  • 1 267 messages
It's good JonnieRS.

I am totally unsure if it's something you're going to want to use though. It's not a plug-and-play type of system. You actually have to script the AI for your creatures. This just makes it easy (IMO) to define what you want your monster to do, when you want them to do it, and who you want them to target.

I've been working on dispelling and healing (because it is something I feel the default AI really lacks). To test I created a party of four humans: 2 Fighters, 1 Wizard and a Cleric. They are all level 7 and then I auto-level my party (PC + 4 companions from the OC) to level 7 as well.

The cleric is pre-configured with healing spells at the ready, and then other spells such as Prayer, Bless, etc. She actively checks her group every round to see if anyone of her allies is below 50% health (this is something you configure in your AI script for the cleric). She then heals the ally who is lowest in health. If there is no ally below 50% health, she will start the fight by Blessing and casting Prayer. After that, she will flip a coin and choose: 50% of the time she'll try and attack the nearest player character with her melee weapon, or she might try and cast a spell like Bane on a PC Fighter (something you can do really easy with my AI is say, "Attack a Fighter with this spel", or "Attack the Lowest Will Save PC character with this spell").

In doing the fight several times I found this made it MUCH more challenging to have a cleric operate more like a PC cleric might. It definitely makes you want to kill the cleric faster :)

I've also just finished the dispelling code. The way the AI was setup did not make it easy to do dispelling. Either your creature would try and dispell every turn, or they would do it randomly (which is not very smart). I wrote some new code to allow the creature to be smarter about it. They will dispell one of your characters (person with the most buffs is a good way to target) and then you can tell them to wait a few turns before looking to dispell again. This ends up being much better.

I have a couple other pieces of the AI left to code:

1) Area of Effect spells. The AI works GREAT for single-target spells and cone spells (Prismatic Spray can be fun). I have a level 17 undead Reaver with about 400 HP that I test against with a level 17 party. He will actively cast single target death spells like Finger of Death, etc, at my party. And he smartly targets, looking for the creature with the lowest resits/save against the spell (again, something you have to write into the script yourself, and I have done it in this case). I tell you... he can wipe your party out pretty quick if you aren't careful (which makes spell protections very valuable).

But, what I haven't done yet is write AI for Area of Effect spell casting.

What I want you to be able to do in the AI is tell the creature something like "If you see three or more PC creatures collected together and you are not in the blast radius, then cast Fireball". To do this takes a new targeting enumeration that I am working on. It's a simple enough algorithm to write but I haven't tested it yet. Plus, there's another algorithm already in the scripting engine in the Dispelling script that might work by default. So I have some work to do and things to try out.

Once the area of effect stuff is done then I think the AI is ready for a trial run. I have a test module and a book on a pedestal. You click the book and it starts a conversation that allows you to choose the encounter you want to test against. So far just the Reaver and 4-party cleric test are there, but I'll add another couple of samples before it's done.

Then you can open up the scripts for those creatures and see how to use the AI. I am adding lots of comments in the scripts so it should make sense on how and why something works the way it does.

Going camping this weekend though - so nothing to report for a few days.

#33
JonnieRS

JonnieRS
  • Members
  • 70 messages
Colorsfade,

Thanks for the feed back.

You said "It's not a plug-and-play type of system. You actually have to script the AI for your creatures. This just makes it easy (IMO) to define what you want your monster to do, when you want them to do it, and who you want them to target. "

If you comment elaborately in the script what the user (in this case me) needs to change or input to achieve a monster with a better AI I should be able to test and use the script. I would envision using this script for characters that have magical or clerical alternative spells to use. As I have written down a strategy for each magical or clerical NPC I have a good number of cases to test and hopefully incorporate in my game.

For instance, I have a Spectre - Wizard (9th level wizard) who is also protected by two iron golems.
Strategy: The spectre/wizard will hang back as long as the golems are active
1. Golems attack PC party
2. Casts Hold monster on strongest looking part member.
3. Casts wall of Fire damage PCs and heal golems
4. Cast Fireball at party
5. Cast Fireball at Party
6. Cast Fireball at Party
7. Casts Cloudkill (golems are immune, PCs are not immune)
8. Uses other spells in random fashion including dispel magic if necessary
If the PCs destroy the golems the spectre/wizard attacks in melee, with his spectre abilities (undead traits) including 1D8 damage and energy drain (2 levels), turn resistance +6

If I can replicate an encounter like this one or approximate it, then learning your AI system will be worth any effort. BTW, the party level for this encounter should be at 9th level and above.

I have encounters with lower level adversaries if you need any additional test situations.

As long as I can ask you questions (via email) I believe that I could incorporate this AI into my mod.

You said, "In doing the fight several times I found this made it MUCH more challenging to have a cleric operate more like a PC cleric might. It definitely makes you want to kill the cleric faster :)"

That's really quite an accomplishment. It almost like having the DM from the old paper and dice days built into the computer.

You said,"If you see three or more PC creatures collected together and you are not in the blast radius, then cast Fireball". To do this takes a new targeting enumeration that I am working on. It's a simple enough algorithm to write but I haven't tested it yet. Plus, there's another algorithm already in the scripting engine in the Dispelling script that might work by default. So I have some work to do and things to try out. "

You might want to use two or more PC's, but the logic seems fine.

You said,"Then you can open up the scripts for those creatures and see how to use the AI. I am adding lots of comments in the scripts so it should make sense on how and why something works the way it does. "

This sounds great, just remember you can't have too many comments especially for me.

Have a good time camping.


JonnieRS

#34
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

You said,"If you see three or more PC creatures collected together and you are not in the blast radius, then cast Fireball". To do this takes a new targeting enumeration that I am working on. It's a simple enough algorithm to write but I haven't tested it yet. Plus, there's another algorithm already in the scripting engine in the Dispelling script that might work by default. So I have some work to do and things to try out. "

You might want to use two or more PC's, but the logic seems fine.

JonnieRS


The number of characters to look for is configurable. 

In the AI code I'm writing, if you see a number 9like 50%, or 3, whatever), that's a parameter you configure when you make the method call. I do NOT like to hard-code anything at all. So all the functions are very flexible. 


The sample battle you describe is definitely something you can do with this AI. And pretty easily. 

#35
JonnieRS

JonnieRS
  • Members
  • 70 messages
Colorsfade,

I thought that might be the case with regard to number characters in the blast radius.

I have been working on companions that the principle PC may want ask to join him/her (mostly companion convos). I have 10 different companion choices so the player can put together any type of party he/she may want. I need to make sure I limit the party to 6 members, right its seems unlimited.

I have decided to have the new Player (most likely level 1 and unarmed) go see a sage, where, if passes a test, he gets leveled up to 4th level and can chose some equipment. I assume the level up script will reset the companions accordingly. The character has be of good alignment or the sage won't even talk to him. Then he is asked three questions (really easy ones). If he gets any of them wrong he is teleported out of the sages house, but he can try again.

None of companions will bother with the Player unless he has the sage's blessing. There is no way a single character will survive even the initial encounters.

Looking forward to you AI script.

#36
ColorsFade

ColorsFade
  • Members
  • 1 267 messages
Here's a quick update: AoE Spellcasting WORKS :-)

I cannot explain how giddy I am about this. It took half a day to write the algorithm and a whole lotta testing before I got the kinks worked out, but was it ever worth it...

I created a copy of my level 17 Reaver and gave him a bunch of AoE spells like Fireball and Ice Storm. I made him spend the first 3 turns buffing himself so you have time to position your party around him in various ways.

I use companions from the OC to give you a party of 6: Elanee, Neeshka, Sand, Grobnar and Z and your PC.

I position a few of those companions away from the Reaver in a ranged-attack distance and then I attack with my PC and Neeshka at melee distance. I have the default PC AI turned off so characters will essentially "stand their ground" and I don't have to manage the party.

The Reaver, after buffing, runs the algorithm and finds the first location in the Area that fits the criteria you pass in. If the algorithm finds a "valid" location, it casts the specified spell.

One value you can pass to the function is a boolean to determine whether or not it's okay for the caster to be in the blast radius (I play on Hardcore, so I don't want that to happen). So while the algorithm is running and finding test locations, if the enemy caster is inside the proposed blast radius, it considers that location invalid and goes on to the next one. If you're playing on a lower setting or if your enemy casters are immune to whatever spell they are casting, then you simply turn that off and make it OKAY for them to be inside the blast radius.

The algorithm is pretty cool. It tests all combinations of the party members (maintaining minimum party size) to find a CENTROID location (this ends up being easy math).

So, for instance, if you specify (as I did) a minimum party size of 3, then the algorithm will go through every combination of the 6 party members to find possible spell locations. Given the possible permutations, you're going to end up testing for party sizes of 3, 4, 5, and 6 (since the minimum I specified was 3).

Once the algorithm finds a potential centroid location then it starts testing the individual party members to see how far away from the centroid they are. If they are INSIDE the minimum specified "blast radius" distance passed to the function call (I use RADIUS_SIZE_LARGE for most of them) then it adds up a counter. If the number of valid targets inside the blast radius is equal to or exceeds the number you specified (in this case, 3) then it considers that location valid and it uses that location to cast the AoE spell.

I watched with delight as my Reaver found the locations and repeatedly cast AoE spells at the location, smacking my party members who were standing off at range distance.

I don't have much else left to do with the AI. I need to make sure undead creatures, when healing, use harm spells on themselves. I also want to take some time to write some AI for MASS HEAL spells, but I think I'll wait until version 2 to do that. I want to get this in your hands as fast as possible.

The AoE stuff.... is just fun to watch.

#37
JonnieRS

JonnieRS
  • Members
  • 70 messages
This sounds great. Your algorithm sounds like it takes all the key variables into consideration congratulations. I know the satisfaction when you get a complex program to do what you want it to.

It also makes the PCs consider taking a ranged position rather than a melee position. It also puts a greater premium on buffing up the party correctly and seeking items that increase your resistance especially for your magic users and ranged weapon PCs. My old strategy of just sending a couple of tanks and then pelting the monster with missiles and spells may no be viable in all cases.

I have all the conversations in and actually edited (mostly). I have the first three levels of the quest in the journal. I also have finished the side adventure areas (swamp and forest) and the made crypt entry area which leads to main dungeon. The first level of the dungeon (challenge rating 5) does not have any intelligent monsters. The second however, has two intelligent monsters and they will be the ones first getting the "Colorfade" brain transplants. Then its test, test, test.

#38
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

JonnieRS wrote...

It also makes the PCs consider taking a ranged position rather than a melee position. It also puts a greater premium on buffing up the party correctly and seeking items that increase your resistance especially for your magic users and ranged weapon PCs. My old strategy of just sending a couple of tanks and then pelting the monster with missiles and spells may no be viable in all cases.  


You are correct on all counts. 

For starters, what I learned in testing is that you want to spread out your forces when attacking a creature with this algorithm. If your party is spread out then the algorithm can't find enough creatures in the blast radius to calculate a valid location (but, of course, you can counter that a bit by reducing the minimum required targets from 3 to 2). I was watching the debug text coming across my chat window, wondering why, in one particular test, he wasn't casting the AoE spells. Then I noticed the spacing of my party. I moved Elanee and Sand closer to Grobnar and immediately he started slamming them with Fireballs. So it clearly works. 

I'm going to setup one more test with combinations of spells - AoE and single-target. I think it's going to make for a very challening fight. If the monster can't find a valid AoE location he'll switch to his single-target spells like Finger of Death. 

Which means you are correct: it's going to make a big difference if you have proper resists or immunities. Those immune to death magic amulets are going to come in handy, as are items that make you immune to holds, petrification, etc. For that reason I intend to put a lot of "resist gear" in this mod. There are going to be a lot of encounters where you're going to want to equip appropriate items and they will make a huge difference in your survivability... I'm excited about the opportunities!

JonnieRS wrote...
My old strategy of just sending a couple of tanks and then pelting the monster with missiles and spells may no be viable in all cases.  


Exactly! I thought combat in the OC, for the most part, was pretty simple and straight forward. I want to challenge players to approach it differently with this AI. I want buffs and equipment to matter. 

#39
JonnieRS

JonnieRS
  • Members
  • 70 messages
Without some sort of AI program such as yours the dangerous enemies with spells and special abilities were not very effective and Boss fights were anti-climatic. The enemy AI in the game was not up to the task. The whole premise of my mod is that there are certain powerful individual enemies that have to be deal with to accomplish the stages of your quest. If I cannot get them to use their special powers than the mod loses it edge.

I look forward to using your brilliant creation. Thanks

#40
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

JonnieRS wrote...

Without some sort of AI program such as yours the dangerous enemies with spells and special abilities were not very effective and Boss fights were anti-climatic. The enemy AI in the game was not up to the task. The whole premise of my mod is that there are certain powerful individual enemies that have to be deal with to accomplish the stages of your quest. If I cannot get them to use their special powers than the mod loses it edge.

I look forward to using your brilliant creation. Thanks


You and I are thinking the same think Jonnie.

I felt like all the boss mob fights were pretty lame (and not nearly enough of them). That was probably the thing I enjoyed most about games like Everquest and Diablo - encountering those "boss mob" fights that really tested your mettle. 

My campaign has the same goal as yours: boss mob fights that matter. 

I started into my first module, the prologue, and immediately in one of the first dungeons I pit the party against a necromancer and some skeletons. The necromancer, on default settings, was do lame! He'd cast his level 0 spells at the party first! WTF! I had given him spells like False Life and Ghoul Touch and Scare and he would be dead before he'd have a chance to use them. And this was a level 3 encounter! 

Hence my work on the AI. I just had to have way to make even the lower level fights more interesting. 

I'm excited to get this to you. Won't be long now. Sometime this week. Only a couple more tweaks. 

#41
JonnieRS

JonnieRS
  • Members
  • 70 messages
Colorfade,
I have quick question for you. I would like to position a condition before a trigger. The trigger is a non-detectable trap if the party does not have certain item. This is a death trap with no recourse if they do not have the item (ebon key). The trigger gives the players a final message before the party is wiped out by a epic sonic trap. If the players have the key then nothing happens.

We are definitely on the same page with regard to boss monster AI. I am supporting you all the way. I made an interesting monster today aptly named the dung monster. He is resistance to everything except direct attacks, rejuvenates when wounded and has the restoration special skill.He is basically impossible to kill. He has 140 HPs, 2 attacked per round including a 2d8 slam and 1d8 claw with acid damage. He not only stinks but also can splash acid on players. He was created by accident. He was formerly a mimic posing as a toilet seat and he ate a wizard holding a staff of wizardry. This transformed the mimic in this enormous stink, acidy monster. The best strategy is to run away.

#42
ColorsFade

ColorsFade
  • Members
  • 1 267 messages
I didn't catch the question Jonnie :)

#43
Dann-J

Dann-J
  • Members
  • 3 161 messages

ColorsFade wrote...

 If the number of valid targets inside the blast radius is equal to or exceeds the number you specified (in this case, 3) then it considers that location valid and it uses that location to cast the AoE spell.


I've noticed with the standard AI that enemy mages cast AoE spells at locations on the ground, which is pointless if your party is running towards them at the time. The spell ends up landing well behind the party.

Would targetting the party member closest to the centroid be a better option, rather than the location on the ground? That way if the party is on the move the AoE spell hits at least one of them.

A more complex option would be to determine a player's (or the party's average) speed and direction, factor in the casting time of the spell, and try to aim where the player/s might be when the spell hits (assuming constant speed and direction).

#44
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

DannJ wrote...

I've noticed with the standard AI that enemy mages cast AoE spells at locations on the ground, which is pointless if your party is running towards them at the time. The spell ends up landing well behind the party.

Would targetting the party member closest to the centroid be a better option, rather than the location on the ground? That way if the party is on the move the AoE spell hits at least one of them.


I'd have to test it Dan, but my guess is that when you cast a spell at a party member, the game converts it to a location. And once the location coordinates are fixed, that's it. 


DannJ wrote...
A more complex option would be to determine a player's (or the party's average) speed and direction, factor in the casting time of the spell, and try to aim where the player/s might be when the spell hits (assuming constant speed and direction).


I think the simplest way to deal with this is not to cast AoE spells as the creature's first action. Because, as you say, the party is on the move. Let them buff first, and then start figuring out if there are good AoE opportunities. The PC player has to eventually stop moving everyone and start focusing on fighting. That's when the AoE can break out. 

Also, terrain and blockaids can be used to hinder the PC party and prevent movement while you blast away with AoE. The barricaids in the Orc valley in the OC is a case where AoE spells could have been devistating while the PC party is trying to clear the blockaids.

Last - if you really wanted to "lead" the PC party with some spells, some simple triggers and waypoints would work wonderfully (I've already thought of doing this in an encounter and will try and report). Just have the enemy casters positioned beforehand, then target specific waypoints when the first PC creature crosses a given trigger. If the geography is such that it's a narrow canyon (outdoors) or a just about any underground hallway then you're going to get the PC party real good (this would also be an ideal way to land a Wall of Fire or Wall of Dispelling). 

Better AI can do a lot. But other simple tricks can help. 

#45
JonnieRS

JonnieRS
  • Members
  • 70 messages
Colorsfade,

That's alright, I wrote a script which fired on entering the trigger area. I am not sure if it works as yet I will have to set up a test.

I read Dannj 's comment but I don't believe that I would put to much effort is trying write code to guess where player might be. In many of the highly magical Boss encounters his minions are actually blocking the player ability to rush him anyway. Since he is most likely an evil guy he probably won't hesitate to use some damaging area spell even if his minions are in the way. In the case I sent you the Iron Golems actually benefited from the wizard's fireballs. Smart evil magic-users always someway of blocking PC progress so they can use their spells.

#46
JonnieRS

JonnieRS
  • Members
  • 70 messages
ColorsFade,

How's everything coming. along?

I don't know if you ever tied to use any of the RWS tile sets but They seem to have a slight problem. Every time I use a tile that changes the chasm set or deep halls set higher or lower the tile will not bake and therefore it stops any player progress pass that spot. I had spent quite a bit of time putting together an underground area that had different levels (It was like putting together a very difficult jigsaw puzzle) only to find out that I couldn't walk there. I corrected it all, but this seemed strange for such high rated tile sets (on the vault). Oh well, al least your little script you corrected for me works great.

John S

#47
JonnieRS

JonnieRS
  • Members
  • 70 messages
Quick question for the anyone. When creating an item that is limited as to what class and alignment can used (equipped and operated) it, such as only good aligned clerics. There does no appear to be settings on the object properties. Any help would be appreciated?

#48
JonnieRS

JonnieRS
  • Members
  • 70 messages
Another question I have a were rat model in one of my mods. I thought it would be easy to transfer over to another mod, but I can't get the 2da appearance model to show up. Any suggestions? It is somewhat of a unique model to NWN2 but I do have a working model in another mod of my own.

#49
Tchos

Tchos
  • Members
  • 5 030 messages
This is usually caused by having two conflicting 2DAs in the same mod. If you have multiple haks attached, they may have 2DAs in them.

#50
Dann-J

Dann-J
  • Members
  • 3 161 messages

JonnieRS wrote...

Quick question for the anyone. When creating an item that is limited as to what class and alignment can used (equipped and operated) it, such as only good aligned clerics. There does no appear to be settings on the object properties. Any help would be appreciated?


You need to add some of the 'Use Limitation:' properties to the item.