# Twilight Monk 1.2.0
# BID: 7926A67119144CFD

unsafeCheck: true

ALL_FPS:
  # Disable bUseFixedFrameRate to untie game speed from framerate and unlock FPS
  -
    type: write
    address: [MAIN, 0x5DC2688, 0x7A4]
    value_type: uint32
    # Default is 0x46, bUseFixedFrameRate |= 0x40 
    # By writing 7 we are making sure that other flags are maintained: 
    # bAllowMultiThreadedAnimationUpdate |= 4
    # bOptimizeAnimBlueprintMemberVariableAccess |= 2
    value: 6
  # r.DynamicRes.FrameTimeBudget
  -
    type: evaluate_write
    address: [MAIN, 0x5D952E8, 0]
    value_type: float
    value: ["TruncDec(FRAMETIME_TARGET, 2)", "TruncDec(FRAMETIME_TARGET, 2)"]
  # t.MaxFPS
  -
    type: evaluate_write
    address: [MAIN, 0x5DC2FA8, 0]
    value_type: float
    value: [FPS_LOCK_TARGET, FPS_LOCK_TARGET]
  # r.VSync
  -
    type: evaluate_write
    address: [MAIN, 0x55C62F8, 0]
    value_type: uint32
    value: [0, 0]
  -
    type: block
    what: timing