- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Tutorials >
- Modding - General - Tutorial: Making new non-core Liftime Wishes
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Tutorials >
- Modding - General - Tutorial: Making new non-core Liftime Wishes
Posts: 902
Thanks: 32116 in 20 Posts
As I noted in the tutorial, feel free to edit it if you find errors/typos or want to correct formatting.
For questions and other feedback, please post here.
Attached to this thread you'll find a package file that adds the two LTWs discussed in the tutorial: "Devoted Seducer" and "Become District Superintendant". I should note that since the Education Career LTW was my first test, I wasn't as diligent when adding new things, e.g. the enum I used is major_dream_level_10_of_education_career. And the "Devoted Seducer" wish rolls new wishes far too often. In any case, it's meant as an illustration, so that you can see what the files and package look like.
Enjoy the tutorial!
VelocitygrassWishes.zip (30.2 KB, 297 downloads) - View custom content | ||||||||||
34335 11-13-10 19:27 VelocitygrassWishes.package -------- ------- 34335 1 file |
Thanks
Posts: 6,105
Thanks: 12816 in 71 Posts
Posts: 902
Thanks: 32116 in 20 Posts
I also hope to see some new LTWs. There are parts of the game that I haven't explored in depth and having an LTW for it would motivate me to do it (e.g. having an LTW for collecting).
I didn't even necessarily have "better" LTWs in mind, but now that you mention it, they all seem very narrowly focused. Whenever I read a guide on fulfilling an LTW that's full of how you can maximize efficiency and have your sim work 15 hours a day to max those skills, I wonder if those sims even "live". I tend to automatically balance work with a bit of play for my sims, but maybe it would be more realistic to have that included in the LTW itself, so that they want to reach the top of a career, but have a family and/or friends and/or hobbies too.
Technically the only problem is that the LTW feedback function reacts to a specific event, so if you wanted to catch a number of fleeting actions like how often they mop or do dishes, you'd probably have to write an event listener and create your own event covering all those things that the LTW could then handle. But it should be possible.
Posts: 6,105
Thanks: 12816 in 71 Posts
- Max a career AND three skills not required for that career
- Have five kids AND take them all on three vacations AND own a vacation home worth more than 100k (yeah, not as hard as it sounds since vacationing is so lucrative, but more challenging if you have seven sims to control while scarfing up the rocks and metals)
- Max the consignment skill, own three businesses and three max value venues... or maybe even... ALL businesses and ALL venues
- Live with three opposite-gender sims at once and raise a child from each of them (easier for male than female sims obviously, but either way you wind up with an 8-sim household and plenty of drama)
and, like you mentioned:
- Collect one of EVERYTHING (fish, bugs, rocks, gems, garden plants, recipes...). Or just complete all the collector challenges.
Posts: 17
Posts: 902
Thanks: 32116 in 20 Posts
Posts: 42
Posts: 2,664
Thanks: 3384 in 5 Posts
Code:
DreamsAndPromisesManager.sMajorWishes = new Dictionary<uint, DreamNodeInstance>(); DreamsAndPromisesManager.sCasFeederTrees = new List<DreamTree>(); foreach (ulong num in kCasFeederTreeIds) { DreamTree tree; if (DreamsAndPromisesManager.sDreamTrees.TryGetValue(num, out tree)) The first two lines need to be commented out so that we don't overwrite existing major wishes and their trees. The foreach line can also be commented out and instead of the TryGetValue based on the num we enter our Instance ID of the dreamtree resource (which is also stored as tree ID): |
The foreach line doesn't exist anywhere I can see, so I'm pretty much stuck when the steps order me to comment some lines, or add some, because I'm not even sure if the added lines are used anywhere.
While writing my own code, I keep looking back and forth at Velocitygrass' code (I only want to make one for Education career). Velocitygrass' code is much more complex and cannot be compared with the tutorial examples. I'd like to simplify it, but it's even more different from the original method, so I don't know which lines to remove and which to keep. They seem to be excessive.
Just call me Nikel
Posts: 902
Thanks: 32116 in 20 Posts
@nikel23: The tutorial is pretty old, so it's possible they changed things in the code since then, however, when I look up Sims3.Gameplay.DreamsAndPromises.DreamsAndPromisesManager.SetupMajorDreams() in the current game .dlls the code looks exactly as in my quote (except that I added DreamsAndPromisesManager in front of the sMajorWishes and other static members). Can you paste what the code of SetupMajorDreams() looks like for you?
Posts: 2,664
Thanks: 3384 in 5 Posts
// Sims3.Gameplay.DreamsAndPromises.DreamsAndPromisesManager private static void SetupMajorDreams() { DreamsAndPromisesManager.sMajorWishes = new Dictionary<uint, DreamNodeInstance>(); DreamsAndPromisesManager.sCasFeederTrees = new List<DreamTree>(); ulong[] array = DreamsAndPromisesManager.kCasFeederTreeIds; for (int i = 0; i < array.Length; i++) { ulong key = array[i]; DreamTree dreamTree; if (DreamsAndPromisesManager.sDreamTrees.TryGetValue(key, out dreamTree)) { DreamsAndPromisesManager.sCasFeederTrees.Add(dreamTree); foreach (DreamNodeInstanceBase current in dreamTree.Root.Children) { if (current is DreamNodeInstance && GameUtils.IsInstalled(current.Primitive.RequiredProductVersions)) { DreamsAndPromisesManager.sMajorWishes.Add(current.PrimitiveId, current as DreamNodeInstance); } } } } }
I forgot to mention I used ILSpy instead of Reflector, and I heard there are differences when looking at the code using those 2 programs. Could that be the problem?
Just call me Nikel
Posts: 902
Thanks: 32116 in 20 Posts
Posts: 2,664
Thanks: 3384 in 5 Posts
Just call me Nikel
Posts: 902
Thanks: 32116 in 20 Posts
public static void ParseNodePrimitivesFromXmlDbData(XmlDbData nodeData, ref List<DreamNodePrimitive> cachePrimitives, bool isStore)
Posts: 2,664
Thanks: 3384 in 5 Posts
Overview
This mod includes 10 custom LTWs. Basically, they're just "forgotten" career LTWs, i.e. Education, Daycare, Art Appraiser (2 branches), Video Game Developer, Sports Agent, Astronomer (2 branches), and Bot Arena (2 branches). There's no fancy LTW like Velocitygrass' Devoted Seducer, and no other custom wishes are included. This mod also added very simple check & feedback functions for careers that need them. Velocitygrass used CareerLevelGreaterThanOrEqualToN for his Education LTW, but I made a simple custom one to follow the game's other career LTWs pattern.
I've tested these custom LTWs, and they work. They'll be fulfilled once your Sim reaches the top of the career track. I tested in Volvenom's empty test world and noticed that specific Rabbit Hole LTWs will not appear on the Live mode LTW selection if the required Rabbit Hole is absent, so unless you put a Stellar Observatory in your base world, the LTW for that career will not appear. All of them will appear in CAS, nonetheless. Daycare LTW is an exception because other Profession LTWs don't behave like this.
This mod consists of required scripts, Dream Trees (I separated each Dream Tree by EPs), and Dreams & Promises Nodes. I have not included linked wishes yet. This means that if your Sim has the Astronomer LTW, they will not get the "special" wish to join that particular career or improve related skills. I will consider adding these once I could deal with the current problem with the mod I have right now. So basically, this mod only includes raw LTWs. No follow-up wishes, nothing fancy.
Bugs
Now the current problem I've mentioned is that once a Sim fulfills any Profession LTWs, the following 3 LTWs: {Education, Sports Agent, Bot Arena (Arena Official branch)} will constantly appear in the Wish selection (providing you have the appropriate Rabbit Hole in the world). If you pause the game and cancel these wishes, they will reappear the second you unpause the game. This is odd, considering the Sim has fulfilled an LTW and cannot promise another LTW. Fulfilling the Profession LTW alone will trigger this bug. It doesn't matter what level and in what career your Sim has. For example, if you reach level 10 of Stylist career, nothing happens. If you change your Sim's LTW to Fashion Phenomenon and fulfill the LTW, the bug will occur. If you change your LTW again with MasterController and cancel the completed LTW, you can cancel the wish and the bug will stop.
This is extremely annoying and a rather crucial bug, and I'm stuck at this process unable to figure out what's wrong yet.
ETA: I realized that I only tested it with Profession LTWs that require you to reach the top of the Profession (Stylist, Ghost Hunter, Magician, Singer, Acrobat, and my custom Daycare). I didn't test the other Profession LTWs like Firefighter, Lifeguard, or P.I. since they couldn't be fulfilled easily. I figured that their goal is fulfilled differently, I think they won't trigger the bug, but I don't know. I'm only under impression that the certain "Reach top level of Profession" functions would trigger the bug.
Test
I'm sharing my unfinished mod at the bottom of this post. As far as I can tell, the bug won't harm your game. If you want to test it out and give feedback or anything, I'd be very glad. I strongly do not recommend you to use this mod for normal gameplay; only use it for testing purposes.
Clear your cache!
It's very important that you clear ALL your cache before installing this mod (and after you uninstall it). In the past, I kept having this problem where my custom LTWs are not loaded to the game, and I couldn't figure out what's wrong even though I've followed the tutorial carefully. It turns out I've never deleted the WorldCache folder (I always played in Store / Custom Worlds), and apparently that's where the Dreams & Promises cache is stored. The game will not load any custom Wishes if it still stores the cache files. After you empty the cache files, the game will normally load the Wishes.
Nikel23 - Custom LTW v.2.2.rar (76.9 KB, 74 downloads) - View custom content | ||||||||||
Size Packed Ratio Date Time Attr CRC Meth Ver ------------------------------------------------------------------------------- Nikel23 - Custom LTW v.2.2.package 111322 78666 70% 19-07-14 22:06 .....A. 961F2E3C m3b 2.9 ------------------------------------------------------------------------------- 1 111322 78666 70% |
Just call me Nikel
Posts: 2,664
Thanks: 3384 in 5 Posts
Posts: 17
CscorpiaBecomeANun.rar (5.2 KB, 21 downloads) - View custom content | ||||||||||
----------- --------- -------- ----- -------- ----- -------- ---- ..A.... 6586 5258 79% 16-05-16 17:49 AF3D8DC9 CscorpiaBecomeANun.package ----------- --------- -------- ----- -------- ----- -------- ---- 6586 5258 79% 1 |
Posts: 45
Thanks: 2531 in 24 Posts
However, when I opened up your package, I don't have the option to export the .dll from your s3sa file. I'm not sure how to help with that I'm afraid.
Posts: 17
Making LTWs for custom careers is definitely possible with this tutorial. I finished one for mine a few weeks ago. I just have to get around to finishing the career! I'm very new to modding ( and C# for that matter), but I'd like to try to help you out. However, when I opened up your package, I don't have the option to export the .dll from your s3sa file. I'm not sure how to help with that I'm afraid. |
I'm glad yours worked! Could I ask you for a favor? Would you mind uploading your LTW mod? I tried making my .dll off of the tutorial and the two mods already on this thread, but the .dll files often differed from what the tutorial said. I *think* that's where my problem is.
Posts: 17
Posts: 45
Thanks: 2531 in 24 Posts
I'm glad yours worked! Could I ask you for a favor? Would you mind uploading your LTW mod? I tried making my .dll off of the tutorial and the two mods already on this thread, but the .dll files often differed from what the tutorial said. I *think* that's where my problem is. |
Whoops. I thought I'd replied to this ages ago... D:
cscorpia, the .dll differs a bit from the tutorial because the tutorial was based on an older version of the code. You'll have to look at the most recent version of DreamsAndPromises and make some adjustments to get it working! That's also why the one Velocitygrass made doesn't appear.
After nearly a year, I'm just now getting back to finishing up my custom career, but I can upload the LTW package if you're still interested.
Just a note: While I did get some dream trees working fine (Main LTW, ChildrenAndTeens, and Career w/o LTW), I never did get the linked wishes to work out properly. Thus, the related wishes that pop up won't have that special background~. I compensated by just making them worth a bit more than regular wishes. If someone else figures/has figured that out, please share!
A few pics of the custom LTW working in game with the career:
Posts: 3,860
Thanks: 8561 in 67 Posts
Posts: 45
Thanks: 2531 in 24 Posts
Oh wow! I really love how you made it compatible with a career mod you made! (Correct me if i'm wrong though ^- ~) Looks pretty EA-ish too with the messages and the icon you made for your lifewish! :D |
Thank you! Kind of "EA-ish" is what I'm going for, ha. I'm still working on the details of the career, but I got the main parts done for the sole purpose of testing out the ability to make custom career-matching LTWs.
Posts: 17
Posts: 45
Thanks: 2531 in 24 Posts
I just now checked this, but I'm only a few days behind! Could you upload your custom career LTW? |
Here you go! Sorry this took forever. My original file was smothered in extra stuff unrelated to custom careers, so I decided to make a heavily trimmed version. All the relevant stuff should still be in there.
I hope I'm attaching this correctly...
FranziLTW-E.rar (25.8 KB, 62 downloads) - View custom content | ||||||||||
----------- --------- -------- ----- -------- ----- -------- ---- ..A.... 75143 26303 35% 04-07-17 10:16 A298BBD4 FranziLTW-E.package ----------- --------- -------- ----- -------- ----- -------- ---- 75143 26303 35% 1 |
||||||||||
Description: Trimmed LTW .package |
Posts: 121
Thanks: 1061 in 8 Posts
A little background; my wish isn't differentiated yet; the actual coding should be very straightforward, so I'm mostly interested in first having it appear as its own unique LTW.
This one is based off of the Gold Digger LTW, which doesn't have a Check or Count Function, so I didn't implement ones either. Otherwise I tried to follow the guide as best as I could. Initially, I had the FeedbackFunction call the exact same function as the original Gold Digger wish; when that didn't work I went ahead and made it unique, since that would have to happen later on anyway, but that didn't resolve the main issue of the wish simply not appearing in-game.
Some other issues I ran into and resolved were: not having the proper name and corresponding FNV64 for my S3SA file, having created the new dreamtree as a DMTR rather than an XML (that is what the guide says to create it as, yet all the working examples contain an XML dreamtree instead of a DMTR one), and other issues I solved using a code comparing program. There are no STBLs in my file yet; I intended to add them later since it required a NRASS I didn't have yet. I've concluded that that's not the issue though, since Fran's wishes still appears even when the STBL info is absent. I am aware that some of my methods are slightly different than in the other examples, but I'm at a loss as to what else should be changed at this point.
Any help would be appreciated: I'm attaching the latest attempt I've made and the original .dll.
Spamaccount LTW.zip (18.7 KB, 28 downloads) - View custom content | ||||||||||
0 2017-09-07 15:28 Spamaccount LTW/ 15506 2017-09-07 14:52 Spamaccount LTW/6.package 11776 2017-09-07 14:48 Spamaccount LTW/Spamaccount.TS3.LastLaugh.dll --------- ------- 27282 3 files |
Who Posted
|