trigger · career_profile_check_playthrough_ratio
Definition
- Supported scope:
any - Supported target:
any
Description
Compares the ratio (first/second) of two playthrough values to a number
career_profile_check_playthrough_ratioanyanyCompares the ratio (first/second) of two playthrough values to a number
Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.
This trigger is commonly used in career mode mods to unlock achievements, medals, or special events based on the ratio of two player gameplay statistics, such as checking "victories/total matches" to determine whether the player's win rate meets the threshold. It is particularly suited for designing "elite commander" type conditions—requiring not just absolute numbers, but also quality proportions.
# Check if the player's naval battle win ratio (naval_battles_won / naval_battles_total) is >= 0.75 (i.e., win rate ≥ 75%)
career_profile_check_playthrough_ratio = {
first = naval_battles_won
second = naval_battles_total
value > 0.75
}
[career_profile_check_playthrough_value](/wiki/trigger/career_profile_check_playthrough_value) — Use the absolute value trigger first to ensure the denominator (such as total matches) is not zero, then apply the ratio trigger for proportion checking, avoiding division-by-zero logic errors.[career_profile_check_points](/wiki/trigger/career_profile_check_points) — Often used in parallel with points checks to form compound unlock conditions like "must reach a certain score AND maintain a high win rate."[career_profile_check_medal](/wiki/trigger/career_profile_check_medal) — Medal checks typically follow immediately after ratio validation passes, serving together as a prerequisite threshold for granting high-tier rewards.[and](/wiki/trigger/and) — Combines ratio conditions with other career conditions into a complete multi-check block; a necessary wrapper for all compound conditions.second is 0, the ratio calculation will exhibit division-by-zero anomalies. Always use career_profile_check_playthrough_value at the outer level to first confirm that the second field is > 0 before performing ratio checks.value (such as >, <, >=) must be written on the same assignment line as value (e.g., value > 0.75); it cannot be split into a separate field, otherwise the script parser will error or silently ignore the entire trigger.