Welcome to
Mod The Sims
Online: 5075
News:
Have an account? Sign in:
pass:
If you don't have an account, why not sign up now? It's free!
Other sites: SimsWiki
Reply  Replies: 30 (Who?), Viewed: 32409 times.
Search this Thread
Old 13th Nov 2010, 6:52 PM DefaultTutorial: Making new non-core Liftime Wishes #1
velocitygrass
Original Poster

Inventor

Join Date: Jun 2009
Posts: 912
Thanks: 29224 in 10 Posts
20 Achievements


You can find the tutorial here in the wiki: Sims 3 New Lifetime Wish (non-core)

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!
Download - please read all instructions before downloading any files!
File Type: zip VelocitygrassWishes.zip (30.2 KB, 224 downloads) - View custom content
12 users say thanks for this.
[ Click here to view a longer list ]
Old 14th Nov 2010, 9:38 AM #2
Srikandi
Eminence Grise

Join Date: Aug 2006
Posts: 6,174
Thanks: 12479 in 65 Posts
13 Achievements


That is a very nicely done tut I am not sure if I will ever use it, but I certainly hope others do. I'd love to see a greater variety of LTWs in the game. Specifically more difficult, complex, diverse ones, which promote varied and interesting gameplay rather than doing the same thing over and over.
Old 14th Nov 2010, 10:27 AM #3
velocitygrass
Original Poster

Inventor

Join Date: Jun 2009
Posts: 912
Thanks: 29224 in 10 Posts
20 Achievements


Thank you

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.
Old 14th Nov 2010, 9:35 PM #4
Srikandi
Eminence Grise

Join Date: Aug 2006
Posts: 6,174
Thanks: 12479 in 65 Posts
13 Achievements


Exactly!
- 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.
Old 25th Jun 2012, 9:54 AM #5
Mary-Greenman
Test Subject

Join Date: Aug 2009
Posts: 17


This tutorial looks wonderful and I'm in the process of designing my own lifetime wish. I know its really late (haha, looks like by about five years?) but if you're still around, I was wondering if I could bother you for a question about the ID in the primitive mode (<Id>171540815</Id>)? I'm a little confused on how to work it. Are you saying we have to grab it from an existing LTW or can we just generate our own number?
Old 29th Mar 2013, 1:21 PM #6
velocitygrass
Original Poster

Inventor

Join Date: Jun 2009
Posts: 912
Thanks: 29224 in 10 Posts
20 Achievements


@Mary-Greenman: Oops, I didn't subscribe to this thread, so I didn't see this. This probably way too late, but a bit further down I explain that the ID is the FNV32 of the wish enum name I made up earlier.
Old 9th Jul 2013, 6:32 PM #7
LaurokaPlay
Test Subject

Join Date: Feb 2012
Posts: 42


Hey! I was wondering if it would be possible to create a LTW like the one you made for the education career, with an entire dreamtree of wishes, for a costumized career without creating a new function? Like, for exemple, it would automatically be included in the game? Or would i have to create it from scratch? Thank you!!
Old 14th Aug 2013, 5:20 PM #8
nikel23
Alchemist

Join Date: Jun 2010
Posts: 2,646
Thanks: 2361 in 5 Posts
10 Achievements


I understand that the tutorial is pretty complex and difficult, but I got confused on some steps, specifically on creating the custom parsing methods. The tutorial said to just copy the entire method ( like ParseNodePrimitives() ) and then remove certain lines. However, some lines mentioned in the tutorial just don't appear in the method body. For example, the "Setting up the major dreams" section, it says:
Quote:
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
Old 14th Aug 2013, 9:02 PM #9
velocitygrass
Original Poster

Inventor

Join Date: Jun 2009
Posts: 912
Thanks: 29224 in 10 Posts
20 Achievements


@LaurokaPlay: Sorry, I must have missed the thread change notification in my inbox. It's been a while since I created the tutorial, but from a quick look at what I wrote, you can't create a new LTW for a custom career without adding at least a basic new check function (in addition to the code necessary to read in the new LTW).

@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?
Old 16th Aug 2013, 9:43 AM #10
nikel23
Alchemist

Join Date: Jun 2010
Posts: 2,646
Thanks: 2361 in 5 Posts
10 Achievements


Code:

// 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
Old 16th Aug 2013, 5:05 PM #11
velocitygrass
Original Poster

Inventor

Join Date: Jun 2009
Posts: 912
Thanks: 29224 in 10 Posts
20 Achievements


@nikel23: Yes, you're right. I just checked in ILSpy and indeed here it's done with a for loop instead of foreach. So that's the difference. I guess in such cases you'll need to check what the equivalent code is and remove/keep that analogously. If you reimpliment something in your script, it doesn't matter which way you code it as long as the outcome is the same.
Old 10th Nov 2013, 11:49 AM #12
nikel23
Alchemist

Join Date: Jun 2010
Posts: 2,646
Thanks: 2361 in 5 Posts
10 Achievements


I've been following this tutorial (I've been abandoning it for a couple months), and I was near the end; hopefully everything was done correctly. But I got stuck with the "Loading the primitive (part 2)" section. Which part of the code is exactly the section talking about?

Just call me Nikel
Last edited by nikel23 : 10th Nov 2013 at 12:37 PM.
Old 15th Nov 2013, 11:22 AM #13
velocitygrass
Original Poster

