边缘世界 RimWorld

边缘世界 RimWorld

Avoid Friendly Fire - 1.6
20 条留言
Hugalafutro 9 月 22 日 上午 3:10 
Thank you for this, my laser sniper wielding colonist just cleanly shot through 2 of my melee and took one arm and incapacitated the other and now they hate each other and that ain't no good.
PathToV1ctory  [作者] 9 月 13 日 下午 4:15 
V1.6.2 - Optimized creation of firecones.
PathToV1ctory  [作者] 9 月 13 日 下午 4:08 
@rk Q: Just wondering, did JimmSlimm's suggestions get integrated yet?
Sorry about the delay, I had implementation like 90% done and then forgot about it.

I've tested the optimizations, and they seem to function fine, but I can't really tell how much it improved performance. Further optimization is likely all going to squeeze out maybe a few microseconds total; I can't really tell a difference between the before and after in-game, like I could with The Big Fix™.

They might help a little bit if you're doing HUGE fights at long range?

Testing fifteen pawns with rifles vs a 10k point raid:
- Dub's Performance Analyzer puts average call time for the patch at ~15-30 microseconds with vanilla assault rifles.
- With range at ~300, average call time only goes up to ~300 microseconds.

Q: Did it further help with TPS on crowded maps?
The mod's TPS issue on crowded maps was already fixed in the previous update. It should be much, much faster than it used to be.
rk 9 月 11 日 上午 2:45 
Just wondering, did JimmSlimm's suggestions get integrated yet? Did it further help with TPS on crowded maps?
MatrixVirus 8 月 14 日 下午 7:34 
work for vehicles from VVE?
PathToV1ctory  [作者] 8 月 14 日 下午 6:42 
@JimmSlimm
Thank you for the kind words, but the vast majority of this mod was done by the original author, Falconne. I have adopted it for maintenance, and only made some minor adjustments to try and optimize.

Those seem like good suggestions for optimizing it even further, thank you very much! I'll test them sometime soon.
JimmSlimm 8 月 14 日 下午 2:35 
Hey, I just wanted to say that your mod is awesome, and I learned a lot from your code on GitHub while working on my own project.
To give something back, I found a couple of ways to optimize your GetFireCone function that should give a really nice performance boost.
Here's an image explaining the ideas: https://postimg.cc/sQy6GsKB
And here's the code changes you'd need: https://justpaste.it/6kn41
Jarrod 8 月 5 日 下午 6:30 
@GetUrAssToMars I'm like 90% sure this *is* tied to the skill. There's a setting to make it *not* tied to the shooting skill.
GetUrAssToMars 8 月 5 日 上午 8:38 
It would be amazing if this could be somehow tied into the pawns ranged skill.
Jarrod 8 月 5 日 上午 6:20 
Yo bless you for the optimizations. It makes this work way better with the "search and destroy" mod which turned the game into a slideshow when you turned it on. Now it's smooth as butter.
PathToV1ctory  [作者] 8 月 4 日 下午 3:45 
V1.6.1 - Optimized logic for checking if it is safe for pawns to fire. Now checks the firecone for pawns, instead of checking if pawns are in the firecone.


In testing, this update made me able to maintain 60TPS (8-10ms/t) with 15 friendlies and 120 enemies in combat.
The previous version brought me down to <30TPS (well over 40ms/t) in a similar situation; less than half of the target TPS for 1x speed.
ObscureParticle 8 月 4 日 上午 9:15 
@Guedez, depends on the difficulty, at higher difficulties friendly fire is more likely to happen, and when you have high dmg weapons like lances or such, these can easily one shot a pawn, it's even an issue when you have multiple people hunting.
Guedez 8 月 4 日 上午 5:27 
Is this mod even needed? I feel like bullets barely ever hit friendlies at all. I have my pawns in a lazy circle formation and they shoot through each other with no issue. I see one friendly fire hit every 300 bullets or something
ObscureParticle 7 月 30 日 下午 5:35 
Can I use this without HugsLib?
fbarba2017 7 月 27 日 上午 8:18 
YASSS Thank you for this!!
BlueTressym 7 月 24 日 下午 8:39 
Thank you for saving this mod, much appreciated.
PathToV1ctory  [作者] 7 月 24 日 上午 8:29 
To me, turning off friendly fire feels weird and kind of cheaty, because it absolutely SHOULD be able to happen. It just should occur very very rarely, in specific circumstances, when you decide the risk is worth the reward.

Removing friendly fire entirely makes REALLY cheesy tactics possible, like a pawn stopping raiders at a door while getting friendly bullets sprayed straight through them. It just makes your pawns better with no consequence. Positioning relative to the gunners matters a lot less.

This mod instead makes your pawns smart enough to NOT shoot near each other (unless specifically told to). It's similar, but not the same. Your firing line will stop firing when a pawn moves in between them and their target. In order to prevent friendly fire, you lose out on possible damage.
bugsbony 7 月 24 日 上午 8:26 
Thanks for porting this mod.

@Bakker Joop: this mod is very different from disabling friendly fire. It allows you to tell your pawns to not fire if there is a chance of friendly fire.
ThroatGOAT 7 月 24 日 上午 5:31 
You a real one for that, Bakker.
Bakker Joop 7 月 24 日 上午 4:49 
For anyone using this mod: You can disable friendly fire in the story teller settings (or set it to any percentage you want) in the vanilla game. This mod is not needed.