Hi there. This mod is amazing; basically essential for me, otherwise I wouldn't still be playing the game, because it allows me to properly script the caster classes to be totally hands-free, etc.
Anyway, the reason I'm writing is I found what appears to be a lone exception earlier today, and I was wondering whether anybody else had noticed it.
I have the "Gatecrashers" gauntlet on my current Fighter/Monk. It has a passive 15% to knock down on crit which is great since I give him WOTEP, BUT... it has an active ability which fires a knockdown effect in a cone, and it's the only thing I've seen to persistently hit my own team, even with this mod on permanently.
Only noticed today. I wonder whether there might be something unusual about it?
Not sure if people are interested in this, but the same basic concept of the mod seems to work. They may have just updated the structure of the files since the mod author posted this. To make AoE spells harm only enemies, you can do the following (limited testing on my part, seems to work for me):
Set up a new mod in your override directory: .\Pillars of Eternity II\PillarsOfEternityII_Data\override\NoFriendlyFire\
Within that directory, make two more subdirectories: .\Pillars of Eternity II\PillarsOfEternityII_Data\override\NoFriendlyFire\design\gamedata\
Create a text file within that gamedata directory, called "nofriendlyfire.gamedatabundle"
For this example, we will make the Fireball Wizard spell hostile-only. Take the original spell from: \Pillars of Eternity II\PillarsOfEternityII_Data\exported\design\gamedata\attacks.gamedatabundle
I use Notepad++ with the JSTool plugin to format this file (press ctrl+alt+m)
Search for Fireball...you should see "DebugName": "Fireball_Aoe", around line 35809 (after formatting). Copy the entire "$type" structure:
Now, go into the new gamedatabundle file that you created (nofriendlyfire.gamedatabundle) and put in the initial necessary structure:
{ "GameDataObjects": [
] }
Then paste the Fireball_Aoe stuff into that GameDataObjects and remove all of the stuff that we don't want to modify. Anything with "$type" or "ID" needs to stay, along with anything you want to modify. Change "AffectedTargetType" from "All" to "Hostile" For example, I have:
Save this file, start the game, make sure the mod is selected. The Wizard's spell Fireball should now state that it is Foe AoE instead of AoE. Might also include a basic manifest.json if you want. Add in more spells as you see fit, some spells have different components, so be wary...naming convention is pretty straight forward (can usually just take spell name and replace spaces with underscores to find what you need).
Here, we are actually changing the attack effects (thus, attacks.gamedatabundle) which are referenced by abilities.gamedatabundle. If you want to make sure that you are changing the right attack data, you can verify by making double-checking what is being referenced in abilities.gamedatabundle. For example, "Fireball" in abilities.gamedatabundle references "AttackID": "5bc9f76b-2113-409f-81c0-5096e66974be", Search for 5bc9f76b-2113-409f-81c0-5096e66974be in attacks.gamedatabundle to find the thing we modified above.
Somewhat time consuming until you get the hang of it...so I don't want to do it for everything, but feel free to do this if you want to modify a few spells on your own. That said, if you've read up to here, you may as well take the extra minute or two to get it done :) Note that you can do things like modify the area, etc, here, if you wanted.
Also, if you want to change more than 1 ability, you need to separate the abilities with a comma. For example (DO NOT USE THIS, IT JUST REPEATS FIREBALL FOR THE EXAMPLE):
So yea...that's about it. The spells I checked in the mod-author's version actually look very similar to what I show here, but it doesn't include the additional stuff in components...not sure if that's new, but doing it this way works for me. It could be that some of the IDs changed from his version, or something else along those lines...I just don't feel like going through all of them to verify.
Alternatively one can replace "AffectedTargetType": "All" for "AffectedTargetType": "Hostile" straight in the attacks.gamedatabundle in one fell swoop. (I know, "swooping is bad") It will also affect some enemy aoe, but that shouldn't be an issue. (Unless some all atacks should remain as all, but I really can't find an instance for this) Also one should backup the file before making the change. But it is considerably quicker, but perhaps not so safe... (quick test with fan of flames worked, but can't predict, if I will find some problem along the way)
90 comments
I updated the mod to add support for version 5.0 of Pillars of Eternity II. Sorry it took so long. Thanks!
Anyway, the reason I'm writing is I found what appears to be a lone exception earlier today, and I was wondering whether anybody else had noticed it.
I have the "Gatecrashers" gauntlet on my current Fighter/Monk. It has a passive 15% to knock down on crit which is great since I give him WOTEP, BUT... it has an active ability which fires a knockdown effect in a cone, and it's the only thing I've seen to persistently hit my own team, even with this mod on permanently.
Only noticed today. I wonder whether there might be something unusual about it?
Thanks again. :)
10/10
Could someone teach me how to add Heart Seeker into the mod?
Thanks!
Set up a new mod in your override directory:
.\Pillars of Eternity II\PillarsOfEternityII_Data\override\NoFriendlyFire\
Within that directory, make two more subdirectories:
.\Pillars of Eternity II\PillarsOfEternityII_Data\override\NoFriendlyFire\design\gamedata\
Create a text file within that gamedata directory, called "nofriendlyfire.gamedatabundle"
For this example, we will make the Fireball Wizard spell hostile-only. Take the original spell from:
\Pillars of Eternity II\PillarsOfEternityII_Data\exported\design\gamedata\attacks.gamedatabundle
I use Notepad++ with the JSTool plugin to format this file (press ctrl+alt+m)
Search for Fireball...you should see
"DebugName": "Fireball_Aoe",
around line 35809 (after formatting). Copy the entire "$type" structure:
{
"$type": "Game.GameData.AttackAOEGameData, Assembly-CSharp",
"DebugName": "Fireball_Aoe",
"ID": "5bc9f76b-2113-409f-81c0-5096e66974be",
"Components": [{
"$type": "Game.GameData.AttackBaseComponent, Assembly-CSharp",
"KeywordsIDs": ["f0dbb330-1b06-4175-8ce4-efe790b99213", "3f075d80-787a-493e-bbaa-6da3d6dc2d0f"],
"AttackDistance": 8,
"MinAttackDistance": 0,
"AttackVariationID": "4365c4d1-44ce-4b2a-bf11-d895a006b12b",
"UseParentEquippableHand": "false",
"CastSpeedID": "eacb53e3-6eb5-422a-92ca-99cc883ae4a9",
"RecoveryTimeID": "9d15e1c1-c6e1-4b25-bc1d-bf3707f6f534",
"OverrideTacticalActionType": "None",
"ImpactDelay": 0,
"ForcedTarget": "None",
"AffectedTargetType": "All",
"AffectedTargetConditional": {
"Conditional": {
"Operator": 0,
"Components": []
}
},
"AffectedTargetDeathState": "Alive",
"HostilityOverride": "Default",
"PushDistance": 0,
"FaceTarget": "true",
"AccuracyBonus": 0,
"PenetrationRating": 7,
"DamageData": {
"DamageType": "Burn",
"AlternateDamageType": "None",
"Minimum": 37,
"Maximum": 48,
"TacticalMinimumOverride": 0,
"TacticalMaximumOverride": 0,
"DamageProcs": []
},
"RequiresHitObject": "false",
"StatusEffectKeywordsIDs": [],
"StatusEffectsIDs": [],
"RandomizeStatusEffect": "false",
"CanGraze": "true",
"CanCrit": "true",
"DefendedBy": "Reflex",
"AfflictionsDefendedBy": "None",
"AfflictionApplicationModifier": "None",
"SubstituteHitVisualEffect": "",
"VisualEffects": [{
"VisualEffect": "prefabs/effects/abilities/cast/fx_cast_wizard_evocation.prefab",
"AttachPoint": "LeftWeapon",
"AttachObject": "Caster",
"AttachMode": "Attach",
"MeshType": "None",
"Event": "OnAnimEvent",
"AnimEventID": 0,
"Loop": "true",
"Scale": "false"
}, {
"VisualEffect": "prefabs/effects/abilities/wizzard/fx_fireball_start.prefab",
"AttachPoint": "RightWeapon",
"AttachObject": "Caster",
"AttachMode": "Attach",
"MeshType": "None",
"Event": "OnAnimEvent",
"AnimEventID": 1,
"Loop": "true",
"Scale": "false"
}, {
"VisualEffect": "prefabs/effects/abilities/cast/fx_grimoire_close_evocation.prefab",
"AttachPoint": "LeftWeapon",
"AttachObject": "Caster",
"AttachMode": "Attach",
"MeshType": "None",
"Event": "OnAnimEvent",
"AnimEventID": 3,
"Loop": "false",
"Scale": "false"
}, {
"VisualEffect": "prefabs/effects/abilities/wizzard/fx_fireball_launch.prefab",
"AttachPoint": "RightWeapon",
"AttachObject": "Caster",
"AttachMode": "PositionRotation",
"MeshType": "None",
"Event": "OnLaunch",
"AnimEventID": 0,
"Loop": "false",
"Scale": "false"
}, {
"VisualEffect": "prefabs/effects/abilities/wizzard/fx_fireball_aoe.prefab",
"AttachPoint": "Ground",
"AttachObject": "Target",
"AttachMode": "Attach",
"MeshType": "None",
"Event": "OnImpact",
"AnimEventID": 0,
"Loop": "false",
"Scale": "true"
}
],
"AttackOnImpactID": "00000000-0000-0000-0000-000000000000",
"ExtraAttackID": "00000000-0000-0000-0000-000000000000",
"LaunchBone": "RightWeapon",
"HitBone": "Ground",
"OnHitShakeDuration": "None",
"OnHitShakeStrength": "None",
"NoiseLevelID": "82bc1ce9-3a81-41ca-a61a-cc1f73a53de7",
"AllReactNoise": "false",
"InterruptsOn": "Crit",
"InterruptType": "Normal",
"TargetAngle": 0,
"ApplyOnceOnly": "false",
"PathsToTarget": "true",
"HideFromCombatLog": "false",
"AdditionalAttackOnTooltip": "false",
"DoesNotApplyDamage": "false",
"TreatAsWeapon": "false",
"BounceData": {
"Bounces": 0,
"Multiplier": 0.5,
"Range": 10,
"InRangeOrder": "false",
"NoRepeatTargets": "false",
"AlwaysBounceAtEnemies": "false",
"Delay": 0,
"NeverBounce": "false"
},
"AttackValidityConditional": {
"Conditional": {
"Operator": 0,
"Components": []
}
}
}, {
"$type": "Game.GameData.AttackAOEComponent, Assembly-CSharp",
"BlastSize": "Medium",
"BlastRadiusOverride": 2.5,
"DamageAngle": 360,
"ExcludePrimaryTarget": "false",
"IgnoreParentTarget": "false",
"ExcludeSelf": "false",
"BlastPhysicsForce": 500,
"PushFromCaster": "false"
}, {
"$type": "Game.GameData.AttackRangedComponent, Assembly-CSharp",
"LaunchAttackOnCollision": "false",
"ProjectileCount": 1,
"IgnoreMagicDefense": "false",
"ProjectileConeAngle": 145,
"ProjectilePrefab": "prefabs/projectiles/wizard/fx_fireball_projectile.prefab",
"IsMultiHit": "false",
"MultiHitTravelDist": 10,
"MultiHitMaxHits": 0,
"LaunchSource": "Caster",
"LaunchOffset": {
"x": 0,
"y": 0,
"z": 0
},
"LaunchOffsetRandom": {
"x": 0,
"y": 0,
"z": 0
}
}
]
}
Now, go into the new gamedatabundle file that you created (nofriendlyfire.gamedatabundle) and put in the initial necessary structure:
{
"GameDataObjects": [
]
}
Then paste the Fireball_Aoe stuff into that GameDataObjects and remove all of the stuff that we don't want to modify. Anything with "$type" or "ID" needs to stay, along with anything you want to modify. Change "AffectedTargetType" from "All" to "Hostile" For example, I have:
{
"GameDataObjects": [{
"$type": "Game.GameData.AttackAOEGameData, Assembly-CSharp",
"DebugName": "Fireball_Aoe",
"ID": "5bc9f76b-2113-409f-81c0-5096e66974be",
"Components": [{
"$type": "Game.GameData.AttackBaseComponent, Assembly-CSharp",
"AffectedTargetType": "Hostile"
}, {
"$type": "Game.GameData.AttackAOEComponent, Assembly-CSharp"
}, {
"$type": "Game.GameData.AttackRangedComponent, Assembly-CSharp"
}
]
}
]
}
Save this file, start the game, make sure the mod is selected. The Wizard's spell Fireball should now state that it is Foe AoE instead of AoE. Might also include a basic manifest.json if you want. Add in more spells as you see fit, some spells have different components, so be wary...naming convention is pretty straight forward (can usually just take spell name and replace spaces with underscores to find what you need).
Here, we are actually changing the attack effects (thus, attacks.gamedatabundle) which are referenced by abilities.gamedatabundle. If you want to make sure that you are changing the right attack data, you can verify by making double-checking what is being referenced in abilities.gamedatabundle. For example,
"Fireball" in abilities.gamedatabundle references "AttackID": "5bc9f76b-2113-409f-81c0-5096e66974be", Search for 5bc9f76b-2113-409f-81c0-5096e66974be in attacks.gamedatabundle to find the thing we modified above.
Somewhat time consuming until you get the hang of it...so I don't want to do it for everything, but feel free to do this if you want to modify a few spells on your own. That said, if you've read up to here, you may as well take the extra minute or two to get it done :) Note that you can do things like modify the area, etc, here, if you wanted.
Also, if you want to change more than 1 ability, you need to separate the abilities with a comma. For example (DO NOT USE THIS, IT JUST REPEATS FIREBALL FOR THE EXAMPLE):
{
"GameDataObjects": [{
"$type": "Game.GameData.AttackAOEGameData, Assembly-CSharp",
"DebugName": "Fireball_Aoe",
"ID": "5bc9f76b-2113-409f-81c0-5096e66974be",
"Components": [{
"$type": "Game.GameData.AttackBaseComponent, Assembly-CSharp",
"AffectedTargetType": "Hostile"
}, {
"$type": "Game.GameData.AttackAOEComponent, Assembly-CSharp"
}, {
"$type": "Game.GameData.AttackRangedComponent, Assembly-CSharp"
}
]
}, {
"$type": "Game.GameData.AttackAOEGameData, Assembly-CSharp",
"DebugName": "Fireball_Aoe",
"ID": "5bc9f76b-2113-409f-81c0-5096e66974be",
"Components": [{
"$type": "Game.GameData.AttackBaseComponent, Assembly-CSharp",
"AffectedTargetType": "Hostile"
}, {
"$type": "Game.GameData.AttackAOEComponent, Assembly-CSharp"
}, {
"$type": "Game.GameData.AttackRangedComponent, Assembly-CSharp"
}
]
}
]
}
So yea...that's about it. The spells I checked in the mod-author's version actually look very similar to what I show here, but it doesn't include the additional stuff in components...not sure if that's new, but doing it this way works for me. It could be that some of the IDs changed from his version, or something else along those lines...I just don't feel like going through all of them to verify.
Enjoy!
-Exfinite