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!
MTS has all free content, all the time. Find out how YOU can help to keep it running. Tell me how...

[TESTING] Custom Traits Manager

by Arsil Posted 15th Apr 2017 at 10:38 PM - Updated 13th May 2017 at 8:36 AM by Arsil : Description's Review
 
16 Comments / Replies (Who?) - 2 Feedback Posts, 13 Thanks Posts
Hide Thanks Posts for this thread (Show only feedback)
Inventor
Original Poster
#2 Old 15th Apr 2017 at 10:38 PM Last edited by Arsil : 16th Apr 2017 at 4:29 PM. Reason: Added new attachment and re-uploaded the example
Here's a trait to use as reference (the xml resource is heavily commented... it's actually an UNKN resource though).

It has no gameplay value, it's just an example (and "requires" my Napping Mat mod, otherwise you'll get a warning,
actually it will make the mat unusable by Sims who don't have the trait, so it's just bad)

DON'T SCREW YOUR SAVEGAMES ! Read the description of the mod.

EDIT: I've added empty thumbnail icons to use as bases. (Re-uploaded with light blue background for the big icon)
Re-uploaded the example trait (I had forgot to include the STBL resources for most languages)

EDIT: Uploaded a "skeleton" package to use as starting point. It should shorten a bit the steps needed.
Remember to rename (and re-hash using the new names) all resources using unique names.
Attached files:
File Type: zip  Arsil_CustomTraitExample.package.zip (9.5 KB, 183 downloads)
File Type: zip  VanillaThumbnails.zip (5.3 KB, 130 downloads)
File Type: zip  CTM_SkeletonToUseAsStartingPoint.package.zip (6.4 KB, 157 downloads)
Test Subject
THANKS POST
#3 Old 16th Apr 2017 at 4:12 AM
You are a real genius!!! Now sims have personality!
Would you like to create some custom moodlets like unrequited love, jealous , missing someone etc or even a custom moodlet manager like this? In Sim3 sims always have the equal relationship which is often isn't in real life. Adding these moodlets may be helpful.
I do not know any programming at all... anyway, I will try my best to study your tutorial. Thank you for all your masterpieces!
Field Researcher
#4 Old 16th Apr 2017 at 4:38 AM Last edited by csg5vbe3argf : 16th Apr 2017 at 4:57 AM.
Great mod!

So, about how to create custom trait.

Is that all I got to do to make working trait?

How do I make custom trait so that it shows up in the "regular Create a Household trait" just like your Japanese Culture Traits?

Cause I see it shows up without this mod.

I just want to create custom trait by myself.
Instructor
THANKS POST
#5 Old 16th Apr 2017 at 8:04 AM
Amazing!
I'm not going to touch this - it scars me! But, AMAZING!
Alchemist
THANKS POST
#6 Old 16th Apr 2017 at 8:29 AM
This is so great, I can't wait to use it! *eagerly awaits next parts of the tutorial*
Site Helper
THANKS POST
#7 Old 16th Apr 2017 at 1:26 PM
You've been busy! <3
Test Subject
THANKS POST
#8 Old 16th Apr 2017 at 8:14 PM
Thanks for creating this! Good job!
Test Subject
THANKS POST
#9 Old 17th Apr 2017 at 5:35 AM
Thank you so much! It's great that Sims 3 is still getting support, you're one of the best when it comes to making new stuff for this game. I am honestly surprised that it took so long to make custom traits for the game. I mean, we had the one Hypochondria trait, but that was it.

Anyway, thanks for all your work, and thanks for keeping the Sims 3 alive with your additions!
Field Researcher
THANKS POST
#10 Old 20th Apr 2017 at 2:45 AM
Thank you for making this, but it's to complex for me LOL It is a miracle that i manage to walk and chew gum at the same time 8D Keep making mods ;)
Test Subject
THANKS POST
#11 Old 9th May 2017 at 8:34 PM
Thank you for the time and effort of making this tutorial! Off to try to make a "drow-trait"
Test Subject
THANKS POST
#12 Old 5th Aug 2017 at 4:20 AM
Thanks
Test Subject
THANKS POST
#13 Old 8th Nov 2017 at 8:26 PM
So i managed to make an alcoholic trait. It shows up in game but it doesn`t actually _do_ anything. Could anyone give me a hint of how to make it "push" the sim to drink if having this trait?
Test Subject
THANKS POST
#14 Old 25th Dec 2017 at 2:27 AM
I think I'll use your great work to support the Traits part of a mod I'm making. Genius !
Field Researcher
THANKS POST
#15 Old 3rd Feb 2018 at 6:10 PM
Tyvm for working on this! :)
Test Subject
#16 Old 17th Mar 2018 at 6:59 PM
When I look in your code with Reflector, I see that it's supposed to add traits to an enum, which I guess is TraitNames, but when I use it in-game, the traits are indeed loaded and I can select the not-hidden ones when editing a sim's traits, but they still aren't in the TraitNames Enum.
Therefore, the other methods in the game can't acknowledge its existence. For example :
Code:
Enum.IsDefined(typeof(TraitNames), "ArtisticAlgorithmsChip").ToString()
returns true, but
Code:
Enum.IsDefined(typeof(TraitNames), "Armise_AngelTrait").ToString()
returns false.
Do you have a way to use the trait in new methods ? For example, to tset if a specified sim has it or not ?
Test Subject
THANKS POST
#17 Old 11th Nov 2023 at 11:34 AM
Just in case someone is wondering after seeing Armise's comment, you can cast your trait GUID as a TraitNames type and functions will still work with it. The following works:
Code:
 TraitManager.GetTraitFromDictionary((TraitNames)0x2D427B314EE35D2C)  // or whatever value you've put as <Hex> in your xml