Inventor

Join Date: Jun 2009
Posts: 912
Thanks: 29224 in 10 Posts
20 Achievements


@nikel23: This should be in
Code:
public static void ParseNodePrimitivesFromXmlDbData(XmlDbData nodeData, ref List<DreamNodePrimitive> cachePrimitives, bool isStore)
, though at a quick glance it appears that a few things were changed since I did the tutorial. The feedback function is assigned now from str11 when I look at it in Reflector. So you might have to make an adjustment.
Old 15th Jul 2014, 3:53 PM
nikel23
This message has been deleted by nikel23. Reason: OhNeverMindIMadeAPureStupidityDontReadThisMoveAlong!!!! Note: My mod worked!!! Thanks for the tutorial velocitygrass!!!
Old 20th Jul 2014, 11:01 AM #14
nikel23
Alchemist

Join Date: Jun 2010
Posts: 2,646
Thanks: 2361 in 5 Posts
10 Achievements


So, here's my custom LTW result. My mod is incomplete yet, but I'm not sure when I will complete it because right now I'm stuck.

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.
Download - please read all instructions before downloading any files!
File Type: rar Nikel23 - Custom LTW v.2.2.rar (76.9 KB, 47 downloads) - View custom content

Just call me Nikel
Old 20th Jul 2014, 11:06 AM #15
nikel23
Alchemist

Join Date: Jun 2010
Posts: 2,646
Thanks: 2361 in 5 Posts
10 Achievements


I forgot to mention that my LTW icons are provisional and crudely photoshopped. I have no idea how to make the icons have gold pattern. If someone is willing to help me create the icons, I'd greatly appreciate it.


Just call me Nikel
Last edited by nikel23 : 21st Jul 2014 at 5:41 AM.
Old 14th May 2016, 6:29 AM
cscorpia
This message has been deleted by cscorpia.
Old 16th May 2016, 11:11 PM #16
cscorpia
Test Subject

Join Date: Oct 2012
Posts: 17


So, not sure what I did wrong, but the LTW is not showing up in game. I'm trying to make a lifetime wish for a custom career, so it may be that that's just too complicated. However, if anyone happens upon this forum and wants to try and fix it/tell me what's wrong, that'd be much appreciated.
Download - please read all instructions before downloading any files!
File Type: rar CscorpiaBecomeANun.rar (5.2 KB, 13 downloads) - View custom content
Old 17th May 2016, 2:01 PM #17
Franzilla
Test Subject

Join Date: Jan 2016
Posts: 40
Thanks: 1404 in 22 Posts
9 Achievements


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.
Old 24th May 2016, 1:37 PM #18
cscorpia
Test Subject

Join Date: Oct 2012
Posts: 17


Quote:
Originally Posted by Franzilla
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.
Old 29th Sep 2016, 11:19 AM
ayaba44
This message has been deleted by ayaba44.
Old 5th Jan 2017, 4:24 PM #19
cscorpia
Test Subject

Join Date: Oct 2012
Posts: 17


So I thought I had gotten my mod to work, but then when I loaded it up and opened CAS, it wasn't there. I played around with a few things and then tried to load Velocitygrass's mod instead, and that one didn't show up in CAS either. Any ideas?
Old 21st Apr 2017, 1:38 AM #20
Franzilla
Test Subject

Join Date: Jan 2016
Posts: 40
Thanks: 1404 in 22 Posts
9 Achievements


Quote:
Originally Posted by cscorpia
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:
Old 21st Apr 2017, 2:42 PM #21
Lyralei
Puffin McMuffin



Join Date: Dec 2013
Posts: 2,382
Thanks: 1062 in 11 Posts
17 Achievements


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
Old 28th May 2017, 4:08 PM #22
Franzilla
Test Subject

Join Date: Jan 2016
Posts: 40
Thanks: 1404 in 22 Posts
9 Achievements


I got the linked wishes to work! As it turns out, learning to spell your own username correctly really, really helps.


Quote:
Originally Posted by Greenplumbbob
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.
Old 1st Jun 2017, 4:43 AM #23
cscorpia
Test Subject

Join Date: Oct 2012
Posts: 17


I just now checked this, but I'm only a few days behind! Could you upload your custom career LTW?
Old 4th Jul 2017, 3:26 PM #24
Franzilla
Test Subject

Join Date: Jan 2016
Posts: 40
Thanks: 1404 in 22 Posts
9 Achievements


Quote:
Originally Posted by cscorpia
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...
Download - please read all instructions before downloading any files!
File Type: rar FranziLTW-E.rar (25.8 KB, 30 downloads) - View custom content
Description: Trimmed LTW .package
Old 7th Sep 2017, 8:29 PM #25
Spamaccount
Lab Assistant

Join Date: Dec 2011
Posts: 101
Thanks: 618 in 15 Posts
5 Achievements


I finally decided to give this a go. I spent all of yesterday messing around with my files, but try as I might, I can't get the LTW to show in CAS either. I'm not sure what to do now; @Franzilla 's example was a gigantic help in helping me track down some errors but I'm at the point where I don't see any other issues and yet, somewhere, something is wrong.

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.
Download - please read all instructions before downloading any files!
File Type: zip Spamaccount LTW.zip (18.7 KB, 15 downloads) - View custom content
Reply


Section jump:


Powered by MariaDB Some icons by http://dryicons.com.