-
Notifications
You must be signed in to change notification settings - Fork 10
Pause Until‐Using Pause If to Prevent Achievement Processing Until Some Condition is Met
Sometimes it will be very difficult to identify an on-going timing for when to processing hit counts or other hit-related events. Or, there are a lot of conditions for when something might look valid, but not be valid. This situation may lead to convoluted logic in order to guard against invalid hit counts. One method to mitigate this is a Pause Until:
| ID | Flag | Type | Memory | Cmp | Type | Mem/Val | Hits |
|---|---|---|---|---|---|---|---|
| 1 | And Next | Delta | 0xSTATE | = | Value | VALUE_A | 0 (0) |
| 2 | Reset Next If | Mem | 0xSTATE | = | Value | VALUE_B | 1 (0) |
| 3 | Pause If | Value | 1 | = | Value | 1 | 0 (0) |
Explanation of Conditions:
- 1-2: This transition from
VALUE_AtoVALUE_Bmay mark the 'start of game/level/sequence' definitively, howeverVALUE_Bmay not definitively identify the 'in-game/in-level/in-sequence' that you care about for the challenge. The Reset Next If here will latch to true upon this transition and suppressed the "always-true"Pause Ifin the following condition, allowing the rest of the logic to be processed. The single hit target here is important for this to function properly. - 3: This
Pause Ifcondition will always be true. That is, unless the Reset Next If before it is latched to 'true' but receiving a hit towards its target of 1 hit! That's what makes this a "Pause Until" structure: The group is paused until the Reset Next If occurs.
Suppose our actual goal is to "Complete Game/Level/Sequence in under X units of time without losing health."
| ID | Flag | Type | Memory | Cmp | Type | Mem/Val | Hits |
|---|---|---|---|---|---|---|---|
| 3 | Delta | 0xCOMPLETE_FLAG | = | Value | 0 | 0 (0) | |
| 4 | Trigger | Mem | 0xCOMPLETE_FLAG | = | Value | 1 | 0 (0) |
In place of conditions 3 and 4 here you would use whatever logic definitively identifies the completion of the challenge you are constructing. This is just one example of a set of conditions you might have to identify the completion of the challenge.
| ID | Flag | Type | Memory | Cmp | Type | Mem/Val | Hits |
|---|---|---|---|---|---|---|---|
| 5 | Reset If | Mem | 0xHEALTH | < | Delta | 0xHEALTH | 0 (0) |
| 6 | Reset If | Value | 0 | = | Value | 0x0 | NUM_FRAMES_EQUAL_TO_TIME_X (0) |
Here, either Reset If statement will remove the hit from the Reset Next If and result in the achievement becoming Paused, preventing timing hits from accruing until the game/level/sequence start transition happens again. Because the group is paused until the challenge starts, the timer reset will never falsely accrue hits outside of the challenge.
There will rarely be a time where this structure is needed. Usually the developer should be able to find some conditions to join with the timer or other counter (using the And Next flag, etc) in order to restrict them to a specific window, along with any other resets needed to clear the counter hits to zero for other failure cases.
- User Guidelines
- Developer Guidelines
- Content Guidelines
- FAQ
- Setup Guide
- Emulator Support and Issues
- Ways to Contribute
- RABot, the RA Discord Robot
- Events
- Overlay Themes
- Useful Links
- Contributing with the docs
- About Us
- Tutorials
- Developer Docs
- How to Become an Achievement Developer
- Getting Started as an Achievement Developer
- Game Identification
- Achievement Design
- Achievement Scoring
- Difficulty Scale and Balance
- Progression and Win Condition Typing
- Badge and Icon Creation
- Achievement Development Overview
- Flags
- BitCount Size
- Alt Groups
- Hit Counts
- Delta Values
- Prior Values
- Value Definition
- Condition Syntax
- Minimum Required Versions for Logic Features
- Memory Inspector
- Real Examples
- Set Development Roadmap
- Achievement Templates
- Tips and Tricks
- Leaderboards
- Rich Presence
- RATools
- Console Specific Tips
- Emulator Hotkeys for Developers
- libretro core support
- Docs To Do List
- WIP User Code of Conduct
- WIP CoC FAQ
- WIP Content Guidelines
- WIP-Jr
- WIP---Dev-Tips---Code-Notes-En-Masse
- WIP-‐-Reauthorship-Policy
- Manifesto RetroAchievements
- Código de Conduta do Usuário
- FAQ - Perguntas Frequentes
- Como contribuir se você não é um desenvolvedor
- Tutorial para Jogos Multi-Discos
- Introdução
- Primeiros Passos como um Desenvolvedor de Conquistas
- Recursos de Lógica para Achievements
- Exemplos Reais
- Dicas e Truques
- Dicas Específicas de Console
- Modelos de Achievement
- Escala de Dificuldade e Equilíbrio
- Roteiro de Desenvolvimento de um Set de Conquistas
- Criação de Ícones e Emblemas
- Leaderboards
- Rich Presence
- Design de Conquistas
- Manifesto RetroAchievements
- Código de Conducta del Usuario
- FAQ - Preguntas Frecuentes
- Tablas Globales y Reglas para la Casería de Logros
- Mi juego no esta cargando los logros
- Como contribuir si no eres un desarrollador
- Por que no deberías utilizar la función de cargar estado
- Contribuyendo con los documentos
- Como funciona la Documentación de RA
- Descargas
- Intro
- Código de Conducta del Desarrollador
- Como convertirme en un Desarrollador de Logros
- Primeros pasos como un Desarrollador de Logros
- Un vistazo al Inspector de Memoria
- Características en la Logica de un Logro
- Ejemplos Reales
- Intro
- Utilizando Hit Counts como un Temporizador
- Utilizando Valores Delta y Hit Counts para Detectar un Incremento
- Un Ejemplo Simple en como evitar el Abuso de Estados de Guardado
- Evitar el Problema de que un Contador se Incremente Dos Veces en el Mismo Frame
- Creando un Temporizador con un ResetIf Hits basándote en la Velocidad de un Juego
- Plantillas para Logros
- Tips y Trucos
- Escala de Dificultad y Balance
- Diseño de Logros
- Mapa de Desarrollo de Set
- Revisiones en Set de Logros
- Creación de Iconos y Badges
- Tablas de Clasificación
- Rich Presence
- Trabajando con el ROM apropiado
- Identificación del Juego
- Guía para Sets Bonus
- Logros para ROM hacks
- Tips Específicos por Consola