Jump to content

Adding effects


Recommended Posts

I got a bit of a problem with adding effects to my new MftW NPC.


I added the following effects (besides weapon proficiencies)


1 - downregulated attack making 1 a 1/2

98 - regeneration of 1 hp every 6 secs

106 - No morale failure

169 - inhibits display icon of regeneration

208 - hp can not drop below 1


I tried several combinations with 1-permanent or 9-permanent after death, but I can't get 98 to work. 1 & 208 work. 169 & 106 seem to work (for I see no icon, but then again do I really have regeneration? and no matter how hard I beat him he doesn't walk away.)

So why isn't 98 working? :p I know how to put this in an item and I know trolls and vampires do it this way, but I do not want to make an item you must keep, so to speak. I just want my NPC to have this. :D

All are tried with 1 or 9 & non-magical or non-dispel/not-bypass resistance.


P.s. If someone knows how to slow a creature down I also would like to know, as I want him to move slower like ghouls do, but you can not give a value below 0 according to shadowkeeper and I can not find an effect in IESDP for this.


Thanks on forehand for helping me out :p ,

The Deathsangel

Link to comment
I didn't say you must set it to 0 duration.

I said you could try it with duration #10000.

But i would first check if the effect is correctly set up (probabilities, level limits)


The 0 idea was my idea for I thought that made it go forever. 0 in charges makes it stay forever, so that is why I didi it


Do I really need to type in #10000 or just 10000 and doesn't that still make his regeneration stop after that?


How do I check if the effect is okay? What I did is I copied it from the ring of regeneration and changed the 2-while equiped into 1-permanent and I changed not dispel/not bypass resistance into nonmagical (this last because I don't want it to happen that if Ian get SR because of an item the regeneration doesn't work anymore). It seems to me that he effect then should still work and when I look at IESDP it should be okay I think. I also created an item with regeneration once in this way and that worked.

Link to comment

I used # to sign that the number is decimal :p Not like it counts.

And yes, it will make the regeneration stop, but you can at least check if that was the problem.


Hmm, now that you say, the timing method shouldn't be a problem, if it works with ' 2 while equipped', then it should work with permanent.

So, you screwed something else up.


You better post what you wrote in each fields, or attach the stuff.

Link to comment

It is just as i said, regeneration cannot be permanent :p

Btw, the regeneration icon doesn't appear from this effect, so disabling it isn't necessary.


I'm not sure why it cannot be permanent if it works as 'while equipped'.

This effect requires some more investigation.

Link to comment
It is just as i said, regeneration cannot be permanent :)

Btw, the regeneration icon doesn't appear from this effect, so disabling it isn't necessary.


I'm not sure why it cannot be permanent if it works as 'while equipped'.

This effect requires some more investigation.

You have to give it a duration. Stick some impossibly large number in the duration field and it will work, regardless of the "timing mode." (What I don't know is if the duration value actually has any effect on the duration of the regeneration; it's something to test, I guess.)


EDIT: duration is respected, timing mode 1 is ignored (lasts only for duration, probably 9 too; I wonder if 2 actually works like other effects?). Start your engines and set the duration to 2^31 - 1 if you want permanent.

Link to comment

To expand upon it a bit:


The regeneration occurs if the mode is set to 2 from an item, regardless of the duration (0 duration works).

The effect is purged on load if the creature effect is set to 2 (as expected).

If set to 1 or 9, regeneration does not occur if duration is small.

If duration is large, regeneration occurs as expected* for some length of time.


*Regeneration is odd, as different types/rates don't stack, and I swear 1HP/3 sec. takes longer than 3 seconds. It works, but I don't know if it's exactly like it should.


Using JumJum.cre to test, if the duration is set to 18 or 60 or some small number, she doesn't ever appear to regenerate. If set to 3600, the regeneration occurred (and persisted from save/reload), but wore off immediately after Ctrl+T (one game hour; definitely not 3600 seconds). Using -1 is the same as very small duration (so, no unsigned int here). Using 2^31 - 1 (use `(0x1 << 0x1f) in WeiDU), regeneration occurred, but I didn't test the actual duration (I suspect it's not forever). Luckily, the effect isn't reapplied or purged; I didn't check to see if it resets after reload (we can hope), only with 18 duration (the effect remained after expiring, but didn't have any effect in the first place, so who knows?).


Obviously, you'll want something a little better for GemRB. ;-)


As for the original request, either set the duration to a high number, or give the creature an undroppable item that grants regeneration while equipped (hopefully this isn't a party-joinable NPC!). You can also set the creature's morale break to 0 directly in the CRE file (0x240 I think; look in NI) and delete that effect (this is all the effect does; ignore anything you read in the IESDP about morale as it's all wrong).

Link to comment

So I found a bug just like with the throwing dagger animation back then in DLTCEP :p However, as I read it is going to be limited even if the number is riducilious large. What I doubt is iuf such a large number is even good enough for a while SoA & ToB run (the limit is also not known as I understand and I poorly understand

Using 2^31 - 1 (use `(0x1 << 0x1f) in WeiDU)
). Maybe you will be so kind as to give that code Avenger so I can put it into my .tp2 and make the ability permanent.


For yes it is a a joinable NPC (he also has some downsides to make for some abilities, do nto worry, but for that reason I didn't want to use an item (like trolls and vampires use) and I know of the morale thing, but I wanted to do it via effect for that is more 'genuine'.

Link to comment

You can try WRITE_LONG where 0x7fffffff ; it seems to work, but if Avenger is correct, you may just want WRITE_LONG where 0x8888887 (or 6 nines or something smaller). Note that it still won't be permanent, and it may expire forever after a certain duration. (The original code would simply be WRITE_LONG where `(0x1 << 0x1f) , which is BNOT (1 BLSL 31) or 2^31 - 1, assuming you use WRITE_LONG).


If you want your NPC immune to morale failure, you should also add immunity to the morale break opcode (add it after the effect to set the break to 0). There are a select few items and spells that modify the failure cutoff; without the immunity, these will cause instant morale failure (although, if the recovery time is also suitably small, it wouldn't be a big deal).

Link to comment


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

  • Create New...