Grenade's "Reflective" Damage - How to disable?

正在查看此主题的用户

Babaganoush

Regular
I notice that if the grenade damage even hits a companion I got damaged for almost 3/4 of my health.

This is EXTREMELY stupid. I try to be careful at times when lobbing them into enemies, but sometimes my companions get in my way.

And AFTER you hit a companion, ANY grenade that you throw in the future of the battle, you will get hit, no matter how far you are away from it. And that means, if you throw another grenade. You die instantly.

Anyone know what to edit, if any to disable this poorly implemented idea?
 
You ask the server admin nicely if he'd change the friendly fire setting from reflective to none.
 
The second bit does sound like a bug, though. Are you saying that even if the grenade doesn't damage anybody,  you still get reflective damage?
 
There's a definite coding bug, as cmpxchg8b points out:
cmpxchg8b 说:
The grenade script is very faulty.

Technical details:
插入代码块:
... here position register 1 holds the position of the grenade hit
(try_for_agents, ":cur_agent"),
	... check for distance between grenade hit and agent
	... if close enough, hurt the agent
	(agent_deliver_damage_to_agent, ":throwing_agent", ":cur_agent", ":damage"),
	... and now the nice part. By calling the above operation, the trigger ti_on_agent_hit will fire. If the agent dies, ti_on_agent_killed_or_wounded will fire too
	... those two triggers might end up executing a massive chain of scripts, and you bet one or more of those overwrites position register 1
	... in the next loop iteration the distance check will be made using the overwritten position, and boom
(try_end),

Funnily enough, they do the exact same mistake with prop_instance_receive_damage (triggering ti_on_scene_prop_hit and possibly ti_on_scene_prop_destroy) just a few lines after.

Fix will likely take the Module System (or at least the Module System would make it considerably easier).


EDIT-
Monkeyed with the .txt coding. This should eliminate the player getting injured regardless of where the grenade detonates, by addressing the concerns cmp expressed in above.
1. Make a backup copy of your scripts.txt file (found in your installation ...WFaS\Modules\OiM\ folder)
2. Open scripts.txt (either in Notepad++ or in Notepad with Word Wrap turned off)
3. Find "oim_deliver_granade_damage"
4. Select the numbers on the line that follow it...they begin with 86...and continue selecting until you reach the next script "kill_radzivill_sneak_condition"
5. You should have selected a block of numbers from 86 to and ending in "3 0 3 0 3 0 3 0"
6. Replace that whole block with the code here:
插入代码块:
 87 23 2 1224979098644774912 1 23 2 1224979098644774913 2 23 2 1224979098644774914 3 700 2 59 1 4 0 1073742241 0 2147484067 0 32 2 1224979098644774912 -1 1718 2 1224979098644774915 1224979098644774912 32 2 1224979098644774915 -1 2170 3 1224979098644774916 34 1224979098644774915 2108 2 1224979098644774916 2 2105 2 1224979098644774914 1224979098644774916 2107 2 1224979098644774914 100 2124 1 100 700 2 60 1 1 2 936748722493063897 1152921504606847102 1969 3 1008806316530991170 1 1 1969 3 1008806316530991172 1 100 1969 3 1008806316530991169 1 1 1969 3 1008806316530991173 1 150 1969 3 1008806316530991171 1 300 12 1 1224979098644774917 1702 1 1224979098644774917 1710 2 2 1224979098644774917 722 2 2 90 710 3 1224979098644774918 2 59 2147483678 2 1224979098644774918 1224979098644774914 2122 3 1224979098644774919 1224979098644774918 100 2108 2 1224979098644774919 1224979098644774914 2133 2 1224979098644774920 0 4 0 2147483680 2 1224979098644774919 30 2133 2 1224979098644774920 1224979098644774913 5 0 2122 3 1224979098644774921 1224979098644774914 30 2108 2 1224979098644774921 100 2121 3 1224979098644774914 1224979098644774914 1224979098644774921 2106 2 1224979098644774918 1224979098644774921 2122 3 1224979098644774920 1224979098644774918 750 2108 2 1224979098644774920 1224979098644774914 2121 3 1224979098644774920 1000 1224979098644774920 2107 2 1224979098644774920 1224979098644774913 2108 2 1224979098644774920 1000 3 0 1722 3 1224979098644774912 1224979098644774917 1224979098644774920 1702 1 1224979098644774917 700 2 60 2 4 0 1704 1 1224979098644774917 1 2 936748722493063897 1152921504606847080 1714 2 1224979098644774922 1224979098644774917 4 0 2147483680 2 1224979098644774922 0 1740 2 1224979098644774917 1801439850948198840 3 0 5 0 1 2 936748722493063897 1152921504606847087 1740 2 1224979098644774917 1801439850948198959 3 0 3 0 4 0 419 0 6 3 1224979098644774923 370 384 520 3 1224979098644774924 360287970189640576 1224979098644774923 1810 2 1224979098644774925 1224979098644774924 32 2 1224979098644774925 0 6 3 1224979098644774926 0 1224979098644774925 1811 3 1224979098644774927 1224979098644774924 1224979098644774926 1850 2 4 1224979098644774927 710 3 1224979098644774918 4 59 2147483678 2 1224979098644774918 1224979098644774914 1815 2 1224979098644774928 1224979098644774927 32 2 1224979098644774928 0 2123 3 1224979098644774929 1224979098644774918 100 4 0 31 2 1224979098644774929 0 2133 2 1224979098644774920 1224979098644774913 5 0 2123 3 1224979098644774920 1224979098644774913 1224979098644774929 3 0 2107 2 1224979098644774920 17 1877 3 1224979098644774927 1224979098644774912 1224979098644774920 3 0 3 0 3 0 3 0
