Animationsub and Sea (& a few others)

Any discussion not related to the other forum topics
Post Reply
PrBlahBlahtson
Developer
Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Animationsub and Sea (& a few others)

Post by PrBlahBlahtson » Tue Feb 12, 2013 4:22 pm

Started wandering around in Sea, messing with animationsub while chatting with kjLotus. Wanted to dump the data somewhere, for whoever tries to tackle setting up an animationsub/mode system. The mobs seem to animate properly when switching between modes, and change their movements appropriately.

Current system will need revisions. Mobs can't be kept out of animationsub 2 with the way things are now. Note that TP moves may change with mode, and I haven't included that information yet. We also may be spawning the mobs in the wrong animationsub; for example, Yovra and Phuabo are invisible until they move. If we spawn them in 2 and immediately move to 3 onIdle (and then 1 onRoam?), this behavior might be fixed. I think this might even be retail spawning behavior.

For those wanting to play around, you can make a GM command that looks for GetMobByID(variable):AnimationSub(variable) to change modes. It looks like using AnimationSub() without a parameter will return the current animationsub for the mob. Seems to only be 2 bits (0, 1, 2, or 3) with higher values just looping around.

Hpemde: swims below surface of water, "aggros" people that pass by and follows them, but does not attack until hostile action is taken against them. SMN's nightmare, because avatars will engage them. When aggressive, toggles between open and closed periodically. Takes double damage from everything when open, and will close up if hit hard enough (DRG + crit hit = hard enough, sometimes non-crits)
0 = not sure. Stays under water. Shouldn't remain in this state, since they bob up and down when engaged by a player. Might be an idle state.
1 = dives below the surface.
2 = comes up to the surface and fights
3 = open face

Phuabo: swims below surface. Wrecks your stuff at flee speed.
0 = Invisible phuabo! Do not use.
1 = Instant teleport underwater. Might be a place to idle the mob.
2 = Surfaces and fights
3 = Dives back underwater.

Yovra: Flies up in the sky. REALLY wrecks your stuff. Should be NMs, always.
0 = Invisible Yovra! Do not use.
1 = Instant teleport to sky. Probably idles here.
2 = Descends from the sky to engage.
3 = Returns to the sky.

Zdei: Usually stands somewhere stationary, rotating and waiting for players to come into sight range so it can attack. Acts strange if you try to switch between 2 and 3, so probably needs to path through mode 1 when changing. I may have 0 and 1 backwards.
0 = idle
1 = nothing out/backwards
2 = bar mode
3 = ring mode

Euvhi: Floats in tiny closed mode when initially spawned (usually.) Aggros to truesound when open, links with other Euvhi when closed. Periodically changes when fighting, but does not change forms when idle.
0 = Closed, floating mode
1 = Closed, tail out (engaged?)
2 = Open
3 = Nothing? Doesn't seem to change their mode. Might be that they spawn in 0 and idle in 3.

Ghrah: Nightmare for the current state of dsp. Spawns in various elements, which are probably handled as different models. Might be able to fix using the mob_change_skin system. Aggros to truesound in all forms except ball.
0 = Ball, BLM.
1 = Humanoid, PLD. Usually only used by NMs.
2 = Spider, WAR. Inc scary Sickle Slash.
3 = Bird, THF.

Aern: All Aerns are currently MNKs, and their different "jobs" are handled as models. More than likely, animationsub will have them draw their weapon, and probably handles bracelets as well. Did not test.

BONUS!
Dynamis Statues: Glow seems to stay even if you change modes. Fixing these atm would require breaking them into separate pools (and therefore groups,) and the current "if animationsub == 1 or 3, change to 2 when engaged" would break the eye glows.
0 = Nothing
1 = Red Eyes
2 = Blue
3 = Green

Empties: There are five models for these. The first four have two elements each, while the fifth might be for NMs?
0 = No change. Idle?
1 = Element 1. Currently Ice, for wanderers.
2 = Element 2. Currently Wind, for wanderers.
3 = No change. Idle?

Mammets: Changes modes and TP moves while fighting.
0 = Hands
1 = Sword
2 = Polearm
3 = Staff

Omega (BCNM) seems to be invisible in 0, but otherwise the quest versions of Omega and Ultima seem to not transform. Must be the Proto-versions use a different model.

Lamia: animationsub 1 seems to break their weapon and make them attack using their hands instead of a single strike.

Qutrub: Something is very, very, very wrong here.

PrBlahBlahtson
Developer
Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Re: Animationsub and Sea (& a few others)

Post by PrBlahBlahtson » Fri Feb 15, 2013 4:29 pm

Aerns: Animationsub 3 surprised me. I'm not sure how we can swing that with dsp without some custom changes specifically for Aerns. But reraise isn't really something other mobs do anyway.
0 = ???
1 = De-bracelet, if they're out. Fade into view a la spawn if changing from 0 to 1.
2 = Bracelet mode
3 = Reraise

Pudding:
0 = Hunches down from 1 or 2
1 = Stands up straighter
2 = Spike mode

Wamoura Prince:
0 = Normal
1 = Curled up

Cluster:
0 = Three bombs
1 = Two bombs
2 = One bomb

