| 1 |
# stat_bonus -- list of stat bonuses |
| 2 |
# |
| 3 |
# This file sets the bonus for the various attributes, removing |
| 4 |
# the hard coded values from the server. |
| 5 |
# |
| 6 |
# The default provided here match the old values as closely as possible, |
| 7 |
# but there may be minor differences due to the way the calculations |
| 8 |
# are done. |
| 9 |
# |
| 10 |
# Because the parsing is not super intelligent, format is as follows: |
| 11 |
# table name to fill in |
| 12 |
# opening brace |
| 13 |
# stat values - they are comma separated, but any non digit will |
| 14 |
# act as a separator when the values are read in. |
| 15 |
# closing brace |
| 16 |
# |
| 17 |
# Repeat for all stats. If the server has an issue reading them, |
| 18 |
# it will generate an error, and should abort. |
| 19 |
# |
| 20 |
# The names are also more consistent in this file - basically, |
| 21 |
# stat name_type of bonus_bonus |
| 22 |
# In the old living.c file, there was a mix - con_bonus (really hp), |
| 23 |
# sp_bonus, etc. The idea of putting in the stat name is to try and |
| 24 |
# provide more information on what does what so when wants to make adjustments, |
| 25 |
# one has a better idea what is being adjusted. |
| 26 |
# |
| 27 |
# Note that all stats must be fully filled in, eg, you can not fill in only |
| 28 |
# the first 20 entries of a stat if the maximum in 30 - all 30 must be |
| 29 |
# filled in. All stats use the same max_stat value. |
| 30 |
# |
| 31 |
# Note also that the loader does not do anything to make sure the |
| 32 |
# stat bonus make any real sense, eg, a bonus for a higher stat could be |
| 33 |
# lower (worse) than if the stat was one less. The loader can not |
| 34 |
# really check for these, because it does not have any good idea to |
| 35 |
# know what is good or bad - for some stats, low numbers are better, |
| 36 |
# for others, high numbers are better |
| 37 |
|
| 38 |
# max_stat must be declared before any of the stat bonuses. |
| 39 |
max_stat 30 |
| 40 |
|
| 41 |
# How many extra HP a character gets per level (first 10). Old |
| 42 |
# living.c file was for every 2 levels, which is why these bonuses |
| 43 |
# are roughly half the old ones. |
| 44 |
con_hp_bonus |
| 45 |
{ |
| 46 |
-3, |
| 47 |
-2.5, -2, -1.5, -1, -0.5, |
| 48 |
-0.5, 0, 0, 0, 0, |
| 49 |
0.5, 1, 1.5, 2, 2.5, |
| 50 |
3, 3.5, 4, 4.5, 5, |
| 51 |
6, 7, 8, 9, 10, |
| 52 |
11, 12.5, 15, 20, 25 |
| 53 |
} |
| 54 |
|
| 55 |
|
| 56 |
# SP (mana) bonus. Bonus the character gets is 2/3 pow, 1/3 int. |
| 57 |
# Note that in old file, the formula used to be (2*pow + int) / 12 - |
| 58 |
# effectively diving old results by 4 (eg, table had 30 for a 26 stat, |
| 59 |
# which effectively meant a 7.5 bonus) - that logic is removed, |
| 60 |
# so these bonuses are real bonuses for each level, presuming both |
| 61 |
# stats were same value - if pow gets bonus of 6, int bonus of 2, |
| 62 |
# that would be (2*6 + 4)/ 3, or 5. |
| 63 |
# Note that for first level, character get double this bonus - this |
| 64 |
# is hard coded into the server. |
| 65 |
|
| 66 |
pow_int_sp_bonus |
| 67 |
{ |
| 68 |
-2.5, |
| 69 |
-2.5, -2.25, -2, -1.75, -1.5, |
| 70 |
-1.25, -1, -0.75, -0.5, -0.25, |
| 71 |
0, 0.25, 0.5, .75, 1, |
| 72 |
1.25, 1.5, 1.75, 2, 2.25, |
| 73 |
2.5, 3, 3.75, 5, 6.25, |
| 74 |
7.5, 10, 12.5, 17.5, 25 |
| 75 |
} |
| 76 |
|
| 77 |
# This is exactly like pow_int_sp_bonus above, |
| 78 |
# but is 2/3 wis, 1/3 power. In fact, table is exactly |
| 79 |
# the same, and like sp bonus, character gets double value at |
| 80 |
# first level. |
| 81 |
|
| 82 |
wis_pow_grace_bonus |
| 83 |
{ |
| 84 |
-2.5, |
| 85 |
-2.5, -2.25, -2, -1.75, -1.5, |
| 86 |
-1.25, -1, -0.75, -0.5, -0.25, |
| 87 |
0, 0.25, 0.5, .75, 1, |
| 88 |
1.25, 1.5, 1.75, 2, 2.25, |
| 89 |
2.5, 3, 3.75, 5, 6.25, |
| 90 |
7.5, 10, 12.5, 17.5, 25 |
| 91 |
} |
| 92 |
|
| 93 |
# There are lots of factors into shop pricing, cha |
| 94 |
# being one of them. Old system was a float, |
| 95 |
# and the relevant formula was (bonus-1)/(bonus+1) |
| 96 |
# Values below are converted with that formula |
| 97 |
# and muliplied by 100 to make them integers. |
| 98 |
# Note that due to rounding, some minor adjustments |
| 99 |
# over the literal translated values have been made |
| 100 |
# to make the changes smoother. |
| 101 |
# |
| 102 |
# If one really wants to know shop prices: |
| 103 |
# adjustment is .4 + .5*((bonus below)/100) |
| 104 |
# |
| 105 |
# Cost to buy is 1*(1+adjustment), cost to sell is (1-adjusment) |
| 106 |
# Thus, if the value below is 20, character pays 50% above |
| 107 |
# and gets 50% of value (.4 + .5*(20/100) = .5 |
| 108 |
# |
| 109 |
# That .4 mentioned above could get all the way down to .1 |
| 110 |
# with maximum bargaining skill. |
| 111 |
# |
| 112 |
# Best way to think of it: Bonus below are percentage discount/ |
| 113 |
# premium for buying/selling on the charisma side of things. |
| 114 |
# If there was no bargaining in the game and only cha was used, |
| 115 |
# the values below would be the total percent values, eg, a value |
| 116 |
# of 50 means if you bought an item of value 100, you would pay |
| 117 |
# 150, and get 50 if sold. |
| 118 |
# |
| 119 |
# Note: These values should probably really be re-done - |
| 120 |
# I believe the formula that original values were based on changed |
| 121 |
# at some point - it is also interesting to note that this is |
| 122 |
# probably one of the few attributes where the effective |
| 123 |
# bonus one gets at higher levels is lower (eg, difference |
| 124 |
# in price for 26 to 20 is not as big a savings as 41 to 33). |
| 125 |
# With revised shop code, max bonus should probably be much closer |
| 126 |
# to zero (still would be 10% price difference even with max |
| 127 |
# bargaining) |
| 128 |
|
| 129 |
cha_shop_bonus |
| 130 |
{ |
| 131 |
81, |
| 132 |
81, 80, 78, 75, 71, |
| 133 |
67, 63, 60, 55, 50, |
| 134 |
49, 47, 46, 44, 43, |
| 135 |
41, 39, 37, 35, 33, |
| 136 |
32, 31, 30, 28, 27, |
| 137 |
26, 24, 23, 21, 20 |
| 138 |
} |
| 139 |
|
| 140 |
# dex_bonus is used for several things for players - |
| 141 |
# AC, bonus to hit with bows, bonus to damage with |
| 142 |
# bows, and bonus to hit with thrown weapons. |
| 143 |
# As such, name just remains dex bonus for now, but |
| 144 |
# arguably, all of these different bonuses should probably |
| 145 |
# get broken out to other tables. |
| 146 |
|
| 147 |
dex_bonus |
| 148 |
{ |
| 149 |
-4, |
| 150 |
-3, -2, -2, -1, -1, |
| 151 |
-1, 0, 0, 0, 0, |
| 152 |
0, 0, 0, 1, 1, |
| 153 |
1, 2, 2, 2, 3, |
| 154 |
3, 3, 4, 4, 4, |
| 155 |
5, 5, 6, 6, 7 |
| 156 |
} |
| 157 |
|
| 158 |
# How much faster the character moves or attacks. |
| 159 |
# These are the usual tick counts. |
| 160 |
# Note - I made some adjustments to smooth these out - |
| 161 |
# I don't see a good reason to go from .15 to .20, repeat |
| 162 |
# 4 times, then jump to 0.25. With this change, at |
| 163 |
# some points, the bonus is slightly higher (.02) than |
| 164 |
# before, at other points, slightly lower. |
| 165 |
# |
| 166 |
dex_speed_bonus |
| 167 |
{ |
| 168 |
-0.1, |
| 169 |
-0.09, -0.08, -0.07, -0.06, -0.05, |
| 170 |
-0.025, 0.00, 0.00, 0.00, 0.00, |
| 171 |
0.025, 0.05, 0.07, 0.09, 0.10, |
| 172 |
0.11, 0.12, 0.13, 0.14, 0.15, |
| 173 |
0.16, 0.17, 0.18, 0.19, 0.20, |
| 174 |
0.21, 0.22, 0.23, 0.24, 0.25 |
| 175 |
} |
| 176 |
|
| 177 |
# |
| 178 |
# damage bonus from strength |
| 179 |
# |
| 180 |
str_damage_bonus |
| 181 |
{ |
| 182 |
-2, |
| 183 |
-2, -2, -1, -1, -1, |
| 184 |
0, 0, 0, 0, 0, |
| 185 |
0, 1, 1, 1, 2, |
| 186 |
2, 2, 3, 3, 3, |
| 187 |
4, 4, 5, 5, 6, |
| 188 |
6, 7, 8, 9, 10 |
| 189 |
} |
| 190 |
|
| 191 |
# bonus to hit from strength. |
| 192 |
# renamed from thaco_bonus, since thaco (really thac0) is an acronym |
| 193 |
# for 'to hit AC 0' - in old AD&D, it was a literal number. This bonus |
| 194 |
# here is to hit any ac. |
| 195 |
# |
| 196 |
str_hit_bonus |
| 197 |
{ |
| 198 |
-2, |
| 199 |
-2, -2, -2, -1, -1, |
| 200 |
-1, -1, 0, 0, 0, |
| 201 |
0, 1, 1, 1, 1, |
| 202 |
2, 2, 2, 2, 2, |
| 203 |
3, 3, 3, 3, 4, |
| 204 |
4, 4, 4, 5, 5 |
| 205 |
} |
| 206 |
|
| 207 |
# This determines how much the character can carry - |
| 208 |
# note that characters start to get penalties to movement before |
| 209 |
# reaching maximum. |
| 210 |
# |
| 211 |
str_weight_limit |
| 212 |
{ |
| 213 |
200000, |
| 214 |
250000, 300000, 350000, 400000, 500000, |
| 215 |
600000, 700000, 800000, 900000, 1000000, |
| 216 |
1100000, 1200000, 1300000, 1400000, 1500000, |
| 217 |
1650000, 1800000, 1950000, 2100000, 2250000, |
| 218 |
2400000, 2550000, 2700000, 2850000, 3000000, |
| 219 |
3250000, 3500000, 3750000, 4000000, 4500000 |
| 220 |
} |
| 221 |
|
| 222 |
# |
| 223 |
# Chance to learn a spell from a spellbook. Note that |
| 224 |
# overall level also increases these odds by a minor amount |
| 225 |
# (level/5). int or wis is used depending on the type of spell. |
| 226 |
# |
| 227 |
int_wis_learn_spell |
| 228 |
{ |
| 229 |
0, |
| 230 |
0, 0, 1, 2, 4, |
| 231 |
8, 12, 16, 25, 36, |
| 232 |
45, 55, 65, 70, 75, |
| 233 |
80, 85, 90, 95, 100, |
| 234 |
100, 100, 100, 100, 100, |
| 235 |
100, 100, 100, 100, 100 |
| 236 |
} |
| 237 |
|
| 238 |
# |
| 239 |
# Chance for a cleric to fail casting a spell. |
| 240 |
# The chance is random(0,99) < ((spell_level * chance) / char_level) |
| 241 |
# Thus, if chance is 0, character never fails. If chance is 10, |
| 242 |
# then if the character is same level as spell, 10% chance of |
| 243 |
# of failure - if character is double level of the spell, 5% chance |
| 244 |
# of failure. |
| 245 |
# |
| 246 |
wis_cleric_chance |
| 247 |
{ |
| 248 |
100, |
| 249 |
100, 100, 100, 90, 80, |
| 250 |
70, 60, 50, 40, 35, |
| 251 |
30, 25, 20, 15, 14, |
| 252 |
13, 12, 11, 10, 9, |
| 253 |
8, 7, 6, 5, 4, |
| 254 |
3, 2, 1, 0, 0 |
| 255 |
} |
| 256 |
|
| 257 |
# Bonus for turning (scarring) undead with various prayers. |
| 258 |
# The bonus effectively increase the character level. |
| 259 |
# To scare a creature, the characters turn level has to be |
| 260 |
# higher than the creatures level, so this bonus can be |
| 261 |
# pretty important. Note if the creature being turned is not |
| 262 |
# an enemy of the characters god, turn bonus has to greater than |
| 263 |
# twice the creatures level |
| 264 |
|
| 265 |
wis_turn_bonus |
| 266 |
{ |
| 267 |
-1, |
| 268 |
-1, -1, -1, -1, -1, |
| 269 |
-1, -1, 0, 0, 0, |
| 270 |
1, 1, 1, 2, 2, |
| 271 |
2, 3, 3, 3, 4, |
| 272 |
4, 5, 5, 6, 7, |
| 273 |
8, 9, 10, 12, 15 |
| 274 |
} |
| 275 |
|
| 276 |
# fear bonus increases the duration for fear |
| 277 |
# spells (it does not affect other fear attacks, |
| 278 |
# like those from weapons.) |
| 279 |
# Note: The comment in living.c, that these are bonuses |
| 280 |
# to fear resistance for players, seems incorrect/no longer |
| 281 |
# valid - the only place where get_fear_bonus() is called |
| 282 |
# is from cast_cone() |
| 283 |
# |
| 284 |
# These bonuses are as they were in the living.c |
| 285 |
# file - the only rationale I can think of for low stats |
| 286 |
# giving the bonus is idea of really ugly characters |
| 287 |
# being more fearsome - however, this goes against |
| 288 |
# the idea of higher stat is better. |
| 289 |
# |
| 290 |
cha_fear_bonus |
| 291 |
{ |
| 292 |
3, |
| 293 |
3, 3, 3, 2, 2, |
| 294 |
2, 1, 1, 1, 0, |
| 295 |
0, 0, 0, 0, 0, |
| 296 |
0, 0, 0, 0, 0, |
| 297 |
0, 0, 0, 0, 0, |
| 298 |
0, 0, 0, 0, 0 |
| 299 |
} |