EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=590)
-   -   Starting work on Seeds of Destruction (https://www.eqemulator.org/forums/showthread.php?t=30867)

bad_captain 04-14-2010 04:55 PM

Okay, I think I have them all ready to test values with. IE a 67 mage with 140 STA, 250 INT, +900 HP, +1100 Mana = 2700 HP and 4000 Mana and see if I get the same values. I still need to clean up the formulas a bit, but want to make sure they work for real data before finishing and posting, anyway.

I don't have SoD set up yet to test these values out myself or I would do that.

trevius 04-14-2010 05:12 PM

Yeah, the item did not add to HP/Mana/End directly it only had STR/STA/DEX/AGI/WIS/INT and no other stat. None of the fields in the data actually show the totals with the stat item equipped. The H E M fields are what stats were seen as a fully naked character with 100 to STR/STA/DEX/AGI/WIS/INT.

And yes, the numbers are rounded for base, so don't let that throw you. As long as it still matches up every other level, you should be on the right track :)

KLS 04-14-2010 08:22 PM

You should test with a character with more stats. The formula on the lower clients has diminishing returns on some stats that you'd want to find they still exist.

trevius 04-14-2010 11:27 PM

Ok, that may very well be the case. I will see if I can test with 0 stats first lol. I don't know if the client will allow that, but would be cool for making sure we have base stats 100% accurate. I will can probably just use the same script I have for testing higher stats and instead of just equipping 1 item, I can equip 2 or 3 of them, and then have the script compare the gain rates between 1 2 or 3 of the stat items and see if they are any different. If so, then it is probably diminishing returns.

You are probably right as when I was testing before I had this script, I noticed some odd inconsistencies.

bad_captain 04-15-2010 05:48 PM

Here are the base End/Mana formulas that I came up with.

Base Endurance / Mana
Code:

if (level < 40) { BaseEnd = floor(15 * level / 4); }
else if (level < 80) { BaseEnd = floor(15 * level / 4 + (15 * (level-40) / 4) ); }
else { BaseEnd = floor(15 * level / 4 + (15 * (level-40) / 4) + 11 * (level - 80) ); }


I feel pretty confident the formulas for END/Mana, so I'll post those as soon as I can have 1 or 2 datapoints to plug into my formulas. The HP formulas just need some datapoints and to clean up a little more.

Base HPs


Warrior
Code:

if (level < 40) { BaseHP = level * 25; }
else if (level < 80) { BaseHP = ((40 * 25) + ((level - 40) * 50)); }
else { BaseHP = ((40 * 25) + (40 * 50) + ((level - 80) * 30)); }


Ranger
Code:

if (level < 40) { BaseHP = level * 23; }
else if (level < 80) { BaseHP = ((40 * 23) + ((level - 40) * 46)); }
else { BaseHP = floor((40 * 23) + (40 * 46) + (55 * (level - 80) / 2)); }

Paladin, Shadow Knight
Code:

if (level < 40) { BaseHP = level * 24; }
else if (level < 80) { BaseHP = ((40 * 24) + ((level - 40) * 48)); }
else { BaseHP = ((40 * 24) + (40 * 48) + ((level - 80) * 29)); }

Beastlord, Berserker, Monk, Rogue, Shaman
Code:

if (level < 40) { BaseHP = floor((level * 21) + (3 * level) / 13); }
else if (level < 80) { BaseHP = floor((40 * 21) + ((level - 40) * 42) + (level / 4) + (level - 40) / 5 ); }
else { BaseHP = ((40 * 21) + (40 * 42) + ((level - 80) * 26) + 30); }

or
if (level < 40) { BaseHP = ((level * 21) + (3 * level) / 13); }
else if (level < 80) { BaseHP = floor((40 * 21.25) + ((level - 40) * 42.5)); }
else { BaseHP = floor((40 * 37.75) + ( level - 40) * 26); }

Bard, Cleric
Code:

if (level < 40) { BaseHP = level * 22; }
else if (level < 80) { BaseHP = ((40 * 22) + ((level - 40) * 44)); }
else { BaseHP = floor((40 * 22) + (40 * 44) + ( 53 * (level - 80) / 2)); }

Wizard, Magician, Necromancer, Enchanter, Druid
Code:

if (level < 40) { BaseHP = level * 20; }
else if (level < 80) { BaseHP = ((40 * 20) + ((level - 40) * 40)); }
else { BaseHP = ((40 * 20) + (40 * 40) + ((level - 80) * 24)); }


trevius 04-16-2010 05:57 AM

Looks like base Mana and Endurance was actually much more simple than I had thought lol. KLS suggested checking diminishing returns, so I did some testing on them for HP/Mana/Endurance. Here is what I came up with:

1. HPs increase at the same rate per STA point until you reach 255 STA. After 255, they increase at the same rate / 2 (so 50% as much increase as before).

2. Mana and Endurance increase at a separate rate up to 100 in their related stats. From 100 to 200, they increase at the rate as shown from my previous test results. Then, for 200+, they increase at that same rate / 2 (so 50% as much increase as 100 to 200 did).

3. Base Mana and Endurance increase rate per level is a flat increase with 3 tiers just like Base HPs are. Since all classes use the same base Mana/Endurance per level, here is the formula for Base Mana/Endurance for all classes:

Code:

if (level < 40) { BaseManaEnd = level * 15; }
else if (level < 80) { BaseManaEnd = ((40 * 15) + ((level - 40) * 30)); }
else { BaseManaEnd = ((40 * 15) + (40 * 30) + ((level - 80) * 18)); }

And here is the result Maudigan's script that I altered to find the actual base of Mana/Endurance:

Class: Wizard
Code:

LVL:1 E:22 M:22 EPer:0.07 MPer:0.07 EBase:15 ManaBase:15
LVL:2 E:44 M:44 EPer:0.14 MPer:0.14 EBase:30 ManaBase:30
LVL:3 E:67 M:67 EPer:0.22 MPer:0.22 EBase:45 ManaBase:45
LVL:4 E:89 M:89 EPer:0.29 MPer:0.29 EBase:60 ManaBase:60
LVL:5 E:112 M:112 EPer:0.37 MPer:0.37 EBase:75 ManaBase:75
LVL:6 E:135 M:135 EPer:0.45 MPer:0.45 EBase:90 ManaBase:90
LVL:7 E:157 M:157 EPer:0.53 MPer:0.53 EBase:104 ManaBase:104 105
LVL:8 E:179 M:179 EPer:0.60 MPer:0.60 EBase:119 ManaBase:119 120
LVL:9 E:202 M:202 EPer:0.68 MPer:0.68 EBase:134 ManaBase:134 135
LVL:10 E:225 M:225 EPer:0.76 MPer:0.76 EBase:149 ManaBase:149 150
LVL:11 E:247 M:247 EPer:0.83 MPer:0.83 EBase:164 ManaBase:164 165
LVL:12 E:270 M:270 EPer:0.91 MPer:0.91 EBase:179 ManaBase:179 180
LVL:13 E:292 M:292 EPer:0.98 MPer:0.98 EBase:194 ManaBase:194 195
LVL:14 E:315 M:315 EPer:1.05 MPer:1.05 EBase:210 ManaBase:210
LVL:15 E:337 M:337 EPer:1.12 MPer:1.12 EBase:225 ManaBase:225
LVL:16 E:359 M:359 EPer:1.19 MPer:1.19 EBase:240 ManaBase:240
LVL:17 E:382 M:382 EPer:1.27 MPer:1.27 EBase:255 ManaBase:255
LVL:18 E:405 M:405 EPer:1.35 MPer:1.35 EBase:270 ManaBase:270
LVL:19 E:427 M:427 EPer:1.42 MPer:1.42 EBase:285 ManaBase:285
LVL:20 E:450 M:450 EPer:1.51 MPer:1.51 EBase:299 ManaBase:299 300
LVL:21 E:472 M:472 EPer:1.58 MPer:1.58 EBase:314 ManaBase:314 315
LVL:22 E:494 M:494 EPer:1.65 MPer:1.65 EBase:329 ManaBase:329 330
LVL:23 E:517 M:517 EPer:1.73 MPer:1.73 EBase:344 ManaBase:344 345
LVL:24 E:540 M:540 EPer:1.81 MPer:1.81 EBase:359 ManaBase:359 360
LVL:25 E:562 M:562 EPer:1.88 MPer:1.88 EBase:374 ManaBase:374 375
LVL:26 E:584 M:584 EPer:1.95 MPer:1.95 EBase:389 ManaBase:389 390
LVL:27 E:607 M:607 EPer:2.02 MPer:2.02 EBase:405 ManaBase:405
LVL:28 E:630 M:630 EPer:2.10 MPer:2.10 EBase:420 ManaBase:420
LVL:29 E:652 M:652 EPer:2.17 MPer:2.17 EBase:435 ManaBase:435
LVL:30 E:675 M:675 EPer:2.25 MPer:2.25 EBase:450 ManaBase:450
LVL:31 E:697 M:697 EPer:2.32 MPer:2.32 EBase:465 ManaBase:465
LVL:32 E:719 M:719 EPer:2.39 MPer:2.39 EBase:480 ManaBase:480
LVL:33 E:742 M:742 EPer:2.47 MPer:2.47 EBase:495 ManaBase:495
LVL:34 E:764 M:764 EPer:2.55 MPer:2.55 EBase:509 ManaBase:509 510
LVL:35 E:787 M:787 EPer:2.63 MPer:2.63 EBase:524 ManaBase:524 525
LVL:36 E:810 M:810 EPer:2.71 MPer:2.71 EBase:539 ManaBase:539 540
LVL:37 E:832 M:832 EPer:2.78 MPer:2.78 EBase:554 ManaBase:554 555
LVL:38 E:855 M:855 EPer:2.86 MPer:2.86 EBase:569 ManaBase:569 570
LVL:39 E:877 M:877 EPer:2.93 MPer:2.93 EBase:584 ManaBase:584 585
LVL:40 E:900 M:900 EPer:3.00 MPer:3.00 EBase:600 ManaBase:600 - Changes
LVL:41 E:944 M:944 EPer:3.14 MPer:3.14 EBase:630 ManaBase:630
LVL:42 E:989 M:989 EPer:3.29 MPer:3.29 EBase:660 ManaBase:660
LVL:43 E:1035 M:1035 EPer:3.45 MPer:3.45 EBase:690 ManaBase:690
LVL:44 E:1080 M:1080 EPer:3.61 MPer:3.61 EBase:719 ManaBase:719 720
LVL:45 E:1125 M:1125 EPer:3.76 MPer:3.76 EBase:749 ManaBase:749 750
LVL:46 E:1169 M:1169 EPer:3.90 MPer:3.90 EBase:779 ManaBase:779 780
LVL:47 E:1214 M:1214 EPer:4.04 MPer:4.04 EBase:810 ManaBase:810
LVL:48 E:1260 M:1260 EPer:4.20 MPer:4.20 EBase:840 ManaBase:840
LVL:49 E:1304 M:1304 EPer:4.34 MPer:4.34 EBase:870 ManaBase:870
LVL:50 E:1350 M:1350 EPer:4.51 MPer:4.51 EBase:899 ManaBase:899 900
LVL:51 E:1395 M:1395 EPer:4.66 MPer:4.66 EBase:929 ManaBase:929 930
LVL:52 E:1439 M:1439 EPer:4.80 MPer:4.80 EBase:959 ManaBase:959 960
LVL:53 E:1485 M:1485 EPer:4.96 MPer:4.96 EBase:989 ManaBase:989 990
LVL:54 E:1529 M:1529 EPer:5.09 MPer:5.09 EBase:1020 ManaBase:1020
LVL:55 E:1575 M:1575 EPer:5.25 MPer:5.25 EBase:1050 ManaBase:1050
LVL:56 E:1620 M:1620 EPer:5.40 MPer:5.40 EBase:1080 ManaBase:1080
LVL:57 E:1664 M:1664 EPer:5.55 MPer:5.55 EBase:1109 ManaBase:1109 1110
LVL:58 E:1710 M:1710 EPer:5.71 MPer:5.71 EBase:1139 ManaBase:1139 1140
LVL:59 E:1754 M:1754 EPer:5.85 MPer:5.85 EBase:1169 ManaBase:1169 1170
LVL:60 E:1800 M:1800 EPer:6.00 MPer:6.00 EBase:1200 ManaBase:1200
LVL:61 E:1845 M:1845 EPer:6.15 MPer:6.15 EBase:1230 ManaBase:1230
LVL:62 E:1889 M:1889 EPer:6.29 MPer:6.29 EBase:1260 ManaBase:1260
LVL:63 E:1935 M:1935 EPer:6.45 MPer:6.45 EBase:1290 ManaBase:1290
LVL:64 E:1979 M:1979 EPer:6.60 MPer:6.60 EBase:1319 ManaBase:1319 1320
LVL:65 E:2025 M:2025 EPer:6.76 MPer:6.76 EBase:1349 ManaBase:1349 1350
LVL:66 E:2070 M:2070 EPer:6.91 MPer:6.91 EBase:1379 ManaBase:1379 1380
LVL:67 E:2114 M:2114 EPer:7.04 MPer:7.04 EBase:1410 ManaBase:1410
LVL:68 E:2160 M:2160 EPer:7.20 MPer:7.20 EBase:1440 ManaBase:1440
LVL:69 E:2204 M:2204 EPer:7.34 MPer:7.34 EBase:1470 ManaBase:1470
LVL:70 E:2250 M:2250 EPer:7.51 MPer:7.51 EBase:1499 ManaBase:1499 1500
LVL:71 E:2295 M:2295 EPer:7.66 MPer:7.66 EBase:1529 ManaBase:1529 1530
LVL:72 E:2339 M:2339 EPer:7.80 MPer:7.80 EBase:1559 ManaBase:1559 1560
LVL:73 E:2385 M:2385 EPer:7.96 MPer:7.96 EBase:1589 ManaBase:1589 1590
LVL:74 E:2429 M:2429 EPer:8.09 MPer:8.09 EBase:1620 ManaBase:1620
LVL:75 E:2475 M:2475 EPer:8.25 MPer:8.25 EBase:1650 ManaBase:1650
LVL:76 E:2520 M:2520 EPer:8.40 MPer:8.40 EBase:1680 ManaBase:1680
LVL:77 E:2565 M:2565 EPer:8.56 MPer:8.56 EBase:1709 ManaBase:1709 1710
LVL:78 E:2609 M:2609 EPer:8.70 MPer:8.70 EBase:1739 ManaBase:1739 1740
LVL:79 E:2654 M:2654 EPer:8.85 MPer:8.85 EBase:1769 ManaBase:1769 1770
LVL:80 E:2700 M:2700 EPer:9.00 MPer:9.00 EBase:1800 ManaBase:1800
LVL:81 E:2718 M:2718 EPer:9.00 MPer:9.00 EBase:1818 ManaBase:1818
LVL:82 E:2736 M:2736 EPer:9.00 MPer:9.00 EBase:1836 ManaBase:1836
LVL:83 E:2754 M:2754 EPer:9.00 MPer:9.00 EBase:1854 ManaBase:1854
LVL:84 E:2773 M:2773 EPer:9.00 MPer:9.00 EBase:1873 ManaBase:1873
LVL:85 E:2791 M:2791 EPer:9.00 MPer:9.00 EBase:1891 ManaBase:1891

For the levels shown that have an extra unnamed field at the end, that is just where I corrected the base value to be the in line with what it should actually be. I am sure the rounding of the float is what caused it to be slightly off for some.

Also, for these tests, I added a hack to set all new characters to start with 0 to all stats. The client actually forces them all to a minimum of 1 to each stat. So, to get the actual base, I just took the difference from what was originally seen as the base (with 1 stat added to it), and then what was seen after adding an item with 100 to all stats (which showed total as 100, not 101!), and then divided that by 99. I then multiplied that value by 100 to get the total amount that should have been added from the item and subtracted that amount from the current Mana/Endurance as shown with the item equipped. This should leave us with the actual base values, and it looks like it all matches up and makes sense to me :)

