![]() |
#1 |
Apprentice
Join Date: Sep 2008
Posts: 59
![]() |
Stat Gain Question (spoilers possible)
In one of tables in the spoilers file for character creation list the following table:
skill lvl Gain ----------------------- to 18 +1/+2 18/01 to /69 5+d15 18/70 to /89 2+d6 18/90+ 1 Is this the same formula that is used when drinking stat gain potions as well? Brian |
![]() |
![]() |
![]() |
#2 | |
Prophet
Join Date: Mar 2008
Posts: 2,799
![]() |
Quote:
|
|
![]() |
![]() |
![]() |
#3 |
Apprentice
Join Date: Sep 2008
Posts: 59
![]() |
I found it in Ability.SPO.
But my question is, are those values correct for gaining stats with potions or is there another table instead? Thanks, Brian |
![]() |
![]() |
![]() |
#4 |
Apprentice
Join Date: Sep 2008
Posts: 59
![]() |
i went from 18/01 to 18/31 in 1 pot. Is that a good roll ?
Brian |
![]() |
![]() |
![]() |
#5 |
Adept
Join Date: Jun 2007
Location: The place of virtuous unbelievers
Posts: 158
![]() |
Yep- not all that unusual, I don't think, but I think that's about as much as you can gain at that point. I don't know the exact formula but as PowerDiver pointed out the above is definitely not it (for stat potions)- you can certainly gain more than 1 point even when over 18/90, and you just gained 30 when over 18, so... The progression is quite similar to that though, but the values are a bit larger.
|
![]() |
![]() |
![]() |
#6 | |
Knight
Join Date: Apr 2007
Posts: 590
![]() |
Quote:
|
|
![]() |
![]() |
![]() |
#7 |
Apprentice
Join Date: Sep 2008
Posts: 59
![]() |
Well this is what i found in the code:
bool inc_stat(int stat) { int value, gain; /* Then augment the current/max stat */ value = p_ptr->stat_cur[stat]; /* Cannot go above 18/100 */ if (value < 18+100) { /* Gain one (sometimes two) points */ if (value < 18) { gain = ((rand_int(100) < 75) ? 1 : 2); value += gain; } /* Gain 1/6 to 1/3 of distance to 18/100 */ else if (value < 18+98) { /* Approximate gain value */ gain = (((18+100) - value) / 2 + 3) / 2; /* Paranoia */ if (gain < 1) gain = 1; /* Apply the bonus */ value += randint(gain) + gain / 2; /* Maximal value */ if (value > 18+99) value = 18 + 99; } /* Gain one point at a time */ else { value++; } /* Save the new value */ p_ptr->stat_cur[stat] = value; /* Bring up the maximum too */ if (value > p_ptr->stat_max[stat]) { p_ptr->stat_max[stat] = value; } /* Recalculate bonuses */ p_ptr->update |= (PU_BONUS); /* Success */ return (TRUE); } /* Nothing to gain */ return (FALSE); } Based on this, my max gain should be: ((118-19)/2 + 3)/2 = 51 RandINT (51) + 25 (51/2) or 26 - 76 stat points in the first potion if starting at 18/01(19). Then it gets harder each other time. Assuming that i roll(or cheat to roll) the max of 76, then for my next potion my start value is 18/77 or 95. Applying the formula, the next potion will give me: ((118-95)/2 +3)/2 = 7(.25) RANDINT(7)+3(7/2) would give me a range of 4-10 for the next potion. Am I understanding this correctly ? Approximately how many stat gain potions do i need of each stat once I get to 18 so I can gauge how long i need to stay at 1600'. Brian |
![]() |
![]() |
![]() |
#8 |
Knight
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 515
![]() |
> Am I understanding this correctly
The idea is correct, but your math is a little off. > ((118-19)/2 + 3)/2 = 51 > RandINT (51) + 25 (51/2) or 26 - 76 stat points in the first potion if starting at 18/01(19) That should be ((118 - 18)/2 + 3)/2 = 26 and randint(26) + (26)/2 = 14 - 39 for the first potion if starting at 18 There is also a bug here (well, at least I think it is a bug). If your stat starts out at 17, and the RNG decides to give you and extra +1, your stat goes to 18/01 rather than going first to 18 and then to 18/14 - 18/39. I am also personally annoyed by the comment in the code. If they want the stat to increase by between 1/6 and 1/3 of the distance to 18/100, then that's what the code ought to do. Instead, it is actually increasing the stat by between 1/8 and 3/8 of the distance to 18/100 (with a little rounding error thrown in). Probably someone had the mistaken idea that dividing by something other than a power of two would be slow. Either the code or the comment should be changed. Preferably both. [I actually wrote code to fix both these issues in my personal version of the source, but never submitted it.] |
![]() |
![]() |
![]() |
#9 | |
Veteran
Join Date: Apr 2007
Posts: 1,951
Donated: $40
![]() |
Quote:
|
|
![]() |
![]() |
![]() |
#10 |
Knight
Join Date: Dec 2007
Location: Poland, Katowice
Age: 31
Posts: 589
![]() |
Can't we just have linear stats...?
__________________
If you can convincingly pretend you're crazy, you probably are. |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Anyone gain more plev at one kill? | AR_chie | AAR | 18 | April 17, 2009 16:08 |
Stat Potion Idea | Greebley | Vanilla | 4 | May 29, 2008 10:24 |
Stat hacking | Old Man | Vanilla | 1 | October 12, 2007 15:13 |
advice: dive vs stat gain | smee | Vanilla | 11 | October 6, 2007 07:18 |
Spoilers updated for Vanilla 3.0.8! | Hugo | Vanilla | 23 | July 21, 2007 08:12 |