Barabas' regeneration: Difference between revisions

From OniGalore
Jump to navigation Jump to search
m (Iritscen moved page Barabus's regeneration to Barabas' regeneration without leaving a redirect: Using "canonical" spelling, omitting trailing 's' after apostrophe because that's correct and I don't care what Strunk wrote.)
m (forgot to actually change cat.)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
This is page about Barabus's regeneration, for Paradox and his project.
This is page about Barabas' regeneration, for Paradox and his project.
----
----
'''1)''' Only AI2 powered characters can regenerate the way similar to Barabus. For player, there are hypos. ^_^
'''1)''' Only AI2 powered characters can regenerate in a way similar to Barabas. For the player, there are hypos. ^_^


'''2)''' Only '''05 - Barabbas shoot''' | '''06 - Barabbas advance''' | '''07 - Barabbas melee''' [[CMBT]] behaviors contain possibility of regeneration.
'''2)''' Only the '''05 - Barabbas shoot''' | '''06 - Barabbas advance''' | '''07 - Barabbas melee''' [[CMBT]] behaviors offer the ability of regeneration.


'''3)''' AI2 character must have '''basic health 150 or more''', otherwise it won't work. Basic health is base health from [[ONCC]] + additional health from [[CHAR]]
'''3)''' An AI2 character must have a '''basic health of 150 or more''' or it won't work. Basic health is the base health from their [[ONCC]] plus additional health from their [[CHAR]].


'''4)''' When AI2 character is made unkillable (either by script or via flags in [[CHAR]]), total amount of hitpoints which can be healed is limited to the value of character's basic health. That means if char has 100 hitpoints, he/she can heal max 100 hitpoints ALTOGETHER, then regeneration is disabled. Read section 6 about mechanics of regeneration to fully understand.
'''4)''' When an AI2 character is made unkillable (either by script or via flags in CHAR), the total amount of hit points which can be healed is limited to the value of the character's basic health. That means if the character has 100 hit points, he/she can heal a maximum of 100 hit points <u>altogether</u>, then regeneration is disabled. Read section 6 about the mechanics of regeneration to fully understand.


'''5)''' Regeneration mechanics can be called unlimited times, unless they are disabled by '''unkillable''' max healed hitpoints limitation (read section 6)
'''5)''' The Regeneration mechanic can be called an unlimited number of times, unless it is disabled by the '''unkillable'''/maximum-healed-hit points limitation (read section 6).


