Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 10-23-2008, 06:39 PM
seveianrex
Sarnak
 
Join Date: Sep 2008
Location: asdf
Posts: 60
Default Various GoD AA Code Changes

{zone/effects.cpp}
@152
locate:
Code:
chance += GetAA(aaFuryofMagicMastery2) * 2;	//just in case
and replace with
Code:
chance += GetAA(aaFuryofMagicMastery2) * 2;
(anal retentive, maybe, but I don't want it getting removed in future because the comment makes it sound iffy)

{zone/aggro.cpp}
@1184
locate:
Code:
switch (GetAA(aaSpellCastingSubtlety))
	{
	case 1:
		AggroAmount = AggroAmount * 95 / 100;
		break;
	case 2:
		AggroAmount = AggroAmount * 90 / 100;
		break;
	case 3:
		AggroAmount = AggroAmount * 80 / 100;
		break;
	}
add after:
Code:
switch (GetAA(aaSpellCastingSubtlety2))
	{
	case 1:
		AggroAmount = AggroAmount * 95 / 100;
		break;
	case 2:
		AggroAmount = AggroAmount * 90 / 100;
		break;
	case 3:
		AggroAmount = AggroAmount * 80 / 100;
		break;
	}
{zone/special_attacks.cpp}

line 30, locate:
Code:
int Mob::GetKickDamage() const {
	int multiple=(GetLevel()*100/5);
	multiple += 100;
	int dmg=(
			    (
				 (GetSkill(KICK) + GetSTR() + GetLevel())*100 / 9000
				) * multiple
			  )
			  + 600;	//Set a base of 6 damage, 1 seemed too low at the sub level 30 level.
	if(GetClass() == WARRIOR || GetClass() == WARRIORGM
	 ||GetClass() == BERSERKER || GetClass() == BERSERKERGM) {
		dmg*=12/10;//small increase for warriors
	}
	
	dmg /= 100;
	return(dmg);
}
REPLACE with
Code:
int Mob::GetKickDamage() const {
	int multiple=(GetLevel()*100/5);
	multiple += 100;
	int dmg=(
			    (
				 (GetSkill(KICK) + GetSTR() + GetLevel())*100 / 9000
				) * multiple
			  )
			  + 600;	//Set a base of 6 damage, 1 seemed too low at the sub level 30 level.
	if(GetClass() == WARRIOR || GetClass() == WARRIORGM
	 ||GetClass() == BERSERKER || GetClass() == BERSERKERGM) {
		dmg*=12/10;//small increase for warriors
	}
	dmg /= 100;

	switch (GetAA(aaStrengthenedStrike))
	{
	case 1:
		dmg *= 1.05;
		break;
	case 2:
		dmg *= 1.15;
		break;
	case 3:
		dmg *= 1.30;
		break;
	}

	return(dmg);
}
line 48, locate:
Code:
int Mob::GetBashDamage() const {
	int multiple=(GetLevel()*100/5);
	multiple += 100;

	//this is complete shite
	int dmg=(
			    (
				 ((GetSkill(BASH) + GetSTR())*100 + GetLevel()*100/2) / 10000
				) * multiple
			  )
			  + 600;	//Set a base of 6 damage, 1 seemed too low at the sub level 30 level.
	dmg /= 100;		  
	return(dmg);
}
REPLACE with
Code:
int Mob::GetBashDamage() const {
	int multiple=(GetLevel()*100/5);
	multiple += 100;

	//this is complete shite
	int dmg=(
			    (
				 ((GetSkill(BASH) + GetSTR())*100 + GetLevel()*100/2) / 10000
				) * multiple
			  )
			  + 600;	//Set a base of 6 damage, 1 seemed too low at the sub level 30 level.
	dmg /= 100;

	switch (GetAA(aaStrengthenedStrike))
	{
	case 1:
		dmg *= 1.05;
		break;
	case 2:
		dmg *= 1.15;
		break;
	case 3:
		dmg *= 1.30;
		break;
	}

	switch (GetAA(aaViciousSmash))
	{
	case 1:
		dmg *= 1.05;
		break;
	case 2:
		dmg *= 1.15;
		break;
	case 3:
		dmg *= 1.30;
		break;
	}

	return(dmg);
}
{zone/pets.cpp}
[code]
@ 204 locate:
Code:
//TODO: think about regen (engaged vs. not engaged)
and add before:
Code:
switch (GetAA(aaElementalDurability))
	{
	case 1:
		npc_type->max_hp *= 1.02;
		npc_type->cur_hp = npc_type->max_hp;
		break;
	case 2:
		npc_type->max_hp *= 1.05;
		npc_type->cur_hp = npc_type->max_hp;
		break;
	case 3:
		npc_type->max_hp *= 1.10;
		npc_type->cur_hp = npc_type->max_hp;
		break;
	}
Reply With Quote
  #2  
Old 10-24-2008, 08:03 PM
seveianrex
Sarnak
 
Join Date: Sep 2008
Location: asdf
Posts: 60
Default

This can be unsticked, I committed the changes.
Reply With Quote
  #3  
Old 10-25-2008, 12:40 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by seveianrex View Post
{zone/effects.cpp}
Code:
chance += GetAA(aaFuryofMagicMastery2) * 2;	//just in case
and replace with
Code:
chance += GetAA(aaFuryofMagicMastery2) * 2;
(anal retentive, maybe, but I don't want it getting removed in future because the comment makes it sound iffy)
If I remember correctly, I put that comment in there because we currently utilize aaFuryofMagicMastery2 (640) vs aaFuryofMagicMastery (770), because that's what's in the database:
Code:
mysql> SELECT skill_id, name, type FROM altadv_vars WHERE name LIKE "%Fury of Magic%";                                                                                                                          +----------+--------------------------------+------+
| skill_id | name                           | type |
+----------+--------------------------------+------+
|      637 | Fury of Magic                  |    5 |
|      640 | Fury of Magic Mastery          |    5 |
|      924 | Advanced Fury of Magic Mastery |    6 |
|     1107 | Fury of Magic                  |    7 |
+----------+--------------------------------+------+
4 rows in set (0.00 sec)
So, until it's updated in the db **looks in cavedude's general direction**, we really don't need it, but I put it there assuming it would be added eventually, and then we wouldn't have to add it into the code
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #4  
Old 10-25-2008, 06:44 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

seveianrex, don't forget to update the changelog.txt file when you commit changes. You have to edit it manually every time. It helps keep track of what has been changed

Also, if you post any updates that require SQL changes, make sure you create a .sql file and put it in the /utils/sql/svn directory in the same format as the current ones. For all of the AAs you added, I don't see them in the altadv_vars table yet, so they won't be available in game until they are added there. Unfortunately, I think there is a major issue with adding AAs to that table that causes the prereq_skill fields to get messed up. I didn't understand what was going on at first when I added some AAs, but apparently, the prereq_skill number is actually the line number in the table in order. So, if you add one to the table, it throws off all prereqs that are higher than the one at the line you added. This seems like a really horrible way for this table to work. I am going to see if there is a better way to do it. Maybe we can get it changed so that making a change there doesn't mess everything else up. It would certainly make adding non-existing AAs MUCH easier.

So, basically, you probably don't want to update that table yet until the code for prereqs is adjusted/fixed. Unless you know of a good way to have it increment all prereqs higher than that line. Like, if the AA you add is on line number 100, anything over 99 in the prereq field would need to be incremented by 1. I am trying to figure that out to correct an issue with the AAs I added. Until then, it might be best to just have those lines for the new AAs I added removed from the table. Hopefully I can find a good answer soon! Still trying to figure out what to do about it until then...
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 10-25-2008 at 02:55 PM..
Reply With Quote
  #5  
Old 10-25-2008, 11:52 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

I already warned him about the changelog.

As for the DB data, he already submitted that data which is now in the PEQ database. Normally, I don't like cramming PEQ down people's throats as I think we should have a choice (that's how I got this job, really) But in this case, due to the nature of the AA tables I think it would be best if the AA changes all get merged into PEQ and released as full table dumps.

If you guys want, after I get more AAs in today I can dump the AA tables and add them to the SVN under utils/sql. I'll keep that updated.
Reply With Quote
  #6  
Old 10-25-2008, 04:27 PM
seveianrex
Sarnak
 
Join Date: Sep 2008
Location: asdf
Posts: 60
Default

Quote:
Originally Posted by cavedude View Post
I already warned him about the changelog.

As for the DB data, he already submitted that data which is now in the PEQ database. Normally, I don't like cramming PEQ down people's throats as I think we should have a choice (that's how I got this job, really) But in this case, due to the nature of the AA tables I think it would be best if the AA changes all get merged into PEQ and released as full table dumps.

If you guys want, after I get more AAs in today I can dump the AA tables and add them to the SVN under utils/sql. I'll keep that updated.

Sorry for the confusion guys.

In the meantime before Cavedude gets the dump posted, anybody seeking the SQL for all these GoD AA's which I've posted, you can find them HERE:

http://www.projecteq.net/phpBB2/viewtopic.php?t=5856
http://www.projecteq.net/phpBB2/viewtopic.php?t=5870
http://www.projecteq.net/phpBB2/viewtopic.php?t=5876
http://www.projecteq.net/phpBB2/viewtopic.php?t=5879
http://www.projecteq.net/phpBB2/viewtopic.php?t=5878


Also, I got the changelog thing figured out. DIdn't realize we were supposed to edit the text file. I got it now
Reply With Quote
  #7  
Old 10-25-2008, 04:32 PM
seveianrex
Sarnak
 
Join Date: Sep 2008
Location: asdf
Posts: 60
Default

Quote:
Originally Posted by trevius View Post
seveianrex, don't forget to update the changelog.txt file when you commit changes. You have to edit it manually every time. It helps keep track of what has been changed

Also, if you post any updates that require SQL changes, make sure you create a .sql file and put it in the /utils/sql/svn directory in the same format as the current ones. For all of the AAs you added, I don't see them in the altadv_vars table yet, so they won't be available in game until they are added there. Unfortunately, I think there is a major issue with adding AAs to that table that causes the prereq_skill fields to get messed up. I didn't understand what was going on at first when I added some AAs, but apparently, the prereq_skill number is actually the line number in the table in order. So, if you add one to the table, it throws off all prereqs that are higher than the one at the line you added. This seems like a really horrible way for this table to work. I am going to see if there is a better way to do it. Maybe we can get it changed so that making a change there doesn't mess everything else up. It would certainly make adding non-existing AAs MUCH easier.

So, basically, you probably don't want to update that table yet until the code for prereqs is adjusted/fixed. Unless you know of a good way to have it increment all prereqs higher than that line. Like, if the AA you add is on line number 100, anything over 99 in the prereq field would need to be incremented by 1. I am trying to figure that out to correct an issue with the AAs I added. Until then, it might be best to just have those lines for the new AAs I added removed from the table. Hopefully I can find a good answer soon! Still trying to figure out what to do about it until then...
Trev, the pre-req thing is a definite issue. I honestly cannot even imagine what was going through somebody's mind when they thought that using the INDEX instead of the ID of the AA would be a good idea for the prerequisite skill......... but I wasn't there.

However. I have not had any issues with pre-requisite skill indexes changing since posting the updated GoD aa's to PEQ's DB. I have a feeling the reason is because it doesn't ORDER BY the skill ID. Meaning, the newest records get appended to the END of the list even if the skillid is in between existing ones. Therefore, the index doesn't change. Atleast it hasn't on my end.
Reply With Quote
  #8  
Old 10-25-2008, 06:28 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

That's the problem with using MySQL line numbers to identify data instead of IDs, they will change. If you insert new lines on the fly, it will just tack them on the end. But, the next time the server lists the data, it will in this case order by skill_id. A simple test:

Clear the index:

Code:
SET @line = 0;
Then, output the line numbers in reference to skill_id:

Code:
SELECT @line := @line + 1, skill_id FROM altadv_vars;
Maybe need to put a limit on, I did. Insert new AAs. Run the above query again, they *should* be tacked on the end. Clear the index with the first query, and then run the second query again. You'll notice, they will all be ordered by the skill_id again.
Reply With Quote
  #9  
Old 10-25-2008, 06:53 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

No, that is most likely because GoD is later, so the skill_id will be higher. And, in my table, nothing has a prereq over index number 230ish. Anything near the bottom won't be an issue for now. It definitely orders by skill_id. I did some testing last night and was 100% accurate with it.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #10  
Old 10-25-2008, 07:08 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

We inserted AAs with spell_ids in the 800s and they are causing problems.

Yes, they count by spell_id eventually, but as I said above it will not take place immediately. Newly inserted queries will be tacked onto the end until whatever you are using reorders the data. Run those queries, and you'll see what I mean.

Not sure why this post was necessary, I was agreeing with you guys and I felt my post was pretty clear :P

Last edited by cavedude; 10-26-2008 at 03:10 AM..
Reply With Quote
  #11  
Old 10-25-2008, 11:29 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Sorry lol. I had mine written before you posted yours, but I didn't hit the submit button for a while because I had to AFK. If I had seen yours before, I wouldn't have posted. Mine was meant to reply to seveianrex's last post :P
__________________
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 01:53 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