7. There's very little change, but easier to copy paste a block than to edit the four different places.
8. Be sure that the next script name "kill_radzivill_sneak_condition" still begins on its own line.
9. Save, play.
 
I assume it'd need to be done on the server rather than the client to work (for multiplayer anyway)?
 
For multiplayer it needs to be done at both the client and then server. Server for the damage, client for dealing with scene props.
 
I was referring to NPC companions, therefore singleplayer... but after further grenade testing, it seems like it's just purely random reflective damage... most of the time after I throw off two grenades, the third one has a high probability of blowing me up.
 
Fix seems to work fine, did a few battles with all 3 sizes of grenades and they didn't seem to have any issues.
 
Caba`drin 说:
Intrinsic genius goes here.

Thank you so much. Huge props to you for fixing this. Now I don't need to be paranoid about throwing grenades!

...

I still sometimes end up hitting myself, but not from buggy behaviour. I should stop hucking them from horseback at full speed.
 
If I apply this fix, and then the official patch comes out, will my save file still be compatible with the newer version of FnS? (Assuming the official patch support older save games).

And while we're on that subject, what about the leveling troops fix?
 
forte712 说:
If I apply this fix, and then the official patch comes out, will my save file still be compatible with the newer version of FnS? (Assuming the official patch support older save games).

And while we're on that subject, what about the leveling troops fix?
Yes, your save should be compatible if you use either fix. This one 100% will have no effect on save game compatibility. Considering the troops leveling fix was home-brewed without direction from knowing what the troop trees should be like, you might see a difference in who you troops will upgrade to later, of course, but it shouldn't break your save.
 
Caba`drin 说:
forte712 说:
If I apply this fix, and then the official patch comes out, will my save file still be compatible with the newer version of FnS? (Assuming the official patch support older save games).

And while we're on that subject, what about the leveling troops fix?
Yes, your save should be compatible if you use either fix. This one 100% will have no effect on save game compatibility. Considering the troops leveling fix was home-brewed without direction from knowing what the troop trees should be like, you might see a difference in who you troops will upgrade to later, of course, but it shouldn't break your save.

Perfect  :grin:
Thanks!
 
后退
顶部 底部