|
Post by k9db on Dec 4, 2017 11:06:49 GMT -5
Hi,
Is there a way to separate animations for an object? For example, to use one animation for adults, but set it to use a different one for kids and toddlers so they don't stretch?
Unfortunately I don't know how to work with script mods. Is there a way to do this without a script mod, just an XML maybe?
|
|
|
Post by k9db on Dec 5, 2017 20:51:11 GMT -5
Anyone have any ideas? Doesn't have to be XML if there's another way...other than a script that is...hopefully?
|
|
|
Post by andrew on Dec 6, 2017 8:40:13 GMT -5
This is done in the animation state machine xml. Here is an example of an animation state with different animations depending on the Sim's age:
<State name="Test" type="public" countlooptime="false" disableautostop="false" skippable="false" interrupt_this="true" focus="full body" facialoverlays="true" tailoverlays="true"> <MakeController> <PostureSelector parameter="x:posture" unique_id="39"> <Choice value="-stand-FullBody" track="normal" mask=""> <ParameterSelector parameter="x:age" unique_id="41"> <Choice value="baby" /> <Choice value="toddler" /> <Choice value="child"> <Controller target="x" controller="@ClipController(clip=c_jumpStand_backFlip_x, loop_count=#1)" overridePosture="false" mask="" track="normal" mirror_conditional="False" suppress_footsteps="False" transition_class_in="Default" transition_class_out="Default" focus="undefined" start_frame_offset="0" end_frame_offset="0" timescale="1" unique_id="34"> <TransitionClassList> <Transition transition_class_name="Default" transition_duration_in="0.2666667" use_custom_transition_in="true" transition_type_in="linear" transition_mask_in="" transition_duration_out="0.2666667" use_custom_transition_out="false" transition_type_out="linear" transition_mask_out="" /> </TransitionClassList> </Controller> </Choice> <Choice value="youngadult"> <Controller target="x" controller="@ClipController(clip=a_birthday_confettiPopper_x, loop_count=#1)" overridePosture="false" mask="" track="normal" mirror_conditional="False" suppress_footsteps="False" transition_class_in="Default" transition_class_out="Default" focus="undefined" start_frame_offset="0" end_frame_offset="0" timescale="1" unique_id="40"> <TransitionClassList> <Transition transition_class_name="Default" transition_duration_in="0.2666667" use_custom_transition_in="true" transition_type_in="linear" transition_mask_in="" transition_duration_out="0.2666667" use_custom_transition_out="false" transition_type_out="linear" transition_mask_out="" /> </TransitionClassList> </Controller> </Choice> <Choice value="teen"> <Reference target="40" /> </Choice> <Choice value="adult"> <Reference target="40" /> </Choice> <Choice value="elder"> <Reference target="40" /> </Choice> </ParameterSelector> </Choice> </PostureSelector> </MakeController> </State>
Adults, Young Adults, Teens and Elders will use the a_birthday_confettiPopper_x animation and children use the c_jumpStand_backFlip_x animation in this example. If you don't already have an animation state machine resource in your package, you may need to extract/rename/link some tunings to your object tuning.
|
|
|
Post by k9db on Dec 7, 2017 15:38:24 GMT -5
Thank you! Thank you so much Andrew! Great help! This was driving me insane! That's great news! I'm not entirely sure how this is done yet, but hopefully I can figure it out this weekend.
|
|
|
Post by k9db on Sept 16, 2019 11:41:30 GMT -5
Hi Andrew,
I never forgot your suggestion, I even saved it, but I never got around to trying it before, but now that I have a little time I was working on a mod last night and tried to figure it out, but wasn't successful. I looked for an animation state machine in an XML somewhere to see how it's used and what I might be doing wrong, but I haven't been able to find one? I'm not sure how/where to add this to my XML? Maybe you can point me in the right direction please?
|
|
|
Post by sigma1202 on Sept 16, 2019 11:48:03 GMT -5
Hi, you will need to use scumbumbo's XML extractor to extract Animation sate machines, also make sure jazz checkbox is checked, the animation state machines will be in a folder named "AsmJazz" after extracted
|
|
|
Post by k9db on Sept 16, 2019 13:32:14 GMT -5
Oooooh! I didn't even have the "Include JAZZ Resources" option in my version of the extractor, and I wouldn't have known to look in "AsmJazz". Thank you! Thank you! Will update and see if I can figure it out from there Thanks so much sigma1202!
|
|
|
Post by k9db on Sept 16, 2019 15:37:48 GMT -5
Hmmm...Ok, can't seem to find the example the Andrew gave, not sure what it attaches to? I'm trying to make a mod that allows kids to drink some of the potions that came with Realm of magic. I've gotten to the point where they can drink it, but they stretch using the adult animations. I put in an alternative animation that works for both (for good quality potions at least), but it means that the sparkle effects are then missing for both. Not the biggest deal really, but I've wanted to separate the animations a few times for mods, figured I might as well learn now.
Does anyone have any advice on an animation machine I could use? What it links to?
|
|
|
Post by sigma1202 on Sept 16, 2019 16:27:12 GMT -5
You can use this one, it's named "02d5df13!00000000!13968a029c318e8b.death_mournSad.AsmJazz" if you exported with the same settings as in my screenshot, its a little more complex though
<State name="Mourn_Stand" type="public" countlooptime="false" disableautostop="false" skippable="false" interrupt_this="true" focus="none" facialoverlays="false" tailoverlays="true"> <description /> <MakeController> <PostureSelector parameter="x:posture" unique_id="14"> <Choice value="-stand-FullBody" track="normal" mask=""> <RandomSelector repeatweight="0" allow_empty_choices="False" unique_id="12"> <Choice weight="100" avoidRepeat="False"> <Controller target="x" controller="@ClipController(clip=a_death_mournStand_sob_x, loop_count=#1)" overridePosture="false" mask="" track="normal" mirror_conditional="False" suppress_footsteps="False" transition_class_in="Default" transition_class_out="Default" ik_configuration="a_death_mournStand.ma" focus="undefined" start_frame_offset="0" end_frame_offset="0" timescale="1" unique_id="8"> <TransitionClassList> <Transition transition_class_name="Default" transition_duration_in="0.2666667" use_custom_transition_in="true" transition_type_in="linear" transition_mask_in="" transition_duration_out="0.2666667" use_custom_transition_out="false" transition_type_out="linear" transition_mask_out="" /> </TransitionClassList> </Controller> </Choice> <Choice weight="50" avoidRepeat="False"> <ParameterSelector parameter="x:age" unique_id="10"> <Choice value="baby" /> <Choice value="toddler" /> <Choice value="child"> <Controller target="x" controller="@ClipController(clip=a_death_mournStand_sniffle_x, loop_count=#1)" overridePosture="false" mask="" track="normal" mirror_conditional="False" suppress_footsteps="False" transition_class_in="Default" transition_class_out="Default" ik_configuration="a_death_mournStand.ma" focus="undefined" start_frame_offset="0" end_frame_offset="0" timescale="1" unique_id="9"> <TransitionClassList> <Transition transition_class_name="Default" transition_duration_in="0.2666667" use_custom_transition_in="true" transition_type_in="linear" transition_mask_in="" transition_duration_out="0.2666667" use_custom_transition_out="false" transition_type_out="linear" transition_mask_out="" /> </TransitionClassList> </Controller> </Choice> <Choice value="teen"> <Reference target="9" /> </Choice> <Choice value="youngadult"> <Reference target="9" /> </Choice> <Choice value="adult"> <Reference target="9" /> </Choice> <Choice value="elder"> <Reference target="9" /> </Choice> </ParameterSelector> </Choice> <Choice weight="50" avoidRepeat="True"> <Controller target="x" controller="@ClipController(clip=a_death_mournStand_sigh_x, loop_count=#1)" overridePosture="false" mask="" track="normal" mirror_conditional="False" suppress_footsteps="False" transition_class_in="Default" transition_class_out="Default" ik_configuration="a_death_mournStand.ma" focus="undefined" start_frame_offset="0" end_frame_offset="0" timescale="1" unique_id="11"> <TransitionClassList> <Transition transition_class_name="Default" transition_duration_in="0.2666667" use_custom_transition_in="true" transition_type_in="linear" transition_mask_in="" transition_duration_out="0.2666667" use_custom_transition_out="false" transition_type_out="linear" transition_mask_out="" /> </TransitionClassList> </Controller> </Choice> </RandomSelector> </Choice> <Choice value="swim--FullBody" track="normalplus" mask="Trackmask_UpperBody"> <RandomSelector repeatweight="1" allow_empty_choices="False" unique_id="13"> <Choice weight="100" avoidRepeat="False"> <Reference target="8" /> </Choice> <Choice weight="50" avoidRepeat="False"> <Reference target="11" /> </Choice> </RandomSelector> </Choice> </PostureSelector> </MakeController> </State>
|
|
|
Post by sigma1202 on Sept 16, 2019 16:52:40 GMT -5
although I am not really sure why not just go the chug potion asm, since all you have to do is make changes following what Andrew posted
|
|
|
Post by k9db on Sept 16, 2019 18:36:34 GMT -5
Thanks sigma1202! Yeah, that's just what I was thinking while looking at it now. I was just comparing the two to see what might go where and what I should be changing...it's like learning a new language...makes no sense till you know what it means, LOL! I'll see if I can figure it out.
|
|
|
Post by k9db on Sept 18, 2019 7:57:50 GMT -5
I can't seem to get this to work. There are no visual effects now (light effect or sparkles when they drink it). I've only changed the "standing" posture so far. The kids don't stretch anymore, but the adults don't do any animation at all. I've changed it a million times...my brain has turned to mush...maybe you can see what I've done wrong?
<?xml version="1.0" encoding="utf-8"?> <ASM name="Potion_Chug" dcc="sage"> <Actor name="x" type="Sim" master="true" virtual="false" /> <Actor name="sitTemplate" type="Object" virtual="true" /> <Actor name="potion" type="Object" virtual="false" /> <Parameter name="x:age" type="enum" labels="baby,toddler,child,teen,youngadult,adult,elder" default="adult" /> <Parameter name="x:sex" type="enum" labels="male,female" default="male" /> <Parameter name="x:carryState" type="enum" labels="none,left,right,both" default="right" /> <Parameter name="potion:carryTrack" type="enum" labels="left,right" default="right" /> <IkConfiguration name="a2o_potion_chug.ma"> <SourceFile name="a2o_potion_chug.ma"> <MapNamespace namespace="x" actor="x" /> <MapNamespace namespace="carryObject" actor="potion" /> </SourceFile> </IkConfiguration> <IkConfiguration name="a2o_potion_chug_seated.ma"> <SourceFile name="a2o_potion_chug_seated.ma"> <MapNamespace namespace="x" actor="x" /> <MapNamespace namespace="sitTemplate" actor="sitTemplate" /> <MapNamespace namespace="carryObject" actor="potion" /> </SourceFile> </IkConfiguration> <PostureManifest actors="" /> <PostureManifest actors="x"> <Support family="stand" compatibility="FullBody" carry_left="potion" carry_right="-" surface="*" /> <Support family="stand" compatibility="UpperBody" carry_left="-" carry_right="potion" surface="*" /> <Support family="stand" compatibility="UpperBody" carry_left="potion" carry_right="*" surface="*" /> <Support family="stand" compatibility="FullBody" carry_left="*" carry_right="potion" surface="*" /> <Support family="sit" compatibility="FullBody" carry_left="potion" carry_right="-" surface="*" /> <Support family="sit" compatibility="UpperBody" carry_left="-" carry_right="potion" surface="*" /> <Support family="sit" compatibility="UpperBody" carry_left="potion" carry_right="*" surface="*" /> <Support family="sit" compatibility="FullBody" carry_left="*" carry_right="potion" surface="*" /> </PostureManifest> <State type="public" skippable="false" interrupt_this="false" name="Fail" focus="none" facialoverlays="false" tailoverlays="true" /> <State type="public" skippable="false" interrupt_this="false" name="Succeed" focus="none" facialoverlays="false" tailoverlays="true" /> <State type="private" skippable="false" interrupt_this="false" name="mirror" focus="full body" facialoverlays="false" tailoverlays="true" /> <Connection from="Fail" to="exit" /> <Connection from="Succeed" to="exit" /> <Connection from="entry" to="mirror" /> <Connection from="mirror" to="Fail" /> <Connection from="mirror" to="Succeed" /> <State name="Fail" type="public" skippable="false" interrupt_this="false" focus="none" facialoverlays="false" tailoverlays="true"> <description /> <MakeController> <PostureSelector parameter="x:posture" unique_id="39"> <Choice value="-sit-FullBody" track="carryinteraction" mask=""> <Controller target="x" controller="@ClipController(clip=a2o_potions_chug_fail_seated_x, loop_count=#1)" overridePosture="false" mask="" track="carryinteraction" mirror_conditional="False" suppress_footsteps="False" transition_class_in="Default" transition_class_out="Default" ik_configuration="a2o_potion_chug_seated.ma" focus="undefined" start_frame_offset="0" end_frame_offset="0" timescale="1" unique_id="1"> <TransitionClassList /> </Controller> </Choice> <Choice value="-sit-UpperBody" track="carryinteraction" mask="Trackmask_UpperBody"> <Reference target="1" /> </Choice> <Choice value="-stand-FullBody" track="carryinteraction" mask=""> <ParameterSelector parameter="x:age" unique_id="41"> <Choice value="child"> <Controller target="x" controller="@ClipController(clip=a2o_serum_drink_x, loop_count=#1)" overridePosture="false" mask="" track="normal" mirror_conditional="False" suppress_footsteps="False" transition_class_in="Default" transition_class_out="Default" ik_configuration="a2o_potion_chug_seated.ma" focus="undefined" start_frame_offset="0" end_frame_offset="0" timescale="1" unique_id="4"> <TransitionClassList> <Transition transition_class_name="Default" transition_duration_in="0.2666667" use_custom_transition_in="true" transition_type_in="linear" transition_mask_in="" transition_duration_out="0.2666667" use_custom_transition_out="false" transition_type_out="linear" transition_mask_out="" /> </TransitionClassList> </Controller> </Choice> <Choice value="youngadult"> <Controller target="x" controller="@ClipController(clip=a2o_potions_chug_fail_x, loop_count=#1)" overridePosture="false" mask="" track="normal" mirror_conditional="False" suppress_footsteps="False" transition_class_in="Default" transition_class_out="Default" ik_configuration="a2o_potion_chug_seated.ma" focus="undefined" start_frame_offset="0" end_frame_offset="0" timescale="1" unique_id="4"> <TransitionClassList> <Transition transition_class_name="Default" transition_duration_in="0.2666667" use_custom_transition_in="true" transition_type_in="linear" transition_mask_in="" transition_duration_out="0.2666667" use_custom_transition_out="false" transition_type_out="linear" transition_mask_out="" /> </TransitionClassList> </Controller> </Choice> <Choice value="teen"> <Reference target="40" /> </Choice> <Choice value="adult"> <Reference target="40" /> </Choice> <Choice value="elder"> <Reference target="40" /> </Choice> </ParameterSelector> </Choice> <Choice value="-stand-UpperBody" track="carryinteraction" mask="Trackmask_UpperBody"> <Reference target="2" /> </Choice> </PostureSelector> </MakeController> </State> <State name="Succeed" type="public" skippable="false" interrupt_this="false" focus="none" facialoverlays="false" tailoverlays="true"> <description /> <MakeController> <PostureSelector parameter="x:posture" unique_id="38"> <Choice value="-sit-FullBody" track="carryinteraction" mask=""> <Controller target="x" controller="@ClipController(clip=a2o_potions_chug_succeed_seated_x, loop_count=#1)" overridePosture="false" mask="" track="normal" mirror_conditional="False" suppress_footsteps="False" transition_class_in="Default" transition_class_out="Default" ik_configuration="a2o_potion_chug_seated.ma" focus="undefined" start_frame_offset="0" end_frame_offset="0" timescale="1" unique_id="4"> <TransitionClassList /> </Controller> </Choice> <Choice value="-sit-UpperBody" track="carryinteraction" mask="Trackmask_UpperBody"> <Reference target="4" /> </Choice> <Choice value="-stand-FullBody" track="carryinteraction" mask=""> <ParameterSelector parameter="x:age" unique_id="41"> <Choice value="child"> <Controller target="x" controller="@ClipController(clip=a2o_serum_drink_x, loop_count=#1)" overridePosture="false" mask="" track="normal" mirror_conditional="False" suppress_footsteps="False" transition_class_in="Default" transition_class_out="Default" ik_configuration="a2o_potion_chug_seated.ma" focus="undefined" start_frame_offset="0" end_frame_offset="0" timescale="1" unique_id="4"> <TransitionClassList> <Transition transition_class_name="Default" transition_duration_in="0.2666667" use_custom_transition_in="true" transition_type_in="linear" transition_mask_in="" transition_duration_out="0.2666667" use_custom_transition_out="false" transition_type_out="linear" transition_mask_out="" /> </TransitionClassList> </Controller> </Choice> <Choice value="youngadult"> <Controller target="x" controller="@ClipController(clip=a2o_potions_chug_succeed_x, loop_count=#1)" overridePosture="false" mask="" track="normal" mirror_conditional="False" suppress_footsteps="False" transition_class_in="Default" transition_class_out="Default" ik_configuration="a2o_potion_chug_seated.ma" focus="undefined" start_frame_offset="0" end_frame_offset="0" timescale="1" unique_id="4"> <TransitionClassList> <Transition transition_class_name="Default" transition_duration_in="0.2666667" use_custom_transition_in="true" transition_type_in="linear" transition_mask_in="" transition_duration_out="0.2666667" use_custom_transition_out="false" transition_type_out="linear" transition_mask_out="" /> </TransitionClassList> </Controller> </Choice> <Choice value="teen"> <Reference target="40" /> </Choice> <Choice value="adult"> <Reference target="40" /> </Choice> <Choice value="elder"> <Reference target="40" /> </Choice> </ParameterSelector> </Choice> <Choice value="-stand-UpperBody" track="carryinteraction" mask="Trackmask_UpperBody"> <Reference target="5" /> </Choice> </PostureSelector> </MakeController> </State> <State name="mirror" type="private" skippable="false" interrupt_this="false" focus="full body" facialoverlays="false" tailoverlays="true"> <description /> <ParameterSelector parameter="potion:carryTrack" unique_id="8"> <Choice value="left"> <SetMirror target="x" mirror="true" unique_id="7" /> </Choice> <Choice value="right" /> </ParameterSelector> </State> </ASM>
|
|