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!
Alchemist
Original Poster
#1 Old 18th Aug 2009 at 4:31 AM
Default making a box with open/closed states?
I'd like to make a floor chest that opens, but can't find out how. I've been all over MTS for days and can't find anything, which probably means I'm using the wrong search terms.

I don't care about animating the movement particularly, but I'd like the box to have an open state. I presume this means two meshes? And then I need to know how to connect them in the interaction.

Can someone point me to a tutorial? Thanks.
Advertisement
Me? Sarcastic? Never.
staff: administrator
#2 Old 18th Aug 2009 at 8:23 PM
I don't know of a tutorial, but an object you can look at is the open/close drapes by Inge at Simlogical. I think the original object she used was lights, since they have the two states.
Alchemist
Original Poster
#3 Old 19th Aug 2009 at 12:54 AM
That's an idea. Of course, looking at another object usually confuses me, but it's worth a try.

Thanks, HL.
Sesquipedalian Pisciform
retired moderator
#4 Old 25th Aug 2009 at 1:10 AM
another excellent item would be the dolls house if you want something already on the floor - it has two meshes. I also made a small window that does EXACTLY this trick and feel free to take look at the BHAVs in that. You can find my little window in the thread below.

http://www.modthesims.info/download.php?t=341918

More downloads by Leesester, BoilingOil and others at Leefish.nl | My Stuff at Leefish.nl | LeeFish RSS | Sims4 News Blog | TumblinLeefish
Alchemist
Original Poster
#5 Old 25th Aug 2009 at 2:39 AM
Thanks, Leesester. I'll have a look at your window.

I'm working on the mesh, which is taking a while, but then I'll have to discover how to make the package work. Still haven't found any instructions, so I hope I can figure it out from looking at these other objects.
Retired Duck
retired moderator
#6 Old 25th Aug 2009 at 5:41 AM
http://www.modthesims.info/showthread.php?t=220742
describes what you are trying to do. For linking the new GMDC into your package, you'll probably find this one useful:
http://www.modthesims.info/wiki.php...he%20Scenegraph
Alchemist
Original Poster
#7 Old 25th Aug 2009 at 5:42 AM
Thanks, I'll check out those links when I get back.

Oooh, after a quick glance, the Scenegraph one looks scary, but I probably have to dive in and work it out. Thankyou.
Alchemist
Original Poster
#8 Old 27th Aug 2009 at 9:17 AM Last edited by aelflaed : 1st Sep 2009 at 1:10 PM. Reason: attachments no longer needed
'm working on connecting the 2nd mesh and referencing it in the BHAV. It seems to need a temp file...or is that because I have My graphic instead of My Stack object? I have to do that next, missed that post before.

EDIT - okay, I've been messing about with it but I just don't understand enough. I've tried to add the open box mesh, and I've also tried to spawn roaches when the coinflip fails. Neither is working, not very surprisingly.

Must look again at the scenegraph info, and the Data Types thread. I've been reading all sorts of stuff on stacks and things, but not following very well. I may understand more after some sleep!

In the meantime, here's the current package, and some error logs...perhaps some kind soul can help me on my way.

There are lots of things wrong with it at this stage - no proper texture, too-small footprint, just to name a few. You can probably ignore it for the moment.

One more thing which I would like a pointer on - I've tried to put a view menu onto it, but it isn't showing. Mustn't be connected right or something. I imported the BHAVs for view and view test from another object, was that the wrong way?

I hope the files are attached properly, they aren't showing up for me at present.Trying a Mediafire link just in case:
http://www.mediafire.com/?sharekey=...6262b50c543740e
Alchemist
Original Poster
#9 Old 28th Aug 2009 at 4:17 AM Last edited by aelflaed : 29th Aug 2009 at 8:09 AM. Reason: broken scenegraph posted
I now have roaches! Hooray...I think.

But the mesh is still vanishing instead of changing state. The anims and motive changes coded are happening as far as I can judge, but without an object. Hmmm.

Also, the roaches have a visual lag - the sims react to them immediately and begin stomping, but the visible bugs take a while longer to show. Not sure if this can be tweaked?

Thanks for reading! Asistance also appreciated.

EDIT again:

I've been trying to fix the scenegraph, and some of it is better thanks to Echo's tutorial. However, I can't repair the second mesh - the -open' state of the chest. I have two orphans and one false TXMT (which should be pointing to one of the orphans). I can't make them reference each other properly, and am probably making it worse by more fiddling! Hope someone can help.
Attached files:
File Type: rar  AEBugBoxScenegraphErrors.rar (185.3 KB, 7 downloads) - View custom content
Description: broken 'open' state...and the rest of course!
Alchemist
Original Poster
#10 Old 31st Aug 2009 at 3:14 AM
Well, I've finally got the scengraph working. Don't know what was wrong with it before, but I now have everything linked and the open/closed states of the box are working. Yay me!

Question - do I need to add an extra shadow for the open state? At present the closed state still has a dollhouse shadow. Can I link both states to the one?