So, now that I think we have the base values for HP/Mana/Endurance for all classes, it is just a matter of figuring out the formula for the increase from each stat per level.

As mentioned before, it looks like Mana and Endurance use an unrelated formula for the first 100 in their related stats, so that is one formula to figure out. The next is just the formula from 100 to 200 as shown in my previous testing results. From there, we can figure out the diminishing returns, as they seem to just be the same formula divided by 2.

Then, the 3rd and final formula left is the one for HP gained per stat point per level.

cavedude 04-16-2010 09:50 AM

Quote:

Originally Posted by bad_captain (Post 186576)
Wizard, Magician, Necromancer, Enchanter, Druid

Wouldn't Druid be lumped with Bard and Cleric? On Live My Druid always had more base health than my Necro. Then again, I guess it's possible Sony has gimped Druids over time. Haha

KLS 04-16-2010 03:18 PM

To be fair cleric, shaman and druid were previously lumped together.

cavedude 04-16-2010 03:28 PM

Quote:

Originally Posted by KLS (Post 186608)
To be fair cleric, shaman and druid were previously lumped together.

Aye, that's right on.

trevius 04-16-2010 04:30 PM

Yeah, it would have made more sense to group them that way, but I have given up on questioning how SOE makes their decisions lol. I was surprised to see that druid got lumped in with the pure casters, but I checked it multiple times to make sure that was correct. At least it is only a fairly small difference.

