Monsters who actually use their Powers
#1
Posté 19 mai 2013 - 04:41
For instance I have an undead monster called a black skeleton which has two special abilities, it can cause fear and weaken other creatures. It also fights with two shortswords so it has the dual welding feat, etc. Its suppose to be a CR6 monster but it never uses fear or weaken. Perhaps I am playtesting with too high a level protagonist (9th lvl paladin).
I have it as a 6lvl undead/6lvl fighter with two spec abilities. Any thoughts?
#2
Posté 19 mai 2013 - 08:11
Modifié par I_Raps, 19 mai 2013 - 08:12 .
#3
Posté 19 mai 2013 - 09:07
First, some attribute was too low (I think int was INT), so a sanity check in the spell script failed.
Then, he didn't find the right time to cast the spell. He was supported by several archers, so casting the spell should be his first action. I solved this by giving him a simple AI script: If he can cast hold person, cast it on the PC; otherwise continue with normal AI.
I think that the most efficient way to use special abilities is by using a cusom AI script like I described above, because you designed the creature and therefore know the best moment to use the abilities.
#4
Posté 19 mai 2013 - 02:54
That said - I haven't written anything so "generic" with it such that you could just attach my AI to a character and it would automagically work. My AI library is written for the purpose of making custom AI scripts for creatures easy to write. I use it to write AI for boss mobs and assistant boss mobs, to make those encounters more challening (which sounds like the case with your creature).
My AI allows you to tell your NPC Creature to do things like target a specific class type (fighters, divine casters, etc.), target the class with the weakest Will/Reflex/etc. save, or target characters with lowest hit points, AC, or spell resistance. The intellgent targeting really helps make fights harder.
From that point on, my AI has functions which allow you to tell the creature what order of spells or abilities to use, or to use specific abilties but in a random order. In the case of your creature, it would be easy to tell it, "Use Fear Ability first" or to randomly use it during the fight.
If you were willing to wait for a couple weeks, I would make it a priority to finish my AI and I could release a version 1.0 that you could then use. I'd include a simple mod to show how it works.
Or, I could help you write a custom script, if you were to describe what you wanted it to do.
Custom enemy AI is.... my thing. I love tinkering with it.
#5
Posté 19 mai 2013 - 09:19
I_raps, great advice, i made the same mistake.
Diophant, i agree with you that AI is the way to go.
Colorsfade, I can wait a couple of weeks, your custom AI sounds like just what I need for this mod.
Actually I have many enemy NPCs in this mod which have all sorts of special abilities and spells and being to control how they use them would be great. In developing the enemy NPCs I have even written out the strategies of how and when they would use their abilities when in combat. My scripting ability is limited (more of story teller) but I know enough to take a script and make some modifications if necessary. I will wait of you to complete the custom AI.
#6
Posté 19 mai 2013 - 11:12
JonnieRS wrote...
First of all thanks for all the replies.
I_raps, great advice, i made the same mistake.
Diophant, i agree with you that AI is the way to go.
Colorsfade, I can wait a couple of weeks, your custom AI sounds like just what I need for this mod.
Actually I have many enemy NPCs in this mod which have all sorts of special abilities and spells and being to control how they use them would be great. In developing the enemy NPCs I have even written out the strategies of how and when they would use their abilities when in combat. My scripting ability is limited (more of story teller) but I know enough to take a script and make some modifications if necessary. I will wait of you to complete the custom AI.
I'll put mine on the front-burner then.
I had stopped working on my AI for the time being. When I originally wrote it, I wrote only enough to make it work with two boss mobs in the prologue of my campaign. They are necromancers and I wanted them to use specific spells in a specific order (buffs first, mirror image, etc., then attack with their best spells against targets that made the most sense). This works and I have tested in in numerous test modules and in the actual game module (and I have to say, it makes the fight all the more entertaining).
There are some features to finish, so I will get to work on those. I'll use your Black Skeleton as a type of sample (creature with Special Abilities) and make sure those work. And then what I'll do is write a couple sample encounters for you to test and look at the scripting to see how you can adapt it to your work. Hopefully it fills the need.
I'll keep ya posted.
#7
Posté 20 mai 2013 - 04:38
Thanks for making the effort..Comparably speaking the Black Skeleton is a somewhat simple with only two special abilities (fear and weaken). But I have some other charcters (bosses) who have a more complex set of spells and abilities. So we should have enough characters for testing.
#8
Posté 20 mai 2013 - 05:09
These are the ones I've identified so far:
http://social.biowar...17119/1#7799517
#9
Posté 20 mai 2013 - 01:49
#10
Posté 20 mai 2013 - 04:12
JonnieRS wrote...
Colorfade,
Thanks for making the effort..Comparably speaking the Black Skeleton is a somewhat simple with only two special abilities (fear and weaken). But I have some other charcters (bosses) who have a more complex set of spells and abilities. So we should have enough characters for testing.
I have plenty of test subjects
I created several scenarios last night. I need to be able to test spell AI, melee AI, combat feat AI, healing AI, dispelling AI, etc. So I invented quite a few scenarios. What I'm going to do for the test module is provide an arena. There will be a book on a pedestal. You click on it and choose the encounter you want to face. It will tell you what is being tested and what to expect from the creatures you face. It will level your character and create a party of assistant companions for you (basically one of every class: melee, healer, wizard and rogue). In this way you'll get to watch the enemies target smartly.
As an example: One encounter will be a copy of the first encounter I wrote this AI for. You'll face a necromancer and a few skeletons. The Necromancer should buff himself first and then proceed to target specific members of your party with specific spells. For instance, he'll try to cast Fear and Scare on the creature with the lowest WILL save. He'll try and cast Ray of Enfeeblement on the Fighter to weaken him. He'll attack the Cleric with magic missile, etc. It's fun to watch it work.
Other scenearios will test things like creatures healing other creatures of the same faction. I want to make sure that if you're facing a party of enemies like your own party, that the divine caster is healing the fighters, etc. (this, of course, is going to make YOU want to nuke the cleric right away, haha!)
Another scenario I thought of (and I am putting this guy in my campaign) is I'm going to have you face a creature that uses Heal on itself when its hitpoints drop below 25%. It's going to be a special ability and he'll have several uses of it readied. Should be fun to watch...
I'm really hoping when I have this AI done and get it into other people's hands that it helps them (like you) make some cool encounters.
And then, of course, when you see something missing or want a function to do something - just ask. This is iteration 1.0 of the AI. I'll keep tweaking it. I figure my campaign is going to take 2 years to build. Plenty of time to keep improving the AI.
#11
Posté 21 mai 2013 - 01:53
ColorsFade wrote...
Another scenario I thought of (and I am putting this guy in my campaign) is I'm going to have you face a creature that uses Heal on itself when its hitpoints drop below 25%. It's going to be a special ability and he'll have several uses of it readied. Should be fun to watch...
The demilich blueprint has a special 'self harm' ability. Since harm spells actually heal undead, this is essentially a 'self heal' ability, but with an edgier goth-friendly title. In the few cases where I've pitted demiliches against things (notably a tarrasque), the standard AI doesn't seem to have them use it very consistently. They frequently refuse to endulge in self-harm, even for their own good.
And for the record - watching a pair of demiliches kill a tarrasque definitely falls under the 'fun to watch' category.
Modifié par DannJ, 21 mai 2013 - 01:54 .
#12
Posté 21 mai 2013 - 03:11
#13
Posté 21 mai 2013 - 02:40
DannJ wrote...
The demilich blueprint has a special 'self harm' ability. Since harm spells actually heal undead, this is essentially a 'self heal' ability, but with an edgier goth-friendly title.
I figured that out yesterday, LOL. That was interesting.
I was using one of the "Reavers" from the OC as a test subject. I gave him a bunch of special powers and Feats to go along with his normal spells. I upped his HP to over 300 as well, just so the fight would last longer and I could be sure he was operating his AI correctly.
The fights were going as expected. Then the Reaver would fall below 50% health, and go to "Heal" itself, and suddenly die! Then it dawned on me to check - yep, he's undead. So I switched the "Heal" special ability to "Harm" and it worked. He heals himself to near complete health when he drops below 50%. It made it an interesting fight.
I then gave him Improved Knockdown with about a 25% chance of using it on an attack. He was pretty effective with that as well. It was fun watching him use his combat ability (he turns Defensive Casting on before self harming as well).
#14
Posté 22 mai 2013 - 12:11
Tchos wrote...
What are you using for the tarrasque, Dann?
This happy little chappy. The game only lets me level him up to level 30 (unless I gave him multiple classes), so I piled some additional hit points on top to match his level 40 stats. He regularly makes mincemeat of some of my level 30 characters from MotB - although two blasts of 'Spiritual Eviseration' will usually kill him (750 negative energy damage each).
#15
Posté 22 mai 2013 - 01:09
#16
Posté 22 mai 2013 - 02:08
The great thing about the toolset is that you can customize a creature any way you see fit. I have already done some customization with enemies, even lowly kobolds. My goal is to make entertaining and challenging encounters. Creatures should be tweaked, IMO, to do whatever is necessary to make the encounter the way you want it to be.
#17
Posté 22 mai 2013 - 03:24
So, for Saracek...Fear Aura is I believe a special ability on that tab, fear and doom would be in spells I think (though blackguard may be funny about that, could be feats...), the DR is easiest done on the properties tab, make sure his inventory has a +2 Wounding Greatsword in his right hand and Undead properties in his creature skin slot, and the rest is own statistics tabs.
#18
Posté 22 mai 2013 - 05:49
#19
Posté 23 mai 2013 - 02:30
Actually, if the PCs fight everything they meet in this mod they won't last very long. There are many roleplaying chances for intelligent PCs to not only avoid combat but gain some important information or items.
I currently am assessing the appropriate level for PCs to start the mod and have narrowed it down to 4th or 5th. In case the player does not have a 4th or 5th level character available I have always provided a "book of experience" which levels the party up to a certain level but not any higher. I also like to make the mod a campaign so I can use Kaldor Silverwand's excellent character editor. I also have potential companions in the inn (starting off base) with might sign on with the Player and be part of his party if it appears that the PC is a worthwhile companion. I assume that the script "reset level" will upgrade the companions automatically. Is there a better way to initiate the mod?
Modifié par JonnieRS, 23 mai 2013 - 02:32 .
#20
Posté 23 mai 2013 - 12:26
#21
Posté 23 mai 2013 - 02:05
Lemenhead22 wrote...
Out of curiosity, how would one alter the AI? Is it all located under the scripts that are linked to the bad guys like OnAttacked and OnHeartbeat?
Here's how you do it:
First, you don't want to alter any of the default scripts for the creature. You dont' have to replace a single script to get custom AI working.
Bioware has actually done a good job here of providing a scripting hook for custom AI scripts to run. All you have to do on the Creature is set a local string variable called X2_SPECIAL_COMBAT_AI_SCRIPT. This needs to point to your custom AI script for the creature. So something like:
X2_SPECIAL_COMBAT_AI_SCRIPT=necromancer_ai
Then there's one other tricky part you have to be aware of:
When your custom AI script runs, if it is successful, you need to then set another local variable on the creature from within your custom AI script. You have to set this line:
SetLocalInt(oTarget, "X2_SPECIAL_COMBAT_AI_SCRIPT_OK",TRUE);
This tells the default creature AI to NOT RUN that round because it is assumed your custom AI has worked. If you don't set this line, then the default AI will override any attacks or spells your custom AI just tried to command the creature to do.
The reason I mention success/failure of the custom AI script is because of this: The way I have written my custom AI routines, it is possible for my scripts to "not work" on a given round, in which case I want the AI to fall back to the Bioware default. The reason some AI "fails" is because of targeting. I provide upwards of 20 different ways for you to tell the creature to target the PC party. If you are really specific in your AI script, and the script cannot find a valid target that round, then the custom AI script has "failed" and won't issue a custom attack. The X2_SPECIAL_COMBAT_AI_SCRIPT_OK variable doesn't get set, and it falls back to the default Bioware AI.
So, for instance, if you tell a creature to attack only the class_ARCANE_CASTER in your script, but the party doesn't have an arcane caster, then your custom AI script would fail.
Anyway, that's all there is to it. Once you know how to hook in then it becomes all about writing the AI. And that mostly involves targeting and then issuing Actions.
#22
Posté 23 mai 2013 - 02:16
JonnieRS wrote...
Great advice! I will be doing just that. I have some NPCs in my mod which do not attack the PCs on sight, but are neutral toward them initially. Some of these are very powerful intelligent creatures who the PCs should probably avoid fighting with in any case. However the option to attack this NPC should be available as a choice in the conversation and if the PCs don't watch what they are saying to the NPC he/she could initiate combat. I always accomplished this the past with a small script that changes the NPC faction to hostile. While this works with lower level guards, etc. I am not sure this the best way to initiate combat in this case. Any thoughts?
This is totally fine and is the preferred way to initiate combat. Just change the faction. The AI does the rest (and by AI I mean Bioware's AI - custom AI just rides piggyback).
JonnieRS wrote...
I currently am assessing the appropriate level for PCs to start the mod and have narrowed it down to 4th or 5th. In case the player does not have a 4th or 5th level character available I have always provided a "book of experience" which levels the party up to a certain level but not any higher. I also like to make the mod a campaign so I can use Kaldor Silverwand's excellent character editor. I also have potential companions in the inn (starting off base) with might sign on with the Player and be part of his party if it appears that the PC is a worthwhile companion. I assume that the script "reset level" will upgrade the companions automatically. Is there a better way to initiate the mod?
The best mods I've seen, where it is required for you to start out at a higher level than 1 and thus you must level up first, start you off in some small Dungeon Master room where they issue you some advice, let you choose some starting equipment from a container, and then grant you the necessary experience to be the appropriate level, all before moving you to the first area. I would recommend checking out the Maimed Gog's Saga - it asks you to start as a level 5 or 6 Cleric. And the way he begins that mod makes for an easy transition (althouhg, to be fair, I think his first dungeon master room is unnecessarily small and makes for odd camera angles when the mod initially loads).
As for companions: The way I am doing it in my campaign, you meet companions at various points in time from level 1 on up. Many of the companions are spawned into the game as level 1, and when you first add them to your group, they are granted XP to match the PC (simple script). From that point, the player then is able to level the NPC up how they see fit (basically like how it worked in the OC - every time you added a companion to your party, they got XP to match and you had to level them).
Some of the companions, however, you meet much later in the game, and not only would it be tedious for the player to have to level them, they may not level them the way I intend, and so I have taken the liberty of leveling the companion up to an expected point. I basically go off the minimum quest experience I expect the PC to have by the time they reach the companion (I track all quest XP in an excel spreadsheet, so I know exactly how much quest XP you'll have when you reach companion X).
#23
Posté 23 mai 2013 - 09:38
I have always believed it is interesting to have the PCs meet NPCs during the mod who could be helpful and willing to join the party. However, I don't want the AI to automatically level up or down the NPCs to the PCs level so I will leave the reset script off that potential companion.
I still have to have a couple of Companions available in the Inn since the players will need at least a six person team.
I agree that you must make great efforts to time events in the mod to make it challenging but not impossible. My current mod is especially difficult with some killer traps and challenging opponents. I playtest it over and over again to balance it correctly.
#24
Posté 24 mai 2013 - 02:29
JonnieRS wrote...
I playtest it over and over again to balance it correctly.
That's really the only way to do it.
I have a script I run for testing purposes. It does several things at once:
1) First thing: Clears the quest journal and all related local variables on the PC
2) Automatically sets any Journal vars and any local variables for the particular point in the area I'm testing. This allows me to test conversations and cut-scenes easily without having to log in and out of the game.
3) It automatically creates a party comprised of the companions in the module that would be most likely available at that time.
4) Levels everyone in the party automatically to the appropriate level for the area I'm testing using the default package (I don't care about specific Feats or level packages when testing - just get me testing fast)
5) Grants everyone level-approriate gear for the area (and potentially any special quest items they may have earned before this point in the campaign)
6) Gives everyone a list of potions and other goodies they are likely to have and need.
7) Automatically warps the party to a specific waypoint for testing.
In this way, I can call the same script a number of times (without logging out of the game), passing in a number. It will jump me directly to a certain point in the area or dungeon and I can beging testing encounters, conversations, or cut scenes.
#25
Posté 24 mai 2013 - 02:30





Retour en haut







