Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Lab Assistant
Original Poster
#1 Old 29th Aug 2022 at 7:50 PM
Default Help with custom trait
I'm making a custom reward trait that makes sims paint faster. But ran into a problem where the game crashes when I load up my save. I have Scumbumbo's XML Injector installed and I exported the trait from Mod Constructor V5. Are there perhaps any code changes that I need to make to the tuning data prevent the crash? I have been following Scarlet's tutorials on SimsVIP, although I'm not sure if the tuning files in the package still need to be changed for it to work with the Cats & Dogs patch, or if Mod Constructor V5 accounts for this and later updates.

Link to the mod
Last Exception
Screenshots
Advertisement
Field Researcher
#2 Old 31st Aug 2022 at 6:41 PM
Why the <GroupKey> on the trait and buff tuning? That's the only part that catches my eye at first glance.
Lab Assistant
Original Poster
#3 Old 1st Sep 2022 at 3:35 PM
Quote: Originally posted by baniduhaine
Why the <GroupKey> on the trait and buff tuning? That's the only part that catches my eye at first glance.

I think Mod Constructor (V5) automatically generated the <GroupKey> tags. I'm not sure what they're meant to do. I tried running the game with the <GroupKey> tags removed, and at first I thought they were the cause of the crash. But when I put them back in, the game didn't crash this time. I suppose the crash wasn't related to the trait.

But, I'm having trouble making the trait appear in the rewards menu. I've added the reward trait snippet into the package while following the XML Injector documentation, but the trait still won't show up in game. No clue what I borked up.
Here's the link to the trait with the snippet added to it.
Lab Assistant
#4 Old 4th Dec 2022 at 5:28 AM
Quote: Originally posted by speedo10
I think Mod Constructor (V5) automatically generated the <GroupKey> tags. I'm not sure what they're meant to do. I tried running the game with the <GroupKey> tags removed, and at first I thought they were the cause of the crash. But when I put them back in, the game didn't crash this time. I suppose the crash wasn't related to the trait.

But, I'm having trouble making the trait appear in the rewards menu. I've added the reward trait snippet into the package while following the XML Injector documentation, but the trait still won't show up in game. No clue what I borked up.
Here's the link to the trait with the snippet added to it.

I'm sorry to add a reply to an older topic with something that probably isn't going to be too helpful, but for one, yes: <GroupKey> is added by Mod Constructor for some reason. I have also wanted to delete it but after your testimony I will likely keep its inclusion as is, heh.

I haven't dabbled in reward traits, yet, but I have played around a lot with "gameplay" variants. In other words, I cannot help you in trying to get the trait to show up in the rewards menu—in fact, I was afraid I'd be unable to do so, too, hence why I opted to simply use "gameplay" traits, instead, and add them to individual sims using the console command (traits.equip_trait)

If you have S4PE, you can load your mod and find the xml for the trait in question—it will have a name similar to what you designated in Mod Constructor, and in all likelihood you can probably just use Mod Constructor if you know where to look for its precise in-game name. The fact that there's a "label" and a secondary thing always made it a tad confusing for me, so I would usually opt to look for its actual name with S4PE. Basically, if you get the trait's actual in-game name, you can switch to a sim and type in the cheat console (ctrl+shift+c, IIRC): traits.equip_trait (trait's actual in-game name) to manually add said trait to them, and traits.remove_trait (same name) to remove it. Theoretically, this should work even if you set the traits as "reward" rather than "gameplay," but if not, it's a simple fix either in Mod Constructor or S4PE to change it.

Again, if this is annoyingly irrelevant or pointless to you, I apologize. I added a topic of my own and wanted to at least try to offer some contribution/assistance to other folks while I was here. Cheers.

smash that disagree button fam, red's my favorite color
Back to top