Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

MTS Summer Movie Night - posted on 13th Jun 2018 at 9:07 PM
Replies: 30 (Who?), Viewed: 26301 times.
Page 2 of 2
Lab Assistant
#26 Old 7th Sep 2017 at 8:29 PM
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, 12 downloads) - View custom content
Test Subject
#27 Old 9th Sep 2017 at 5:36 PM
I took a look through your package and .dll to see if I could sniff something out. Good news! Only a few things need changing, and you'll be good to go.

In your DreamAndPromisesNodes xml, you just need to add your username at the end of the wish name so that it matches its converted form in the .dll. So, "*See ghost of $n enemies" should be "*See ghost of $n enemies Spamaccount"

In the .dll, just three lines need to change:
  • In ParseDreamTreesSpamaccount:
    should be
    Dictionary<string, XmlElement> instanceDefults = DreamsAndPromisesManager.ParseDefaults();

    new ResourceKey(1388242823523682991uL, 53690476u, 0u);
    should be
    DreamsAndPromisesManager.ParseDreamTreeByKey(new ResourceKey(1388242823523682991uL, 53690476u, 0u), instanceDefults, ref baseObject);

  • In ParseNodePrimitivesFromXmlDbDataSpamaccount:
    Type type2 = Type.GetType("Spamaccount.TS3.LastLaugh.Spamaccountltw1,Spamaccountltw1", false);
    should be
    Type type2 = Type.GetType("Spamaccount.TS3.LastLaugh.Spamaccountltw1,Spamaccount.TS3.LastLaugh", false);

If you're not using UntranslatedKey from NRaas, the strings will probably be blank. Otherwise it'll appear in CAS and in game like so:
Lab Assistant
#28 Old 11th Sep 2017 at 6:00 AM
Wow. Thank you so much for your help! I'm still quite new to script modding, and I would have never tracked down those mistakes myself. After making the changes, the wish finally showed up! It was a little bit trickier than I was hoping to manipulate the new feedback function into what I wanted, but that eventually worked out too. All I need to do now is make the wish require more than one event to fulfill, add a few linked wishes, and it will be ready.
This is really intimidating stuff, and it's great that there's someone in the community that understands it! Thanks again.
Test Subject
#29 Old 17th Sep 2017 at 3:07 AM
Originally Posted by Franzilla
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...

I just saw that you uploaded a custom LTW! I hope I can get mine to work.
Test Subject
#30 Old 23rd Sep 2017 at 3:39 PM
How did you make your Career GUID in the Level10DentistryFeedbackFunctionFranzilla? My custom career name within the other mod is "Nun" and the mod name is "CscorpiaNunCareerv2.0"
Test Subject
#31 Old 10th Jan 2018 at 7:22 AM
The number for the GUID is the FNV64 hash of your custom career's GUID (the name you have in the <AltGuid> tags for your custom career) in decimal form.

I use a constant ulong in the current version of my LTW script, but you can also get the career GUID and assign it to an ulong with HashString:
ulong myCustomCareerGUID = ResourceUtils.HashString64("MyAltGuidNameHere"); 

(Fun fact: It's the same number you see if you lack the proper strings for joining your career!)

Good luck! I hope your LTW still going well! We could definitely use some more. :D
Page 2 of 2
Back to top