Jump to content

Question to Effect "Minimum HP (208)"


jastey

Recommended Posts

I wanted to grant my NPC a min 1 HP effect so he can't die. I tried to do this via spell. I made an (innate) spell with the effect "Minimum HP (208)", Target Self(1), HP amount 1 and applied to via ReallyForceSpellRES.

 

If the spell is applied, the NPC still dies when I Ctr-y him. Did I misunderstood the minHP effect, did I apply it wrongly, or did I misunderstood how damage is applied? Any help appreciated.

Link to comment

I wanted to grant my NPC a min 1 HP effect so he can't die. I tried to do this via spell. I made an (innate) spell with the effect "Minimum HP (208)", Target Self(1), HP amount 1 and applied to via ReallyForceSpellRES.

 

If the spell is applied, the NPC still dies when I Ctr-y him. Did I misunderstood the minHP effect, did I apply it wrongly, or did I misunderstood how damage is applied? Any help appreciated.

Minimum HP (208)",

Target = Self(1),

HP amount = 1 (or whatever, I use 15 for Corwin)

Duration = Instant/Permanent Until death - 1 (well, should not happen but that is the setting)

Probability 1 = 100

 

I use this for my Corwin mod because she cannot die in BG1 as you need her in SoD. I have coupled this with a script that makes her go unconcious as long as the party is in combat and if her HP are down. This way she stays alive but cannot fight and needs to be healed afterwards.

Edited by Roxanne
Link to comment

lynx: Duration is "0" but Timing mode is Instant/Permanent Until death. The idea was not to do it via item, so I tried using an effect. (I have reasons why I want to avoid an item, I know it can be easily done via item.)

 

Roxanne: It's basically what I intend to realise as well, the NPC is not in the party at that time and needs to stay alive (I let him drop unconscious and turn neutral, too, so he can't be used as an undying "tank"). I tried using 15 HP but I can still instand-kill him.

 

I am working with the old BGII engine, I should add.

 

My original intention was to make this effect a SecType to be able to remove the 1HP effect via (221). (I added ADD_SECTYPE "C#1HPEffect" and patched it to this spell.) I guess this won't work as I imagine but so far I can't even get the 1 HP effect to work.

Link to comment

lynx: Duration is "0" but Timing mode is Instant/Permanent Until death. The idea was not to do it via item, so I tried using an effect. (I have reasons why I want to avoid an item, I know it can be easily done via item.)

 

Roxanne: It's basically what I intend to realise as well, the NPC is not in the party at that time and needs to stay alive (I let him drop unconscious and turn neutral, too, so he can't be used as an undying "tank"). I tried using 15 HP but I can still instand-kill him.

 

I am working with the old BGII engine, I should add.

 

My original intention was to make this effect a SecType to be able to remove the 1HP effect via (221). (I added ADD_SECTYPE "C#1HPEffect" and patched it to this spell.) I guess this won't work as I imagine but so far I can't even get the 1 HP effect to work.

If the cre is not in party, just give it an item with the above effect and use *while equip*. You simply destroy the item if no longer needed,

Just use imoenhp1.itm to test it (the belt she has in Irenicus Dungeon).

 

ActionOverride("YourDV",CreateItem("ImoenHP1",0,0,0))

ActionOverride("YourDV",FillSlot(SLOT_BELT))

Edited by Roxanne
Link to comment

I already have the solution with an item. I was thinking about using the effect so I do not have to switch items because it blocks one item slot for nothing.

EDIT: Thanks for your help, nontheless. I appreciate any ideas in this regard.

 

I fear the effect does not work for the BGII engine, though. Can anyone confirm this?

Edited by jastey
Link to comment

I already have the solution with an item. I was thinking about using the effect so I do not have to switch items because it blocks one item slot for nothing.

EDIT: Thanks for your help, nontheless. I appreciate any ideas in this regard.

 

I fear the effect does not work for the BGII engine, though. Can anyone confirm this?

Not sure why you cannot get it to work. I had this spell and it works in both BGT and EET. And I applied it via ReallyForceSpellRES, just like you intended.

CVDEXIN.zip

I never tested anything to remove it, I had no need for that.

Edited by Roxanne
Link to comment

