Options
All
  • Public
  • Public/Protected
  • All
Menu

nw-analyzer

New World Data File Analyzer

This tool allows analysis of the data files of New World. It is built to work on the converted data files produced by Kattor's Data Sheet Reader, which it can retrieve automatically.

Installation

Clone this repository. If you want the module to be globally available, run npm link in the cloned folder.

Using the command line tool

You can run a basic analysis using the command line script analyze-nw-data-files. After you cloned the project, run npm start to run the script. By default, it will download Kattor's data files into the folder data and produce output in the folder docs. You can see more options by running npm start -- --help.

Using the library

For more powerful analysis, you can run your own analysis. This is done in multiple steps. For an example, check out the command line script.

Load the data files

The raw data files are already in a JSON format which could be easily loaded, but the content has a structure which do not lend themselves well to analysis. Therefor the first step is to load and parse the data files into something which resembles a useful format.

import { DataLoader } from 'nw-analyzer'

let loader = new DataLoader(downloadSource, dataFolder);
if (!loader.dataFilesExist()) {
await loader.download();
}
let dataTables = loader.parse();

If you already have the data sheets available locally (e.g. because you parsed the game yourself), you can point the data loader to the folder containing the sheets and use them directly. If you want to use a different table that is shared online, you can point the data loader at the download URL. Note that the file names and folder layout must match the output of the Data Sheet Reader.

The resulting data is still in a raw format and not interpreted in any way, except for the restructuring of the contents. Check out the API documentation for details on the data format.

Analyze the data files

The parsed data files still have cross-references between loot tables and use a hard-to-read probability format. This can be made more understandable by running the analyzer.

import { Analyzer } from 'nw-analyzer'

let analyzer = new Analyzer(dataTables);
let analyzedTables = analyzer.analyze();

The analyzed tables resolve all cross-references and normalizes probability. The probability will now be in a range between 0 (impossible) and 1 (100%, guaranteed). Again, check the API documentation for more information.

Output

For a quick and simple output of analyzed tables, use the Formatter class.

import { DataLoader } from 'nw-analyzer'

let output = new Formatter(analyzedTables).html();

Ideas for future versions

  • Consider luck ratings in the probability calculation
  • Compare versions and luck settings
  • More analysis options? Create an issue if you have ideas.

Legal

New World is trademarked by Amazone Game Studios. This project has no affiliation with Amazon or Amazon Game Studios.

Generated using TypeDoc