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!
Virtual gardener
staff: administrator
Original Poster
#1 Old 24th Jan 2022 at 1:19 PM Last edited by Lyralei : 24th Jan 2022 at 3:51 PM. Reason: Added some examples on how to do the Thought Balloons
Default List Of Balloon Name Text
Heya!

For whom it may be necessary! A compiled list of Thoughtbubble Balloon names! If you've worked with them before, you probably know how much of a pain it is to find the correct name of the balloons, especially because they're not called through the image, but the actual name from the Balloon Data xml. I've most definitely struggled with that before! Thus, I decided to write a little program that just extracts all the names from the XML

EDIT: I figured I'd also add the 'keys' of the balloons as that's usually how you'd call the thoughtballoons with anyways Usually it defaults to "Random" when you'd want to use the ThoughtBalloonManager, but with the list it might make it easier to have more precise thought bubbles when your sims are socializing or doing "thinking" interactions





EDIT: I thought it would be fair to share some code on how to do this :p

How to call a set of Thought bubbles when doing an interaction? (refer to the BalloonKeys list):



If you rather use one single thoughtballoon/speechballoon...


Alternatively, if you have a list with your own curated Thought Icons (and your sim is doing a looping animation) you can also do this!

Advertisement
Forum Resident
#2 Old 30th Jan 2022 at 8:45 PM
Awesome! That's very helpful! I was wondering where the game hides all them string codes.

Here's a small snippet to demonstrate how to make double balloons, how to have thumbnails of sims or gameobjects (they all have the .GetThoughtBalloonThumbnailKey() property) and how to use the positive/negative axis.
I haven't worked out what priority really does, but perhaps someone wants to play with it.

So, this example pops up a double scream balloon with a crossed out frying pan icon at the top and a sim portrait at the bottom with a little smiley face next to it.

Code:
                        var sim = base.Target; // sim that spawns the balloon
                        var somesim = base.Actor; // sim whose portrait we want in our ballon
                        
                        var bd = new ThoughtBalloonManager.DoubleBalloonData(somesim.GetThoughtBalloonThumbnailKey(), "balloon_frypan"); // bottom, top ballon
                     
                        bd.mPriority = ThoughtBalloonPriority.Extreme_ShowInSkewer; // low, medium, high, extreme
                        bd.Duration = ThoughtBalloonDuration.Long; // short, medium, long;
                        bd.BalloonType = ThoughtBalloonTypes.kScreamBalloon;  // scream, speech or thought
                        bd.HighAxis = ThoughtBalloonAxis.kDislike; // top ballon: like (w/ smiley), dislike (w/ strikethrough) or neutral
                        bd.LowAxis = ThoughtBalloonAxis.kLike; //bottom ballon, see above;

                        sim.ThoughtBalloonManager.ShowBalloon(bd);


It's also very straight forward to show custom icons in the balloons. Just use S3PE to generate an IMAG resource of type 0x2F7D0004, name it and generate a FNV64 has from that name. Then simply import (replace with) your custom PNG icon. Access it via code by just placing the name where the "balloon_frypan" string is in the above code.

Find my Mods: Here at MTS, over at Simlogical
Virtual gardener
staff: administrator
Original Poster
#3 Old 31st Jan 2022 at 10:49 AM
Nice! Thanks for sharing that! I totally forgot to add that Calling the thumbnail key is also a good idea! Although I noticed sometimes the names of the images weren't 100% accurate? but then I got mine from the XML rather than S3PE lol... probably not a good idea... Might start with the thumbnail key approach if I ever need just one thumbnail

Quote:
I was wondering where the game hides all them string codes.


Initially I thought it was in code as well, but then all I could find was "Random". This is not always the one you want when you specifically make talking interactions about, say, cooking But I basically made a quick console program that reads the Balloon Data XML, and then just parses a list of whatever I wanted really. (In this case the Keys and balloon names)

(So just as an explanation about what a balloon key is, for the people among us that don't know: It's basically a string that you can call that has a collection of suitable balloon thumbnails. So for example, if you use "RantAboutWork" then the game will give random curated thumbnails that work for the theme "rant" and "work" basically )
Back to top