Jump to content

Calculation formulas


Recommended Posts

I've looked in the tuning code, did some testing and compiled these tables for calculating the rots' health, there's currently only health values but I might do damage and other stats later if I have the time.

The max health value is calculated as follow:

Base health (can be found in each creature definition in 'tuning.lua' or accessible globally in game through "TUNING").

Health modifiers for the location, the further in the game that location is, the tougher enemies will be.
+ DungeonTierModifierSource (HealthMult):
    0.0 for rotwood forest
    0.33 for nocturne grove
    0.66 for bog
    1 for molded grave

Health modifiers for ascension (frenzy), the higher frenzy level you play at, the tougher enemies will be.
+ AscensionModifierSource:
    - frenzy 0: no additional health
    - frenzy 1:
        + BasicHealthMult: 0.2
        + MinibossHealthMult: 0.8
        + BossHealthMult: 0.35
    - frenzy 2:
        + BasicHealthMult: 0.25
        + MinibossHealthMult: 0.8
        + BossHealthMult: 0.5
    - frenzy 3:
        + BasicHealthMult: 0.35
        + MinibossHealthMult: 0.8
        + BossHealthMult: 0.5
NOTE: (Some) ascension modifiers stack, for example a frenzy 3 health modifier will be added on top of the last 2 frenzy modifier values. I'm not sure if it stacks like that for all modifiers in the table but it was specifically mentioned for health and damage modifiers.

Health modifiers for multiplayer, the more players, the tougher enemies will be, this will also based on the enemy's multiplayer modifier type (included in their tuning definition as "multiplayer_mods"), possible values of it are BASIC, MINOR, MAJOR, SWARM, ELITE, MINIBOSS and BOSS.
+ ENEMY_MULTIPLAYER_MODS:
    - 1 player: no additional effects applied
    - 2 players:
        + BASIC: no additional health
        + MINOR: 0.5
        + MAJOR: 1
        + SWARM: no additional health
        + ELITE: 1.25
        + MINIBOSS: 2
        + BOSS: 1.5
    - 3 players:
        + BASIC: no additional health
        + MINOR: 0.5
        + MAJOR: 1.5
        + SWARM: no additional health
        + ELITE: 1.75
        + MINIBOSS: 3
        + BOSS: 2
    - 4 players:
        + BASIC: 0.25
        + MINOR: 1.2
        + MAJOR: 2
        + SWARM: no additional health
        + ELITE: 2.25
        + MINIBOSS: 4
        + BOSS: 2.5
NOTE: When I write "no additional health", I mean exactly that, just no health modifier, but there might still be some other modifiers like spanw count applied that are not mentioned here.

Example 1: an elite bulbin (cabbageroll_elite) spawned in Nocturne Grove, on frenzy 1, and in a lobby with 2 players should be:
    450 + 148.5 + 90 + 562.5 = 1251 health
        450: base health
        148.5: dungeon tier modifier (+0.33 base health)
        90: ascension modifier (+0.2 base health)
        562.5: multiplayer modifier (2 players, ELITE type, +1.25 base health)

Example 2: an elite bulbin (cabbageroll_elite) spawned in Molded Grave, on frenzy 2, and in a lobby with 2 players should be:
    450 + 450 + 90 + 112.5 + 562.5 = 1665 health
        450: base health
        450: dungeon tier modifier (+1x base health)
        90 + 112.5: ascension modifier (+0.2x +0.25x base health) (frenzy modifiers stack)
        562.5: multiplayer modifier (2 players, ELITE type, +1.25x base health)

 

Thanks for reading, if there's any mistakes please correct me.

Link to comment
https://forums.kleientertainment.com/forums/topic/156024-calculation-formulas/
Share on other sites

