In the toolset I see special abilities for many types of dragons, but when I give the dragon the special ability, it does not use it. The one I tested was white. Do they work? I know red works but do the others?
Implementing Dragon breath
Débuté par
M. Rieder
, oct. 08 2011 07:38
#1
Posté 08 octobre 2011 - 07:38
#2
Posté 09 octobre 2011 - 06:43
I'm guessing it's an AI issue, but that's a guess. (that if the AI doesn't specifically say "use dragon breath, white" it won't)
i'm halfway through workin on this stuff, but got sidetraked,
no ETA sry. I notice there's only 4 basic dragon types in the Toolset (black, blue, bronze, & red) - which means i might be doing a lot of research into Dragons over the next few months ..
or i might just kick back & watch UFO videos
What kind of breath does a white dragon have, Cold? If yer up to it, MR, you should use Dann's dragon fixes and if necessary set up a special combat script to use breath weapon ( with a % chance, else Return; & let the default AI attack)
:\\
i'm halfway through workin on this stuff, but got sidetraked,
no ETA sry. I notice there's only 4 basic dragon types in the Toolset (black, blue, bronze, & red) - which means i might be doing a lot of research into Dragons over the next few months ..
or i might just kick back & watch UFO videos
:\\
#3
Posté 09 octobre 2011 - 11:12
Hey, thanks kevL. That is really useful! By the way, you are correct that a white uses cold. I'll check out Dann's dragon fixes.
#4
Posté 09 octobre 2011 - 12:08
right on
#5
Posté 09 octobre 2011 - 12:16
I tried putting the scripts and vfx in my mod via hak. The dragon's behavior didn't change. This makes me think I may have to actually tinker with the AI. Have you ever made a dragon breathe white dragon breath? I know that with the default AI, a red dragon will breathe fire.
I saw screenshots on Dann's page of a dragon breathing white breath but I have no idea how he did it.
I saw screenshots on Dann's page of a dragon breathing white breath but I have no idea how he did it.
#6
Posté 09 octobre 2011 - 01:37
could try this :
On the dragon, put a string variable "X2_SPECIAL_COMBAT_AI_SCRIPT" and give it a value like "ai_dragonbreath_white" <- name of the custom AI script that needs to be written, which goes something like this:
in Spells.2da, line 237 Dragon_Breath_Cold has impact script "NW_S1_DragCold" (which is a script in Dann's pack) and SPELLABILITY_DRAGON_BREATH_COLD is its 'readable' constant. Nothing strange there. Give the dragon a use of Special Ability, Dragon Breath, Cold and the CastSpell function should fire it off again and again; in fact, since bCheat is set TRUE you don't even have to assign Breath as a Special Ability, at all (in my exp).
if Dann wants to add something to this, i'm hoping he does.
ps. If the conditions are not met, the AI should fall through to a normal DCR AI round ( DetermineCombatRound )
( I really don't want to go digging through 'proper' AI scripts, but you might well have to code up WingBuffets and Tailswipes similar to above, if wanted )
nb. I've actually got this part of Dragons o Doom done, in much much greater detail, but so far it's only good for Red & Blackys. The Ai there will be self-contained, no calls to DCR ( no potion-drinking dragons in other words ), but i feel I have to tidy up the offensive casting section before moving onto the various types. So ... try it, the more nasty dragons the better!
On the dragon, put a string variable "X2_SPECIAL_COMBAT_AI_SCRIPT" and give it a value like "ai_dragonbreath_white" <- name of the custom AI script that needs to be written, which goes something like this:
// 'ai_dragonbreath_white'
//
// - script to fire off White Dragon breath weapon.
#include "x0_i0_enemy" // (object)GetNearestPerceivedEnemy
void main()
{
object oPC = GetNearestPerceivedEnemy();
if (GetIsObjectValid(oPC)
// app. range of breath weapon (although Spells.2da says its got Range = Touch ???)
&& GetDistanceBetween(oPC, OBJECT_SELF) < 20.0f)
// 15% chance
&& d100() < 16)
{
location lPC = GetLocation(oPC);
// #237 Dragon Breath, Cold
ActionCastSpellAtLocation(SPELLABILITY_DRAGON_BREATH_COLD, lPC, METAMAGIC_NONE, TRUE, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
}in Spells.2da, line 237 Dragon_Breath_Cold has impact script "NW_S1_DragCold" (which is a script in Dann's pack) and SPELLABILITY_DRAGON_BREATH_COLD is its 'readable' constant. Nothing strange there. Give the dragon a use of Special Ability, Dragon Breath, Cold and the CastSpell function should fire it off again and again; in fact, since bCheat is set TRUE you don't even have to assign Breath as a Special Ability, at all (in my exp).
if Dann wants to add something to this, i'm hoping he does.
ps. If the conditions are not met, the AI should fall through to a normal DCR AI round ( DetermineCombatRound )
( I really don't want to go digging through 'proper' AI scripts, but you might well have to code up WingBuffets and Tailswipes similar to above, if wanted )
nb. I've actually got this part of Dragons o Doom done, in much much greater detail, but so far it's only good for Red & Blackys. The Ai there will be self-contained, no calls to DCR ( no potion-drinking dragons in other words ), but i feel I have to tidy up the offensive casting section before moving onto the various types. So ... try it, the more nasty dragons the better!
Modifié par kevL, 09 octobre 2011 - 01:38 .
#7
Posté 09 octobre 2011 - 02:38
Many thanks. I'm going to try this out. I'll let you know how it goes.
#8
Posté 09 octobre 2011 - 08:06
Rieder you may want to look at User defined events as well for this. Here is a good link that explains using them. Bouncy Rock Forums
#9
Posté 09 octobre 2011 - 09:29
I didn't change any of the AI - I just gave the dragon the cold breath special ability instead of the fire breath. The default AI took care of the rest of it. In my test module, I used three trolls as dragon bait (since anything but a red or black dragon can't kill them).
One thing I've noticed about dragon AI is that they generally don't bother using their breath weapons against creatures that are immune to the damage type. Red dragons won't breath fire against fire elementals, for instance. They often don't seem to use their breath weapons against single opponents either.
One thing I've noticed about dragon AI is that they generally don't bother using their breath weapons against creatures that are immune to the damage type. Red dragons won't breath fire against fire elementals, for instance. They often don't seem to use their breath weapons against single opponents either.
#10
Posté 10 octobre 2011 - 01:59
Okay, I'll try again. I do recall that when I was testing, I had myself warded against energy attacks. Just to clarify that I am giving the dragon the ability properly:
Under special abilities, I select the dragon breath, cold, then give it however many fires I want, correct? Did you change the caster level for the ability or leave it at 0?
Under special abilities, I select the dragon breath, cold, then give it however many fires I want, correct? Did you change the caster level for the ability or leave it at 0?
#11
Posté 10 octobre 2011 - 03:21
The caster level isn't important, since the scripts use the hit dice of the dragon to determine the damage.
I've found that some abilities don't work properly if you try to limit the number of times they're used. All the other dragon blueprints in the game seem to let them use a breath weapon an unlimited number of times. I usually just give the dragon the breath weapon ability, then don't touch any of the default values. That seems to work.
There shouldn't be more than one instance of the special ability in the dragon's ability list though.
I've found that some abilities don't work properly if you try to limit the number of times they're used. All the other dragon blueprints in the game seem to let them use a breath weapon an unlimited number of times. I usually just give the dragon the breath weapon ability, then don't touch any of the default values. That seems to work.
There shouldn't be more than one instance of the special ability in the dragon's ability list though.
Modifié par DannJ, 10 octobre 2011 - 03:24 .
#12
Posté 10 octobre 2011 - 09:25
I tried going back to the default scripts, but your animation did'nt play and the dragon breath only did 18 hp of damage. I think maybe I installed your scripts improperly.
Here is what I did:
I took the VFX and scripts and put them all into a .hak and then associated that hak with my mod. That seems like it should work. Have I done something wrong?
Here is what I did:
I took the VFX and scripts and put them all into a .hak and then associated that hak with my mod. That seems like it should work. Have I done something wrong?





Retour en haut






