Page 1 of 1

Equipping on action

Posted: Sun Apr 09, 2017 7:36 am
by Gangrenous
I am trying to set things like the Woodchoppers in Antonica or these random guys sparring. How do we get them to wield the weapon they have? They always stay by their sides.

Re: Equipping on action

Posted: Sun Apr 09, 2017 3:09 pm
by Jabantiz
I am not sure off hand but I believe it is one of the state values but not sure which one, visual and action usually controll the animations, so it might have been initial but messing with that can give all sorts of weird results. If the animations are set in visual_state you could try changing it the action_state and see if it changes.

Re: Equipping on action

Posted: Mon Apr 10, 2017 3:48 am
by Gangrenous
The states seem to control what they do, but not what the equip, if I am right. Do we have an zones at all where they have them equipped?

Re: Equipping on action

Posted: Mon Apr 10, 2017 3:05 pm
by Jabantiz
It is probably the initial_state that will force them to wield the weapon they have I am just not sure of the values for that field. We did have some that were wielding there weapons but that might have been in the old content. Some mendors will wield the tools but that might be part of the animation. I will probably have to dig up a log to check the initial state.

Re: Equipping on action

Posted: Mon Apr 10, 2017 4:26 pm
by Jabantiz
Ok ignore the above has nothing to do with initial_state, it is visual_state and action_state that will control this. After playing with initial with no results I remembered frost fang sea might have npc's with weapons out and they did so this is how it is done.

First meet Glanald, my test dummy
WeaponTest0.png
First thing is to set the visual_state to 11420 and that will force draw the weapon
WeaponTest1.png
As you can see it just puts the weapon in his hand, to get the animation you will now need to use the action_state, in this case as he has a sword I used 16 (1h_sword_idle)
WeaponTest2.png
Now he has the proper idle animation with the sword in hand, from here you would need to use scripts with timers to change the action_state to get him to swing the sword every now and then.

Re: Equipping on action

Posted: Mon Apr 10, 2017 4:38 pm
by Gangrenous
So that the rest can learn how did you figure this out?

Re: Equipping on action

Posted: Mon Apr 10, 2017 4:51 pm
by Jabantiz
Gangrenous wrote: Mon Apr 10, 2017 4:38 pm So that the rest can learn how did you figure this out?
Jabantiz wrote: Mon Apr 10, 2017 4:26 pm...I remembered frost fang sea might have npc's with weapons out and they did...
I just went to frostfang found the archers above the third quest hub that had the bows out and did a /spawn details on one of them then looked up the visual_state and action_state id's in the `visual_states` table.

Re: Equipping on action

Posted: Mon Apr 10, 2017 5:47 pm
by Gangrenous
But how was it figured out before this? We want to learn!

Re: Equipping on action

Posted: Mon Apr 10, 2017 6:19 pm
by Jabantiz
It was probably parsed correctly from a log at some point, maybe even the frostfang logs, and just copied from there for any one else that needed it.

Re: Equipping on action

Posted: Tue Apr 11, 2017 4:27 am
by Gangrenous
I am guessing it just did not pull from our current dump, it was set for zero. I also notice that many of our duplicate spawns, the first one will have stats like INT, STR, WIS and then the duplicate will have zero of those stats. Seems consistent too.

Re: Equipping on action

Posted: Tue Apr 11, 2017 3:10 pm
by Jabantiz
Live tends to like to change the spawn struct often so it is likely that the structs we used for the log version were not 100% causing it to miss some stuff. Even when we had a bunch of people it was difficult to keep up with the constant changes going into live.

Stats are odd, they should all have generic stats as we can't get that info from live, no clue why some are not getting them.

Re: Equipping on action

Posted: Sun May 14, 2017 6:52 pm
by tyrbo
Can this apply to players as well?

I've noticed when I have auto attack on, I see the animation for a swing, but there is no idle animation happening in between.
My character will try to sheath the weapon before the next swing animation (depending on weapon delay).

It's something that's been on my radar to fix - I assume it's a similar sort of situation?

Re: Equipping on action

Posted: Mon May 15, 2017 9:04 pm
by Jabantiz
Honestly I don't know. For the most part the server has very limited control over the spawn the client controls, most visual stuff we can change though so this might be one but I have never tried.

As far as combat goes some packets and flags on the char sheet seem to put the character into the combat stance, it could be that the flag for combat in the char sheet is off so they only play the attack animations (spell/combat art packet or auto attack packet) and don't enter the idle stance. This is one of those bugs that seems to come and go but I never considered it important so I never spent much time trying to track it down. It could be client related (char sheet is off) but I never paid enough attention to even note what client I was using at the time.