Bounding box problems
#1 18-01-2016 
Hi everyone. I'm working on a creator that requires me to deal with object creation, and I'm rather lost. I want to create miniature versions of Maxis cars, that still count as cars and can be assigned an owner. The idea is that your Sim can own a tiny car, and no longer get a carpool. The idea came from a couple of mine that have the same work hours. They live in an apartment and have a car, and I'd like them to carpool to work together since they leave at the same time, but since only one of them can be the owner of the car, the carpool still shows up for the other one and I find that silly.

SimFused (aka Michelle and Debra) made tiny versions of the Maxis cars as part of their tiny treasures collection. They were kind enough to give me permission to use their miniaturized meshes. I have cloned the Maxis smoogo minima car, and I have replaced it's mesh by importing the mesh from tiny treasures mesh. I have made it stop using the semiglobal pie menu and instead use my edited pie menu, and removed all menu options except change owner, and I've slaved it to the original so that it pulls textures from it. So far, so good. Tiny car that you can assign an owner.

But even though the tiny car is tiny, the footprint is still enormous. I've never modified footprints before, and cars don't appear to follow the same logic as some other objects as my clone only had one OBJD and so on. But Michelle sent me a tutorial on how to add footprint, and I managed to deduce how to change the CRES to be one tile. It appears to have worked, as it now only has one green tile and the object is centered in that tile.

But, while the car visually appears to be in the center of the square, the game does not recognize it as being there. To pick it up, I have to click at the edge of the tile rather than on the car. And the thumbnail is empty. Phaenoh suggests this might be due to the bounding box not being right. I've tried to find information about it but nothing I find works.

[Image: BoundingBox_zps9tmndjfx.jpg]

Does anyone have any advice on how to proceed? Aside from the bounding box problem, I also need to make it not want to be placed on a driveway, and accept being placed on shelves. But I'm taking one step at a time, and this seemed like a logical next step.
gummilutt, proud to be a member of LeeFish since Jun 2013.

#2 18-01-2016 
I would not bother with *ownership* of the mini car, but with the *possession* of one. As in: slightly rewrite the carpool code to *not* send a car for anysim who has the mini model in their *inventory*.

#3 18-01-2016 
That'd certainly be one approach for it. But I like my idea as it is. For example, this car will make Sims believe they have a car, so it fulfills car wants (and prevents them from re-rolling) those wants. And since I have managed to modify it so far, I might as well continue. If it proves impossible to fix the bounding box and placement of it, I'll reconsider my approach and try your version instead.

#4 18-01-2016 
Tjena. Smile

I'm not on my simming computer right now, but I'd have a look at the init (that's also where you'll be changing the placement flags to make it go on shelves but not on driveways, BTW). Try adding a BHAV line that sets the flag "do NOT use Maya model footprint", that might help. You can also try "add to bounding box" on the GMDC's... it's either on the Group tab or on the Model tab, can't remember which one right now. Just make a backup of your file before you try it, because it can bork things badly if you're unlucky.

That's the best I can do without looking at your object in SimPE (which I don't have on this 'puter - I'm on my notebook and TS2 would kill it ded).

#5 18-01-2016 
God morgon!

I posted on MTS as well, and mustluvcatz suggested deleting a part of the CRES to make thumbnail regenerate, and it worked. So that's one issue fixed. I tried adding the maya model line you said, on a previous version where I had not tried fixing footprint yet, and the footprint is now one tile. It still wants to be placed on a driveway, but at least it fixes the footprint. Thank you!

I found an old post by Numenor that explained that SimPE can now fix bounding box in the GMDC, and I tried it, but the resulting package makes the game crash if you try to place the object.

