Jump to content

AI: Difference between revisions

3,187 bytes added ,  21 September 2011
No edit summary
Line 451: Line 451:


:For each one of these weapons, there are in ONCC defined these parameters (xml tag in brackets):
:For each one of these weapons, there are in ONCC defined these parameters (xml tag in brackets):
:*Recoil compensation (RecoilCompensation) - how much should A.I. compensate the recoil of the weapon. Setting this to 0 mean no compensation, setting this to 1 means full compensation.
:*Recoil compensation (RecoilCompensation) - how much should A.I. compensate the recoil of the weapon. Setting this to 0.0 mean no compensation, setting this to 1.0 means full compensation.
:*Best aiming angle (BestAimingAngle) - in radians
:*Best aiming angle (BestAimingAngle) - in radians, but question is whether it really affects aiming.
:*Shot group error - no idea what it is
:*Shoot group error - random deviation of A.I.'s aim within the target spot. Incorporated to simulate human inaccuracy. Can be set more than 1.0.
:*Shot droup decay - again no idea
:*Shoot droup decay - Random deviation of the target spot. Target spot is always loosely based on enemy's position. Can be set more than 1.0.
:*Shooting inaccuracy multiplier (ShootingInaccuracyMultiplier) - How much can A.I. stray with its aim from the target
:*Shooting inaccuracy multiplier (ShootingInaccuracyMultiplier) - How much can A.I. stray with its aim from the target. Not clear how much it really affects aiming.
:*Minimal shooting delay (MinShotDelay) - minimal pauses between shots for this gun an this A.I. character.
:*Minimal shooting delay (MinShotDelay) - minimal pause between reload and the beginning of a gunfire for this A.I. character.
:*Maximal hooting delay (MaxShotDelay)- maximal pause between shots.
:*Maximal hooting delay (MaxShotDelay)- minimal pause between reload and the beginning of a gunfire for this A.I. character.




:Next in [[ONCC]], there is targeting and predicition of enemy's position.
 
 
'''Targeting and prediction''' of enemy's movement. Apart from majority of other games, Oni A.I. does not "cheat" by being 100% accurate and then having some kind of additive error (even tough additive error is present in Oni, see above). It is a bit inverse - there's a bit of a problem making A.I. being a reasonably precise marksman ^_^. A.I. character is given input parameters such as distance between characters, present velocity of its enemy (vector) and velocity of held gun's projectile (number, not a vector). From this data, A.I. logic computes a prediction of enemy's location and ideal aiming direction in order to hit the enemy.
:[[ONCC]] parameters for targeting and prediction (xml tags in brackets):
:*Predict amount (PredictAmount)- Some sort of multiplier for prediction mechanics.
:*Predict position delay (PredictPositionDelay) - In frames, delay before prediction is applied, so A.I. characters always uses a bit outdated prediction result.
:*Predict delay frames (PredictDelayFrames) - In frames, delay before prediction is computed. Must be set at least to 1.0.
:*Predict velocity frames (PredictVelocityFrames) - Number of frames interval but meaning not 100% sure. Maybe enemy's velocity data are obtained and used for prediction algorithm during the interval? Must be set at least to 2.0.
:*Predict trend frames (PredictTrendFrames) - Number of frames interval but meaning not 100% sure. Maybe a trend (sort of extrapolation of enemy's movement) is computed with data from this interval? Must be set at least to 2.0.
 
:[[ONWC]] parameters for targeting and prediction (xml tags in brackets):
:*Prediction speed (PredictionSpeed) - More precisely "projectile prediction speed". This value is taken by prediction algorithm as a speed of a projectile fired with the corresponding fire mode of the [[ONWC]] weapon. Thus when actual [[PAR3]] projectile's speed is changed, prediction behavior produces misleading values (A.I. is unable to hit moving targets).
:*Maximal inaccuracy angle (MaxInaccuracyAngle) - Maximal allowed deviation of aim from the enemy's character pelvis in order to keep firing the weapon. If exceeded, A.I. ceases fire and corrects aiming, the resumes fire. Pelvis is taken as a root point of the character, so without any extra chages done to targeting origin and targeting vector (see [[ONWC]]) A.I. characters always target pelvis of the enemy.
:*Aim radius (AimRadius) - no idea what it does.
:*Ballistic projectile speed (ProjectileSpeed) - special prediction can be used if weapon is meant to fire relatively slow but gravity affected projectiles (grenades). A.I. then adjusts aiming in order to hit enemy with the projectile according to the ideal (parabolic) ballistic curve. This is a horizontal speed component.
:*Ballistic projectile gravity (ProjectileGravity) - vertical gravity attraction for the projectile.
271

edits