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!
Quick Reply
Search this Thread
Field Researcher
Original Poster
#1 Old 18th Dec 2021 at 4:03 PM Last edited by lizcandor : 18th Dec 2021 at 7:53 PM.
Default [Resolved]Dream tree debugging
I've finally gotten a dream tree for a custom trait into the game, but I'm having trouble getting a visible wish for it to show up (the non-visible root node and the timer node that I'm trying to use to make the visible wish show up 1 hour after the root node is activated are both there; I can find them in the file generated by using NRaas DebugEnabler to export dreams and promises for a sim). So: does anyone know how to guarantee, for testing/debugging purposes, that a wish in a tree will be rolled as soon as the sim is eligible for it?

I am barely understanding what I'm doing here and was up too late last night, so apologies if this is a somewhat incoherent question!

[Edit: Hmmm it's possible I fixed it but I need to do some tests, will update]
[Edit2: Yes, success! It's in, I think my issue was in my script when I'd been assuming it was the xml.]
Advertisement
Senior Moderator
staff: senior moderator
#2 Old 18th Dec 2021 at 8:06 PM
Glad you got it working! Are you looking at the hypochondriac mod as a reference? I had some success with making a tiny skill dream tree, but it was super frustrating to follow the EA trees :p
I'd love to know about any success you have with trait dreams because there's just not enough info on dreams out there! tagging @echoweaver too :p
Field Researcher
Original Poster
#3 Old 18th Dec 2021 at 11:27 PM
I've been using VelocityGrass' LTW tutorial! The hypochondria trait dreamtree and some EA trees were my references on my first try, but they were waaaaaay beyond me so I gave up for a very long time I saw that you (or echoweaver? or both?) were working on dream trees on discord a while back though! I wouldn't have come back to this part of the project if I hadn't seen that somebody had managed it.

Right now my tree just has a root node that triggers a timer node that triggers a test wish to do a social interaction; I'm hoping now that I've confirmed it works at all and have a better debugging strategy I'll be able to make faster progress at expanding it, and learn some things about making more complicated nodes.
Inventor
#4 Old 19th Dec 2021 at 5:00 AM
Quote: Originally posted by lizcandor
I've been using VelocityGrass' LTW tutorial! The hypochondria trait dreamtree and some EA trees were my references on my first try, but they were waaaaaay beyond me so I gave up for a very long time I saw that you (or echoweaver? or both?) were working on dream trees on discord a while back though! I wouldn't have come back to this part of the project if I hadn't seen that somebody had managed it.

Right now my tree just has a root node that triggers a timer node that triggers a test wish to do a social interaction; I'm hoping now that I've confirmed it works at all and have a better debugging strategy I'll be able to make faster progress at expanding it, and learn some things about making more complicated nodes.


Haha. I experimented using the LTW tutorial but didn't succeed in getting regular dreams to work. I'm pretty sure it loaded, but I never saw the wishes. The problem with something that isn't guaranteed to show up is that it's miserable to debug.

I hadn't thought of using a timer node like that. I'd really like to do dream trees, but my time for projects like this hasn't been huge recently...

Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Field Researcher
Original Poster
#5 Old 19th Dec 2021 at 12:40 PM
The debugging really is the worst. My strategy is I've been using DebugEnabler to check if trees/nodes are really in the game at all even if my wishes don't show up, and I've also gotten unexpectedly good mileage out of putting debugging messages in the check and feedback functions – which if I'm understanding correctly, should both fire when a node's parent is fulfilled (e.g. timer node times out) and then again every time the event the node is linked to happens? And displaying the feedback function's result can explain why a wish isn't showing up if it should have, too.
Field Researcher
Original Poster
#6 Old 25th Dec 2021 at 7:22 PM Last edited by lizcandor : 27th Dec 2021 at 10:03 PM.
I'm still testing and expanding the tree, but here are some notes for the archive after confirming that one full branch works (non-visible nodes are detectable in the debugging file and visible nodes appear as wishes).

First, here's a chunk of the outline (based on VelocityGrass' recommendation) for the fully tested branch, so the rest is more readable:
For each level of the outline, what's before the semicolon is the enum name + FNV32 hash of the enum name + decimal version of the FNV32 hash for the node primitive, and after the semicolon is the same information for the node instance.

The XMLs are as VelocityGrass described in their tutorial - node primitive table and dream tree excerpts corresponding to the outline above are below:
To link the tree to a custom trait, the root node's check and feedback functions call DreamsAndPromisesDelegateFunctions.HaveTraitHelperFunction and DreamsAndPromisesDelegateFunctions.HaveTraitFeedbackHelperFunction, respectively, for the custom trait:
And besides that, the script just adds enums and parses the node primitive and dream tree XMLs the same way as for making an LTW, skipping the step where you set up major dreams since none of the wishes in this tree is an LTW.

The check and feedback functions for the other nodes besides the root node are more complicated, but I think this is all the information that's needed for just making a trait-linked dream tree at all.

Edit: Some additional notes - for wishes with a sim as the subject, it seems like the primary icon will by default be the subject's thumbnail (with the secondary icon, if you specified one, overlaid on the bottom right corner). And information about the subject is at index 1 of the localization parameters, so if you want to put the subject's first name in the name of the wish you'd use 1.SimFirstName. Also, an important line of the InstanceNode that wasn't in my example before is "Repeatable", which is false by default - add <Repeatable>true</Repeatable> to allow a node to be repeated after being fulfilled once.
Back to top