Sitting Behavior questions

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Sitting Behavior questions

Postby Emor D'ni Lap » Mon Aug 29, 2022 11:57 am

This is kinda-somewhat related to scripting issues, so I'm posting here...

A couple questions about the animations hardwired into the Avatar Sitting Behavior:

- The sitting idle animation in both CC/TPotS AND MO:ULa is [Male/Female]SitIdle. But the Male version in CC is a relatively polite cross-armed idle compared to the jittery-leg, neck-scratching, thigh-rubbing MaleSitIdle seen in MO:ULa. Of course, Destiny and MOULa won't accept the 'polite' CC animation as-is. But if I were to create a new Polite Male Sit Idle .prp, is there any way to get the hardwired Avatar Sitting Behavior component to call that animation? Probably not. Better, is there any way to create a SPECIAL Sitting Behavior that would do so?
If it were just a couple handfuls of seats, I could probably set up complicated, awkward MultiBehs of some sort - but I have a LOT of seats to wire up and simply using Sitting Behaviors would help a great deal.

- Essentially the same question, but regarding the Male/Female StandUpFront animation that's called when exiting the Sitting Behavior with the ApproachFront option: both Female and Male versions take a seemingly unnecessary large stride forward after standing, and I'd like to create a version of the animation that minimizes that forward motion. But getting the Sitting Behavior (or a Special Sitting Behavior) to call that new .prp?

I know squat about this, but I'm guessing that the Sitting Behavior is essentially a prepackaged MultiBeh in itself? Its key advantage over a custom MultiBeh is that the exit animation (StandUpFront, in this case) is triggered by a single middle-mouse-click or double-left-click...with which everyone is already familiar.

(note that this all applies to the Max/Plasma plug-in)
Emor D'ni Lap
 
Posts: 87
Joined: Sun Jan 30, 2011 12:12 pm

Re: Sitting Behavior questions

Postby Paradox » Sun Sep 04, 2022 12:18 pm

Essentially, yes. What the sitting mod is doing is programmatically constructing a set of behaviours almost identical to a multistage behaviour mod. The relevant code, for anyone who wants to follow along.

There's a bit more complexity in there than you might expect, with the different approach directions (and standing up directions), and also some code to figure out how far to seek before playing the sit down animation so that it lines up properly with the seat. It also sends some camera messages when activated to put the camera behind the avatar in 3rd person view.

It doesn't look like there's any way to customize the animations. You could build a multistage behaviour mod yourself (and do the animation pre-seeking and camera message stuff yourself too) and in theory it should work. The behaviour exit flags appear to be consistent between a multistage behaviour mod and a sitting mod.
Paradox
 
Posts: 1292
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: Sitting Behavior questions

Postby Emor D'ni Lap » Mon Sep 05, 2022 5:21 pm

Thank you, Paradox.

I'd searched GitHub for such a file - but obviously failed.
Because Max/Plasma has all the options for L/R/Forward sitting & standing, I knew those were coded somewhere!
And the camera behavior when sitting is also apparent.

I gather that this plSittingModifier.cpp is hardwired into the engine, therefore a substitute plSittingModifier2.cpp (merely swapping alternate lines containing SmallStep below, for instance) cannot be created/utilized? Is that correct?

Code: Select all
        if(frontClear && IIsClosestAnim("SitFront", sitGoal, closestDist, curPosition, avatar))
        {
            sitAnimName = "SitFront";
            standAnimName = "StandUpFrontSmallStep";
        }


As mentioned, I'm just trying to minimize the repetitive labor of putting custom MultiStage Behaviors on a lot of seats here! But that may be my only choice.... :^P
Emor D'ni Lap
 
Posts: 87
Joined: Sun Jan 30, 2011 12:12 pm

Re: Sitting Behavior questions

Postby Paradox » Mon Sep 05, 2022 9:07 pm

So, the easiest and most reliable way to get this working as it currently stands is going to be manually creating a Multistage Behaviour Mod.

If you're open to engine changes that may or may not ever get accepted by OpenUru into MOULa, we could add another flag to the Sitting Mod to conditionally read extra animation strings for more customization. I'd need to think a little bit about how that would work, because there are so many different potential animations.
Paradox
 
Posts: 1292
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: Sitting Behavior questions

Postby Emor D'ni Lap » Tue Sep 06, 2022 9:20 pm

Much as I appreciate you considering writing a customizable Sitting Behavior controller, you're absolutely right that it runs the risk of not being accepted into MO:ULa.
Therefore it seems like it'd be risky for me to do a ton of work that'd be reliant on such a modified Sitting Behavior.

Thanks anyway!
Emor D'ni Lap
 
Posts: 87
Joined: Sun Jan 30, 2011 12:12 pm


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest

cron