# Nils Reaction Core

## Assumptions

* Consumer has Tensor Core exe loaded properly and Argus. * For this Document, ACR (Advanced Combat Rotation) and MCR (Madao Combat Rotation) are used interchangeably.

## What is Nils Reaction Core?

Nils Reaction Core at the surface is a unified set of api calls that allow reactions to be integrated via a single call that has the ability to reach out to a multitude of different advanced combat systems (arc/mcr). In pratice it allows a consumer to make a single call like `NilsReactionCore.API.Hotbar.Knockback()` and the reaction core knows whether it should be Arm's Length or Surecast along with an understanding if the request should be passed to an arc or queue up in an internal processing system.

Settings are unique to the Character. This gives you the freedom to have different settings for different characters. This is useful when multi-boxing.

Settings that can be confured based on map type, there will be a right click menu. check tooltips for more information.

Nils Reaction Core is broken up in three distinct sections:

* API calls for Hotbar and Toggle management. * Auto Reaction system. * General Reactions.

## Currently supported ACR's

* ACE * Ex Machine (still in development) * Riku/Tensor * xSalice * Madao Combat Rotation (MCR) * No Arc (for those that want to play manually or person arcs but would like reactions)

## API Calls

Api calls outside of helper calls use a simplified syntx. The syntax is `NilsReactionCore.API.Hotbar.<Action>()` where the action is the name of the action listed in [FFXIV Job Guid](https://na.finalfantasyxiv.com/jobguide/battle/) remove spaces and specical characters. Example: `Six-sided Star` would be `SixsidedStar`.

Hotbars and Toggles use the same syntx.

### Hotbar Options

Hotbar also accepts a variet of options to help with the reaction. The options are:

* POS: if the action is intended to be a ground target, a table of `{x = 100, y = 0, z = 100}` can be passed in. * HasBuff: if the buff is is provided, the action will only be used if the buff is active. (ex. Pepsis) * IgnoreComboCheck: true|false, if the action should be used regardless of combo check. (default: false) * IgnorePotencyCheck: true|false, if the action should be used regardless of potency check. (default: false) * HPHighLimit: 0-100, if the player's HP is above this limit, the action will not be used. * Target: Is a label lookup to specify the target that should be used. (default: changes based on the type of action)

Example: `NilsReactionCore.API.Hotbar.Taurochole({[“Target”] = “LowestTank”, IgnorePotencyCheck = false, HPHighLimit = 55})`

### Toggle Options

Toggles also accept a variety of options to help with the reaction. The options are:

* state: true|false, if the toggle should be turned on or off. * lock: true|false, if the toggle should be locked. this prevents other reactions that are part of the core for changing the state until the lock is released. Cannot be used with timeout toggles (default: false) * timeout: the number of milliseconds the toggle should be in that state before it resets to the default state. (see toogle manager for default state options)

Examples:

`NilsReactionCore.API.Toggles.Jumps(false, false, 8000)` `NilsReactionCore.API.Toggles.Cooldowns(true, true)`

## Auto Reaction System

Auto Reaction system is a set of workflows and rules that are executed based on a set of conditions. Auto reactions vary from job to job, please open the settings to review the options.

### General Tab

* Display the Map Id and the map type that the core has classified that map as. This is useful when managing specific options for a map type. * Enable Reaction Core: true|false, if the core should be enabled. If false, everything but the UI is disabled. * Force Legacy: true|false, if the core should use the legacy mode. Addons like questing and gathering can adjust this and place it back in standard mode which is not optimal for combat. * Has Speeder: true|false, if you use a tool like speeder (not a minion addon), if enabled, reactions will make assumptions for some reactions. * Pulse: number of millisconds to adjust a variety of options that can be adjusted based on your performance and network latency. Example, on draws you see flickering, the time can be increased to adjust for this. (default: 500) * Delay End of Combat Reset: how long in milliseconds to wait to signal end of combat. This is benefical when in dungeons and wall to wall trash pulls. (default: 4000) * Load Tensor Reactions: will load my timeline reactions into tensor reactions, these are auto updated, if you need to adjust and it makes sense, I can do it in the base, or you can clone (default: true)

* FFXIV Version: Latest should be selected if on the latest expansion. Will be removed when CN/KR receives the latest expansion.

#### Modules

These are global modules that can be enabled or disabled. These are used to adjust the core to your playstyle.

* Move Detection: Executes reactions based on movement. Example: dungeon runs and you want to have burst windows toggled off. See Jobs tab for configuration. * Auto Gap Closer: If a channel id is being watched for, gap closer will be used when it is safe to gap close. See reactions tab for configuration. * Toggle Management: Manages Toggles, Direct API calls will work regardless of this setting, actions like resets and timed toggles will not work if this is disabled. See Jobs tab for configuration. * General Reactions: Manages the general reaction processor for built in reactions. See Jobs tab for configuration. * Hacks: Various hacks that can be enabled or disabled. These are used to adjust the core to your playstyle. See Hacks tab for configuration.

### Jobs Tab

This is where you can adjust the settings for each job. Each job has a set of options that can be adjusted.

#### General

* Safe Knockback: if this is enabled, the arc will be toggled off inorder to force a knockback. This is useful for fights like E8S where knockback uptime was to tight for the arc to weave it. Toggle Management needs to be enabled for this to work. * Internal Knockback: Uses the internal processor for knockback vs sending it to the arc. * Toggle on Raise: Toggles off the arc when you have the rais buff and raise immunity buff. * Toggle on Target: When raise immunity buff drops, auto toggles the arc back on. * Only Internal Queue: Only execute actions via the internal processor.

#### Auto

This is where auto use actions can be configured. Example on tanks, there adjustments for auto mitigation can be configured.

#### Move Detection

This is where you can adjust the settings for move detection. Move detection is used to adjust the core to your playstyle.

#### Reactions

This is where general built in reactions can be adjusted. The UI is still in development, but the reactions are listed with the options are displayed.

#### Argus

This is where you can adjust the settings based on Argus events.

#### Toggles

This is where you can adjust default state for toggles. These can be adjusted based on map type.

* The top level toggle enables/disables any management of the toggle. * Right click options are the default state of the toggle.

#### Prepull helper

This is where you can adjust the settings for prepull helper. still in development.

#### Heals

used to adjust self healing options.

#### Party Hotbar

used to make adjustments for the party hotbar.

### Reactions Tab

This contains helper reactions, primarily for toggle management.

* AOE Exclusion: Targets that should toggle off AOE. * Burn Boss: The target allows for the burn toggle to be enabled when the threshold is met. * Cooldown Exclusion: Targets that should toggle off cooldown. * Omni Inclusion: Target is an omni target and should enable the omni toggle. * Dot Exlusion: Targets that should toggle off dots. * Auto Gap Closer: Allows for channel ID's to be added that will auto gap close to target when safe. * Targeting Assist: Always keep a target when in combat. Should only target active agro targets. * List of the number of non-timeline reactions for a map.

### Helpers Tab

Small tweaks for certain things.

* Send ACT Reset On Wipe: Sends the ingame slash command that forces a reset in ACT when a wipe is detected. * Disable player HP/MP/TP: Disables the minion checks for player HP/MP/TP. These can cause a fps drop from minion. * Enable TTS/Text Alerts: Enables events to be sent to TTS and Text alerts on screen. * Enable Echo Alerts: Allows echo commands to be utilized.

### Hacks Tab

* Speed Hack: Allows for movement speed to be adjusted. Confugable based on map type. * Zoom Hack: Allows for zoom to be adjusted. Confugable based on map type. * Displays the current speed and zoom options.

### Fight Tracker Tab

* Enable or disable the log output for the fight tracker. The fight tracker is a detailed log of the fight, information recieved and if an action was executed. This is useful for debugging and understanding why an action was or was not executed. This is adjustable based on map type.

### Debug Tab

* Debug logging: outputs all fight tracker events to the console. * Debug snapshot: outputs snapshot data, like party cooldown usage, mt and st, and more. * Is Moving: displays if the player is moving. * Display if TensorCore and Argus are loaded. * Coordinates: displays the player's coordinates. * FPS: displays the current FPS. * Distance: displays the distance to the target. * Party Range: displays number of party members in range. * FPS (Optifine/Tensor): Displays Tensor cores pretty FPS graph. * Settings File name: name of the configurtion file that is being used.