271
edits
(Finished. For some reason I feel a bit...melancholic...) |
|||
Line 525: | Line 525: | ||
:*Through modification of Minimal shooting distance in conjunction with BSL scripting, a modder can achieve pseudo-dynamic holster behavior. If enemy gets too close, A.I. start moving away, facing the enemy. Since simply backing away is almost never used by armed A.I. (it usually move to the side), it can be detected via BSL function '''chr_wait_animation''' and subsequent script makes A.I. character holster held weapon. To unholster, different animation check has to be used, for example a check for a taunt animation. In [[MELE]], modder can set up approppriate melee profile which makes A.I. character taunt only at safe distance. | :*Through modification of Minimal shooting distance in conjunction with BSL scripting, a modder can achieve pseudo-dynamic holster behavior. If enemy gets too close, A.I. start moving away, facing the enemy. Since simply backing away is almost never used by armed A.I. (it usually move to the side), it can be detected via BSL function '''chr_wait_animation''' and subsequent script makes A.I. character holster held weapon. To unholster, different animation check has to be used, for example a check for a taunt animation. In [[MELE]], modder can set up approppriate melee profile which makes A.I. character taunt only at safe distance. | ||
::Drawback of this modification is is that enemy ''will not fire the weapon at point blank range'' and also it limits Melee override in [[CMBT]] to be only None or IfPunched, otherwise instead of backing away, A.I. character goes directly into melee. | ::Drawback of this modification is is that enemy ''will not fire the weapon at point blank range'' and also it limits Melee override in [[CMBT]] to be only None or IfPunched, otherwise instead of backing away, A.I. character goes directly into melee. | ||
==Combat behavior part 4 : "Everybody was kung fu fighting..."== | |||
Ah yes. After all those OTHER things, we finally got to how A.I. system handles core gameplay feature of this game, hand to hand combat. | |||
First things first. As usual, player can see her/his enemy trying to perform some move, so player can then react. A.I. character cannot see a thing beacuse it does not have human eyes nor human brain. Thus the first question is how the A.I. knows about incoming attacks? | |||
:Answer lies within [[TRAM]] files. Each animation which can hurt somebody should have EXTENTS. Extents are invisible marks which tell A.I. character how the attack's ''trajectory'' looks. There are two types, horizontal and vertical, but more important thing A.I. wise is that without extents attack TRAMs will not be registered by A.I. characters as attacks, so A.I. will not try to block them or dodge. But if the attack has extents, then the moment A.I. character registers this enemy's attack, the A.I. gets a complete knowledge of a whole path of attacking bodyparts of this enemy's attack (see attack part of [[TRAM]]). | |||
Now back to A.I. and hand to hand combat. Fistfighting is handled via [[MELE]] profiles which are assigned to the spawnable character in her/his [[CHAR]] profile. When in melee mode, A.I. character uses vector type of movement. Unless specified otherwise, A.I. character is made to run towards its enemy. | |||
:[[MELE]] profile alwas contains these parameters regarding A.I. (xml tags in brackets): | |||
:*Character class (CharacterClass) - Link to an [[ONCC]] class. Level of importance of this parameter not known, but maybe it is neccessary in order to allow for performance of some attack moves (engine checks referenced [[ONCC]] class and its [[TRAC]]). | |||
:*Notice (Notice) - percentual chance that A.I. will register incoming attack. In retail profiles it is always set 100. | |||
:*Dodge base (Base inside Dodge) - percentual chance A.I. will try to use one of '''evade''' moves (if it has any in evade section of MELE profile) to avoid getting hurt. | |||
:*Dodge extra (Extra inside Dodge) - extra chance to dodge | |||
:*Dodge extra damage (ExtraDamageThreshold inside Dodge) - amount of damage for activation of extra dodge | |||
:*Single block skill - (Single inside BlockSkill) - percentual chance of attempt to block incoming enemy's attack | |||
:*Group block skill - (Group inside BlockSkill) - percentual chance of ???. Not sure, maybe of blocking more attackers? | |||
:*Not blocked (NotBlocked) - Multiplier which affects probability of executing a technique which will not be blocked by the enemy under current circuumstances (punch combo against opponent who is running forward). | |||
:*Must change stance (MustChangeStance) - Multiplier which affects probability of executing a technique which makes enemy change stance in order to block itnot be blocked by the enemy under current circuumstances (leg sweep against standing opponent). | |||
:*Blocked but unblockable (BlockedButUnblockable) - Multiplier which affects probability of executing a technique that has set "unblockable" flag in its attack part, see [[OBD:TRAM/raw0x14|TRAM-attack part]]. | |||
:*Blocked but has stagger (BlockedButHasStagger) - Multiplier which affects probability of executing a technique that makes enemy stagger if the enemy blocks the techique. Depends on TRAM attack part settings (BlockStagger), see [[OBD:TRAM/raw0x14|TRAM-attack part]]. | |||
:*blocked but has blockstun (BlockedButHasBlockStun) - Multiplier which affects probability of executing a technique that locks enemy in a blocking animation for longer than 20 frames. Depends on TRAM attack part settings (BlockStun), see [[OBD:TRAM/raw0x14|TRAM-attack part]]. | |||
:*Blocked (Blocked) - Multiplier which affects probability of executing a technique that will be certainly blocked by the enemy under currend circuumstances and will not stagger or stun the enemy. | |||
:*Throw Danger (ThrowDanger) - Something with throws, but only Bungie West knows what's the meaning of this field. | |||
:There are probably two more parameters, but their meaning is a mystery up to this date. | |||
Basic melee setup is done. Now the profile branches into '''attack''' part, '''evade''' part and '''maneouver''' part. Each part has a certain number of "melee techniques". Melee technique is a compound of one or more melee moves. Melee moves are simple elements of hand to hand combat - attacks, throws, positioning, maneuvring. Maximal amount of techniques in one melee profile is 32. If this limit is exceeded, Oni crashes. Now for those three branches: | |||
:*Attack branch - Techniques from this branch are executed when A.I. is trying to attack and hurt it enemy. Attack branch contains not only attack techniques, but maneuver techniques as well (morea bout this later). | |||
:*Evade branch - Techniques contain moves which are used to evade attack. That means escape moves (SHIFT + some direction) and various jumps/slides. | |||
:*Maneuver branch - Techniques from this branch should be used by A.I. to move not only in a straightforward fashion towards the enemy, but also circle around, retreat or advance. Unfortunately, it seems this branch is never used and all maneouvring is done via Attack branch. | |||
Structure of a melee technique: | |||
:*Name (debugging purposes only) | |||
:*Flags - possibilities are: | |||
::*Interruptible - This technique can "home" to some extent and if enemy gets away from its reach, technique is ended prematurely | |||
::*Unknown2 - Either GenerousDir or Fearless, meaning of this flag unknown. | |||
:*Weight - Techniques are chosen randomly but with "weight" of techique taken into account. Techniques with higher "weight" are used more often than those with lower "weight". | |||
:*Unknown - only Bungie West folks know what this parameter should affect. | |||
:*RepeatDelay - In frames, how long should be the technique unavailable after its use (to prevent from predictability). | |||
:*Moves, possible types of moves are: | |||
::*Position - usually takes three parameters: minimal distance, maximal distance, tolerance range, but does not have to (StartToCrouch takes no parameter). These moves are used to set up correct distances and correct stances (crouch, stand, jump) for execution of subsequent attacks or throw moves [[OBD:BINA/OBJC/MELE/MoveList/Position|HERE is a list]] of all available position melee moves. | |||
::*Attack - no parameter, simply some kind of attack action. [[OBD:BINA/OBJC/MELE/MoveList/Attack|HERE is a list]] of all available attack melee moves. | |||
::*Throw - no parameter, simply some throw. [[OBD:BINA/OBJC/MELE/MoveList/Throw|HERE is a list]] of all available throw melee moves. | |||
::*Evade - no parameter, simply some evasive action. [[OBD:BINA/OBJC/MELE/MoveList/Evade|HERE is a list]] of all available evasion melee moves. | |||
::*Maneouver - up to three parameters, these moves are used to make A.I. character move around somehow (advance, retreat, circle left/right, rouch, jump etc.) [[OBD:BINA/OBJC/MELE/MoveList/Attack|HERE is a list]] of all available maneuver melee moves. | |||
:In melee techniques there can be a mixture of melee moves, so one technique can contain position move followed by attack move and concluded by some maneuver move. | |||
And...that's all ^_^. According to technique's weight, enemy's position and MELE setup (multipliers such as Not blocked, Blocked but has stagger etc) some "Attack branch" technique is chosen and executed. In "Attack branch" there are some maneuver techniques as well, those do not (and must not) have position move as the first move in the technique. | |||
Next, if enemy's attack is registered by A.I., it can either let it pass completely or block it or attempt to dodge it (chooses some technique from "Evade branch"). | |||
Maneuver branch appears to be unused. | |||
Code behind all this must be pretty complex, hands down before Oni developers. However we, outsiders, can only guess how much work was poured into it. | |||
Modding hints: Creating custom MELE profiles can be fun, but beware of a few pitfalls: | |||
:*Position moves can be followed by some certain other position moves, but generally after position move an attack or throw move is expected. If attack or throw is not present, this melee technique will be albeled as NOATTACKNOTHROW and will be unused. | |||
:*Jump position moves can be used to make A.I. at least "somehow" jump across gaps. Oni registers special pathfinding grid tiles (edge tiles and danger tiles) which are registered by A.I. character even she/he is in melee mode. And orange tiles upweight jumping moves a lot. Just don't forget to follow jump position move with some jump attack move. | |||
:*Special attack (Rising fury, Devil spin kick) use StartToCrouch position move as a starter. | |||
:*Any combo techique (for example three punch combo) without Interruptible flag makes A.I. character too vulnerable. | |||
:*Rear throw techniques and side attack techniques should have high weight to ensure they will be chosen and used the moment there is a chance. | |||
:*Set distances in position moves reasonably so A.I. character doesn't attempt to perform jump attack techniques or run attack techniques at close distance. | |||
:*Always try to utilize given class's strength - Fury is fast, so upweight combos. Tanker is slower, upweight throws and run attacks. Ninja is a beast, set whatever you want and it will be annoying to deal with anyway. | |||
<div style="text-align: center;">[http://www.youtube.com/watch?v=XeymFlbQuNg|'''THE END...''']</div> |
edits