Jump to content


Photo

Question to Effect "Minimum HP (208)"


15 replies to this topic

#1 jastey

jastey
  • Gibberlings
  • 7152 posts
  • Gender:Female

Posted 10 December 2017 - 08:58 AM

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.



#2 lynx

lynx
  • Modders
  • 3066 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 10 December 2017 - 09:03 AM

And what was the duration? Usually this is done via items and equipping effects.


GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Market android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...

#3 Roxanne

Roxanne

    Modder

  • Modders
  • 2002 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 10 December 2017 - 09:14 AM

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, 10 December 2017 - 09:15 AM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#4 jastey

jastey
  • Gibberlings
  • 7152 posts
  • Gender:Female

Posted 10 December 2017 - 10:22 AM

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.



#5 Roxanne

Roxanne

    Modder

  • Modders
  • 2002 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 10 December 2017 - 11:52 AM

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, 10 December 2017 - 12:11 PM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#6 jastey

jastey
  • Gibberlings
  • 7152 posts
  • Gender:Female

Posted 10 December 2017 - 12:48 PM

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, 10 December 2017 - 12:55 PM.


#7 Roxanne

Roxanne

    Modder

  • Modders
  • 2002 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 10 December 2017 - 01:14 PM

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.

Attached File  CVDEXIN.zip   248bytes   16 downloads

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


Edited by Roxanne, 10 December 2017 - 01:15 PM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#8 CamDawg

CamDawg

    Just a simple country Hyper-Chicken

  • Gibberling Poobah
  • 9411 posts
  • Gender:Not Telling

Posted 10 December 2017 - 01:44 PM

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.

I came here with a simple dream: a dream of killing all humans. And this is how it must end? Who's the real seven billion ton robot monster here? Not I. Not... I.


#9 CamDawg

CamDawg

    Just a simple country Hyper-Chicken

  • Gibberling Poobah
  • 9411 posts
  • Gender:Not Telling

Posted 10 December 2017 - 01:48 PM

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.


I came here with a simple dream: a dream of killing all humans. And this is how it must end? Who's the real seven billion ton robot monster here? Not I. Not... I.


#10 jastey

jastey
  • Gibberlings
  • 7152 posts
  • Gender:Female

Posted 10 December 2017 - 01:57 PM

Thank you both for your help, I'll try a bit more to get it to work.



#11 jastey

jastey
  • Gibberlings
  • 7152 posts
  • Gender:Female

Posted 10 December 2017 - 02:17 PM

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!



#12 Roxanne

Roxanne

    Modder

  • Modders
  • 2002 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 10 December 2017 - 02:48 PM

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.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#13 jastey

jastey
  • Gibberlings
  • 7152 posts
  • Gender:Female

Posted 10 December 2017 - 07:54 PM

Good idea! Thanks!



#14 CamDawg

CamDawg

    Just a simple country Hyper-Chicken

  • Gibberling Poobah
  • 9411 posts
  • Gender:Not Telling

Posted 10 December 2017 - 08:41 PM

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, 10 December 2017 - 08:43 PM.

I came here with a simple dream: a dream of killing all humans. And this is how it must end? Who's the real seven billion ton robot monster here? Not I. Not... I.


#15 Roxanne

Roxanne

    Modder

  • Modders
  • 2002 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 10 December 2017 - 09:57 PM

 

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, 11 December 2017 - 12:17 AM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users