Git Product home page Git Product logo

bg3-xp-table-generator's Introduction

BG3 XP Table Generator

This is a simple tool that generates expereince and treasure tables (Data.txt, XPData.txt, ExperienceRewards.lsx, and TreasureTable.txt) for Baldur's Gate 3 in the required format.

Requirements

.NET 7 Runtime

How-To

  1. Enter the required maximum XP number (the game's default is 200000);
  2. Enter the required number of levels (the game's default is 12);
  3. Click Generate;
  4. Analyze generated data. You can adjust numbers in the grid if something looks off (especially early levels);
  5. Optionally, edit XP rewards for various actions in the game or the treasure table;
  6. Click Export and select an export location.

You'll find generated files in the set location.

What's Next?

Set LSLib (divine.exe) path in Settings and click pack to select the generated folder and package your mod. Alternatively, just use BG3 Modder's Multitool.

P.S.

This tool uses simple and straightforward progression curves. If you feel like you can come up with another solution, please feel free to submit a pull request.

bg3-xp-table-generator's People

Contributors

dmitryromenskiy avatar noxis-source avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

bg3-xp-table-generator's Issues

I think min level is not implemented correctly

I don't know if this is the expected behavior and I don't know the repercussions in the game but the program basically skips the levels below min level.

In any case, here is the scenario, I wanted to start the game a few levels higher, to give myself a boost but resume the progression normally after a certain level. From my experience (I tried setting the XP required to 0 before to test some builds but it didn't work, the level got stuck), setting the XP required to 1 for the levels you want to skip would be a solution.

I did some experimenting in excel and was able to find what I think is a viable formula.

From your code:

public void GenerateData(ICollection<XPDataRecord> source) {
    if (Progression == ProgressionType.Linear) {
        double limit = MaxLvl + 1;
        double sum = (limit - 1) * (limit / 2.0d);
        double root = MaxXP / sum;

        for (int i = MinLvl; i < limit; i++)
            source.Add(new XPDataRecord(i, Convert.ToInt32(i * root)));
    }
}

To:

public void GenerateData(ICollection<XPDataRecord> source) {
    if (Progression == ProgressionType.Linear) {
        double limitLow = MinLvl;
        double sumLow = (limitLow - 1) * (limitLow / 2.0d);
        double limit = MaxLvl + 1;
        double sum = (limit - 1) * (limit / 2.0d);
        double root = (MaxXP - MinLvl) / (sum - sumLow);

        for (int i = 1; i < MinLvl; i++)
            source.Add(new XPDataRecord(i, 1));

        for (int i = MinLvl; i < limit; i++)
            source.Add(new XPDataRecord(i, Convert.ToInt32(i * root)));
    }
}

I just converted the formula from excel and I wasn't able to test the code, so there might be some issues, but it should look something like this:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.