trevius 04-17-2010 12:04 AM

I adjusted the previous Mana/Endurance output to be what I think it is supposed to be and then added a column to the right that shows the increase for the MPer colum beween each level over the previous level.

Code:

LVL:1 M:22 MPer:0.07 ManaBase:15 .07
LVL:2 M:44 MPer:0.14 ManaBase:30 .07
LVL:3 M:67 MPer:0.22 ManaBase:45 .08
LVL:4 M:89 MPer:0.29 ManaBase:60 .07
LVL:5 M:112 MPer:0.37 ManaBase:75 .08
LVL:6 M:135 MPer:0.45 ManaBase:90 .08
LVL:7 M:157 MPer:0.52 ManaBase:105 .07
LVL:8 M:179 MPer:0.59 ManaBase:120 .07
LVL:9 M:202 MPer:0.67 ManaBase:135 .08
LVL:10 M:225 MPer:0.75 ManaBase:150 .08
LVL:11 M:247 MPer:0.82 ManaBase:165 .07
LVL:12 M:270 MPer:0.90 ManaBase:180 .08
LVL:13 M:292 MPer:0.97 ManaBase:195 .07
LVL:14 M:315 MPer:1.05 ManaBase:210 .08
LVL:15 M:337 MPer:1.12 ManaBase:225 .07
LVL:16 M:359 MPer:1.19 ManaBase:240 .07
LVL:17 M:382 MPer:1.27 ManaBase:255 .08
LVL:18 M:405 MPer:1.35 ManaBase:270 .08
LVL:19 M:427 MPer:1.42 ManaBase:285 .07
LVL:20 M:450 MPer:1.50 ManaBase:300 .08
LVL:21 M:472 MPer:1.57 ManaBase:315 .07
LVL:22 M:494 MPer:1.64 ManaBase:330 .07
LVL:23 M:517 MPer:1.72 ManaBase:345 .08
LVL:24 M:540 MPer:1.80 ManaBase:360 .08
LVL:25 M:562 MPer:1.87 ManaBase:375 .07
LVL:26 M:584 MPer:1.94 ManaBase:390 .07
LVL:27 M:607 MPer:2.02 ManaBase:405 .08
LVL:28 M:630 MPer:2.10 ManaBase:420 .08
LVL:29 M:652 MPer:2.17 ManaBase:435 .07
LVL:30 M:675 MPer:2.25 ManaBase:450 .08
LVL:31 M:697 MPer:2.32 ManaBase:465 .07
LVL:32 M:719 MPer:2.39 ManaBase:480 .07
LVL:33 M:742 MPer:2.47 ManaBase:495 .08
LVL:34 M:764 MPer:2.54 ManaBase:510 .07
LVL:35 M:787 MPer:2.62 ManaBase:525 .08
LVL:36 M:810 MPer:2.70 ManaBase:540 .08
LVL:37 M:832 MPer:2.77 ManaBase:555 .07
LVL:38 M:855 MPer:2.85 ManaBase:570 .08
LVL:39 M:877 MPer:2.92 ManaBase:585 .07
LVL:40 M:900 MPer:3.00 ManaBase:600 .08
LVL:41 M:944 MPer:3.14 ManaBase:630 .14 - Changes
LVL:42 M:989 MPer:3.29 ManaBase:660 .15
LVL:43 M:1035 MPer:3.45 ManaBase:690 .16
LVL:44 M:1080 MPer:3.60 ManaBase:720 .15
LVL:45 M:1125 MPer:3.75 ManaBase:750 .15
LVL:46 M:1169 MPer:3.89 ManaBase:780 .14
LVL:47 M:1214 MPer:4.04 ManaBase:810 .15
LVL:48 M:1260 MPer:4.20 ManaBase:840 .16
LVL:49 M:1304 MPer:4.34 ManaBase:870 .14
LVL:50 M:1350 MPer:4.50 ManaBase:900 .16
LVL:51 M:1395 MPer:4.65 ManaBase:930 .15
LVL:52 M:1439 MPer:4.79 ManaBase:960 .14
LVL:53 M:1485 MPer:4.95 ManaBase:990 .16
LVL:54 M:1529 MPer:5.09 ManaBase:1020 .14
LVL:55 M:1575 MPer:5.25 ManaBase:1050 .16
LVL:56 M:1620 MPer:5.40 ManaBase:1080 .15
LVL:57 M:1664 MPer:5.54 ManaBase:1110 .14
LVL:58 M:1710 MPer:5.70 ManaBase:1140 .16
LVL:59 M:1754 MPer:5.84 ManaBase:1170 .14
LVL:60 M:1800 MPer:6.00 ManaBase:1200 .16
LVL:61 M:1845 MPer:6.15 ManaBase:1230 .15
LVL:62 M:1889 MPer:6.29 ManaBase:1260 .14
LVL:63 M:1935 MPer:6.45 ManaBase:1290 .16
LVL:64 M:1979 MPer:6.59 ManaBase:1320 .14
LVL:65 M:2025 MPer:6.75 ManaBase:1350 .16
LVL:66 M:2070 MPer:6.90 ManaBase:1380 .15
LVL:67 M:2114 MPer:7.04 ManaBase:1410 .14
LVL:68 M:2160 MPer:7.20 ManaBase:1440 .16
LVL:69 M:2204 MPer:7.34 ManaBase:1470 .14
LVL:70 M:2250 MPer:7.50 ManaBase:1500 .16
LVL:71 M:2295 MPer:7.65 ManaBase:1530 .15
LVL:72 M:2339 MPer:7.79 ManaBase:1560 .14
LVL:73 M:2385 MPer:7.95 ManaBase:1590 .16
LVL:74 M:2429 MPer:8.09 ManaBase:1620 .14
LVL:75 M:2475 MPer:8.25 ManaBase:1650 .16
LVL:76 M:2520 MPer:8.40 ManaBase:1680 .15
LVL:77 M:2565 MPer:8.55 ManaBase:1710 .15
LVL:78 M:2609 MPer:8.69 ManaBase:1740 .14
LVL:79 M:2654 MPer:8.84 ManaBase:1770 .15
LVL:80 M:2700 MPer:9.00 ManaBase:1800 .16
LVL:81 M:2718 MPer:9.00 ManaBase:1818 0  - Changes
LVL:82 M:2736 MPer:9.00 ManaBase:1836 0
LVL:83 M:2754 MPer:9.00 ManaBase:1854 0
LVL:84 M:2773 MPer:9.00 ManaBase:1872 0
LVL:85 M:2791 MPer:9.00 ManaBase:1890 0