'''6)''' Mechanics of regeneration:
'''6)''' Mechanics of regeneration:
:*When AI2 character has '''40% of its basic health or less''', regeneration mechanics start.
:*When an AI2 character has '''40% of its basic health or less''', the regeneration mechanic starts.
:*AI2 character can be healed max to '''80% of basic health''', then engine ends regeneration. If AI2 is forced to end regeneration earlier (enemy comes nearby) and its actual health is over 40% of basic health, it won't regenerate further. It will do its own business until its health drops under 40% of base health again.
:*An AI2 character can be healed only up to '''80% of its basic health''', then the engine ends regeneration. If the AI2 is forced to end regeneration earlier (e.g. because an enemy comes nearby), and its actual health is over 40% of basic health, it won't regenerate further. It will perform other actions until its health drops under 40% of base health again.
:*For AI to start regenerating, distance at least about 40 game world units (more or less) is required. Due to this AI2 attempts for about 300 game time units to get away from its enemy to at least this distance. If this is unsucessful (enemy still to close), regeneration mechanics are terminated for some time (AI2 starts fighting again) but after another some time(^_^') these regeneration mechanics start again.
:*For an AI to start regenerating, a distance from the enemy of about 40 world units is required. Due to this, the AI2 attempts for about 300 game time units to get at least this distance from its enemy. If this is unsuccessful and the enemy is still too close, the regeneration behavior is halted for some time (the AI starts fighting again) but after some more time (^_^') the regeneration behavior resumes.
:*When in required distance, AI2 goes into animation: '''type 219''', '''state''' from '''07''' to '''68''', varient 00|00|00|02 (fight varient). For sucessful transition into state 68, at least one of ''combat idle animations''(for example STRCOMidle1) must have shortcut to state 68(see [[TRAM]] for info about animation shortcut). This is required for actual regeneration process. If AI2 sucesses in getting into state 68, it loops animation:  '''type 219''', '''state''' from '''68''' to '''68''', varient 00|00|00|02 (fight varient). Along with that, engine calls something similar to ''elderrune'' cheat for this AI2 character. That is what actually heals it.
:*When it reaches the required distance, the AI goes into animation: '''type 219''', '''state''' from '''07''' to '''68''', variant 00|00|00|02 (fight variant). For a successful transition into state 68, at least one of the ''combat idle animations'' (for example STRCOMidle1) must have a shortcut to state 68 (see [[TRAM]] for info about animation shortcuts). This is required for the actual regeneration process to take place. If an AI succeeds in getting into state 68, it loops an animation:  '''type 219''', '''state''' from '''68''' to '''68''', variant 00|00|00|02 (fight variant). Along with that, the engine calls something similar to the ''elderrune'' cheat for this AI2 character. That is what actually heals it.
:*When terminated, AI2 character goes back to its job (fight, usually ^_^'). Healed hitpoints from all regeneration sessions are '''added together'''. Sum of all healed hitpoints has it own meaning when AI2 character is '''unkillable''' (read section 4).
:*When terminated, the AI character goes back to its job (fighting, usually ^_^'). The total hit points healed during all regeneration sessions are '''added together'''. This sum of all regained hit points has its own meaning when an AI2 character is '''unkillable''' (read section 4).


----
----


Solved. Now we can give regeneration to other TRACs as well.
Mystery solved. Now we can give regeneration to other TRACs as well.


It looks like required 150 hitpoints are a bit too much health for ordinary non-boss opponents, but keep in mind that in fact engine can heal AI2 character max to 80% of it, which is about 120(it usually heals one or two hitpoints over 80% which is nothing important). 120 is basic health of red Elites. So we can take Elite_hard ONCC, give it additional health via [[CHAR]] so his basic health is 150 and then (via '''chr_set_health''') reduce his health to 80% of basic when he is spawned. This way, we can get "harder hard elites" ^_^
It looks like the required 150 hit points is a bit too much health for ordinary non-boss opponents, but keep in mind that in fact the engine can heal AI2 characters to only 80% of their maximum hit points, which is about 120 (it usually heals one or two hit points over 80%, which is nothing much). 120 is the basic health of red Elites. So we can take the Elite_hard ONCC, give it additional health via CHAR so his basic health is 150, and then (via '''chr_set_health''') reduce his hit points to 80% of his basic health when he is spawned. This way, we can get "harder hard elites" ^_^


 
[[Category:Engine docs]]
*Ahm.. why should we reduce the elite health in the end again if we want a "harder hard Elite"?
*I tried to change shortcut part of REDCOMidel1 but it didn't work. I might have messed up the offsets because she had no shortcut part to begin with. Can you post a working file so that I can compare it? Thanks.
[[Category:Modding information]]

Latest revision as of 22:01, 4 January 2017

This is page about Barabas' regeneration, for Paradox and his project.


1) Only AI2 powered characters can regenerate in a way similar to Barabas. For the player, there are hypos. ^_^

2) Only the 05 - Barabbas shoot | 06 - Barabbas advance | 07 - Barabbas melee CMBT behaviors offer the ability of regeneration.

3) An AI2 character must have a basic health of 150 or more or it won't work. Basic health is the base health from their ONCC plus additional health from their CHAR.

4) When an AI2 character is made unkillable (either by script or via flags in CHAR), the total amount of hit points which can be healed is limited to the value of the character's basic health. That means if the character has 100 hit points, he/she can heal a maximum of 100 hit points altogether, then regeneration is disabled. Read section 6 about the mechanics of regeneration to fully understand.

5) The Regeneration mechanic can be called an unlimited number of times, unless it is disabled by the unkillable/maximum-healed-hit points limitation (read section 6).

6) Mechanics of regeneration:

  • When an AI2 character has 40% of its basic health or less, the regeneration mechanic starts.
  • An AI2 character can be healed only up to 80% of its basic health, then the engine ends regeneration. If the AI2 is forced to end regeneration earlier (e.g. because an enemy comes nearby), and its actual health is over 40% of basic health, it won't regenerate further. It will perform other actions until its health drops under 40% of base health again.
  • For an AI to start regenerating, a distance from the enemy of about 40 world units is required. Due to this, the AI2 attempts for about 300 game time units to get at least this distance from its enemy. If this is unsuccessful and the enemy is still too close, the regeneration behavior is halted for some time (the AI starts fighting again) but after some more time (^_^') the regeneration behavior resumes.
  • When it reaches the required distance, the AI goes into animation: type 219, state from 07 to 68, variant 00|00|00|02 (fight variant). For a successful transition into state 68, at least one of the combat idle animations (for example STRCOMidle1) must have a shortcut to state 68 (see TRAM for info about animation shortcuts). This is required for the actual regeneration process to take place. If an AI succeeds in getting into state 68, it loops an animation: type 219, state from 68 to 68, variant 00|00|00|02 (fight variant). Along with that, the engine calls something similar to the elderrune cheat for this AI2 character. That is what actually heals it.
  • When terminated, the AI character goes back to its job (fighting, usually ^_^'). The total hit points healed during all regeneration sessions are added together. This sum of all regained hit points has its own meaning when an AI2 character is unkillable (read section 4).

Mystery solved. Now we can give regeneration to other TRACs as well.

It looks like the required 150 hit points is a bit too much health for ordinary non-boss opponents, but keep in mind that in fact the engine can heal AI2 characters to only 80% of their maximum hit points, which is about 120 (it usually heals one or two hit points over 80%, which is nothing much). 120 is the basic health of red Elites. So we can take the Elite_hard ONCC, give it additional health via CHAR so his basic health is 150, and then (via chr_set_health) reduce his hit points to 80% of his basic health when he is spawned. This way, we can get "harder hard elites" ^_^