Next I am working on the footprint issue.
Me? Sarcastic? Never.
staff: administrator
#11 Old 31st Aug 2009 at 4:04 AM
Alchemist
Original Poster
#12 Old 1st Sep 2009 at 1:25 AM
Thanks. Still wrestling with the footprint at the moment.
Retired Duck
retired moderator
#13 Old 1st Sep 2009 at 11:09 AM
Just a quick note regarding the "View" option, unfortunately you can't just import a "view" option from a painting or sculpture object into a different kind of object like the dollhouse, because they belong to different object "families" and have different semi-globals. That's why, if you open the "view" bhav inside a painting and find a line with an ID greater than 0x2000, it'll have one description, but if you move it into another type of object it gets a different description.

From the looks of the rest of your code, you've definitely got the hang of getting sims to move around and animate when you tell them to, so I'd suggest that rather than trying to import the view behaviours (which are all unnecessarily complicated) you just make a simplified version of the view which just chooses some good standard viewing animations and plays them.
Alchemist
Original Poster
#14 Old 1st Sep 2009 at 1:04 PM Last edited by aelflaed : 1st Sep 2009 at 1:23 PM.
Quote:
rather than trying to import the view behaviours (which are all unnecessarily complicated) you just make a simplified version of the view which just chooses some good standard viewing animations and plays them
I was thinking that might be the way to go. Thanks. And I'm glad you think my code looks okay - it's far more linear than anything else I've looked at.

I really need an animation that has the sim reach towards the object. Obviously enough, trying the a2o anims keeps giving me an IK error, but are there some that will work? Or can I make one of those animations work somehow? I'm not sure I'm ready to leap into animating anything just yet, but I can't find an animation that looks reasonable.

Assuming I get the footprint fixed and finish coding this box, the next project is a basketry station. For that, I want to spawn a partial project in front of the sim, have them work on it for a while, and then get a finished object at the end - a bit like painting on the easel, I suppose. Any tips on where to find out how that is achieved?

I want them to sit on the ground while doing it, and I'd like other sims to be able to join the activity and be social, like they do with fishing..., all of which might be easier said than done.

It's a steep learning curve!
Retired Duck
retired moderator
#15 Old 2nd Sep 2009 at 12:47 PM
For reaching... I can't remember what it's called, but there's a sort of pick up type animation which doesn't require a2o... I used it in the Easter Bunny code when he swipes the "crest of bunny", if that helps?

The easiest way to create a "work-in-progress" object style object is actually, oddly enough, very similar to what you've made here - mesh switching. What you want to do is run a "Create New Object Instance" command with the GUID of the object you want to create, but have multiple mesh versions for different states of completion. When the object is in it's final state, you're done and can move it away at will.

Multiple sims joining in is sometimes a bit trickier, but it depends on how synchronized the activity needs to be. If they can just all run animations at roughly the same time as each other, that's fine. If you actually want sims coordinated with one another, passing stuff around or taking turns with something, it's a fair deal harder to do!
Alchemist
Original Poster
#16 Old 2nd Sep 2009 at 2:53 PM
I thought mesh-switching would be the way; thanks for confirming it. (My progress isn't precisely "oddly enough" - there is a level of planning in my modding career I'm a late bloomer, but hoping to get there in manageable stages.)

I've been looking at Nadira's Ceramics Workstation, which is VERY complex but does show me a number of things I need to do. Hopefully less complicatedly!

It looks as though the ceramics station is doing most of the work in little bits, all in separate BHAVs, instead of putting them together. Maybe it's easier to keep track of that way. There are an awful lot of BHAVs calling each other all over the place, and a lot of other commands I don't understand, many of them without helpful wizards. Sigh.

I've got a budget transaction coded for the Bugbox, but haven't time to test it this evening. Hope I got it right; then I can use that for the basketry too.

I'll keep looking for the reaching animation - saw a thread where you had suggested bookcase anims, will have to look for those. I can look up the bunny one as well. I'm using a text list of basegame animations, but I suspect it is rather incomplete - haven't seen any book anims on it at all, and I was looking for the diary one particularly. I'll have to seach the game files myself.

The joining doesn't need to be synchronised. I would like the activity to be social - one sim making a basket can be joined by others ('ask to join' maybe?). Each sim would need their own project spawned, I think, and then they'd work on it in their own time-frame. Hopefully that's the less tricky option! And I do want them to talk with each other while working.

I got the sim to sit on the ground properly in front of the basketry station, but I'm not sure if I can keep going that way - there might not be any animations to use for the rest of the interaction. Looks good sitting down and standing up again, though, so I hope I can continue - it won't be as good if I have to put it all onto a table.

Is it better to spawn the project in their hands, or on the ground in front of them? Does it mattter? Presumably the finished version will have to go on the ground so it can be kept or sold.

Nadira has umpteen different vase types, colours and stages - it''ll reduce the coding if I keep it to three (or so) styles of basket. And maybe a super-duper master-level object to finish off with.

Anyway, must go to bed now. Thanks for your continuing advice.
Retired Duck
retired moderator
#17 Old 3rd Sep 2009 at 1:06 PM
If you're happy with just having sims sit near each other doing their own thing but talking to each other, then you should be able to get away with using the global "Conversation - Enter (Area)" code. It's global 0x034C, and handles people's conversation topics, taking turns to speak, reacting to different topics, and all the other inter-sim dynamics. You can find examples in a bunch of objects, but chairs are a nice example.