I think from this, it means that Mana Per Int/Wis is just a flat increase of 7.5 until level 40 and then it increases to 15 for levels 40 to 80, and then down to a 0 increase from 80 to 85. I will have to do some more testing, but if this is true, we should be able to set the complete Mana and Endurance formulas for all classes on SoD. That will just leave the HP increase per stat formula to figure out to have these all done.

I think we are nearly there :)

trevius 04-17-2010 06:48 AM

Ok, this isn't exactly a pretty function yet, but it should use the math properly at least, which is the important part for now:

Code:

int32 Client::ManaFromIntWis(int8 level, int16 totalintorwis) {
        float mana_per = 0.0;
        int totalmana = 0;
       
        // Do calculations for Mana Per INT/WIS for the first 100 INT/WIS points
        if (level < 40) {
                mana_per = level * 0.075;
        }
        else if (level < 80) {
                mana_per = (3 + ((level - 40) * 0.15));        // ((40 * 0.075) + ((level - 40) * 0.15))
        }
        else {
                mana_per = 9;        // ((40 * 0.075) + (40 * 0.15))
        }
       
        // Calculate how much mana is added from the first 100 INT/WIS points
        if (totalintorwis > 100) {
                totalmana += mana_per * 100;
                totalintorwis -= 100;
        }
        else {
                totalmana += mana_per * totalintorwis;
                totalintorwis = 0;
        }
       
        // If there was over 100 INT/WIS, do the rest of the Mana Calculations
        if (totalintorwis) {
                // Do calculations for Mana Per INT/WIS for INT/WIS over 100 points
                if (level < 40) {
                        mana_per = level * 0.1875;
                }
                else if (level < 80) {
                        mana_per = ((40 * 0.1875) + ((level - 40) * 0.375));
                }
                else {
                        mana_per = 22.5;        // ((40 * 0.1875) + (40 * 0.375))
                }
               
                // Calculate how much mana is added for points over 100 INT/WIS
                if (totalintorwis > 100) {
                        totalmana += mana_per * 100;
                        totalintorwis -= 100;
                        totalmana += ((mana_per * totalintorwis) / 2);
                }
                else {
                        totalmana += mana_per * totalintorwis;
                }
        }

        return totalmana;
}