I already have the solution with an item. I was thinking about using the effect so I do not have to switch items because it blocks one item slot for nothing.

EDIT: Thanks for your help, nontheless. I appreciate any ideas in this regard.

 

I fear the effect does not work for the BGII engine, though. Can anyone confirm this?

It works--trolls use the monhp1 item to prevent death from damage until their scripts swap them to their 'dead' versions.
Link to comment

Oh, and if you want to see an invincibility spell in action, check OHSMODE1.spl in the EE engine. OHSMODE1 is applied when the player enables story mode and, though it has some extra effects you won't want (e.g. immunity to sleep), would probably be a good place to start. Set the secondary to what you want and then strip out the EE-only opcodes and unwanted protections.

Link to comment

It works! (I was an idiot, I added an effect to the spell, not an ability with an effect.) So, 1HP effect works and removing it (via SecType) works, too.

 

Only drawback is that the 1 HP effect is stripped if the NPC is healed by Ctrl-R, but I guess if someone uses that cheat then I won't have to worry about health getting too low, anyway...

So, I will have to decide whether I risk it nontheless and spare the stupid 1 HP item.

 

Thank you again!

Link to comment

It works! (I was an idiot, I added an effect to the spell, not an ability with an effect.) So, 1HP effect works and removing it (via SecType) works, too.

 

Only drawback is that the 1 HP effect is stripped if the NPC is healed by Ctrl-R, but I guess if someone uses that cheat then I won't have to worry about health getting too low, anyway...

So, I will have to decide whether I risk it nontheless and spare the stupid 1 HP item.

 

Thank you again!

You can build in a safety feature, e.g. just casting that spell again if your NPC HP goes below some value 20hp or so. That way it will be restored if needed.

Link to comment

I wanted to grant my NPC a min 1 HP effect so he can't die. I tried to do this via spell. I made an (innate) spell with the effect "Minimum HP (208)", Target Self(1), HP amount 1 and applied to via ReallyForceSpellRES.

 

If the spell is applied, the NPC still dies when I Ctr-y him. Did I misunderstood the minHP effect, did I apply it wrongly, or did I misunderstood how damage is applied? Any help appreciated.

 

Keep in mind that a min HP effect only protects against death from damage; there are still a lot of ways to die in the engine:

  • Stat-drained to zero (ops 6, 10, 15, 19, 44, 49)
  • Level-drained to zero (216)
  • Disintegration (238)
  • Turned to stone (134)
  • Power word kill (209)
  • Various items use instant kill effects such as vorpal hits (kill, op 13) or destruction (slay, op 55 e.g. Crom vs. golems)
  • Polymorph (135) can kill on transformation, such as Aec'Letec's gaze)
  • If undead, turn from a high-level cleric (297 prevents)

edit: I can't remember if anything stops a scripted kill such as Kill(Myself)

Edited by CamDawg
Link to comment

 

I wanted to grant my NPC a min 1 HP effect so he can't die. I tried to do this via spell. I made an (innate) spell with the effect "Minimum HP (208)", Target Self(1), HP amount 1 and applied to via ReallyForceSpellRES.

 

If the spell is applied, the NPC still dies when I Ctr-y him. Did I misunderstood the minHP effect, did I apply it wrongly, or did I misunderstood how damage is applied? Any help appreciated.

 

Keep in mind that a min HP effect only protects against death from damage; there are still a lot of ways to die in the engine:

  • Stat-drained to zero (ops 6, 10, 15, 19, 44, 49)
  • Level-drained to zero (216)
  • Disintegration (238)
  • Turned to stone (134)
  • Power word kill (209)
  • Various items use instant kill effects such as vorpal hits (kill, op 13) or destruction (slay, op 55 e.g. Crom vs. golems)
  • Polymorph (135) can kill on transformation, such as Aec'Letec's gaze)
  • If undead, turn from a high-level cleric (297 prevents)

edit: I can't remember if anything stops a scripted kill such as Kill(Myself)

 

I know of no reasonable way to overcome those, you can even kill plot creatures that way and thereby kill your game as well. But that has always been the case. Unless you want to spend useless time to prevent every single eventual case...

Edited by Roxanne
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...