#6 18-01-2016 
Leget? (And now you know where in Sweden I'm from. Tongue )

Yay! That's two down, then. Smile

Fixing the placement is the easiest part, it's pretty much just a matter of setting or clearing placement flags in the init. So, clear the placement flag for driveway and set placement flags (or possibly "my allowed height" flags) for the surfaces where you want it to go, and you should be good. You might have to dig around a bit to find the surface you want, though, they might be under different flags (my flags, my placement flags, my placement flags 2...).

As a side note, you don't always see all the flags that are set/cleared directly in the init; very often, usually on the first line, the init will call on a semi global that sets/clears them instead. (Can't say for sure if that's the case with cars, but it is with stuff like deco.) The placement (and other) flags you set/clear in your init will override the ones that might be in the global, though.

#7 18-01-2016 
The init is indeed calling a semi global. Since that semi should be in the same group, anything that it can call as it is it should be able to call if set to private, right? So could I extract it and add it to my package, set group to 0xFFFFFFFF and fix instance number, and make the modifications I need to? That way it won't affect any other cars, just my car.

And you'd think I'd know, but I'm worthless at dialects. Unless you say ostkrokar I'm probably lost, and I only know that one because I have a friend who says that. To much mocking from my part, of course Tongue

#8 18-01-2016 
Sorry, I wasn't being clear. Any flags you set/clear in the init will override the ones in the semi global - but since your init is private, it'll only for your package, it won't affect any other cars. So if that's what you're worried about, you don't have to import the semi global for that reason. But you can still do it if you want to, of course, if you feel making the changes is easier that way.

What version of SimPE are you running? Because if it's the latest one, then when you view the semi global the init is calling, there should be a button called "import as private". If you use that one, it will fix the group and the instance number for you so you won't have to do it yourself. (If the button isn't not called "import as private", but just "import" or "import unchanged" or somesuch, then you'll have to change the instance number and fix integrity manually, like you said.)

I'm pretty sure you'd be able to tell where I'm from if you heard me speak. I'm from that city where people are (in)famous for pronouncing "ä" like "eee" and are commonly referred to by their two-digit area code. Tongue

#9 18-01-2016 
That makes sense. I got a bit confused earlier because the semi calls another semi that has the maya-line in it, which seemed kind of weird to me, but I guess something in the first semi was over-writing that line. I suppose I'll take a look at the Init of a few decorative objects, and try copying lines from them to this one, and see if that makes it forget about driveway. Never looked at an Init before, and the way they are set up is rather confusing me, but it usually helps to look at stuff.

I am running 0.72. I could never make sense of 0,73. I probably could now that I'm used to it, but I'm your typical "I hate change!"-internet person, so I haven't been motivated to try. Handy to be able to do it with a button press, but I'm used to doing it manually by now Smile

It did cross my mind you might be referencing that, but I've never really understood why the rest of Sweden think we speak like that so I decided you must be meaning something else Tongue I'm from there too! Moved to Örebro a couple of years ago though, for studies Smile

Does anyone have any ideas on the bounding box issue? Has anyone experienced the add bounding box causing the package to crash the game?

#10 18-01-2016 
Sorry for double posting, but I thought I'd update NixNivis on the progress. I had a look in the semi's that the Init is calling, and I noticed it's clearing some flags and setting others. I added the same lines to the init, but reversed them, and then I had a look in a decorative object and copied the flags it sets. It works brilliantly Smile It can still be placed on driveway, but does not jump into the standard place. Not sure if I want to keep that feature, or if it should need moveobjects to be placed on a driveway square like decorative objects. It's also not accepting OFB shelves, but all other kinds of surfaces it's agreeing to. Thanks a lot Smile

Aside from OFB shelves, I think the only thing left now is the bounding box problem. While waiting to see if anyone has any ideas, I'll try doing the bounding box fix on different stages of the car, see if there's some version of it that can handle it.

EDIT: Nope, I tried adding bounding box right after replacing the mesh, and that crashes too. I guess it's either my SimPE that can't do it properly, or there's something about the tiny mesh it can't handle.
EDIT2: Ran Numenors ofb shelve dimension setter on it, and it now places on OFB shelves Smile
(This post was last modified: 18-01-2016 11:09 PM by gummilutt.)


Sorry, that is a members only option