Hydra: Animations can only pass 0 -> 1 -> 2 -> 1 -> 0. You cannot smoothly jump from 2 to 0, or 0 to 2.
0 = Three heads
1 = Lost right head
2 = Lost right+left head

Aspid: Can't have his head pulled in while idle, so the animation looks wrong unless you engage him. Adamantoise uses a different model, and does not change.
0 = Normal
1 = Pull head in (and keep it in)
2 = Head comes back out.

Eruca:
0 = Normal
1 = Sleeping

Shadow Lord: Seems able to transition smoothly to any mode.
0 = No glow
1 = Glowing left hand
2 = Glowing sword

Ezekyel
Developer
Posts: 62
Joined: Sat Jul 21, 2012 11:42 pm

Re: Animationsub and Sea (& a few others)

Post by Ezekyel » Fri Mar 01, 2013 3:45 pm

i try to add roaming and fight animation atm

add in DB (mob_pool i think): roaming_anim and fight_anim

-- Roaming --------------

0: normal
1: scripted (with onMobRoaming() ?)
2: back under the ground anim, movement, comes out from under the ground anim, wait 2min... (like worm)
3:
..
.

-- Fight --------------

0: normal
1: scripted (with onMobEngage(), onMobFight(), ..)
2: animsub(2)(engaged), animsub(3)(disengage), animsub(1)(death) (like phuabo or yovra)
3: ..
..
.

but i need a full list of animation for roaming and fight
New Gilgamesh Server --> http://gilgamesh.servegame.com

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Animationsub and Sea (& a few others)

Post by kjLotus » Fri Mar 01, 2013 3:59 pm

Ezekyel wrote:1: scripted (with onMobRoaming() ?)
maybe onRoamStart / onRoamStop, called when he is to roam and when he reaches his "roam destination" (from moveTo)

if that can be done, worm can probably just be done with script

(unless launching the lua costs too much resources, i don't know)

Ezekyel
Developer
Posts: 62
Joined: Sat Jul 21, 2012 11:42 pm

Re: Animationsub and Sea (& a few others)

Post by Ezekyel » Fri Mar 01, 2013 4:40 pm

For scripted roaming we can create new function (used in onMobInitialize() for saving ressource, it's better i think)
we can use that for npc too.

mob:addRoamingPoint(pointid,x,y,z,wait); for displacement, if mob reach the position wait x sec or launch next pointid
mob:addRoamingAnimation(id,anim,special,wait); for animation, special is for behavior changement or another action
New Gilgamesh Server --> http://gilgamesh.servegame.com

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Animationsub and Sea (& a few others)

Post by kjLotus » Fri Mar 01, 2013 5:18 pm

Ezekyel wrote:For scripted roaming we can create new function (used in onMobInitialize() for saving ressource, it's better i think)
we can use that for npc too.

mob:addRoamingPoint(pointid,x,y,z,wait); for displacement, if mob reach the position wait x sec or launch next pointid
mob:addRoamingAnimation(id,anim,special,wait); for animation, special is for behavior changement or another action
well, roaming itself probably doesn't need to be scripted

just extra things to do when the core starts a roam
Ezekyel wrote:mob:addRoamingAnimation(id,anim,special,wait); for animation, special is for behavior changement or another action
this could maybe work

but it all really depends on how many mobs use subanimations while idle and how they change. need more information on all the different kinds before we can make a real design choice, i think

someone have to get them all for us ^^

PrBlahBlahtson
Developer
Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Re: Animationsub and Sea (& a few others)

Post by PrBlahBlahtson » Fri Mar 01, 2013 8:03 pm

I think worms auto-burrow while moving, actually.

PrBlahBlahtson
Developer
Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Re: Animationsub and Sea (& a few others)

Post by PrBlahBlahtson » Sun Jun 02, 2013 12:48 am

These came up in conversation more than once recently and I got the go-ahead to script the Sea mobs as far as we could, but the result was still too crap to be committed. This was a Yovra, but Phuabo can use the same script. Hpemde need to use 1 to submerge instead of 3.

Code: Select all

-----------------------------------
-- onMobEngaged Action
-----------------------------------

function onMobEngaged(mob,target)
   mob:AnimationSub(2); -- Drop down
end;

-----------------------------------
-- onMobDisengage Action
-----------------------------------

function onMobDisengage(mob)
   mob:AnimationSub(3); -- Go back up
end;
Issues:
- Mobs were still invisible until they roamed, regardless of what I did with their starting animationsub.
- If a mob was engaged and moved into a different animation, then another player came near enough to see it, the mob was invisible to them.
- A mob that disengaged would never be visible while roaming, because it wasn't in the correct idle animationsub. However, jumping to the idle animationsub would not give the smooth "return to roaming" animation that should have been present.
- Above could be partially fixed using onMobRoam, but then you have a few dozen mobs in a zone that players can't access on trunk servers updating their animationsub roughly every 3 seconds. Just not acceptable.
- Hpemde didn't open their mouths, everything could be targeted when it shouldn't be, names were visible...

Finally decided it just wasn't good enough to be in the trunk, so I gave up on the task. Just putting this here to save people the trouble of trying the same thing.

Post Reply