That will all be rewritten once I look at how the current HP/Mana/Endurance code is all written currently in the source. But, that should be the formula for nearly exact mana per INT or WIS point. It may add 1 extra mana point for some levels, but that is the most it should ever be off.

That formula should also be able to be used to calculate Endurance with just a few adjustments to account for Endurance gaining stats from all 4 STR/STA/AGI/DEX stats.

So, this should just leave the HP per STA formulas to figure out for the 6 types between all classes. I suspect that will be a flat rate gain just like the Mana/Endurance ones are, so it should be fairly simple to figure it out.

trevius 04-17-2010 08:30 AM

Ok, this should be the final formula we needed, which is for calculating HP per Stamina point.

Code:

float Client::HPPerStamina(int8 level, int8 class) {

        float hpunder40;
        float hpover40;
        float hpover80;

        // Note: hpunder40 is equal to hpover80 / 120, and hpover40 is just hpunder40 * 2
       
        switch(class){
                case DRUID:
                case ENCHANTER:
                case NECROMANCER:
                case MAGICIAN:
                case WIZARD:
                        hpunder40 = 0.06666666;
                        hpover40 = 0.13333333;
                        hpover80 = 8;
                        break;
                case BEASTLORD:
                case BERSERKER:
                case MONK:
                case ROGUE:
                case SHAMAN:
                        hpunder40 = 0.07083333;
                        hpover40 = 0.14166666;
                        hpover80 = 8.5;
                        break;
                case BARD:
                case CLERIC:
                        hpunder40 = 0.07333333;
                        hpover40 = 0.14666666;
                        hpover80 = 8.8;
                        break;
                case SHADOWKNIGHT:
                case PALADIN:
                        hpunder40 = 0.08;
                        hpover40 = 0.16;
                        hpover80 = 9.6;
                        break;
                case RANGER:
                        hpunder40 = 0.07666666;
                        hpover40 = 0.15333333;
                        hpover80 = 9.2;
                        break;
                case WARRIOR:
                        hpunder40 = 0.08333333;
                        hpover40 = 0.16666666;
                        hpover80 = 10;
                        break;
                default:
                        hpunder40 = 0.06666666;
                        hpover40 = 0.13333333;
                        hpover80 = 8;
                        break;
        }

        float hp_per_sta = 0.0;
       
        // Do calculations for HP Per Stamina point
        if (level < 40) {
                hp_per_sta = level * hpunder40;
        }
        else if (level < 80) {
                hp_per_sta = ((40 * hpunder40) + ((level - 40) * hpover40));
        }
        else {
                hp_per_sta = hpover80;        // ((40 * hpunder40) + (40 * hpover40))
        }

        return hp_per_sta;
}

