Jump to content

Need to change regeneration for my creature


ericp07

Recommended Posts

Hello,

 

I have a custom creature for my mod that's supposed to regenerate damage at the rate of 1 HP/second. Originally, I added a pair of rings of regeneration in the .CRE file, and made them non-droppable and non-stealable. At the time, I didn't realize that this wouldn't yield the rate of regen that I wanted the creature to have. So, I'd like to know what the best way is to set this up. I use NearInfinity to edit game files.

 

On a related note, the creature should also have "damage reduction 5/+1" which means it instantly heals 5 hp from each attack unless the damage is done with a weapon of +1 or greater enchantment. Can this also be set up in the .CRE file?

 

Thanks,

Eric

Link to comment

You could script it, I think. Unless there is a weapon enchantment check, you would have to have an OR for every single weapon +1 or greater enchantment.

 

I found HasItemEquipped(), which might work, so something like this;

IF

HasItemEquipped(LastAttackerOf(Myself),"SW1H62")

OR(_)

HasItemEquipped(LastAttackerOf(Myself),"SW1H63")...

THEN

RESPONSE #100

ApplyDamage(Myself,-5,[damage it is vulnerable to])

/*Or use ReallyForceSpell(), then we have something like this;*/

THEN

RESPONSE #100

ReallyForceSpell(Myself,[spell integer, a healing spell for 5hp, don't worry about casting time as ReallyForceSpell() casts at 0 casting time])

END

 

I hope this is slightly useful.

 

Icen

Link to comment
You could script it, I think. Unless there is a weapon enchantment check, you would have to have an OR for every single weapon +1 or greater enchantment.

 

I found HasItemEquipped(), which might work, so something like this;

IF

HasItemEquipped(LastAttackerOf(Myself),"SW1H62")

OR(_)

HasItemEquipped(LastAttackerOf(Myself),"SW1H63")...

THEN

RESPONSE #100

ApplyDamage(Myself,-5,[damage it is vulnerable to])

/*Or use ReallyForceSpell(), then we have something like this;*/

THEN

RESPONSE #100

ReallyForceSpell(Myself,[spell integer, a healing spell for 5hp, don't worry about casting time as ReallyForceSpell() casts at 0 casting time])

END

 

I hope this is slightly useful.

 

Icen

 

Would this be created as a separate file? Is it a .BCS? If so, would I designate the .BCS in the creature's .CRE file where I normally designate WTASIGHT.BCS? Or should I APPEND WTASIGHT.BCS with the code, in the mod's .tp2?

 

Thanks,

Eric

Link to comment
Guest Guest

The best course of action is probably use immunity to nonmagical weapons or an enhanced regeneration rate, because that's the way AD&D does things. (Or just ignore it, since in all likelihood the entire party will be outfitted with enchanted weapons from Nashkel on and never use nonmagical ones ever again. The only time you can expect an unenchanted weapon in SoA is inside Irenicus' dungeon, which most of us skip anyway.)

 

 

@Icendoan: That kind of script isn't my speciality, but wouldn't it lead to the creature constantly repeating the +5 recovery while LastAttackerOf is holding an unenchanted weapon, thus effectively making it immortal?

Link to comment

I'm exploring the possibility of applying a spell effect directly to the creature, in order to handle the "ignoring" or "instant recovery" of 5 HP from every nonmagical weapon strike that hits the beast. This would apply, then, to crushing, slashing, piercing, and missile damage. I don't want the effect to ADD HP to the creature, though, in a case where the damage scored in a single hit is less than 5 HP. So, if this can be set up in the .CRE, great! If there's really no way to make it happen, I'll ditch the idea. The regeneration rate of 1 HP/second must remain, though. Aside from the beast's "claw slayer" form getting an improved critical hit ability, neither form of this creature will get any other special abilities.

 

Thanks,

Eric

Link to comment

I am learning to script, as well, and, if you're holding an unenchanted weapon it should be immortal, with what I picked up from the OP.

 

There is no reason to hold an unenchanted weapon. The only worthwhile +1 weapon is Illbratha, and an exception could be made for that.

 

I only found the actions from 5 mins in the IESDP.

 

Oh, you would do something like copy a new script for WTASIGHT (using

 COPY_EXISTING ~Wtasight.bcs~ ~override/Hinaeariel.bcs~
EXTEND_TOP ~Hinaeariel.bcs~ ~Hinaeariel.baf~

Or similar)

 

Icen

Link to comment
I am learning to script, as well, and, if you're holding an unenchanted weapon it should be immortal, with what I picked up from the OP.

 

There is no reason to hold an unenchanted weapon. The only worthwhile +1 weapon is Illbratha, and an exception could be made for that.

 

I only found the actions from 5 mins in the IESDP.

 

Oh, you would do something like copy a new script for WTASIGHT (using

 COPY_EXISTING ~Wtasight.bcs~ ~override/Hinaeariel.bcs~
EXTEND_TOP ~Hinaeariel.bcs~ ~Hinaeariel.baf~

Or similar)

 

Icen

 

I've figured out how to set regeneration to 1 HP/sec. for both of the .CREs for my Beast of Malar. Your comments about unenchanted weapons appear relevant to me, as I doubt the average adventuring party will be using much in the way of unenchanted gear. Maybe the fact that the creature regenerates as quickly as it does will make up for the possibility of it getting hit by a "normal" weapon. Perhaps my focus became too narrow on this issue :suspect: I'll drop the idea, as I don't need to make more work for myself.

 

I'm not going to mess with added scripting. I think the creature is ready now. All I need to do now is to figure out how to allow the creature to follow this standard procedure:

 

1. Appear and attack the party

2. Change forms from the hunting panther form (EP#MABP.CRE) to the claw slayer form (EP#MABC.CRE) after two or three combat rounds.

 

This is because the creature hunts in panther form, and will attack in that form, but changes to the claw slayer form for serious combat.

 

One additional question regarding the creature: does anyone know if there's an animation in the game that resembles a wolverine, but about the same size as the panther? I'm currently using the panther animation for both forms (colored black), but it would be nice to have a visual clue to the change in forms, and have the claw slayer appear more or less as it should.

 

Thanks!

Eric

Link to comment

Right, you would want a ReallyForceSpell for the change, and set a LOCAL each time (so it doesn't keep doing it), other than that

IF
 Detect(Player1)
THEN
 RESPONSE #100 //Weight, how likely it is to happen (in relation to others)
Attack(Player1)
SetGlobal("BeastofMalaratk","LOCALS",1)
SetGlobalTimer("BeastofMalar","GLOBAL",10000) //A 100-second timer
END

IF
 Detect(Player1)
 Global("BeastAttacks","LOCALS",1)
 GlobalTimerExpired("BeastofMalar","GLOBAL")
THEN
 RESPONSE #100
ReallyForceSpell(Myself,"Malar1")
End

 

Ect. That all should work, but only with limited knowledge of scripting, if anyone could correct or simplify that it would be better.

 

Icen

Link to comment

ChangeAnimationNoEffect("EP#MABC") will completely replace the current creature with EP#MABC.

 

Timers are already in real seconds; 10,000 would be a pretty long time.

 

You could use the leopard; other than that, I can't think of anything suitable for an enemy avatar (maybe one of the wolves, but BioWare screwed up the alternate palettes, so they don't look that hot).

Link to comment
ChangeAnimationNoEffect("EP#MABC") will completely replace the current creature with EP#MABC.

 

Timers are already in real seconds; 10,000 would be a pretty long time.

 

You could use the leopard; other than that, I can't think of anything suitable for an enemy avatar (maybe one of the wolves, but BioWare screwed up the alternate palettes, so they don't look that hot).

 

I think the leopard and the panther would look too similar, especially since both forms must be all black...and a bunny just wouldn't be right :suspect: I'll stick with the panther, at least for now.

 

Thanks,

Eric

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...