# The Witcher 3: Wild Hunt 4.04a-4.04b
# BID: B151A224A429F9A7

unsafeCheck: true

15FPS:
  # DRGameTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312B4]
    value_type: float
    value: 63
  # DRCinematicTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312E4]
    value_type: float
    value: 63
  # LimitFPS
  -
    type: write
    address: [MAIN, 0x411DCFC]
    value_type: int32
    value: 15
  -
    type: block
    what: timing
20FPS:
  # DRGameTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312B4]
    value_type: float
    value: 47.25
  # DRCinematicTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312E4]
    value_type: float
    value: 47.25
  # LimitFPS
  -
    type: write
    address: [MAIN, 0x411DCFC]
    value_type: int32
    value: 20
  -
    type: block
    what: timing
25FPS:
  # DRGameTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312B4]
    value_type: float
    value: 37.8
  # DRCinematicTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312E4]
    value_type: float
    value: 37.8
  # LimitFPS
  -
    type: write
    address: [MAIN, 0x411DCFC]
    value_type: int32
    value: 25
  -
    type: block
    what: timing
30FPS:
  # DRGameTargetFrameTimeInMs (original value)
  -
    type: write
    address: [MAIN, 0x41312B4]
    value_type: float
    value: 31.5
  # DRCinematicTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312E4]
    value_type: float
    value: 31.5
  # LimitFPS (original value)
  -
    type: write
    address: [MAIN, 0x411DCFC]
    value_type: int32
    value: 60

# For 35-60 FPS check if cutscene is played. If it is, set 30 FPS lock. If not, disable it.
35FPS:
  # DRGameTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312B4]
    value_type: float
    value: 27
  # DRCinematicTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312E4]
    value_type: float
    value: 27
  # LimitFPS
  -
    type: write
    address: [MAIN, 0x411DCFC]
    value_type: int32
    value: 35
  -
    type: block
    what: timing
40FPS:
  # DRGameTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312B4]
    value_type: float
    value: 23.625
  # DRCinematicTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312E4]
    value_type: float
    value: 23.625
  # LimitFPS
  -
    type: write
    address: [MAIN, 0x411DCFC]
    value_type: int32
    value: 40
  -
    type: block
    what: timing
45FPS:
  # DRGameTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312B4]
    value_type: float
    value: 21
  # DRCinematicTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312E4]
    value_type: float
    value: 21
  # LimitFPS
  -
    type: write
    address: [MAIN, 0x411DCFC]
    value_type: int32
    value: 45
  -
    type: block
    what: timing
50FPS:
  # DRGameTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312B4]
    value_type: float
    value: 18.9
  # DRCinematicTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312E4]
    value_type: float
    value: 18.9
  # LimitFPS
  -
    type: write
    address: [MAIN, 0x411DCFC]
    value_type: int32
    value: 50
  -
    type: block
    what: timing
55FPS:
  # DRGameTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312B4]
    value_type: float
    value: 17.1818181818
  # DRCinematicTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312E4]
    value_type: float
    value: 17.1818181818
  # LimitFPS
  -
    type: write
    address: [MAIN, 0x411DCFC]
    value_type: int32
    value: 55
  -
    type: block
    what: timing
60FPS:
  # DRGameTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312B4]
    value_type: float
    value: 15.75
  # DRCinematicTargetFrameTimeInMs
  -
    type: write
    address: [MAIN, 0x41312E4]
    value_type: float
    value: 15.75
  # LimitFPS
  -
    type: write
    address: [MAIN, 0x411DCFC]
    value_type: int32
    value: 60
  -
    type: block
    what: timing