Now, I just need to look through the source and figure out where to add these in and how best to format them and junk, so they work like the current ones for Titanium.

Dinggo 04-17-2010 05:09 PM

Trev can you talk to Rogean about SOD support on the Login Server again now that he has his personal server up and running again?

It would be nice to be able to bring our new server up online and everyone else who has been waiting on this simple change also.

trevius 04-18-2010 04:13 AM

I don't think me talking to him about it would be of much use right now. I am sure he has plenty on his plate atm. But, the good news is that we should have some alternatives to announce in the very near future for the time being until the EQEmu LS is ready for SoD. I will make sure to keep you guys informed when I have more solid info :)

Dinggo 04-18-2010 09:17 AM

This is what I was affraid of though. All the servers are now considering alternate login servers since Rogean is dragging his feet on this. The reason this project is really stable is that it was always centralized arond one login, a place where Devlopers and Users alike congregated. This showed the project was alive and growing at all times.

Once everyone moves to its own login servers, there will really be a big void opened up. Imo it would do alot more harm then good to not keep things centralized arond one common denominator.

I just dont understand why this isnt done yet, it took the other servers a few moments to adjust their own logins to accept SOD. Rogean is risking alot more servers moving to offsite logins which would in the end be bad for the overall project.

ChaosSlayerZ 04-18-2010 03:10 PM

Trev, I am curious, so what happens now with the formula- will all players playing on different clients use the same new formula, or dos each player will run on hp/mana based on what his client is?
thats gonna be a mess =)

another question... or more of a wish, would that be possible at SOME POINT to put these values into DB instead?
So each server admin could adjust how much each class gains from sta/int/wis without the need to go into the source?
Wouldn't that be awesome? =)
I mean you just replace the the formula in the source code with X, Y and Z, and add a tiny table to the DB with what like 50 rows for all the values per class? =)
Please consider this =)

gaeorn 04-18-2010 04:56 PM

Quote:

Originally Posted by Dinggo (Post 186691)
This is what I was affraid of though. All the servers are now considering alternate login servers since Rogean is dragging his feet on this. The reason this project is really stable is that it was always centralized arond one login, a place where Devlopers and Users alike congregated. This showed the project was alive and growing at all times.

Once everyone moves to its own login servers, there will really be a big void opened up. Imo it would do alot more harm then good to not keep things centralized arond one common denominator.

