Style order in npctemplate?

Discussions on various DOL development features

Moderator: Support Team

Style order in npctemplate?

Postby tegstewart » Fri Mar 03, 2017 8:08 pm

G'day!

Does the order of styles in npctemplate have any impact on how mobs select which styles to use? For instance, is it more likely to use the first style in the list than the second? If not, could I enter the same style multiple times to increase the odds of it being used?

I'm doing some somewhat elaborate custom pets with high style usage rates, and I'm looking for an easy way to make some styles fire more frequent than others.

Thanks!
tegstewart
Developer
 
Posts: 102
Joined: Sun Dec 13, 2009 11:46 pm

Re: Style order in npctemplate?

Postby PlanarChaosRvrtwo » Sat Mar 04, 2017 1:49 am

What about create same style twice with diffrent ids?
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: Style order in npctemplate?

Postby Leodagan » Sat Mar 04, 2017 7:40 am

GameNPC Styles List is an "ArrayList", it should support duplicate Objects and I didn't find any code that try to reduce the List to only Unique Objects, so you could try to add some Style multiple time for increased odds ;)

The way GameNPC use styles is pretty easy, each time he attack he will roll a Random against Server Property "GAMENPC_CHANCES_TO_STYLE" with some more odds depending on the size of the Styles List (so a mob with a lot of Styles will use Styles more often), if the Random roll decide there will be a Style used this attack round it will trigger a second Random roll to pick up a Style in the List, if this style can be used (pre-requisite Style successfully executed, position match opening constraint etc...) then it is performed normally, if the Style can't be used right now you need to wait another attack round for Random Style triggering to kick in again...
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Style order in npctemplate?

Postby tegstewart » Sat Mar 04, 2017 5:12 pm

Ah, OK. I was hoping style selection was a little more advanced and checked for chains, responses, and positionals before picking an anytime style. Oh, well.

I have a pet with a taunt and a block response style. I thought the taunt was being intelligently selected, but it was actually just that when the pet was much more likely to miss when incorrectly doing the block response. When I put the block response in three times, the pet did a normal attack 75% of the time. So that definitely matches what you've described.

Thanks!
tegstewart
Developer
 
Posts: 102
Joined: Sun Dec 13, 2009 11:46 pm

Re: Style order in npctemplate?

Postby ontheDOL » Sat Mar 04, 2017 6:10 pm

check this out
http://www.dolserver.net/viewtopic.php? ... eleestyler

could be of some use
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: Style order in npctemplate?

Postby Leodagan » Sat Mar 04, 2017 9:09 pm

I had a more intelligent method in use once...

But it was deadly :P

All Styles were ordered in the list to have the ones that stun or snare with higher chance, if they needed a pre-requisite style they tried to execute them before trying the higher ranked ones (it was easy, the follow-up style are mostly the deadly ranked one being executed next round), and after that positional/block/parry were checked before using anytime...

It was really not live-like and mobs with 2 or 3 different styles could be awesome opponents, so I reverted to Randoms because summons from pet classes use the same code and I wasn't ready to bring such a balance change in DOL Core :P
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Style order in npctemplate?

Postby tegstewart » Sun Mar 05, 2017 12:26 am

I think what I'll end up doing is making custom styles for pets anyway. In it's cosmetic form, my tank pet will have multiple copies of the same taunt, but with different animations so how the pet swings will vary.

If I want to do something like a melee dps pet, I'll do custom styles that mimic positional and chains without actually having the requirements. No biggie.


On a related note, it looks like order of spells does matter. If you have multiple spells from the same line, the pet will cast the first one on the list that it's high enough level to cast. Putting the smallest spell first means the pet will only cast the smallest spell. Which isn't a problem, just a thing to be aware of.
tegstewart
Developer
 
Posts: 102
Joined: Sun Dec 13, 2009 11:46 pm

Re: Style order in npctemplate?

Postby tegstewart » Sun Mar 05, 2017 1:22 am

Also on a related note, it looks like there's no stylexspell for savage styles that hit multiple targets. Does that use a custom handler in the code, or can I get the same effect from a style I create myself?

Thanks again!
tegstewart
Developer
 
