Chess Pills

Chess Pills

Not enough ratings
(automatic) workaround for no pieces on board bug
By ◉_◉
Describes how to get the game working again without removing all files and automate it. Also explains the cause. Note that I am not affiliated with the developers in any way.
   
Award
Favorite
Favorited
Unfavorite
Missing Pieces Bug Workaround
If you are affected by the missing pieces bug, you can do the following:
On linux:
rm ~/.local/share/Steam/steamapps/compatdata/2016540/pfx/drive_c/users/steamuser/AppData/LocalLow/Deep\ Green\ Games/Chess\ Pills/CHAP*dat
On windows: Navigate to %APPDATA%/LocalLow/Deep Green Games/Chess Pills and remove all CHAP*.dat files.

Automation
If you do not care about seeing the same puzzles quite often you can make this bug never bother you again (linux):
1. Right click on game in library
2. Select Properties
3. Under General paste the following launch options:
rm ~/.local/share/Steam/steamapps/compatdata/2016540/pfx/drive_c/users/steamuser/AppData/LocalLow/Deep\ Green\ Games/Chess\ Pills/CHAP*dat; %command%

Explanation
The game creates for every seen puzzle a file. That is if you play chapter n some random puzzle x is selected and CHAPn_x.dat created. Next time you play chapter n puzzle x is no longer available for display, game realizes this by checking the previously created files. If not enough puzzles are available for some chapter there is an index out of bounds exception*. The developers created a different amount of puzzles per chapter (e.g. for chapter 3 having seen more than 90 puzzles lets the game fail, while chapter 1 and 2 each contain more than 100). In theory you could remove at will some dat files (from the chapter where you have exhausted all puzzles) to be able to play again (or make sure to keep some of them for the puzzles you really saw too much). Due to the puzzles being chosen randomly the approach of removing all dat files on launch seems fine for me, as a workaround, of course someone from the developers should fix this (I am not affiliated with them).



*To see for yourself, check the Player.log file in the directory; if you did not have pieces in your last session it should contain something like this:
IndexOutOfRangeException: Index was outside the bounds of the array. at PuzzleManager.BuildScript () [0x0007c] in <34b486eb6b9e42a086e2eb12cefc6529>:0 at LevelScript.InitState () [0x00058] in <34b486eb6b9e42a086e2eb12cefc6529>:0 at LevelScript.DelayedStartGame (System.Int32 chapter) [0x00000] in <34b486eb6b9e42a086e2eb12cefc6529>:0 at LevelScript.Start () [0x00059] in <34b486eb6b9e42a086e2eb12cefc6529>:0 NullReferenceException: Object reference not set to an instance of an object at Board.OnSquarePointerEnter (System.String square) [0x00000] in <34b486eb6b9e42a086e2eb12cefc6529>:0 at StringEventChannelSO.RaiseEvent (System.String value) [0x0000a] in <34b486eb6b9e42a086e2eb12cefc6529>:0 at SquareHighlights.OnPointerEnter (UnityEngine.EventSystems.PointerEventData eventData) [0x00007] in <34b486eb6b9e42a086e2eb12cefc6529>:0 at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerEnterHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00007] in <5c3c499e80374de3864655e9616d744b>:0 at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00067] in <5c3c499e80374de3864655e9616d744b>:0