I just dont understand why this isnt done yet, it took the other servers a few moments to adjust their own logins to accept SOD. Rogean is risking alot more servers moving to offsite logins which would in the end be bad for the overall project.

This is why the new multi-login code I wrote requires one to login to a trusted game server via the main eqemulator.org login server to update the login info on alternate login servers. I did not want to cause division in the project, but I did want those who use SoD to have a way to log into their preferred game servers.

trevius 04-18-2010 05:59 PM

Yeah, I think the private/secondary Login Servers are actually a great addition to EQEmu and something that has been needed for a very long time. I am definitely against dividing this project, as it does not need to be spread thinner than it is. But, I think the multiplle LS stuff will only strengthen EQEmu. Having to use other Login Servers to access servers from the SoD client is only temporary I am sure. At least until the official EQEmu LS is updated for it. And once it is, the extra Login Servers will make nice backups for when the official one is down, which is awesome. We are no longer 100% reliant on a single point of failure, which is good. Not that the official LS fails very often (because it is very stable), but just that it is good to have a backup when one is needed!

This thread isn't really meant for this particular discussion though.

In news related to this thread, I have added the HP formulas for SoD to the SVN :) They aren't 100% perfect yet, but they are much closer than before and probably only need minor tweaking to be perfect. I still have to add the Mana and Endurance formulas, but plan to try to get those added tonight.

Zandig 04-19-2010 04:52 PM

Quote:

Originally Posted by trevius (Post 186712)
In news related to this thread, I have added the HP formulas for SoD to the SVN :) They aren't 100% perfect yet, but they are much closer than before and probably only need minor tweaking to be perfect. I still have to add the Mana and Endurance formulas, but plan to try to get those added tonight.

Very nice Trev!
I had a look at rev 1395 with the SOD client and my Iksar monk's hitpoints now reach 100% (instead of hovering between 80 and 81). Looking forward to the endurance and mana.

Work on SOD is coming along excellent.
New PEQ database released!
Today is a good day :D

trevius 04-20-2010 07:33 PM

I have the Mana and Endurance formulas on my test server and they are almost finished. I think they just need a bit more tweaking to get them to align properly all of the time. They should most likely be on the SVN by tomorrow :)

AngelKnight 04-21-2010 03:43 AM

Using SoD on PEQ server, hit points are now showing properly (go up to 100%). Mana/End still doing same as they did, which, of course, is to be expected. :) VERY well done everyone involved on the formulas!

Trev, in relation to the 9th spell slot issue I ran into at level 58, I have yet to have this problem re-appear. I have ding'd 62 recently, died a BUNCH of times in between (6 times today alone, lol), and not once did the extra slot show up again. So, I am going to have to conclude that it was a fluke and is un-reproducable, so feel free to take it off of your list of things to look at. :)

I shall keep my eye on the spell casting bar jic it happens again, but I have a feeling it's not going to, LOL.

Thanks to everyone for the great (and quick!!) work getting SoD client working.

trevius 04-21-2010 05:24 PM

Ok, the HP/Mana/Endurance formulas are now all as good as I can get them and they are all on the SVN. The HP formula is accurate and at most it will only be off by 1 for certain levels/stats combos. It is always 1 over, so HPs should always show 100% on the client. The Mana and Endurance formulas were more complicated for certain Level/Stats combinations. I was able to get them accurate up to level 60 for any stat value, and up to level 80 for stats under 200. But, if you are 60+ and have over 200+ stats, some combos will have 7 to 15ish more mana on the server-side than what the client shows. I am sure it is just missing some minor detail or needing to round something that it isn't, but I tried and tried and couldn't get them 100% accurate for every combo. At least they are very close and by the time it starts being off at all, the number of mana/endurance added won't even be barely noticeable. When the Mana/End formulas are off, it is always higher on the server-side, so players will always still be able to have 100% showing on their UI, which was my main goal.

Maybe at some point, I will try to look into the Mana/End formulas again and get them fixed, but it probably wouldn't happen any time soon. Since they are on the SVN now, if anyone wants to test them out and play with the formulas to see if they can figure it out, please do! I will be happy to answer any questions I can if someone else wants to give a shot at making them closer to 100% accurate. Though, for now, I think they are definitely good enough, even if they never got messed with again.

I also set the default size of NPCs to 6, so if they are set to 0 in the DB, they will now be set to 6. This is because SOE added in default sizes for many races, when in the past, their default size was 6. So, without this fix, you would see some NPCs that are not the size you may have seen them as in previous clients.

Now, to figure out what I am going to work on next. I am probably going to look into a few more of the bug reports and see if I can get those resolved. There isn't really a ton of work left to do to complete SoD, and that rocks :D

robinreg 04-21-2010 05:33 PM

lol, I just compiled the source this morning and log on my ogre sk and I noticed he's smaller than previously which is fine with me. He ducked alot when trying to move around and about and small tight quarters. but when I got my bots out my gnome enchanter bot is about as big as my orge sk which looks funny. all the bots and my character is about the same height.

trevius 04-21-2010 05:35 PM

LMAO, I didn't think about that. I will have to set it so it doesn't do that for player races. Will do that later if someone else doesn't beat me to it. Thanks for reporting that.

Lylyth 04-24-2010 10:10 PM

