CRpCreator


Overview

CRpCreator is a command line application that can be used to create a .crp file containing replay information for a number of players of a single game. It takes a .csv file as input to allow specification of the input data in a way that can be managed using a standard spreadsheet package, such as MS Excell, to ease the batch processing of a large number of player's files. It generates a small report as output giving some details of which (if any) player's files failed to be imported into the .crp file.


CIV Version Support

CRpCreator has been designed to support the following CIV versions, mainly because they are the ones supported by GOTM from GOTM14 up to the present time.


Basic Instructions

The following is a list of steps to perform to create a .crp file from multiple .SAV files. This assumes that the CIVReplay suite has installed in the standard location.

  1. Ensure all .SAV files are in the same directory (we'll call it CRpGen).
  2. Create a .csv file in the CRpGen directory (we'll call it config.csv). See the config.csv in the Example section for details of the .csv file format.
  3. Open a command prompt window and cd to the CRpGen directory.
  4. Type the following (Alternatively you can create a .bat file with this command in and double click it) :
    "C:\Program Files\CFC Dianthus\CIVReplay\CRpCreator.exe" config.csv > results.csv
  5. Open the results.csv file and check that the Error column is empty, that the UnknownEventCount column is 0 for all rows, and that the FileCivVersion is populated for all rows.
  6. Open the .crp file using CRpViewer or CRpSettleLoc.


Example

Directory structure

This example shows how you might want to organise a directory structure for multiple games, allowing you to easily recreate a bunch of .crp files whenever I update CRpCreator to extract more information.

I've created a directory structure with a folder per game, with the intention of adding more games to the structure later. The folders will end up looking as follows after adding further games (this example just adds Game1) :

I've created the structure here for Game1, complete with supporting files. The file run.bat can be double clicked on to create the Game1.crp file and Game1_Results.csv file. If you have installed the CIVReplay suite somewhere other than the default location then you will need to edit the run.bat file and change the path in the following line :

SET CRPCreator="C:\Program Files\CFC Dianthus\CIVReplay\CRpCreator.exe"


The input .csv file (config.csv)

I've placed a file named config.csv in the Game1 directory with the following contents :

Excell view :

Raw Text (I.e. using Notepad) :

Original file,Original.SAV
Output file,..\Game1.crp
PlayerName,CIVVersion,FileName,InGameScore,JasonScore,QSCScore
Player1,N/A,Player1_0825BC.SAV,2977,-1,-1
Player2,N/A,Player2_0825BC.SAV,72,-1,-1

The cells are used as follows :


The output .csv file (Game1_Results.csv)

On running CRpCreator (by double clicking run.bat) the Game1.crp and Game1_Results.csv will be created. Lets have a look at the .csv file :

Excell view :

Raw Text (I.e. using Notepad) :

Line,PlayerName,InCivVersion,Error,Turns,EventCount,UnknownEventCount,GameType,FileCivVersion,Major.Minor
4,Player1,N/A,,88,121,0,?,PTW 1.21f,18.7
5,Player2,N/A,,87,91,0,?,PTW 1.21f,18.7

This file is just to provide some information about the success of the .crp creation. The columns are defined as follows :