How to make mod that give all companions unlimited health?

Users who are viewing this thread

But why? So basically you want them to be immortal? It is very easy to do, learn how to mod Warband. Go to the Modding section and learn basics of M&B engine modding.

A common battle trigger setting companion agents (range defined in module_constants.py) to have lots of HP with agent_set_hit_points and agent_set_max_hit_points will do the job.
 
Veledentella, do you mind briefly telling what is the difference between agent_set_hit_points and agent_set_max_hit_points?
Can I just set the max point, and ignore the other one? Or do I need to set both to a high value?
 
Veledentella, do you mind briefly telling what is the difference between agent_set_hit_points and agent_set_max_hit_points?
Get the newest version of header_operations.py from The Forge to have documented operations of the engine. Taken from the file itself:
Python:
agent_set_hit_points                     = 1721  # (agent_set_hit_points, <agent_id>, <value>,[absolute]),
                                                 # Sets new value for agent health. Optional last parameter determines whether the value is interpreted as actual health (absolute = 1) or relative percentile health (absolute = 0). Default is relative.
agent_set_max_hit_points                 = 2090  # (agent_set_max_hit_points, <agent_id>, <value>, [absolute]),
                                                 # Version 1.153+. Changes agent's max hit points. Optional flag [absolute] determines if <value> is an absolute number of his points, or relative percentage (0..1000) of default value. Treated as percentage by default.

Also, setting agent_set_hit_points to a very high value is only one way to do that, there are also others. agent_set_no_death_knock_down_only is also a very convenient solution; setting a tf_unkillable flag in companions' entry should also work out.
 
Back
Top Bottom