Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #91  
Old 04-17-2010, 12:04 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #92  
Old 04-17-2010, 06:48 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #93  
Old 04-17-2010, 08:30 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #94  
Old 04-17-2010, 05:09 PM
Dinggo
Sarnak
 
Join Date: Mar 2002
Posts: 39
Default

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.
Reply With Quote
  #95  
Old 04-18-2010, 04:13 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #96  
Old 04-18-2010, 09:17 AM
Dinggo
Sarnak
 
Join Date: Mar 2002
Posts: 39
Default

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.
Reply With Quote
  #97  
Old 04-18-2010, 03:10 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

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 =)
Reply With Quote
  #98  
Old 04-18-2010, 04:56 PM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

Quote:
Originally Posted by Dinggo View Post
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.
Reply With Quote
  #99  
Old 04-18-2010, 05:59 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #100  
Old 04-19-2010, 04:52 PM
Zandig's Avatar
Zandig
Hill Giant
 
Join Date: Jun 2006
Location: New York City
Posts: 180
Default

Quote:
Originally Posted by trevius View Post
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
Reply With Quote
  #101  
Old 04-20-2010, 07:33 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #102  
Old 04-21-2010, 03:43 AM
AngelKnight
Fire Beetle
 
Join Date: Jan 2010
Posts: 4
Default

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.
Reply With Quote
  #103  
Old 04-21-2010, 05:24 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #104  
Old 04-21-2010, 05:33 PM
robinreg
Sarnak
 
Join Date: Feb 2010
Location: California
Posts: 88
Default

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.
Reply With Quote
  #105  
Old 04-21-2010, 05:35 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:28 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3