Posts: 102
Joined: Sun Dec 13, 2009 11:46 pm

Re: Style order in npctemplate?

Postby PlanarChaosRvrtwo » Sun Mar 05, 2017 1:39 am

i hope our face to face talk solved most of issues
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: Style order in npctemplate?

Postby Leodagan » Sun Mar 05, 2017 7:32 am

The Savage Multi-Hit are only triggered on Styles ?

They can't Multi-Hit with regular attack ?

It's probably somewhere else in the code, in the huge "WeaponAttack" Logic in GameLiving I think... (most of close-combat rules are in these methods anyway...)
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Style order in npctemplate?

Postby tegstewart » Sun Mar 05, 2017 4:17 pm

Here's another oddity.

I wanted to make pets with only one style have varied attack animations, so I created multiple copies of the same style with the same ID but different classids that aren't valid combinations for players: ie scythe styles with ID 385 and claassids 1-5. Each one has a different TwoHandAnimation, but the pets always use the same animation anyway, and changing TwoHandAnimation doesn't appear to have any impact regardless of whether the pet uses a one or two handed weapon model.

It also looks like pet styles damage growth rate doesn't do anything, or at least the bonus damage isn't displayed in the combat log. I'm pretty sure bonus to hit had an impact since unstyled hits have much higher miss rates, and I have no idea about bonus to defense.
tegstewart
Developer
 
Posts: 102
Joined: Sun Dec 13, 2009 11:46 pm

Re: Style order in npctemplate?

Postby PlanarChaosRvrtwo » Sun Mar 05, 2017 8:30 pm

Why you dont do Clienteffect Id;Id2;id3?
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: Style order in npctemplate?

Postby tegstewart » Mon Mar 06, 2017 3:55 am

The Savage Multi-Hit are only triggered on Styles ?

They can't Multi-Hit with regular attack ?
Kinda both. They can multi hit a single target on regular attacks, but they have three styles that also hit other nearby targets. That's what I'm after, and it isn't handled by a styllxspell entry, so it must be hard-coded.
tegstewart
Developer
 
Posts: 102
Joined: Sun Dec 13, 2009 11:46 pm

Re: Style order in npctemplate?

Postby tegstewart » Mon Mar 06, 2017 4:30 am

I've done some more testing.

Since having 148|1;148|2;148|3;148|4;148|5 with different twohandanimations didn't work, I thought maybe the client is using the style id to generate the animation. So I tried 148|1;149|1;150|1;151|1;152|1. I had to put in stylexspell entries for them, but whatever. I also named them Draw Out 1, Draw Out 2, etc so I could see which was used in the combat log.

I still got the same attack animation each time, but Draw Out 5 is applying a bleed. That's 152, which is Aurora. Stylexspell has classid as 0 for Aurora, so I'm getting a bleed for Draw Out 5, either as a additional effect or as a substitute for the taunt effect. Very interesting.

I ended up creating duplicates of the taunt styles from axe, sword, and hammer using the same same style ids. I modified them to have the stats I wanted, and that did the trick. Three different named styles, three different animations, all behaving identically otherwise. I didn't need any stylexspell entries since all three used classid 0 so it's already covered.
tegstewart
Developer
 
Posts: 102
Joined: Sun Dec 13, 2009 11:46 pm

Re: Style order in npctemplate?

Postby tegstewart » Mon Mar 06, 2017 4:31 pm

One last real oddity.

If I make a custom style based off windmill, and assign the windmill spell to it in stylexspell, it works fine. If I make a custom spell based off the windmill spell, and assign it to the custom style, it doesn't work, even if only difference is spellid.

Interesting.

Also, when a player casts a group spell, it effects the player. When a pet casts a group spell, it doesn't. The easy fix is to make custom versions of the spell with high radius and target set to realm.

These aren't problems at this point. I'm finding workarounds, but I'm putting them here that if somebody else is having problems with custom pets or npcs they will hopefully find this and benefit from it.
tegstewart
Developer
 
Posts: 102
Joined: Sun Dec 13, 2009 11:46 pm


Return to “%s” DOL Development Discussion

Who is online

Users browsing this forum: No registered users and 1 guest