I'm trying to make it so that children can garden (at least do those things for which I can recycle existing animations like Generic_PickUp for harvesting); the way I got this to work, so far, is by
1. making a custom super_interaction that references the kid-friendly animation and is for children only;
2. telling each and every plant object about it (i.e. overriding them all with a version that has my super interaction(s) added to the _super_affordances list).
This strikes me as a little clunky and very collision-prone, because of all those overrides .. is there a more efficient way to do this? Is it possible to e.g. override just Gardening_Harvest with a version that makes it so that one (and only one) age group will use a different animation? How would I go about that? The generic SuperInteraction tdesc talks at length about TunableAnimationOverrides but only along the lines of "complex and seldom used" things that don't seem to have anything to do with the age or other properties of the actor ..
Also, what is AffordanceList_Gardening? I'm not sure how those snippets relate to the rest of the world =/ (I only see that referenced once, in another snippet about .. painting?)
Enlightenment much appreciated!
@SimGuruModSquad maybe?
Edit: while I'm fiddling with plants, does anyone know which of the effects is responsible for the sparklies? If it turns out I have to override the plants anyway, I'd like to turn off those as well -- if I'm not mistaken they're referenced here.
Comments
velocitygrass pointed me at that resource (Gardening_Harvest_EE17C6AD_00000000_00000000000098C6), so I'm hopefully on the right (or less wrong) track now.
Edit: Hrm. Well maybe, but according to AnimationElement.tdesc I'm also back at square one with those "complex and seldom used" things which scream EXPERTS ONLY at me =P .. I guess the manifest stuff is mostly there to account for handedness and posture, not to run entirely different animations.
Also, wouldn't solve the issue of how to add new interactions to vanilla objects.
You can find that resource both in the SimulationFullBuild file and the ClientFullbuild0 file. Lift it out with Export to file and read it in an external program, an XML Editor or Notepad++ or whatever. If none of your programs will do it, Note Tab Lite will certainly do it, as it opens everything.
In there you will find the Posture Manifest or whatever it is you mention above, the "handedness" and all the other stuff.
The way I would probably go about attempting to place some animations on the child when they don't have any in vanilla game is to make a copy of this Jazz file, as opposed to typing in "Child" all over the place in the current file.
So I have the copy, which needs it's own Instance ID # to make it independent of the original, and presumably you can identify the new Jazz file in your modded XML by that asm_key, which lists your new file.
In the Jazz file itself, your new copy, all you need to do, I think, is replace all the actual Clip names themselves, for example clip=a2o_gardening_graft_low_x, with an appropriate c2o clip which is child-to-object, instead of a2o which is an adult-to-object Clip file. Simple.
There may be some other stuff which actually needs alteration in a new Jazz copy file which is intended for Child only, but this info can be gleaned and tested out by reading through one of the other Jazz files which are made for Child, like playing with the Monkey Bars would maybe be a good one to look at, as the Adults are locked out from the Monkey Bars IIRC?, so it's possible this Jazz file is written only for Child, and can be used for comparison purposes.
I'm currently trying to make heads and/or tails of what clown did in their EnableDebugCheats (since that is an example for new interactions on objects that comes with (commented!) source) and the decompiled source files ..
Thanks @Shimrod101 for pointing me in the direction of JAZZ files .. I wasn't even aware those are plain XML too! (Nobody ever tells me anything! XD)
And they have selectors, which is cool. And leads to new questions of course: is there a way to select multiple parameters at once? Or do I have to repeat everything for every-age-but-kids over and over again?
Anyhow, what I did now is override just the gardening interactions (to include kids), and the Gardening jazz (with an additional age selector that for now just C+Ps the SwipeToInventory thing), which already makes a lot more sense to me than overriding all the plants. Since I do not change anything else about the interactions (for now), this is kind of working (for now), jazz-internal clunkiness notwithstanding.
\o/
Still the interesting question remains: how to make existing objects aware of custom interactions?
Edit, more questions for @SimGuruModSquad (if they haven't torn their hair out yet =P):
- How unrecommended is it exactly to have children accumulate adult skills and vice versa? If I do end up overriding the interaction, I could just as well have it increase both adult gardening and child motor skill ..
- How come that the GenericSwipe jazz has no age differentiation at all (for all I can see) but still looks OK on all both ages?
Also, test package now uploaded here.
Skills have tuning for allowed ages. Attempting to award a child skill to an adult (or vice versa) might simply not do anything.
The animation system auto-replaces clip names with the appropriate age prefix. So a clip a_GenericSwipe would be replaced by c_GenericSwipe when animating for a child Sim.
Ah that's good to know, thanks!