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

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-29-2004, 01:48 AM
Armanthuz
Sarnak
 
Join Date: Apr 2003
Posts: 72
Default Trying to get a grasp what developers want

Hi,

I have been playing with attack.cpp code for awhile and put up a few chunks here and there. My question is How do the developers of eqemu want emucombat to be? Are they happy with it atm? Will only exact formulas depicting eqlive behavior be accepted for changes or are you willing to accept things that can get us closer than where its at?

I personally feel combat is a HUGEEE part of the eq experience, and although it is a very hard part to code i think from lookin at available code that we can get a large amount closer to real combat than where we are now...

The question is... is that what you want??
Reply With Quote
  #2  
Old 01-29-2004, 03:28 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

My PERSONAL opinion is that combat should be completely configurable from the database with eqLIve as a basis for the default system.

Ultimately I'd like to see it fully tweakable outside of the code by whoever runs the server.

Thats my opinion though
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #3  
Old 01-29-2004, 04:12 AM
kathgar
Discordant
 
Join Date: May 2002
Posts: 434
Default

What ever it is, it has to be fast, commented well, and easy to understand. Our's is horrible because 50+ people have been hacking at it for 2+ years
__________________
++[>++++++<-]>[<++++++>-]<.>++++[>+++++<-]>[<
+++++>-]<+.+++++++..+++.>>+++++[<++++++>-]<+
+.<<+++++++++++++++.>.+++.------.--------.>+.
Reply With Quote
  #4  
Old 01-30-2004, 06:24 AM
Armanthuz
Sarnak
 
Join Date: Apr 2003
Posts: 72
Default

Wow now thats thinkin big :P , good idea thou.. Unfortunately no where near my skill level, ill just keep ploddin along..
Reply With Quote
  #5  
Old 02-02-2004, 12:17 PM
smogo
Discordant
 
Join Date: Jan 2004
Location: 47
Posts: 339
Default

Quote:
Ultimately I'd like to see it fully tweakable outside of the code by whoever runs the server.
and
Quote:
What ever it is, it has to be fast, commented well, and easy to understand. Our's is horrible because 50+ people have been hacking at it for 2+ years
maybe first step is to turn all these inlined constants to #define's, huh ? 'Big thing is to find the names.
Reply With Quote
  #6  
Old 02-02-2004, 02:00 PM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

???
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #7  
Old 02-02-2004, 03:47 PM
smogo
Discordant
 
Join Date: Jan 2004
Location: 47
Posts: 339
Default

Sry if the post was enigmatic.

Lots of the 'rules' are inlined in the code, as integer constants, like :

Code:
// with this formula if you have an attacker with 185 offense skill
        // and a defender with 180 defense, the net effect is
        // 24.05 - 16.2 == 7.85% added
        // an example with the defender having a defense of 85, and the attacker
        // having an offense of 60
        // 7.8 - 7.65 = 0.15% added
        // so basically defense is for cancelling out the attacker's offense,
        // but offense is more effective than defense
        chancetohit += (float)((float)attacker->GetSkill(OFFENSE) * 0.13f);
        chancetohit -= (float)((float)defender->GetSkill(DEFENSE) * 0.09f);

        int16 defender_agi = defender->GetAGI();
        // skill points over 200 are 1/5 as effective
        // at max stat of 252 this is a 10.52% bonus
        defender_agi = (defender_agi <= 200) ? defender_agi : defender_agi + ((d
efender_agi-200)/5);
        chancetohit -= (float)((float)defender_agi * 0.05f);

        // etc ...

could turn into :

in a foo.h :
Code:
#define TOHIT_AttackerSkillFactor  0.13f
#define TOHIT_DefenderSkillFactor  0.09f
// with this formula if you have an attacker with 185 offense skill
        // and a defender with 180 defense, the net effect is
        // 24.05 - 16.2 == 7.85% added
        // an example with the defender having a defense of 85, and the attacker
        // having an offense of 60
        // 7.8 - 7.65 = 0.15% added
        // so basically defense is for cancelling out the attacker's offense,
        // but offense is more effective than defense
#define TOHIT_Base(attacker,defender) ((float)((float)attacker->GetSkill(OFFENSE)* \
					  TOHIT_AttackerSkillFactor  - \
					(float)((float)defender->GetSkill(DEFENSE) \
					 * TOHIT_DefenderSkillFactor  )

// skill points over 200 are 1/5 as effective
// at max stat of 252 this is a 10.52% bonus
#define TOHIT_DefenderAgiCap 200
#define TOHIT_DefenderAgiCappedRaise 0.2f
#define TOHIT_DefenderAgiCapped(defagi)   (defagi < TOHIT_DefenderAgiCap \
						? defagi \
                                                : (defagi - TOHIT_DefenderAgiCap) * TOHIT_DefAgiCappedRaise ))

#define TOHIT_DefenderAgiModifierFactor 0.05f
#define TOHIT_DefenderAgiModifier(defender) \
	 (float)(TOHIT_DefenderAgiCapped(defender->GetAGI())*TOHIT_DefenderAgiModifierFactor))
then attack.cpp
Code:
	// ...
        
        // base attack vs defense skills
	chancetohit =TOHIT_Base(attacker,defender)

        // apply defender's agility
        chancetohit -= TOHIT_DefenderAgiModifier(defender);
obviously the names are not good, as TOHit_Base doesn't explain a thing, and TOHIT_DefenderAgiModifierFactor is way too long. And the change is not complete.

But this could be the first step to :
- group 'rules' in a single source file, leaving only the logic in attack.cpp , and make it more readable.
- easily change a rule through edit of the foo.h
- move 'rules' to database driven, like :
Code:
// in foo.h
extern float gamesvars[];

#define TOHIT_DefenderAgiCap \
               gamesvars[VAR_TOHIT_DefenderAgiCap]
I guess it did not tell you anything new. It's just that i had been surprised to see all these numbers in engine code. It would be very fine if game could be tuned from the DB.
Reply With Quote
  #8  
Old 02-02-2004, 10:48 PM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

I got ya now.

That would be a good first step, I agree.. It would definitely make migration to a database block easy. Breaking it out into those sections would also make it alot more easily tweakable by someone doing their own compiling, so they wouldnt have to go wandering through the code..
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
Reply

Thread Tools
Display Modes

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 04:15 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3