Jump to content

Photo

Reverse Blood Sacrifice


  • Please log in to reply
27 replies to this topic

#1
Site Bot

Site Bot

    Fear me

  • Members
  • PipPipPipPipPip
  • 2,475,669 posts
Reverse Blood Sacrifice

This mod reverses the target of Blood Sacrifice from ally to enemy.

#2
mastermahidhar

mastermahidhar

    Journeyman

  • Members
  • Pip
  • 37 posts
Note: This is a reupload of the mod I had uploaded a few months ago. That version came with some 'extras' that I didn't know how to unlink. This one is cleaner which only affects the spell Blood Sacrifice.

#3
Tenebunny

Tenebunny

    Newbie

  • Supporter
  • Pip
  • 18 posts
Does this make it so you can ONLY target Enemies, or Enemies in addition to Allies?

#4
mastermahidhar

mastermahidhar

    Journeyman

  • Members
  • Pip
  • 37 posts
In response to post #109055198.


Spoiler

It switches target of Blood Sacrifice to enemies. Which means you will not be able to target party members anymore(the only allies you could target).

I don't really know how to get both as I would also like to get the option to choose any blooded creature. Especially those temporary allies(blue circles). 

#5
balmz

balmz

    Old hand

  • Members
  • PipPipPip
  • 779 posts
In response to post #109055198. #109057148 is also a reply to the same post.


Spoiler

forcefield works on both allies and foes, maybe you can check the targeting behaviour or target type for that?

#6
mastermahidhar

mastermahidhar

    Journeyman

  • Members
  • Pip
  • 37 posts
In response to post #109055198. #109057148, #109070033 are all replies on the same post.


Spoiler

First of all, it is nice to see there are interested people like me(I thought I was the only one) to make modifications such as this to add more 'freedom of choice' to the player.

Secondly, yes. I've reviewed Forcefield's script and there isn't any distinguishable part of the script so far as I can see that clearly states that the Target of the spell could be any creature. Here:

Forcefield:
case ABILITY_SPELL_WALL_OF_FORCE:
        {
            // remove stacking effects
            RemoveStackingEffects(stEvent.oTarget, stEvent.oCaster, stEvent.nAbility);
            if (GetHasEffects(stEvent.oTarget, EFFECT_TYPE_INVALID, ABILITY_SPELL_CRUSHING_PRISON) == TRUE)
            {
                effect[] eEffects = GetEffectsByAbilityId(stEvent.oTarget, ABILITY_SPELL_CRUSHING_PRISON);
                RemoveEffectArray(stEvent.oTarget, eEffects);
                ForceExplosion(stEvent.oTarget, stEvent.oCaster);
            } else
            {
                float fDuration = GetRankAdjustedEffectDuration(stEvent.oTarget, FORCE_FIELD_DURATION);
                eEffect = Effect(EFFECT_TYPE_DAMAGE_WARD);
                ApplyEffectOnObject(EFFECT_DURATION_TYPE_TEMPORARY, eEffect, stEvent.oTarget, fDuration, stEvent.oCaster, stEvent.nAbility);
                eEffect = EffectParalyze(Ability_GetImpactObjectVfxId(stEvent.nAbility));
                ApplyEffectOnObject(EFFECT_DURATION_TYPE_TEMPORARY, eEffect, stEvent.oTarget, fDuration, stEvent.oCaster, stEvent.nAbility);
            }
            bHostile = TRUE;
            break;
        }

That's the whole thing. You can see the first two lines check whether Crushing Prison was cast. The second set of lines define the effect that needs to take place, if so(i.e. Force Explosion). The third set of lines just detail the spell's regular functioning. Then we have "bHostile' which I have no idea what it does.

In Blood Sacrifice's case, there was actually a clearly written set of lines which required the Caster and the Target to be in the same party for it to work(which is why the spell doesn't work on temporary allies). This, I removed and it magically allowed targeting enemies. Here's what I removed to make it work.

// if caster and target are party members, or if caster not a party member and target is of the same group
                    int bCasterPartyMember = IsPartyMember(stEvent.oCaster);
                    int bTargetPartyMember = IsPartyMember(stEvent.oTarget);
                    int nCasterGroup = GetGroupId(stEvent.oCaster);
                    int nTargetGroup = GetGroupId(stEvent.oTarget);
                    if (((bCasterPartyMember == TRUE) && (bTargetPartyMember == TRUE)) || ((bCasterPartyMember == FALSE) && (nCasterGroup == nTargetGroup)))
                    {

Feel free to let me know you figure something out from this cause I can't read beyond the surface level of code to understand what it's talking about.

#7
balmz

balmz

    Old hand

  • Members
  • PipPipPip
  • 779 posts
In response to post #109055198. #109057148, #109070033, #109073598 are all replies on the same post.


Spoiler

try checking the abi gda file

#8
mastermahidhar

mastermahidhar

    Journeyman

  • Members
  • Pip
  • 37 posts
In response to post #109055198. #109057148, #109070033, #109073598, #109091768 are all replies on the same post.


Spoiler

Thank you. It was indeed on the GDA. TargetType just needed to be set to 7, just like it is for Force Field.

A new optional file has been added called Blood Sacrifice All. Enjoy.

Edited by mastermahidhar, 09 May 2022 - 05:35 PM.


#9
UroshUchiha

UroshUchiha

    Regular

  • Members
  • PipPip
  • 72 posts
I always found it dumb that we couldn't use this ability on enemies. Made no sense. Thank you for this, will download it and use it on my next playthrough!

#10
CALINGA

CALINGA

    Journeyman

  • Members
  • Pip
  • 40 posts
Doesn't seem to work for me sadly, even though I installed it correctly.

Edited by CALINGA, 18 May 2022 - 07:55 PM.





IPB skins by Skinbox
Page loaded in: 0.946 seconds