Do you know how the currently displayed weapon/armor stats are calculated? :) Or how to find the original values of your current weapon damage (because those are still being used e.g. strikers being favored for bulbin-snortoise because of their high base weapon damage; they're just hidden and replaced with the new system)

edit: asking particularly for the craftables, since I recall the tuning file has the base/default weapon damage values of each weapon class and their corresponding modifiers declared in it.

6 hours ago, molivious said:

Do you know how the currently displayed weapon/armor stats are calculated? :) Or how to find the original values of your current weapon damage (because those are still being used e.g. strikers being favored for bulbin-snortoise because of their high base weapon damage; they're just hidden and replaced with the new system)

edit: asking particularly for the craftables, since I recall the tuning file has the base/default weapon damage values of each weapon class and their corresponding modifiers declared in it.

The mod calculates additional damage and armor
stats.zip

1 hour ago, kipper0k said:

The mod calculates additional damage and armor
stats.zip

Awesome mod! One of the first few mods for Rotwood too, cheers. I did have some time to test it and look through the code and I wanted to point out some things and  I want to help improve it for everyone.

Firstly I'm not a very experienced modder so not sure about this one, but do you really need to add the AddStatsData function to the GLOBAL table? Defining it as normal function or local function works fine for me.

I also did try to improve the UI part to make it look better and easier to manage if we ever need to add on to it in the future.

The whole stats list is now a widget, so it can be cleaned easily each rebuild by using RemoveAllChildren, each stat is a children widget of the list, so you can now use LayoutChildrenOnRow/Column to adjust list layout.

I also chose to add it as children of a widget under self.root of playerstatuswidget so it gets dragged along with the others in the animatein/out animations.

Since it's a list widget now, you don't have to add the list elements to a table to keep track of them and delete each one manually since we can just use the widget children management instead.

Also it's now placed in the same place as the whole status widget, to the right of the potions indicator, so you don't have to move your eyes across the screen as much.

Included is a pic of how it looks and the modified mod scripts down below.

image.png

stats.7z

 

edit: currently it's only designed and optimized to show for ThePlayer (as I saw in the code), so maybe in the future can you try and make it works for all 4 player widgets?

Also one more thing that I've always wondered about, is ThePlayer specifically player 1, or is it the player we're controlling? Like if I was in an online game and I'm player 2, if I was to access ThePlayer would that be me, or the player 1 of that lobby? I haven't had the chance to test that out actually.

On 5/13/2024 at 2:01 PM, gibberish said:

Awesome mod! One of the first few mods for Rotwood too, cheers. I did have some time to test it and look through the code and I wanted to point out some things and  I want to help improve it for everyone.

Firstly I'm not a very experienced modder so not sure about this one, but do you really need to add the AddStatsData function to the GLOBAL table? Defining it as normal function or local function works fine for me.

I also did try to improve the UI part to make it look better and easier to manage if we ever need to add on to it in the future.

The whole stats list is now a widget, so it can be cleaned easily each rebuild by using RemoveAllChildren, each stat is a children widget of the list, so you can now use LayoutChildrenOnRow/Column to adjust list layout.

I also chose to add it as children of a widget under self.root of playerstatuswidget so it gets dragged along with the others in the animatein/out animations.

Since it's a list widget now, you don't have to add the list elements to a table to keep track of them and delete each one manually since we can just use the widget children management instead.

Also it's now placed in the same place as the whole status widget, to the right of the potions indicator, so you don't have to move your eyes across the screen as much.

Included is a pic of how it looks and the modified mod scripts down below.

image.png

stats.7z 2.36 kB · 2 downloads

 

edit: currently it's only designed and optimized to show for ThePlayer (as I saw in the code), so maybe in the future can you try and make it works for all 4 player widgets?

Also one more thing that I've always wondered about, is ThePlayer specifically player 1, or is it the player we're controlling? Like if I was in an online game and I'm player 2, if I was to access ThePlayer would that be me, or the player 1 of that lobby? I haven't had the chance to test that out actually.

my original variant was there, I could not make this variant work in multiplayer, but I am not strong in widgets and I hope that your variant works correctly (p.s. in multiplayer pictures and text displayed mirrored).

image.png.f3fbe7427c5b973e3fa1af480fad1454.png

On 5/13/2024 at 2:01 PM, gibberish said:

Awesome mod! One of the first few mods for Rotwood too, cheers. I did have some time to test it and look through the code and I wanted to point out some things and  I want to help improve it for everyone.

Firstly I'm not a very experienced modder so not sure about this one, but do you really need to add the AddStatsData function to the GLOBAL table? Defining it as normal function or local function works fine for me.

I also did try to improve the UI part to make it look better and easier to manage if we ever need to add on to it in the future.

The whole stats list is now a widget, so it can be cleaned easily each rebuild by using RemoveAllChildren, each stat is a children widget of the list, so you can now use LayoutChildrenOnRow/Column to adjust list layout.

I also chose to add it as children of a widget under self.root of playerstatuswidget so it gets dragged along with the others in the animatein/out animations.

Since it's a list widget now, you don't have to add the list elements to a table to keep track of them and delete each one manually since we can just use the widget children management instead.

Also it's now placed in the same place as the whole status widget, to the right of the potions indicator, so you don't have to move your eyes across the screen as much.

Included is a pic of how it looks and the modified mod scripts down below.

image.png

stats.7z 2.36 kB · 2 downloads

 

edit: currently it's only designed and optimized to show for ThePlayer (as I saw in the code), so maybe in the future can you try and make it works for all 4 player widgets?

Also one more thing that I've always wondered about, is ThePlayer specifically player 1, or is it the player we're controlling? Like if I was in an online game and I'm player 2, if I was to access ThePlayer would that be me, or the player 1 of that lobby? I haven't had the chance to test that out actually.

AddStatsData is gloabl so other mods can add their stats.
ThePlayer is a variable on the client, i.e. ThePlayer stores the player we control, and can only be called on the client, I decided to use ThePlayer, because when checking in multiplayer I found out that I can not get the statistics of other players, at least for now.
I'm sorry, for the sake of convenience, can we have your Discord?

3 hours ago, kipper0k said:

my original variant was there, I could not make this variant work in multiplayer, but I am not strong in widgets and I hope that your variant works correctly (p.s. in multiplayer pictures and text displayed mirrored).

image.png.f3fbe7427c5b973e3fa1af480fad1454.png

AddStatsData is gloabl so other mods can add their stats.
ThePlayer is a variable on the client, i.e. ThePlayer stores the player we control, and can only be called on the client, I decided to use ThePlayer, because when checking in multiplayer I found out that I can not get the statistics of other players, at least for now.
I'm sorry, for the sake of convenience, can we have your Discord?

Hey I would love to discuss this further, you can DM me on discord @zgibberish

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...