|
Post by triplis on Dec 26, 2018 19:56:00 GMT -5
I don't think this is well-explored ground, but I figured, you folks here know a lot about animation, maybe you'll know something I don't that cracks this problem.
Custom walkstyle file - works Custom locomotion file - works Custom clip file referenced in custom locomotion file - the animation starts to play, but stalls and the sim just hangs there in place.
I tried a few different things, including trying a custom Clip file that I know works outside of being used in a locomotion file (it works in a jazz/AnimationElement/interaction setup).
So then I tried comparing Clip/ClipHeader files of an EA Clip file used in locomotion, versus what I'd ended up with from importing in a different .blend file (or using the Clip Pack creator). I noticed a couple of differences.
1) Even with the same animation, the duration was different. 0.4333333 (my file) versus 0.4 (EA file). Why is a mystery. All I did was extract the EA animation as a .blend file using S4S and then import it in for a custom file.
2) There were some additional things under Channels in the EA file. A variety of things about IK_TargetWeight and IK_TargetWeightWorld. I guessed that maybe these had something to do with the stalling (them not being present). So I tried adding them manually to the custom Clip file for the heck of it and S4S gave me a save error.
Save Error:
The Sims 4 Studio - Version 3.1.2.1
System.NullReferenceException: Object reference not set to an instance of an object.
at S4Studio.Data.IO.Util.BinaryStreamWrapper.WriteBytes(Byte[] bytes, ByteOrder order)
at S4Studio.Data.IO.Util.BinaryStreamWrapper.Write(Byte[] input)
at S4Studio.Data.IO.Animation.Clip.Write(Stream stream, IReferenceList resources)
at S4Studio.Data.IO.Animation.ClipResource.Write(Stream stream, IReferenceList resources)
at S4Studio.Data.IO.Package.DBPFPackage.WriteResourceStream(FileStream final_stream, IPackedResource resource, IDBPFResourcePointer index)
at S4Studio.Data.IO.Package.DBPFPackage.WriteDataStream(Stream src_stream, FileStream final_stream)
at S4Studio.Data.IO.Package.DBPFPackage.SaveTempPackage(String out_file, String tmp, Stream pkg_stream)
at S4Studio.Data.IO.Package.DBPFPackage.Save(String out_file, Boolean inline, String temp_path)
at S4Studio.Shared.StudioDocumentModel.Save(String filename) So apparently adding in stuff like that manually is not going to work. Nor is S4S generating that type of information manually it seems (or maybe it's that extracting the animation into a .blend file strips that kind of information, when it would otherwise be present?).
I'm kind of at a loss on this one. Animation is not something I know much about in general, much less as it specifically pertains to TS4 and there is very little documentation on it for this game that I'm aware of. I'm content to experiment as needed, if only I had some inkling of what to try. Right now, it seems like I'm in a bit of a dead end.
|
|
|
Post by triplis on Nov 15, 2017 21:02:14 GMT -5
Another person I tried to help was having issues because their SimData file got gutted when opened in Sims Studio. Probably the same issue you folks are running into. This seems to be an issue with SimData files generated by programs like some of Zerbu's earlier programs; that Sims Studio can't read them properly, so stuff ends up blanked out. For a workaround, use Sims Studio's Extract Tuning feature to pull out a sample Maxis data file for a trait that's similar to the one you're trying to fix. Then you can edit in the relevant values from your trait's info to the sample maxis file, or just use the maxis file as a reference to see what your file is missing. Some things that I've seen gutted in this situation are: Age tags, trait tags, description Edit: Someone pointed me to a person who made a more in-depth tutorial on this. You can find it here: simsvip.com/2017/11/15/custom-trait-making-trait-compatible-pets/
|
|
|
Post by triplis on Nov 12, 2017 18:35:11 GMT -5
Generally speaking (it may vary a bit by context and you can usually find something in the TDESC's to figure out how specific context applies) weight refers to how one possibility is weighted against another. So if possibility 1 has a weight of 2 and possibility 2 has a weight of 4, possibility 4 will happen more often. That's the general idea of it. Edited to add: Another way to think of it is like a priority system. Something that has a higher weight will be considered higher priority than something that has a lower weight. Thanks. This is what I was thinking but was unsure. Thank you for confirming that. You're welcome!
|
|
|
Post by triplis on Nov 12, 2017 0:27:18 GMT -5
Generally speaking (it may vary a bit by context and you can usually find something in the TDESC's to figure out how specific context applies) weight refers to how one possibility is weighted against another.
So if possibility 1 has a weight of 2 and possibility 2 has a weight of 4, possibility 4 will happen more often. That's the general idea of it.
Edited to add: Another way to think of it is like a priority system. Something that has a higher weight will be considered higher priority than something that has a lower weight.
|
|
|
Post by triplis on Nov 10, 2017 15:44:51 GMT -5
Thank you so Very Much! You have been a giant help! You're welcome! Like I said under Part 1, make sure you're adding under both schemas and... well, I called it simdata, but I guess that's inaccurate. schemas and instances. Point is, it needs to be under both. I made this mistake initially in fixing some traits of mine - forgot to add the line under schemas - and it didn't save my changes! So make sure you do both. That's probably what the issue is. In case that's not clear, here's an example, highlighting the specific lines to look for in the sample code I posted for the species reference in the data file: instances part: <L name="species">
<T type="Int64">1</T>
</L>
schemas part: <Column name="species" type="Vector" flags="0x00000000" />
Hope that helps! As for editing elsewhere, nope, I definitely did it in S4S. I used to use velocitygrass's data tool for editing data files, but it's out of date with the patch now and it won't open data files that have the ui_category line in them. So S4S is the only up to date resource I know of for editing data files. Oh, also, make sure you're using the version of S4S that's been updated since the patch. If it's out of date, it may not work right with the new data.
|
|
|
Post by triplis on Nov 9, 2017 20:48:14 GMT -5
Zerbu is still active. He came back from whatever was going on before a few months back, if I'm remembering the dates right.
He made a post on twitter the other day about possibly releasing an "emergency update" earlier than his intended new version release of Mod Constructor. You can see the tweet here:
Also, what's going has a few parts to it, though I'm pretty sure only one of them is vital for the trait to work (I'm not totally clear on all the details... I'll explain more on that below).
Part 1: Species
Traits now need to have species code in them for them to appear properly.
Here's an example of the updated DATA file for a CAS trait in Sims Studio:
<?xml version="1.0" encoding="utf-8"?> <SimData version="0x00000101" u="0x00000000"> <Instances> <I name="trait_Toddler_Silly" schema="Trait" type="Object"> <L name="ages"> <T type="Int64">4</T> </L> <T name="cas_idle_asm_key">00000000-00000000-0000000000000000</T> <T name="cas_idle_asm_state"></T> <T name="cas_selected_icon">00000000-00000000-0000000000000000</T> <T name="cas_trait_asm_param">Cheerful</T> <L name="conflicting_traits" /> <T name="display_name">0x18857EEE</T> <L name="genders" /> <T name="icon">00B2D882-00000000-D467D3B21F361F64</T> <L name="species"> <T type="Int64">1</T> </L> <L name="tags"> <T type="Int64">234</T> <T type="Int64">755</T> </L> <T name="trait_description">0x528AF917</T> <T name="trait_origin_description">0x00000000</T> <T name="trait_type">0</T> <V name="ui_category" variant="0x603EAA6C"> <T type="Int64">0</T> </V> </I> </Instances> <Schemas> <Schema name="Trait" schema_hash="0x53D584C8"> <Columns> <Column name="ages" type="Vector" flags="0x00000000" /> <Column name="cas_idle_asm_key" type="ResourceKey" flags="0x00000000" /> <Column name="cas_idle_asm_state" type="String" flags="0x00000000" /> <Column name="cas_selected_icon" type="ResourceKey" flags="0x00000000" /> <Column name="cas_trait_asm_param" type="String" flags="0x00000000" /> <Column name="conflicting_traits" type="Vector" flags="0x00000000" /> <Column name="display_name" type="LocalizationKey" flags="0x00000000" /> <Column name="genders" type="Vector" flags="0x00000000" /> <Column name="icon" type="ResourceKey" flags="0x00000000" /> <Column name="species" type="Vector" flags="0x00000000" /> <Column name="tags" type="Vector" flags="0x00000000" /> <Column name="trait_description" type="LocalizationKey" flags="0x00000000" /> <Column name="trait_origin_description" type="LocalizationKey" flags="0x00000000" /> <Column name="trait_type" type="Int64" flags="0x00000000" /> <Column name="ui_category" type="Variant" flags="0x00000000" /> </Columns> </Schema> </Schemas> </SimData>
Note the part about species and ui_category. It needs to be added both in the schemas part and the instances part or it won't save the data properly.
Then in the XML file for the trait, you need to have a reference to species as well. Here's an example:
<?xml version="1.0" encoding="utf-8"?> <I c="Trait" i="trait" m="traits.traits" n="trait_Toddler_Silly" s="140743"> <L n="ages"> <E>TODDLER</E> </L> <L n="buffs"> <U> <T n="buff_type">143175<!--Buff: buff_Trait_Toddler_Silly--></T> </U> </L> <T n="cas_trait_asm_param">Silly</T> <T n="display_name">0x19D153B4<!--String: "Silly"--></T> <T n="display_name_gender_neutral">0x5B69E124<!--String: "Silly"--></T> <T n="icon" p="InGame\UI\Icons\CAS\Traits\traits_silly_cas.png">2f7d0004:00000000:38c0a703ddfea044</T> <E n="min_lod_value">MINIMUM</E> <L n="species"> <E /> </L> <L n="tags"> <E>TraitPersonality</E> <E>TraitGroup_Emotional</E> </L> <U n="trait_asm_overrides"> <V t="enum" n="param_type"> <T n="enum">trait_toddler</T> </V> <T n="trait_asm_param">silly</T> </U> <T n="trait_description">0x6E64927B<!--String: "Goofy and curious. These Toddlers love to tell jokes and get Playful. They earn Imagination skill slightly faster."--></T> <E n="trait_type">PERSONALITY</E> <V t="ui_trait_category_tag" n="ui_category" /> </I>
So far, from what I know, the species part is what's vital for getting the trait to appear properly.
Part 2: min_lod_value
In the XML part, you also want the "min_lod_value". This has something to do with culling that I don't fully understand, but I'm pretty sure it's important to making sure the trait doesn't go poof on a lower priority sim.
This part doesn't need any new adds to the DATA file, just the XML part.
Part 3: ui_category
The ui_category part, according to the new TDESCs, has something to do with how the trait appears in the relationship panel... but in my testing, it doesn't appear to have any impact for custom traits (they still aren't showing up in the relationship panel). So I don't know what the deal is there.
It may be worth adding in the XML and DATA code for this regardless, in case it's tweaked somehow in a later patch. Right now, it doesn't appear to do anything to custom traits one way or another. But it is present in all Maxis CAS traits now, so no harm in imitating.
|
|
|
Post by triplis on Nov 8, 2017 20:41:52 GMT -5
It's working for me now. Thanks so much, andrew !
|
|
|
Post by triplis on Nov 7, 2017 18:41:11 GMT -5
Attempting to read a trait DATA file in Sims Studio is giving an error post-patch, as far as I can tell. This is further supported by the fact that VelocityGrass's DATA tool (which worked for me fine up until this patch) is not able to open post-patch trait DATA files. Doesn't seem to be a way to copy/paste the text, so here's a screenshot of the error text for quick ref:
|
|
|
Post by triplis on Sept 19, 2017 19:20:09 GMT -5
Ahh, got it. Thanks!
|
|
|
Post by triplis on Sept 19, 2017 15:15:38 GMT -5
Most animations seem to extract just fine and play as expected. With a2o_yoga_corpsePose_loop_sleep_x and a2o_yoga_corpsePose_sleepGetOut_x blend files, they're jerky when playing them in blender (for example, GetOut moves inches into the air at the beginning, like a balloon being smacked, as if its geometry thinks it's supposed to be somewhere far higher than it should be).
I don't know enough about animations to even begin to guess why this would be the case with them and not other animations. The procedure I'm following is exactly the same.
Edit: Ok, so something is funky with the b_ROOT_bind_
Whatever that means. If I delete it, the animation plays without the jerking, but in the case of a2o_yoga_corpsePose_sleepGetOut_x, this is disastrous, as it then doesn't know where the ground is supposed to be and gets up off the ground as if its chest is pinned to ground level.
Edit2: I think I got it. Using clean keyframes on b_ROOT_bind_ seems to have fixed it.
|
|
|
Post by triplis on Jun 25, 2017 16:49:31 GMT -5
I've been curious about this as well (looking into it a bit today). In the past, in my experience, a route failure usually happens because the sim can't perform whatever animation it's being asked to perform. So toddlers, I'm guessing, are restricted from the tent animations somehow, or the animation doesn't support toddlers using it. At least, that's what I first thought... the actual animations for tent seem to have toddler age tags in them, in the Animation State Machine (ASM) files. Not sure what all that does though...
I mean, for some animations, it'll just stretch weirdly if the age is wrong. In this case, it just does a route failure. I'm pretty confident the restriction has something to do with the animation... just not sure in what way. I was thinking about looking into if there's a different way to get them inside the tent from a normal animation. Some kind of teleport, for instance, but I think a teleport might just put them on top of the tent, instead of inside.
Edit: It could have something to do with posture (just not sure how). Now I think about it more, sometimes a route failure will happen because the sim can't get in the posture they're required to be in to do the animation. And I know toddlers do have some postures that are different, just not sure to what extent. Like Child and up can kneel, but can't sit on the ground. And toddlers can sit on the ground, but can't kneel.
Edit2: Then again, maybe it has something to do with the capacity to walk through/inside of the object. As an experiment, I tried changing the animation to Nap Idle and requiring the sleep on the ground jig, to see if the toddler could get inside at all (e.g. using the same components as toddler Nap on Ground). No luck. Then I tried removing the jig requirement... toddler, same issue. Child and up could still get inside the tent, they'd just leave immediately, presumably since it isn't an idle they're built to do.
|
|
|
Xevt ID
May 18, 2017 16:00:34 GMT -5
Post by triplis on May 18, 2017 16:00:34 GMT -5
Thanks! That's good to know. I didn't even realize offset_time exists. I might try offset_time for the heck of it, though I'm not sure if it will work in this particular case, unless there's a way to hook offset_time to the animation itself. The deal is (and I forget what all I described in the OP, so I'll just lay it out) for the main use, I'm imitating how the vampire "mind control" powers work, where it goes like this: Pusher > Continuation into main interaction | Continuation that stops the target sim > End Result The "main interaction" has a constraint in it that forces the sim to be in a particular range of the target before starting the "mind control" animation. The catch is, the VFX that is supposed to play when the animation does is not constrained in the way that the animation is. For the mind control interactions, they worked around this by having a xevt_timing in the "mind control" animation, so that the VFX would only be allowed to play once the animation has started playing. Because the sim could be any distance from the target, it's impossible to predict with manual timing how long it will be before the animation starts (that's why I'm not sure offset would work). For the time being, I found an ok workaround by using the guitar animation, which funnily enough can be played without carrying an actual guitar (air guitar anyone? XD) and which has a base xevt_timing set in it where it can do something immediately when the animation starts (it's there to trigger a state change, but can be used for other stuff too). Also, for those curious about xevt, SimGuruModSquad posted a reply today (well, more like yesterday now) in reply to my question on the official sims about it. I'll quote the full post here: So from the look of it with not the most thorough read-through at 2 in the morning, it looks like what I'm asking about is possible, but not the simplest thing ever to do. Also, here's the resource he linked to in that post: forums.thesims.com/en_US/discussion/872672I see why "at_beginning" method won't work for You, & thanks for the information that You provided Maybe try adding the VFX in the "Clip Resource" for the animation? it works for sims or objects even if the VFX are not meant for them. I'm gonna have to try to dig into this more. I've been meaning to reply to this, but hadn't gotten around to it. I'm not sure what you mean, tbh; the clip files are brand new territory for me and I'm not totally sure what and where all I can edit them, much less what needs to be edited to do particular stuff. I also wanted to ask you, in particular, about custom animations (though maybe that's better done in its own thread) cause I noticed you seem to have added a custom animation with your Torture and Chaos mod, and I'm looking into the possibility of adding some custom animations for my Sorcerer mod. I would want to make sure I know how to add a custom xevt though, along with the adding of animations itself, and of course, creating them, which is so many layers of learning, I get overwhelmed thinking about it. :P (I had some cursory animation study in my game design major in college, but it was always a bit of an overwhelming area for me. So much learning how to navigate the interface just for one program. And then all the details of animation itself. Yeesh.) Basically, what I'm wanting to ask you at the moment, with regards to custom animations is... is there a special process to it that you had to go through? Cause I know Sims Studio has a built-in thing for doing animation overrides, but I don't think that's the same process as adding an entirely new one, which you appear to have done with Torture and Chaos.
|
|
|
Post by triplis on Apr 26, 2017 1:22:37 GMT -5
Thanks! That's good to know. I didn't even realize offset_time exists. I might try offset_time for the heck of it, though I'm not sure if it will work in this particular case, unless there's a way to hook offset_time to the animation itself. The deal is (and I forget what all I described in the OP, so I'll just lay it out) for the main use, I'm imitating how the vampire "mind control" powers work, where it goes like this: Pusher > Continuation into main interaction | Continuation that stops the target sim > End Result The "main interaction" has a constraint in it that forces the sim to be in a particular range of the target before starting the "mind control" animation. The catch is, the VFX that is supposed to play when the animation does is not constrained in the way that the animation is. For the mind control interactions, they worked around this by having a xevt_timing in the "mind control" animation, so that the VFX would only be allowed to play once the animation has started playing. Because the sim could be any distance from the target, it's impossible to predict with manual timing how long it will be before the animation starts (that's why I'm not sure offset would work). For the time being, I found an ok workaround by using the guitar animation, which funnily enough can be played without carrying an actual guitar (air guitar anyone? XD) and which has a base xevt_timing set in it where it can do something immediately when the animation starts (it's there to trigger a state change, but can be used for other stuff too). Also, for those curious about xevt, SimGuruModSquad posted a reply today (well, more like yesterday now) in reply to my question on the official sims about it. I'll quote the full post here: So from the look of it with not the most thorough read-through at 2 in the morning, it looks like what I'm asking about is possible, but not the simplest thing ever to do. Also, here's the resource he linked to in that post: forums.thesims.com/en_US/discussion/872672
|
|
|
Xevt ID
Apr 23, 2017 0:32:01 GMT -5
Post by triplis on Apr 23, 2017 0:32:01 GMT -5
Posted about this on the official sims forums, but I figured I'd ask here too; seems to be more knowledge about the animation side of things concentrated here.
What I'm wanting to do is (as an example): Play a vfx next to the fireplace warm self animation with xevt timing (to guarantee that the vfx will start when, or shortly after, the animation starts.. there's a janky way with a continuation I managed to do this using at_beginning, for the purpose I wanted it, but it's inefficient and comes with its own set of problems).
The issue is, info on how xevt works seems to be sparse and the impression I'm steadily getting from research and testing is that animations simply don't have xevt ids that you can reference, unless they were manually put in there. So if I have to, I'm up for trying to add xevt ids to certain animations. I just have no idea where to begin on it, or if that's even the right track.
I looked at the clip and clipheader files for an animation that definitely does use a xevt_id in-game to see if I could find anything indicating where it's getting the ID value from (which is another part of this that isn't making sense... I've seen xevt ids that are anything from 100 to 1290... the range is so odd that at first it seems like the values are picked to be unique, but then, there are multiple interactions that use a xevt id of 101). I looked using sims studio and using s4pe, but I'm not finding anything that seems relevant.
I feel like I'm missing something really key here. Also, I'm tired and recovering from a cold, so I'm sure that isn't exactly aiding my detective skills. :P
|
|