General support forum. If you require assistance and your problem doesnt fall in any of the other categories, this is the forum for you!
Moderator: Team Members
Forum rules
READ THE FORUM STICKY THREADS BEFORE ASKING FOR HELP!
Most information can be found there, and if not, the posts will help you determine the information required to get assistance from the development team.
Incomplete Help Requests will be locked or deleted.
-
Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Post
by Gangrenous » Wed Dec 27, 2017 4:13 pm
What classifies as dual wield? IsDualWield seems to always return false even when something like a Guardian wields two weapons. GetWieldType seems to always return a 2, with one weapon, two weapons or hell even bare fist. If I equip and two handed sword it does return a 4, which is correct. It never equals a 1, which it should for dual wield.
Code: Select all
bool Entity::IsDualWield(){
return melee_combat_data.wield_type == 1;
}
int8 Entity::GetWieldType(){
return melee_combat_data.wield_type;
}
Resident Dirty Hippy
-
Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Post
by Gangrenous » Wed Dec 27, 2017 4:25 pm
Ahhh, never mind. I never play tank classes, EQ2 is different and has special weapons that are dual wield.
Resident Dirty Hippy
-
Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Post
by Gangrenous » Wed Dec 27, 2017 5:04 pm
Also, is this correct? GetPrimaryLastAttackTime?
Code: Select all
bool Entity::SecondaryWeaponReady() {
//Can only be ready if no ranged timer
if(IsDualWield() && (GetPrimaryLastAttackTime() == 0 || (Timer::GetCurrentTime2() >= (GetSecondaryLastAttackTime() + GetSecondaryAttackDelay())))) {
if(GetRangeLastAttackTime() == 0 || Timer::GetCurrentTime2() >= (GetRangeLastAttackTime() + GetRangeAttackDelay()))
return true;
}
return false;
}
Resident Dirty Hippy
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Post
by Jabantiz » Wed Dec 27, 2017 5:08 pm
Yes, the way eq2 dual wield worked is the secondary can only swing with the primary so it would have to wait until the primary is ready as well.
-
tyrbo
- Team Member
- Posts: 271
- Joined: Thu Feb 18, 2016 12:33 pm
Post
by tyrbo » Wed Dec 27, 2017 5:12 pm
The code also currently requires that the item itself has a Dual Wield type.
That's not the case on live anymore, where you can dual wield any 1H type.
I made the change on my server some time back just to not have to worry about differentiating 1H vs DW weapons.
Not sure the "Dual Wield" weapon type is even used on live anymore.
-
Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Post
by Gangrenous » Wed Dec 27, 2017 6:16 pm
Yeah, I completely changed all of those code blocks and timers just now. I want each independent.
Resident Dirty Hippy
-
Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Post
by Gangrenous » Wed Dec 27, 2017 6:31 pm
You know, I really do not like the way they did that. I am definitely not going to have items labeled "dual wield". You should just be able to pop another one handed sword in and run with it, that off hand should be recognized. Now to find out how to find the slot and change that function.
Resident Dirty Hippy
-
tyrbo
- Team Member
- Posts: 271
- Joined: Thu Feb 18, 2016 12:33 pm
Post
by tyrbo » Wed Dec 27, 2017 6:49 pm
The IsDualWield() check is the function you'll probably want to look at.
Mine looks like this at the moment:
Code: Select all
bool Entity::IsDualWield() {
if (has_secondary_weapon && (melee_combat_data.wield_type == 1 || melee_combat_data.wield_type == 2))
return true;
return false;
}
-
Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Post
by Gangrenous » Wed Dec 27, 2017 8:07 pm
Yeah, I like that better. Thanks dude! I have some decent code in there and it appears to be working well. I added some skills like double attack and changed dual wield. I still do not like the timers though, something is quite off. The mob should get an attack, then the player. Maybe it is how the timers are run but I see too many rounds where the mob hits twice and then I hit twice, both are using primary so it should not happen.
I have not checked the mob code for combat, it could be that they are getting a double attack, which I do not want until they hit a much higher level.
Resident Dirty Hippy
-
tyrbo
- Team Member
- Posts: 271
- Joined: Thu Feb 18, 2016 12:33 pm
Post
by tyrbo » Wed Dec 27, 2017 9:17 pm
Only reason they should have double attack is if there's a stat being given to them from an item or something.
-
Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Post
by Gangrenous » Wed Dec 27, 2017 9:27 pm
I would not so much say double attack, more like dual wield. I do not want them having 100% dual wield, and now they do not, it is now based on level.
Resident Dirty Hippy
-
Ememjr
- Team Member
- Posts: 975
- Joined: Wed Mar 15, 2017 9:41 am
- EQ2Emu Server: Perseverance
Post
by Ememjr » Thu Dec 28, 2017 8:12 am
i have never looked at combat yet, but based on what was said abov, is it really turn based
ie mob hits
you hit
mob hits
mob hits again(double attack)
-
Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Post
by Gangrenous » Thu Dec 28, 2017 11:03 am
Something just seems way off still but I am still troubleshooting. I am doing a log output right after AttackAllowed for player and npc and getting way more iterations for player than npc, over 10 times as many. Both player and NPC are showing the same delay on this test for primary but player is getting way more iterations. It may even out once the WeaponReady is checked, but why so many more iterations for players?
Resident Dirty Hippy
-
Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Post
by Gangrenous » Thu Dec 28, 2017 11:26 am
I am guessing this is why though. I have altered the entire zone process heavily, but I think even official source will operate the same way. The players are processed more often because their checks are not stored like an NPC's are.
Code: Select all
if (GetHP() > 0 && Timer::GetCurrentTime2() >= (m_brain->LastTick() + m_brain->Tick())) {
Since each NPC can only be processed so often, because the brain tick is stored and can only be processed every so often.
Resident Dirty Hippy
-
tyrbo
- Team Member
- Posts: 271
- Joined: Thu Feb 18, 2016 12:33 pm
Post
by tyrbo » Thu Dec 28, 2017 1:42 pm
I haven't noticed any issues like the ones you're describing and we've been doing combat testing (with ACT running) for a long time now.
I have fixed a lot lot lot of bugs though, so it's possible you're running into an issue that I've already dealt with.
Who is online
Users browsing this forum: No registered users and 0 guests