Getting rid of Friendly Fire without changing other difficulty settings
#1
Posté 16 novembre 2009 - 05:18
A writeup by Talian Kross gave me an idea (http://social.biowar...59524/blog/628/). I haven't tried it yet, but I don't see why it shouldn't work.
1. Open difficulty.xls.
2. Follow Talian's instructions, copy the difficulty settings for Normal (or Hard, or Nightmare) mode and overwrite Casual mode's settings with them.
3. Compile the 2da file and place it where it needs to go.
4. Fire up the game and change difficulty to Casual.
This should give you all the difficulty enhancements of harder modes, minus the friendly fire.
Sure seems easier than editing a bunch of spell scripts. Not sure if it will work though (so if you want to test, let me know how it went).
#2
Posté 17 novembre 2009 - 04:47
Anyway, tested it and it works. Sadly, "no friendly fire" means "no damage from the spell's main effect"; however, your party still suffers from Fire's DoT and Frost's "frozen solid" effects.
#3
Posté 17 novembre 2009 - 05:14
#4
Posté 18 novembre 2009 - 04:09
KillerRabbit wrote...
Games without friendly fire suxx!
Eh, thank you for your input?
#5
Posté 18 novembre 2009 - 04:22
Yes, that works perfectly. My only suggestion is that you go a step further and just reverse the settings.
In the ID column, Row 3, just change the 0 to 1, and Row 4, change 1 to 0. (IDs in 2da's need not be consecutive.) This way, you can play with Normal settings without FF in Easy mode but also still have the option to switch to Easy settings by switching to Normal mode for those battles that may be too tough.
For example, here's a shot of my switching Hardcore and Easy modes so I can play Hardcore mode without FF (Inferno is too much fun to play with friendly fire on, like I need to prove anything to you "FF off suxx" internet e-thug dweebs
Modifié par Talian Kross, 18 novembre 2009 - 12:53 .
#6
Posté 18 novembre 2009 - 02:56
This brings up a possible issue. Say, I follow these instructions and swap Normal and Casual. I then go on to play and select "Easy" in the difficulty drop-down under Options in game. Now all rules of Normal apply, minus friendly fire.
Then I run into the Mega Uber Super Boss that I just can't beat, and switch the drop-down from Easy to Normal. Now, since we swapped the IDs in difficulty.2da, the rules of Easy mode apply. However, won't that turn Friendly Fire back on?
#7
Posté 18 novembre 2009 - 03:08
Damar Stiehl wrote...
KillerRabbit wrote...
Games without friendly fire suxx!
Eh, thank you for your input?
well honestly I agree..if anything I'd want to enable friendly fire in Easy setting...no friendly fire + mage = iwin
#8
Posté 18 novembre 2009 - 05:47
#9
Posté 18 novembre 2009 - 11:14
Yeah, but there seems to be no way around that. As far as I have been able to determine, FF is strictly hard-coded in the engine and can't be modified without BioWare releasing a patch. Though, admittedly, my search through the scripts wasn't exhaustive, I could find no damage scaling based on the difficulty mode in any of the scripts which is what leads me to conclude that (0% - Easy, 50% - Normal, 100% Hardcore/Nightmare) damage scaling is done inside the game engine itself.Damar Stiehl wrote...
Talian, are you saying that the ID number in difficulty.2da is what defines whether friendly fire is on or off? That's... interesting to say the least.
This brings up a possible issue. Say, I follow these instructions and swap Normal and Casual. I then go on to play and select "Easy" in the difficulty drop-down under Options in game. Now all rules of Normal apply, minus friendly fire.
Then I run into the Mega Uber Super Boss that I just can't beat, and switch the drop-down from Easy to Normal. Now, since we swapped the IDs in difficulty.2da, the rules of Easy mode apply. However, won't that turn Friendly Fire back on?
If someone knows differently, please speak up!
Anyway, yes, all 2DA data is keyed by ID. Everything else (the other columns) is just data. So, internally, Easy Mode = ID 0, Normal = ID 1, etc.
My suggestion is just switch the data around; and that way, you don't actually lose a setting: you are just really renaming them. But again, FF off only applies to the ID:0 record, and there's no way around that as far as I know.
Side Note: I would be ecstatically happy if a BioWare dev confirmed or denied any of this, but they seem to be busy nowadays and don't post much anymore.
Modifié par Talian Kross, 18 novembre 2009 - 11:25 .
#10
Posté 19 novembre 2009 - 03:31
#11
Posté 19 novembre 2009 - 03:59
#12
Posté 19 novembre 2009 - 10:43
zuggy wrote...
I'm not at home so I can't test this, but would it be plausible to just create a new difficulty setting and have it show up in the dropdown?
Yes. Apparently, you can! It shows up on the Options page anyway. I'll leave it to you (or someone else) to determine how the engine itself treats the new setting. (Again, I'm presuming FF is hard-coded, so is the engine flexible enough to accept a difficulty ID outside the range of 0 to 3? I don't know.)
I didn't feel like going to the trouble of creating a new string (for the name), so I just copied Normal difficulty to a new line (ID:4):
Modifié par Talian Kross, 19 novembre 2009 - 10:47 .
#13
Posté 20 novembre 2009 - 12:58
Modifié par JonnyOctagon, 20 novembre 2009 - 01:00 .
#14
Posté 20 novembre 2009 - 01:23
if (IsObjectHostile(stEvent.oCaster, oTarget) == TRUE)
Where as fireball does not include such a check, and thus is able to blast your party. I put a blog up on how to edit and compile a simple spell mod that is module independant. Careful with it because it will not behave well with other mods of the same files.
That being said, I believe I saw a place where you can set a 2da flag for allowing targeting of friendly players. Not sure if this with effect FF, as you don't need to target a friendly to hit them with Fireball.
Based on what I read and from looking just now, it seems like the difficulty setting for FF just hardcodes the damage done to allies to 0, and at a low level. You can still effect them with effects from spells, which leads me to understand that the spells are still be run to their full effects on allies, just not doing damage.
Should you require a workaround that is not a difficulty setting hack, you will have to modify all the base spells. I am sure bioware made the base abilities like this so that they could not be easily overrode from multiple places. If you need help with modifying the spells in script, I have a blog up on this site.
Modifié par Nodrak, 20 novembre 2009 - 01:42 .
#15
Posté 20 novembre 2009 - 03:14
Nodrak wrote...
Friendly Fire is determined uniquly and individually on a per spell/ability basis. For example, Sleep's damage logic is prefaced by:
if (IsObjectHostile(stEvent.oCaster, oTarget) == TRUE)
...
Yeah, we already know that, but what you are referring to really has nothing to do with "friendly fire" in the context players are interested in.
As I stated in my original post, if you go through all the damage and effect related functions, nowhere is the damage being scaled based on the active difficulty level which leads us to conclude the scaling is hard-coded in the engine itself, not in the script subsystem.
So you have two choices. 1.) modify each spell event, or 2.) [much, much easier and incredibly less intrusive], just tell the engine we are playing in Easy mode but apply the "Normal/Hard/Nightmare" scaling to damage, resistance,etc. as we show how to do above.
Modifié par Talian Kross, 20 novembre 2009 - 03:16 .
#16
Posté 20 novembre 2009 - 03:38
The reason I mentioned that was because while some people would just like to do 0 damage to your team, things like Freezing them or Paralyze from the spell combo can still do 'friendly fire'. Altering that is a firly large task for people not experienced with coding though
Hmm, if there is large interest, that might make a good starting mod me to work on...
Modifié par Nodrak, 20 novembre 2009 - 03:39 .
#17
Posté 20 novembre 2009 - 07:55
#18
Posté 23 novembre 2009 - 08:08
Modifié par Graxster, 23 novembre 2009 - 04:55 .
#19
Posté 23 novembre 2009 - 10:45
#20
Posté 23 novembre 2009 - 01:07
Friendly Damage modifiers 0%, 50%,.. are determinated by script in effect_damage_h, inside Effects_ApplyInstantEffectDamage function implementation where there is conditional check depending of the game difficulty mode.Talian Kross wrote...
....
As I stated in my original post, if you go through all the damage and effect related functions, nowhere is the damage being scaled based on the active difficulty level which leads us to conclude the scaling is hard-coded in the engine itself, not in the script subsystem.
......
Also if you simply want to have other difficulty modes with friendly fire disabled, you just need to edit 2 lines in 2 scripts.
in effect_damage_h.nss:
// ---------------------------------------------------------------------
// DIFFICULTY: No friendly fire in easy difficulty
// ---------------------------------------------------------------------
if (GetGameDifficulty() == GAME_DIFFICULTY_CASUAL)
{
int bUnresistable = (nDamageFlags & DAMAGE_EFFECT_FLAG_UNRESISTABLE) == DAMAGE_EFFECT_FLAG_UNRESISTABLE;
int bDot = (nDamageFlags & DAMAGE_EFFECT_FLAG_FROM_DOT) == DAMAGE_EFFECT_FLAG_FROM_DOT;
// Unresistable damage still gets through, unless it's from a dot
if (!bUnresistable || bDot)
{
if (IsFriendlyFireParty(oTarget,oDamager))
{
#ifdef DEBUG
Log_Trace(LOG_CHANNEL_COMBAT_DAMAGE,"effect_damage_h.IsDamageAllowed",
"Easy Difficulty, Not allowing damage between members of the player's party");
#endif
return FALSE;
}
}
}
remove the: if (GetGameDifficulty() == GAME_DIFFICULTY_CASUAL) {} contitional check;
and in the script effect_dot2_h, modify the Effects_HandleApplyEffectDOT function to replace
if ((GetGameDifficulty() == GAME_DIFFICULTY_CASUAL) && (nDamageType != DAMAGE_TYPE_PLOT))
with
if (nDamageType != DAMAGE_TYPE_PLOT)
Then recompile spell_aoe_instant, spell_aoe_duration and alike scripts to replace them with your module.
Modifié par elys, 23 novembre 2009 - 03:16 .
#21
Posté 24 novembre 2009 - 09:07
#22
Posté 24 novembre 2009 - 01:42
#23
Posté 25 novembre 2009 - 12:30
elys wrote...
...
Then recompile spell_aoe_instant, spell_aoe_duration and alike scripts to replace them with your module.
Good info! Thanks!
Still, it's a lot simpler to remap the difficulty levels with a simple 2da override than to maintain a header file and compile and override several scripts. Heck, with the 2da override, you never even need to open the toolset to make the changes.
#24
Posté 25 novembre 2009 - 12:35
Can you send me a link with the modified file? I tried to do what is written in your description but nothing happened, instead the game got buggy and had to reinstall.elys wrote...
Friendly Damage modifiers 0%, 50%,.. are determinated by script in effect_damage_h, inside Effects_ApplyInstantEffectDamage function implementation where there is conditional check depending of the game difficulty mode.Talian Kross wrote...
....
As I stated in my original post, if you go through all the damage and effect related functions, nowhere is the damage being scaled based on the active difficulty level which leads us to conclude the scaling is hard-coded in the engine itself, not in the script subsystem.
......
Also if you simply want to have other difficulty modes with friendly fire disabled, you just need to edit 2 lines in 2 scripts.
in effect_damage_h.nss:// --------------------------------------------------------------------- // DIFFICULTY: No friendly fire in easy difficulty // --------------------------------------------------------------------- if (GetGameDifficulty() == GAME_DIFFICULTY_CASUAL) { int bUnresistable = (nDamageFlags & DAMAGE_EFFECT_FLAG_UNRESISTABLE) == DAMAGE_EFFECT_FLAG_UNRESISTABLE; int bDot = (nDamageFlags & DAMAGE_EFFECT_FLAG_FROM_DOT) == DAMAGE_EFFECT_FLAG_FROM_DOT; // Unresistable damage still gets through, unless it's from a dot if (!bUnresistable || bDot) { if (IsFriendlyFireParty(oTarget,oDamager)) { #ifdef DEBUG Log_Trace(LOG_CHANNEL_COMBAT_DAMAGE,"effect_damage_h.IsDamageAllowed", "Easy Difficulty, Not allowing damage between members of the player's party"); #endif return FALSE; } } }
remove the: if (GetGameDifficulty() == GAME_DIFFICULTY_CASUAL) {} contitional check;
and in the script effect_dot2_h, modify the Effects_HandleApplyEffectDOT function to replace
if ((GetGameDifficulty() == GAME_DIFFICULTY_CASUAL) && (nDamageType != DAMAGE_TYPE_PLOT))
with
if (nDamageType != DAMAGE_TYPE_PLOT)
Then recompile spell_aoe_instant, spell_aoe_duration and alike scripts to replace them with your module.
#25
Posté 29 novembre 2009 - 07:26
Also I don't see how the game could be permanently buggy.
The worst you can do with the toolset is mess up the toolset database, and create files in override folders.
When this happens, and your game is buggy, just delete all the override folders in MyDocuments/Bioware/Dragon Age/Addins/, MyDocuments/Bioware/Dragon Age/Packages and delete MyDocuments/Bioware/Dragon Age/Single Player if you have one.
And if your database is damaged, just reinstall the toolset.
Also when you modify a core resource (which is done internally in the database) you have to remember that it will be modified for any other addin as well.
As for your particular issue I suspect there was a problem with the modification you've done on scripts, which got exported in override folder, and so the game was using it and got buggy?
Modifié par elys, 29 novembre 2009 - 07:26 .





Retour en haut