If you DL SoD from Steam do you have to run it through steam? Husband/wife team want to play but only one account on steam, so don't want to have to make another account and buy it again.

Vampire1212 04-24-2010 10:54 PM

No (:
 
Everquest SoD is in no way tied to Steam, simply move the Everquest folder from C:\Program Files\Steam\steamapps\common\everquest to something like C:\everquest

Steam only downloads and installs for you. The rest is as if you installed EQ off the disc.

Rykeau 05-11-2010 05:14 PM

I'm sorry if this is posted elsewhere or covered in multiple posts - I simply can't find it.

Is there a consolidated guide to getting SoD working from Titanium or SoF?

Here is my situation:

I have a working EQEMU server using newly compiled source and SoF clients. I utilize EQEmuLoginServer for my login server. All clients can login and play without issue at this time.

My challenge has been getting my SoD client to log into my server. I've copied the SoD client to my current EQ directory, validated the eqhost.txt file and triple checked the EQ launch shortcut for the "patchme" switch. I have even tried updating the opcodes.conf with SoD info on the server with no success.

When using the SoD client with my current server configuration, the client stalls in a "Logging in to the server. Please wait..." state almost indefinately. I'm guessing I am missing something in my complilation or in my config but I simply can't narrow it down. Any help anybody can provide would be appreciated.

trevius 05-11-2010 05:32 PM

Your eqhost.txt needs to be set to port 5999 for SoD, not 5998 like Titanium/SoF are. Assuming you have everything else setup correctly, that should work fine. Being unable to log in like you mentioned is exactly the symptom caused by not having the port set to 5999 in your eqhost.txt file.

There isn't currently a full wiki on getting SoD setup, but other than changing the port to 5999, and only being able to use the non-official Login Servers that support SoD, the setup is almost exactly the same as previous clients. I have been waiting until the official EQEmu Login Server supports SoD before I go through and update the play guide wiki's to include SoD instructions in them.

pfyon 05-11-2010 07:14 PM

Btw, why have the SoD stream on a different port? Titanium and SoF already share one, requiring the login server to check what client is connecting, why not put SoD on the same port and just have it check between 3 clients instead of the original 2?

trevius 05-11-2010 07:24 PM

Because it handles login stuff a bit differently and uses some different opcodes. Unfortunately, at the time that you submit the login, all clients appear to be the same, so the server has no way to know to reply to SoD in a special way as is needed. So, we just have it use a different port, so the Login Server knows right away how to treat it.

pfyon 05-11-2010 07:27 PM

Ah, okay then.

Rykeau 05-13-2010 05:53 PM

Quote:

Originally Posted by trevius (Post 187784)
Your eqhost.txt needs to be set to port 5999 for SoD, not 5998 like Titanium/SoF are. Assuming you have everything else setup correctly, that should work fine. Being unable to log in like you mentioned is exactly the symptom caused by not having the port set to 5999 in your eqhost.txt file.

There isn't currently a full wiki on getting SoD setup, but other than changing the port to 5999, and only being able to use the non-official Login Servers that support SoD, the setup is almost exactly the same as previous clients. I have been waiting until the official EQEmu Login Server supports SoD before I go through and update the play guide wiki's to include SoD instructions in them.

Thank you! Changing the login port info in all appropriate files did the trick.

WkimWes 05-14-2010 03:30 PM

Hey all great work on the progress of SoD liking that we can use it now. :) I was curious though, is the new Mercenary system working or is that something that is going to be worked on later or not at all? I was curious to see if the healing mercs and tanks worked better than the current bots.

KLS 05-14-2010 04:37 PM

Later we plan to replace the bot system completely and make it part of core server functionality. With those we'll implement mercs. It is a rather large process and so it's only a todo atm.

trevius 05-14-2010 04:56 PM

No, none of the mercenary stuff works yet. There is probably quite a bit of packet handling, structures, and opcodes that are needed in order to make the system functional at all. And even then, we would still have to create AI stuff for them similar to the bots system, if we decide not to use bots for them.

I don't know what the plans are for mercs currently. We need to get some collects that include the info we need first of all. Once we have that, someone will have to take the time to actually figure it all out and get the systems coded. I am sure it is a decent chunk of work. They definitely aren't a high priority atm, but maybe they will be added at some point.

EDIT: KLS beat me to it!

Kuldiin 05-18-2010 01:13 PM

My SoD worked fine first time, but when I went to change resolution my system locked up.

When I tried to reload SoD I get the below error

http://img99.imageshack.us/img99/7092/crashp.jpg

Is there a config file or something I can delete so it goes back to its original resolution? My screen flickers like crazy when I first run SoD before it crashes(before login) so guessing its the reso causing these issues.

KLS 05-18-2010 01:30 PM

eqclient.ini

Kuldiin 05-18-2010 01:40 PM

Quote:

Originally Posted by KLS (Post 188063)
eqclient.ini

Worked thanks :) Now back to normal

WkimWes 05-18-2010 02:51 PM

Quote:

Originally Posted by KLS (Post 187917)
Later we plan to replace the bot system completely and make it part of core server functionality. With those we'll implement mercs. It is a rather large process and so it's only a todo atm.

Sweet, thanks for the response KLS and Trevius. I look forward to seeing that happen.


All times are GMT -4. The time now is 06:09 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.