Armor Analyzer - RedDeadlyCreeper/ArmoredCombatExtended GitHub Wiki
ACE Armor Analyzer v0.18
Script Information
- Provides up-to-date information about the armor's abilities, stats, and more.
- Well optimized to handle many props
- Highly customizable
How to use it?
- ACE automatically preinstalls some scripts and dupes in your Advance Duplicator 2 Folder, therefore to use it, follow these steps:
- Open Advance Duplicator 2 folder.
- Open ACE tools folder
- Choose ace_armor_analyzer and click on it twice.
- Spawn this dupe
- Click
Use
button (default "E") on the EGP HUD (white thing on top of E2 chip) - Use it
Chat Commands
The script supports the following chat commands:
/creator
: Retrieves information about the creators of the script, including their Steam profiles./s
: Toggles the trace staying on your position./h
: Toggles the display of holos./i
: Changes the interval of the script./sp
: Changes the maximum distance for tracing./chg
: Shows the latest changelog./vol
: Changes the size of a trace.
Problems
There is no such folder / dupe in my advance duplicator 2
- Solution: you need to restore your dupes.
HUD
The HUD displays various information about the armor analysis, including:
- Line of Sight (LOS) thickness and effectiveness.
- Total KE (Kinetic Energy) and CHE (Chemical Energy) thickness.
- Effective KE and CHE thickness.
- Average ductility of the armor.
- Number of layers analyzed.
- LOS vs. Effective KE and CHE percentages.
1. Total and Effective Thickness Display
The HUD displays the total thickness and effective thickness of the hit armor against kinetic energy (KE) and chemical energy (CE) projectiles. This information helps players understand the potential armor protection against different types of attacks.
2. Layer Information
The HUD presents detailed data on each armor layer encountered during the recursive trace process. Players can view the thickness and material of each layer, enabling them to identify weak points and strong defenses in an entity's armor structure.
3. Average Ductility Indicator
The HUD includes an average ductility indicator, showing the overall ductility of the armor layers. Ductility is a crucial factor in determining how well the armor can withstand deformation or penetration.
4. Line of Sight (LOS) vs. Effective KE/CE
The HUD provides LOS values versus the effective KE and CE of the hit armor. These values show the relative effectiveness of the armor against incoming kinetic and chemical energy projectiles, considering the angle of impact.
5. Layer Count
Players can see the total number of layers analyzed during the recursive trace. This count gives an idea of the complexity and effectiveness of the armor structure.
6. Cursor Information
The HUD displays additional armor analysis data at the player's cursor position. It shows the angle of impact, total KE and CE thickness, and effective KE and CE thickness. This feature allows players to quickly assess specific points of interest on the hit entity.
7. Armor Material Statistics
The HUD includes statistics for each armor material encountered during the recursive trace. It shows the total KE and CE thickness for each material separately. Players can use this data to compare the performance of different armor materials.
8. Stay Mode Hologram (Optional)
If Stay Mode is enabled, the trace is going to be static. That will let you edit armor easily.
9. Customization
The HUD is highly customizable, allowing players to adjust the interval for data updates, change the maximum trace distance, and control the volume of the trace. This flexibility enables users to tailor the HUD to their preferences and performance requirements.
Authors
- KemGus [ Link to Steam profile ]
- Cheezus [ Link to Steam profile ]
Roadmap (Upcoming Features)
1. Add corountine logic
2. Add error handling logic
3. Add more HUD customizability
4. Maybe comments in the code??
Developer information
Trace Logic
The core functionality of the ACE Armor Analyzer v0.18 script involves its trace logic. This logic is responsible for analyzing armor properties of entities in the game environment. It employs a recursive tracing approach to gather data and calculate the effectiveness of the armor on each hit entity.
How the Trace Logic Works
-
Recursive Trace Function: The script uses a custom-defined function called
recursiveTrace
. This function performs a recursive trace from the player's position in a specified direction until it encounters an entity or reaches the world. -
Initialization: Upon trigger, the
recursiveTrace
function is called with the player's position as the starting point and the aim direction as the specified direction. It also uses additional parameters such as the depth of recursion, a data table to store trace results, and an entity filter to avoid redundant entity analysis. -
Recursive Tracing: The
recursiveTrace
function traces a line from the starting position and direction to check for collisions with entities or the world. Upon collision, it retrieves information about the hit entity, such as armor material, thickness, ductility, and effectiveness. -
Valid Entity Check: The function verifies if the hit entity is valid for armor analysis, including entities like "prop_physics," "primitive_shape," "primitive_ladder," etc.
-
ACF Hit Clips: The function checks for ACF hit clips affecting armor. If the hit position is within a hit clip, it is excluded from analysis.
-
Calculating Effective Thickness: The function calculates the effective thickness of the armor based on the hit entity's thickness and effectiveness, considering the angle of projectile impact.
-
Data Storage: For each valid hit entity, relevant data is stored, including hit normal, angle, position, thickness for kinetic and chemical energy projectiles, effective thickness, and armor material.
-
Recursion Depth: To avoid infinite recursion, the function tracks the recursion depth. If it exceeds a threshold (e.g., 50), the recursion stops.
-
Layered Approach: The recursive trace function analyzes multiple layers of entities, creating a layered approach to armor analysis.
Practical Application
The recursive trace logic implemented in the ACE Armor Analyzer script allows players to analyze armor properties of entities effectively. Data is displayed on a Heads-Up Display (HUD), providing players with insight into armor effectiveness against different projectile types.
The tracing function's recursive nature guarantees precise calculations for multiple layers of armor, accurately determining the actual effectiveness of each layer against incoming projectiles. With comprehensive armor analysis, players can make informed decisions, understanding the strengths and weaknesses of different armor materials, and strategize effectively in combat scenarios.