Author Topic: Capturing the wounding effect  (Read 502 times)

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Capturing the wounding effect
« Reply #15 on: February 12, 2012, 06:39:55 pm »


               

pope_leo wrote...

Probably won't be of much help to you, but using Acaos' nwnx_structs on the linux side creating the wounding effect for arbitrary damage amounts is pretty simple:

effect EffectWounding (int nAmount) {
    effect eEff = EffectVisualEffect(nAmount);

    SetEffectTrueType(eEff, EFFECT_TRUETYPE_WOUNDING);
    return eEff;
}

nwnx_funcs for windows would probably let you do the same.


Just curious if you have tested this; moreso because it seems wounding would also require an object parameter (the object that applied the wounding).  Should this object die the wounding would typically last at most one more round and then disappear.  This latter behavior I will be overriding by keeping the actual creature alive. 
               
               

               
            

Legacy_leo_x

  • Sr. Member
  • ****
  • Posts: 403
  • Karma: +0/-0
Capturing the wounding effect
« Reply #16 on: February 12, 2012, 07:37:12 pm »


               

WhiZard wrote...

pope_leo wrote...

Probably won't be of much help to you, but using Acaos' nwnx_structs on the linux side creating the wounding effect for arbitrary damage amounts is pretty simple:

effect EffectWounding (int nAmount) {
    effect eEff = EffectVisualEffect(nAmount);

    SetEffectTrueType(eEff, EFFECT_TRUETYPE_WOUNDING);
    return eEff;
}

nwnx_funcs for windows would probably let you do the same.


Just curious if you have tested this; moreso because it seems wounding would also require an object parameter (the object that applied the wounding).  Should this object die the wounding would typically last at most one more round and then disappear.  This latter behavior I will be overriding by keeping the actual creature alive. 


I didn't test fully every aspect of it, because ultimately my world was too high magic to make use of it.  I can say impact was applied every round and it was negated by any healing/regen effects as expected.

Since the technique here (developed by Acaos so far as I know) is to 'trick' the game engine into treating a visual effect as an effect of a different type, it's just as you'd suspect: the applier/creator is implicity OBJECT_SELF so you could AssignCommand it to any object if you wanted.
               
               

               


                     Modifié par pope_leo, 12 février 2012 - 07:47 .
                     
                  


            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Capturing the wounding effect
« Reply #17 on: February 12, 2012, 09:30:06 pm »


               

pope_leo wrote...

WhiZard wrote...

pope_leo wrote...

Probably won't be of much help to you, but using Acaos' nwnx_structs on the linux side creating the wounding effect for arbitrary damage amounts is pretty simple:

effect EffectWounding (int nAmount) {
    effect eEff = EffectVisualEffect(nAmount);

    SetEffectTrueType(eEff, EFFECT_TRUETYPE_WOUNDING);
    return eEff;
}

nwnx_funcs for windows would probably let you do the same.


Just curious if you have tested this; moreso because it seems wounding would also require an object parameter (the object that applied the wounding).  Should this object die the wounding would typically last at most one more round and then disappear.  This latter behavior I will be overriding by keeping the actual creature alive. 


I didn't test fully every aspect of it, because ultimately my world was too high magic to make use of it.  I can say impact was applied every round and it was negated by any healing/regen effects as expected.

Since the technique here (developed by Acaos so far as I know) is to 'trick' the game engine into treating a visual effect as an effect of a different type, it's just as you'd suspect: the applier/creator is implicity OBJECT_SELF so you could AssignCommand it to any object if you wanted.


That's interesting, because in the effect I capture I can't change the one initiating the wounding damage with AssignCommand().  Did the applier turn out to be the damager?
               
               

               
            

Legacy_leo_x

  • Sr. Member
  • ****
  • Posts: 403
  • Karma: +0/-0
Capturing the wounding effect
« Reply #18 on: February 12, 2012, 10:09:45 pm »


               

WhiZard wrote...

pope_leo wrote...

WhiZard wrote...

pope_leo wrote...

Probably won't be of much help to you, but using Acaos' nwnx_structs on the linux side creating the wounding effect for arbitrary damage amounts is pretty simple:

effect EffectWounding (int nAmount) {
    effect eEff = EffectVisualEffect(nAmount);

    SetEffectTrueType(eEff, EFFECT_TRUETYPE_WOUNDING);
    return eEff;
}

nwnx_funcs for windows would probably let you do the same.


Just curious if you have tested this; moreso because it seems wounding would also require an object parameter (the object that applied the wounding).  Should this object die the wounding would typically last at most one more round and then disappear.  This latter behavior I will be overriding by keeping the actual creature alive. 


I didn't test fully every aspect of it, because ultimately my world was too high magic to make use of it.  I can say impact was applied every round and it was negated by any healing/regen effects as expected.

Since the technique here (developed by Acaos so far as I know) is to 'trick' the game engine into treating a visual effect as an effect of a different type, it's just as you'd suspect: the applier/creator is implicity OBJECT_SELF so you could AssignCommand it to any object if you wanted.


That's interesting, because in the effect I capture I can't change the one initiating the wounding damage with AssignCommand().  Did the applier turn out to be the damager?


An effects creator is set when the effect is created, application doesn't change that.  I was going to mention that but I didn't want to split hairs unnecessarily.  If you have a scenario like such:

void func(object pc, effect eff){
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eff, pc);
}

void main()
{
    object pc = GetLastUsedBy();
    effect eff = EffectWounding(100);
    AssignCommand(GetArea(pc), func(pc, eff));

}

The damage will be done by whomever OBJECT_SELF was at the time of effect creation, not application.  

There is one caveat to what I said, the effect can't be assigned to any object, it really needs to be a creature.  Placeables, Areas, etc, will apply the wounding but do the damage once on impact and then it will end.