Elin
54 个评价
Cautious Companion
2
2
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
444.721 KB
2024 年 11 月 12 日 下午 1:24
1 项改动说明 ( 查看 )

订阅以下载
Cautious Companion

描述
Companions/allies have a more cautious AI in combat, with some options.

The default vanilla mechanic for non-player-characters running away only triggers at < 1/5 * MaxHP, with some randomness weighted by how hard the character was hit. See the topmost graph, if you have 44 hp then getting hit 40 damage has a higher chance of making you run away than getting hit by 5 damage at an Hp of 15. Makes sense.

This mod adds two features at the moment, which only affect your party members:
- Higher health to consider running away at. This is now set to 1/3rd of MaxHP.
- Distance calculation

The base game does not consider the distance from the player when considering whether to run away. This mod adds two distance modes, where the further away you are, the more likely it is to run away when taking damage. The primary cases for this are (a) the ally follows enemies a long distance, (b) you are running away.
The "Alone" distance is *very* fearful when it is alone.

The health to consider running away at and the distance calculation method can be changed per-ally by speaking with them.

I suggest the default distance (Sigmoid-ish/"Gradual Distance" in-game), but I'm still uncertain about the precise tuning of the health.

The graphs use a MaxHP of 58 (the default for the cat, I believe).

If you have any feedback, like you want a curve somewhere in the middle, or some suggestion for how to calculate fear then feel free to suggest it. I'm not doing powerful levels of combat yet, so this may be too aggressive, or perhaps it is still ignoring too much.

----

Addition/Removal Status: Safe, will revert back to vanilla. Does not modify any game data permanently, and stores data in its own file.

----

TODO: Add a MMB/R command to simply tell your pet to flee immediately.
TODO: Consider adding a custom condition for fleeing towards the player. The default fear just runs away from the enemy, which might send them deeper into the dungeon.
TODO: Use information about the number of enemies and fellow allies (besides the player) nearby? Harder to calculate the probability of running...

Source Code: https://github.com/MinusGix/elin-mods/tree/master/CautiousCompanion
12 条留言
trouter 1 月 16 日 上午 2:26 
Seems like tank AI overrides this entirely, anything with tank AI ♥♥♥♥♥ itself and goes sprinting off no matter what AI I set it to.
Karmapowered 1 月 15 日 下午 12:39 
Hello,

I'd like to report an error I noticed in my Player.log file :

Error: Failed to load cautious companion fear modifiers: System.NullReferenceException: Object reference not set to an instance of an object
at GameIO.get_pathCurrentSave () [0x00000] in <15eede575b1846778eb12a24e8f0df22>:0
at GameIOSavePatch.GameIO_LoadGame_Post (System.String id) [0x00002] in <c014fcfc52f64c86b9a83ce276ad4619>:0

Thank you for sharing your useful mod with us.
Virkful 2024 年 11 月 28 日 上午 9:48 
somehow doesn't work with older younger sister with the current game update, she's fighting for her death
Kinasin 2024 年 11 月 16 日 下午 9:10 
thanks
requiemfang 2024 年 11 月 16 日 下午 7:10 
Yeah hard limit distance def needed
Nekyia 2024 年 11 月 15 日 上午 7:12 
Commenting because I absolutely am needing the hard limit distance from player mod ASAP.
REDIC 2024 年 11 月 13 日 下午 12:54 
ah yeah no no. I should have said I'm tired of my bear running off *to its death*
Saber 2024 年 11 月 12 日 下午 11:18 
You a real one for this, thanks.
Z03 2024 年 11 月 12 日 下午 9:53 
thank you for making this!!! i appreciate it
Missing Minus  [作者] 2024 年 11 月 12 日 下午 5:58 
It will still run off, but will be more fearful when it gets into fights. I might make an addition (if it is wanted by people) that lets you discourage companions from running too far from you, a hard distance limit being easiest.