Welcome to
Mod The Sims
Online: 3874
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: 37 (Who?), Viewed: 30906 times.
Search this Thread
Old 18th Aug 2009, 4:31 AM Defaultmaking a box with open/closed states? #1
aelflaed
Original Poster

Theorist

Join Date: Jan 2007
Posts: 2,178
Thanks: 15647 in 49 Posts
15 Achievements


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.
Old 18th Aug 2009, 8:23 PM #2
HugeLunatic
Dancing Flamingo



Join Date: Mar 2006
Posts: 6,371
Thanks: 178420 in 254 Posts
70 Achievements


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.
Old 19th Aug 2009, 12:54 AM #3
aelflaed
Original Poster

Theorist

Join Date: Jan 2007
Posts: 2,178
Thanks: 15647 in 49 Posts
15 Achievements


That's an idea. Of course, looking at another object usually confuses me, but it's worth a try.

Thanks, HL.
Old 25th Aug 2009, 1:10 AM #4
leefish
Sesquipedalian Pisciform



Join Date: Jul 2008
Posts: 6,569
Thanks: 107093 in 124 Posts
39 Achievements

View My Journal


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
Old 25th Aug 2009, 2:39 AM #5
aelflaed
Original Poster

Theorist

Join Date: Jan 2007
Posts: 2,178
Thanks: 15647 in 49 Posts
15 Achievements


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.
Old 25th Aug 2009, 5:41 AM #6
Echo
Retired Duck



Join Date: Dec 2004
Posts: 3,941
Thanks: 39911 in 27 Posts
27 Achievements

View My Journal


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
Old 25th Aug 2009, 5:42 AM #7
aelflaed
Original Poster

Theorist

Join Date: Jan 2007
Posts: 2,178
Thanks: 15647 in 49 Posts
15 Achievements


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.
Old 27th Aug 2009, 9:17 AM #8
aelflaed
Original Poster

Theorist

Join Date: Jan 2007
Posts: 2,178
Thanks: 15647 in 49 Posts
15 Achievements


'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
Last edited by aelflaed : 1st Sep 2009 at 1:10 PM. Reason: attachments no longer needed
Old 28th Aug 2009, 4:17 AM #9
aelflaed
Original Poster

Theorist

Join Date: Jan 2007
Posts: 2,178
Thanks: 15647 in 49 Posts
15 Achievements


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.
Download - please read all instructions before downloading any files!
File Type: rar AEBugBoxScenegraphErrors.rar (185.3 KB, 5 downloads) - View custom content
Description: broken 'open' state...and the rest of course!
Last edited by aelflaed : 29th Aug 2009 at 8:09 AM. Reason: broken scenegraph posted
Old 31st Aug 2009, 3:14 AM #10
aelflaed
Original Poster

Theorist

Join Date: Jan 2007
Posts: 2,178
Thanks: 15647 in 49 Posts
15 Achievements


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.
Old 31st Aug 2009, 4:04 AM #11
HugeLunatic
Dancing Flamingo



Join Date: Mar 2006
Posts: 6,371
Thanks: 178420 in 254 Posts
70 Achievements


Good job! Based on how repository works and that shadows can be linked then, I would guess that yes you only need to create one shadow.
Old 1st Sep 2009, 1:25 AM #12
aelflaed
Original Poster

Theorist

Join Date: Jan 2007
Posts: 2,178
Thanks: 15647 in 49 Posts
15 Achievements


Thanks. Still wrestling with the footprint at the moment.
Old 1st Sep 2009, 11:09 AM #13
Echo
Retired Duck



Join Date: Dec 2004
Posts: 3,941
Thanks: 39911 in 27 Posts
27 Achievements

View My Journal


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.
Old 1st Sep 2009, 1:04 PM #14
aelflaed
Original Poster

Theorist

Join Date: Jan 2007
Posts: 2,178
Thanks: 15647 in 49 Posts
15 Achievements


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!
Last edited by aelflaed : 1st Sep 2009 at 1:23 PM.
Old 2nd Sep 2009, 12:47 PM #15
Echo
Retired Duck



Join Date: Dec 2004
Posts: 3,941
Thanks: 39911 in 27 Posts
27 Achievements

View My Journal


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!
Old 2nd Sep 2009, 2:53 PM #16
aelflaed
Original Poster

Theorist

Join Date: Jan 2007
Posts: 2,178
Thanks: 15647 in 49 Posts
15 Achievements


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.
Old 3rd Sep 2009, 1:06 PM #17
Echo
Retired Duck



Join Date: Dec 2004
Posts: 3,941
Thanks: 39911 in 27 Posts
27 Achievements

View My Journal


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.
Old 3rd Sep 2009, 2:38 PM #18
aelflaed
Original Poster

Theorist

Join Date: Jan 2007
Posts: 2,178
Thanks: 15647 in 49 Posts
15 Achievements


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.
Download - please read all instructions before downloading any files!
File Type: rar ObjectError_N007_t67771.rar (13.8 KB, 5 downloads) - View custom content
File Type: rar AEBugBox3DError.rar (192.1 KB, 5 downloads) - View custom content
Last edited by aelflaed : 4th Sep 2009 at 5:48 AM.
Old 4th Sep 2009, 6:26 AM #19
aelflaed
Original Poster

Theorist

Join Date: Jan 2007
Posts: 2,178
Thanks: 15647 in 49 Posts
15 Achievements


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.
Old 4th Sep 2009, 6:47 AM #20
Echo
Retired Duck



Join Date: Dec 2004
Posts: 3,941
Thanks: 39911 in 27 Posts
27 Achievements

View My Journal


They're used from the "Function - Sit" commands (semiglobals), called from the objf's "Sit" target. Definitely not in the food.
Old 4th Sep 2009, 11:08 AM #21
aelflaed
Original Poster

Theorist

Join Date: Jan 2007
Posts: 2,178
Thanks: 15647 in 49 Posts
15 Achievements


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.
Old 4th Sep 2009, 11:42 AM #22
Echo
Retired Duck



Join Date: Dec 2004
Posts: 3,941
Thanks: 39911 in 27 Posts
27 Achievements

View My Journal


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.
Old 4th Sep 2009, 2:19 PM #23
aelflaed
Original Poster

Theorist

Join Date: Jan 2007
Posts: 2,178
Thanks: 15647 in 49 Posts
15 Achievements


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!
Last edited by aelflaed : 4th Sep 2009 at 2:58 PM.
Old 5th Sep 2009, 3:41 AM #24
aelflaed
Original Poster

Theorist

Join Date: Jan 2007
Posts: 2,178
Thanks: 15647 in 49 Posts
15 Achievements


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.
Old 5th Sep 2009, 4:23 AM #25
Echo
Retired Duck



Join Date: Dec 2004
Posts: 3,941
Thanks: 39911 in 27 Posts
27 Achievements

View My Journal


Well on the "Budget" thing, check out this thread:
http://www.modthesims.info/showthread.php?t=149812

It's old, but it's accurate.
Reply


Section jump:


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