Making mobs stronger at certain player level

09/07/2013 10:16 raventh1984#1
Hi elitepvpers,

I am working on something that makes the mobs with the rank RANK_BOSS and RANK_SUPER stronger if the player has reached certain level.

Now what i did first is alter ProjectCmn.cpp with these values
under pProperty->dwClass = scanner.GetNumber();
PHP Code:
pProperty->dwStr                pProperty->dwStr BOSS_STR 10;
                
pProperty->dwSta                pProperty->dwSta BOSS_STA 10;
                
pProperty->dwDex                pProperty->dwDex BOSS_DEX 10;
                
pProperty->dwInt                pProperty->dwInt BOSS_INT 10
now what i did next was this
PHP Code:
if(g_pPlayer->m_nLevel >= 150)
            {
                
pProperty->dwStr                pProperty->dwStr BOSS_STR 10;
                
pProperty->dwSta                pProperty->dwSta BOSS_STA 10;
                
pProperty->dwDex                pProperty->dwDex BOSS_DEX 10;
                
pProperty->dwInt                pProperty->dwInt BOSS_INT 10;
            }
            else
            {
                
pProperty->dwStr                pProperty->dwStr BOSS_STR;
                
pProperty->dwSta                pProperty->dwSta BOSS_STA;
                
pProperty->dwDex                pProperty->dwDex BOSS_DEX;
                
pProperty->dwInt                pProperty->dwInt BOSS_INT;
            } 
Well i think most of you already see it that this doesnt work
Cause of the g_pPlayer undeclared identifier. Now my question is how can i solve this.

With kind regards.
09/07/2013 10:45 Sedrika#2
That would be client side and not serverside. I think you should have a look into AttackArbiter and modify there some stats and not while scanning the resources.
09/07/2013 12:05 raventh1984#3
So if i understand you correctly this is only client sided so it doesnt make the mobs stronger? Its only visual correct?

I will take an look into AttackArbiter
09/07/2013 17:17 Sedrika#4
Exactly. The World is loading the file right after you start it. How do you want to ask the level of a user if no ones online ? The same problem client side.
09/07/2013 23:06 Avalion#5
Why not just do something in DamageMultiplyer in MoverParam? If it is possible. I haven't attempted it yet nor do I even have a source + computer to test.

Essentially, something like this?

if (g_pPlayer->m_nLevel >= 150 && WhateverBoss level is){
if (the rank is boss or super) { Damage Multiplyer cuts damage.}}
09/08/2013 05:18 Sedrika#6
Quote:
Originally Posted by Avalion View Post
Why not just do something in DamageMultiplyer in MoverParam? If it is possible. I haven't attempted it yet nor do I even have a source + computer to test.

Essentially, something like this?

if (g_pPlayer->m_nLevel >= 150 && WhateverBoss level is){
if (the rank is boss or super) { Damage Multiplyer cuts damage.}}
Everything with attacking any Mover have to be done in attackarbiter
09/09/2013 13:38 alfredico#7
First you cannot increase damage depending on players level editting the file load function. Anything regarding monsters is located in _AIInterface folder.

@Sedrika
That file contains everything with attacking any mover as you said, but it contains player damage, not monster. All that functions are used for player.
09/09/2013 13:59 Sedrika#8
Quote:
Originally Posted by alfredico View Post
First you cannot increase damage depending on players level editting the file load function. Anything regarding monsters is located in _AIInterface folder.

@Sedrika
That file contains everything with attacking any mover as you said, but it contains player damage, not monster. All that functions are used for player.
Not only players. You have to check if it's a user or not.
09/10/2013 08:35 Tex0#9
just have a look into propMover.txt. :-)
09/10/2013 09:20 Sedrika#10
Quote:
Originally Posted by Tex0 View Post
just have a look into propMover.txt. :-)
He want to change it from player to player.
09/10/2013 10:36 raventh1984#11
The reason i want it to have it from player to player is as follow

Since i am running an high rate server. Players will get bored eventually.
So what i had in mind is When an player has reached top level then all the bosses will be increased in STATS. For example STR/STA/INT/DEX * 25 HP increase of 200%
Min/Max Attack increase by 150% Thus making it harder for those players so they have actually something to do.

Now before you all say then way not an low rate server. I agree it was better to make an low rate server. But since i already made it an high rate i wanted something to make it an bit difficult.

About the AttackArbitter i still didnt found an thing about that if an player is attacking an mob. I only see an lot of pAttacker vs pDefender.

So ill guess i need to make something like this
if(pDefender == RANK_BOSS) then increase HP or something like this. Correct?
09/10/2013 10:54 Sedrika#12
Quote:
Originally Posted by raventh1984 View Post
The reason i want it to have it from player to player is as follow

Since i am running an high rate server. Players will get bored eventually.
So what i had in mind is When an player has reached top level then all the bosses will be increased in STATS. For example STR/STA/INT/DEX * 25 HP increase of 200%
Min/Max Attack increase by 150% Thus making it harder for those players so they have actually something to do.

Now before you all say then way not an low rate server. I agree it was better to make an low rate server. But since i already made it an high rate i wanted something to make it an bit difficult.

About the AttackArbitter i still didnt found an thing about that if an player is attacking an mob. I only see an lot of pAttacker vs pDefender.

So ill guess i need to make something like this
if(pDefender == RANK_BOSS) then increase HP or something like this. Correct?
I'll give you a snippet when I'm back home.
09/10/2013 12:28 Mognakor#13
It should be something along the lines of this


Code:
if(pAttacker->IsMonster()&&pDefender->IsPlayer())
{
  if(check for Rank of pAttacker and level of pDefender)
  {
  //Insert your edits here
  }
}

You also can make it linear so the increased damage isn't applied too suddenly.
09/10/2013 13:00 raventh1984#14
Hmm i have searched for these things
m_pDefender->IsNPC()
This will lead me to these snippets



Nothing that its calculating the dammage. towards NPC/MOB

I also searched for m_pAttacked->IsNPC()
This is only located in the snippet to calculate Asal.
09/10/2013 15:58 Mognakor#15
....

Just use the basic thing i posted and add it into the damage calculation.
It's all in the AttackArbiter.cpp you just gotta choose a function.