tylercamp / palcalc

MIT License
33 stars 5 forks source link
breeding calculator palworld

Pal Calc


Pal Calc is a breeding tool for Palworld which uses the data from your save file to automatically find the optimal breeding tree for any desired pal and passive skills.

Pal Calc will find the optimal path using your own pals, will tell you where to find those pals, and estimate how long each step will take.

No more spreadsheets!

No more fumbling between bases and sorting pals!

No more effort spent manually building a breeding tree!

Spend less time planning your game and more time playing it!


Pal Calc Screenshot

v1.8.0 screenshot

v1.9.0 animation


Click here to get the latest version. (Expand "Assets" at the bottom, download PalCalc.UI.exe, place in its own folder and run.)

The Pal Calc wiki can be found here.


Full list of features

Community Help

Pal Calc currently has some outstanding pieces that need more information to resolve. Some of these need some level of reverse engineering, but some can be figured out through experimentation and statistics. An issue has been created for each item, where more information can be found.

  1. Is there a formula for how long breeding takes? Or is it a constant five minutes? Issue
  2. What's the probability of wild pals having exactly N passives? Issue
  3. Has the passive skill inheritance calculation changed since /u/mgxts reverse engineered it? Was their reverse engineering accurate? Issue
  4. Assuming the passive skill inheritance calculation is correct, is Pal Calc's implementation of those probabilities correct? Issue
  5. What's a good way to estimate time needed to capture a wild pal of a certain type? e.g. Chikipi would be much faster to find + catch than Paladius. Issue

Development

Visual Studio Community 2022 is required. The .CLI projects act as test programs which can be ran without involving the whole Pal Calc UI.

Palworld Database

The list of pals, passives, and stats are stored in a db.json file embedded in PalCalc.Model. This file is generated by the PalCalc.GenDB project. Running this project will update the db.json file in PalCalc.Model which will be used by the rest of the projects. It also updates the Pal icons and in-game map used by PalCalc.UI.

PalCalc.GenDB will attempt to read and export data from your local Palworld game files. See the README for more info. It uses CUE4Parse, made and maintained by the same developers of the popular modding tool FModel, to perform that export.

The db.json file should not be modified manually. It should be modified by re-running the PalCalc.GenDB project.

Save File Support

Save file parsing is in PalCalc.SaveReader, which is a partial C# port of palworld-save-tools. See the project's README for more information.

Data and Solver Model

Data collected from Palworld or a save file are represented by types in PalCalc.Model. Instances of an owned pal within the game are represented by PalInstance.

The solver logic in PalCalc.Solver wraps this type with IPalReference types, which can represent owned, wild, and bred pals. The IPalReference types are returned by PalCalc.Solver.BreedingSolver, but you can use OwnedPalReference results to fetch underlying owned instances.

The overall solver process is described in the project's README.

Pal Calc UI

The general structure of the PalCalc.UI project is somewhat messy. The application uses WPF and (weak) MVVM, mainly for convenience. MVVM principals and WPF best-practices were not strictly adhered to. There are various hackfixes since many features were unplanned and added through the path of least resistance. Refactoring is planned and gladly accepted.

Entries in the Resource folder are set to the Resource build action and embedded in the final program.

The Community Toolkit library is used for the viewmodels, which provides the ObservableObject, ObservableProperty, and other utilities. These use code generation to automatically implement private fields annotated with [ObservableProperty] as public properties with the appropriate INotifyPropertyChanged logic.

GraphSharp, a defunct library preserved after the Codeplex shutdown, does not have any documentation. It was added here by referencing hollowdrutt's implementation of a useful overview/walkthrough of its usage by Sacha Barber.

TODOs

Maybe TODOs