饥荒联机版

饥荒联机版

Stamina System [Leaf Mods]
amoryleaf  [开发者] 2021 年 6 月 1 日 下午 3:14
Aggro System Bug
The player can get into a state where they are permanently in combat therefore disabling stamina until the server is restarted.

I've experienced this twice: 1) after killing hounds in the first hound wave; 2) and when going through a wormhole while in combat.
< >
正在显示第 1 - 10 条,共 10 条留言
amoryleaf  [开发者] 2021 年 6 月 1 日 下午 3:23 
Each enemy that targets the player is added to a list. They are removed from the list if the enemy drops the player as a target, if they're dead, or if they're removed from the world.
For 1) Not sure what caused it, haven't been able to reproduce.
For 2) DropTarget isn't called when I expect it to be. It makes sense that if player goes through a wormhole that the enemies would drop their target but... Apparently not!
amoryleaf  [开发者] 2021 年 6 月 1 日 下午 3:26 
For now I'm going to add a workaround. If the player wants to sprint but is in combat, make sure they're actually in combat.
amoryleaf  [开发者] 2021 年 6 月 1 日 下午 8:03 
ok 2) happens when the entity is "asleep". I expected the entity would be in limbo or removed from the scene but guess not.
amoryleaf  [开发者] 2021 年 6 月 3 日 下午 5:56 
Released version 1.1 which refactors the aggro system (to separate into its own component) to handle when enemies go to "sleep" which is when the player is a certain distance away from them. When the player is in in range, the enemy "wakes up" and may or may not drop the player as a target.
amoryleaf  [开发者] 2021 年 6 月 25 日 下午 7:33 
bat issue(bug?):
Sometimes when the bat dies, it doesn't get removed therefore perma-disabling stamina. The only way I can detect this is by making sure all active enemies are valid entities.

bees issue(?):
When bees are caught entity should be asleep, and it does for a moment before waking up while in the player inventory... what?! Have to add a tag check for INLIMBO to believe if entity is really awake.

Released version 1.1.5 that removes aggro from bees when they are caught and also adds the above solutions for bat/bee issues
最后由 amoryleaf 编辑于; 2021 年 6 月 25 日 下午 7:39
amoryleaf  [开发者] 2022 年 1 月 1 日 下午 8:22 
These damn bats ya'll.

Adding hack in version 1.1.8 to clear enemy list when the player teleports.

I also added the following (which didn't fix all the issues, god knows why):
1. Check if enemy is in sleeping state, if so, add to asleep list.
2. Fixed bug with removing an invalid entity (now it actually gets removed)
3. Added two more listen events, "onwakeup" and "gotosleep". Sometimes while bat was sleeping it would call "onwakeup"...

I tried this, but removed it since it didn't work:
Instead of adding each bat as an enemy, add the teamleader which orders each bat when to attack. This fails when player attacks sleeping bat.

Note: Noticed that bats and penguins are the only prefabs with the "teamattacker" component. So I'm assuming I'd have these same issues with penguins.
最后由 amoryleaf 编辑于; 2022 年 1 月 2 日 上午 6:43
Ker Blam 2022 年 4 月 27 日 下午 4:33 
doubt mod compatibility is too high on your priority list but it might be worth mentioning. I'm using this mod with island adventures and this bug happens extremely frequently, can usually only go about an hour max without encountering *something* that causes it (source inconsistent)

not a very elegant solution but maybe if a player is in combat for a long period of time check if there's non-passive creatures (or just any creatures, if that's not possible) anywhere nearby, and if there's not, end the combat? unsure how the mod actually works, just spitballing
最后由 Ker Blam 编辑于; 2022 年 4 月 27 日 下午 4:34
amoryleaf  [开发者] 2022 年 4 月 29 日 下午 4:35 
Hi there, thanks for taking a look through this thread before commenting about it! I appreciate that! I'm sorry you're going through that ugh thats frustrating I knew this would come back.I'll look into this and update when I can.
amoryleaf  [开发者] 2022 年 4 月 29 日 下午 8:01 
@Ker Blam This bug is not easy to reproduce and I don't have a lot of data (or motivation) to debug it further. Similar to your idea, I added in a timer to track how long the player's stamina has been disabled. If it's been more than 60 seconds it gets re-enabled even if you're still in combat unless a NEW enemy is encountered. I figured if its gonna bug out, rather have stamina enabled at the wrong time sometimes, rather than disabled forever!

I hope this fixes the issues you're seeing. Please let me know how it goes and thank you very much for trying out my mod and participating in this discussion! :steamhappy:
amoryleaf  [开发者] 2023 年 5 月 7 日 上午 11:52 
The latest version v1.2 should prevent any more issues with perma-disabled. It is only disabled if the enemy is within 10m of the player.:steamthumbsup:
< >
正在显示第 1 - 10 条,共 10 条留言
每页显示数: 1530 50