For objects which I want sims to move around and pick up and put down again, what I normally do is clone a "pick-up-able" object like a cup. That way I can spawn it on the ground or on a table, have the sim pick it up and interact with it, then put it down again. That's just my technique though, there are many others. It really depends on what effect you're going for.
Alchemist
Original Poster
#18 Old 3rd Sep 2009 at 2:38 PM Last edited by aelflaed : 4th Sep 2009 at 5:48 AM.
That sounds like a good method for the basketry work, and for the joining. I'll give it a go.

(Found a good reaching animation, BTW - a20-videogameRackFloor-browse-crouch-getVideogame. Works well. The rabbit one you suggested was probably a-daydream-grabstuff, but that has the sim reach out at chest-height, which doesn't suit my current objects at all.)

Now, various Bugbox issues:

I've hit a snag with the Bugbox and can't figure it out. At present, the interaction fails after the videogame anim, accusing my expression of calling a non-3D object. I suspect this is because I have now altered the footrpint. I notice the sim is lining up at the front-left of the object, rather than in the middle of the two tiles, so perhaps I have missed something in the footprint stuff.

Did some searching but couldn't find out how to fix whatever it is. Found something suggesting a change in the 3D object type, but that setting seems to be correct for my OBJDs. I'll post the latest package in case someone (not pointing any fingers) can tell me what to alter next.

Also, I've lost the Close Lid menu option somehow. Maybe it's the same problem as the mesh swap, since I'm trying to make the option dependent on the lid needing to be closed.

I did make a guard for the Investigate BHAV, which is currently disabled. I wanted to prevent the option if the lid was already open, and push the sim to close the lid if so. My attempt at that last bit failed completely, so I mustn't be doing it right.

General query - I'm using Literals to check/alter motives, but I see others using constants - is one better? How would I know which constant to pick if I wanted to?

That's about enough for the moment. If I can't get any further with the bugbox on my own, I can start working on the basketry solutions you've offered. Nice to have a fallback plan.
Attached files:
File Type: rar  ObjectError_N007_t67771.rar (13.8 KB, 7 downloads) - View custom content
File Type: rar  AEBugBox3DError.rar (192.1 KB, 7 downloads) - View custom content
Alchemist
Original Poster
#19 Old 4th Sep 2009 at 6:26 AM
Quote:
global "Conversation - Enter (Area)"
I cloned the tea party chair and had a look, but it doesn't have anything in the BHAVs but main and init, and precious few commands in those. I assume all chairs are accessing BHAVs globally or something, but it didn't help me much. Maybe it's attached to the food rather than the chairs?

However, I did find it in the globals list, so I suppose I can mess about with it anyway.
Retired Duck
retired moderator
#20 Old 4th Sep 2009 at 6:47 AM
They're used from the "Function - Sit" commands (semiglobals), called from the objf's "Sit" target. Definitely not in the food.
Alchemist
Original Poster
#21 Old 4th Sep 2009 at 11:08 AM
Then it must be in the water....

I'm working on the accessory meshes for the baskets just now, while waiting for either inspiration, or a tip, on my next move with the bugbox 3D error.
Retired Duck
retired moderator
#22 Old 4th Sep 2009 at 11:42 AM
A suggestion more than a definitive answer, but I suspect you've not got the right OBJD in the Stack Object. Right after the first line, add a line which says "Stack Object ID 0x00 := Stack Object's Lead Tile Object ID.
Alchemist
Original Poster
#23 Old 4th Sep 2009 at 2:19 PM Last edited by aelflaed : 4th Sep 2009 at 2:58 PM.
I think you're right. Putting that line in got rid of the 3D error, allowing me to continue on to a Tree Break one instead. Oh well. The new error seems to indicate I'm not doing the budget transaction correctly. Must need another command or something.

What do I need to do to get the text notification to put the sim's name in properly? They all say "Me$" currently. I've searched for that also, without success so far.

The custom view menu seems to be working as planned, and the mesh swapped when it should. Close menu didn't appear after the Tree Break error (on a 'true' coinflip), but did appear after the failure result. With its own animation speed error.
***********
I tried to create a new object with the basketry station, but nothing showed, and no error. I cloned the coffee mug, which seems to have no TXTR file, and I haven't yet added one, so that might be part of the problem. Have to investigate that some more too.

I am slowly getting there.

I need to know how to fix the budget properly, get the sim's name into the text notification, and create a new object instance successfully. That ought to fill up my time for the next little while!
Alchemist
Original Poster
#24 Old 5th Sep 2009 at 3:41 AM
Echo, I just found your "Better Interactions" tutorial. Don't know how I missed it before, but it looks like it will answer a number of my current questions. You're a marvel, and I'm off to study up.
Retired Duck
retired moderator
#25 Old 5th Sep 2009 at 4:23 AM
Well on the "Budget" thing, check out this thread:
http://www.modthesims.info/showthread.php?t=149812

It's old, but it's accurate.
Page 1 of 2
Back to top