Replies: 273 (Who?), Viewed: 122035 times.
Page 1 of 11
Retired Duck
retired moderator
Original Poster
#1 Old 16th Oct 2005 at 4:40 PM Last edited by Echo : 3rd Feb 2006 at 1:26 PM.
Default Tutorial: Fixing the footprint (or "stop walking through my object!")
When an object mesh is made larger than the object it is cloned from, you will probably notice that your sims have an annoying habit of walking through the other cells as if they don't even see them. This can be annoying, and disruptive to the illusion. And as far as I know has always just been something you have to put up with, because in all my exploring I haven't come across anyone posting a solution before.

Well the good news is that it seems to be fixable!

There are two stages to fixing it. The first is making the visible footprint match your object. That is, you have to have the right number of green squares when you try to place the object. By itself, this is mostly an aesthetic change, but it is necessary for the next step. The process for doing this has been around for a while, and step-by-step instructions can be found here:
http://www.eternal-echo.net/sims/tutorials/footprint

The second half is the part that actually tells your sims that they can't walk there, and compared with the last part is surprisingly simple. (So much so that I wouldn't be particularly surprised if others have found it and just not shared the discovery). It does, however, require modification of a BHAV file, and my explanation here assumes some small familiarity thereof.

What you need to do is find your object's "Function - Init" Behaviour Function and add a new command at the end. This command should be:

My 0x0008 Set Flag Literal Value 0x0008

The values to get this are:
OpCode: 0x0002
Operands:
08 00 08 00 FF 09 03 07
00 00 00 00 00 00 00 00
True Target: Return True
False Target: Return Error

(For those interested, this is setting the object’s flag "7: Do NOT Use Maya Model Footprint". It seems that if this flag isn't set, as is the case by default, the system reads the footprint data from the footprint block in the CRES field. However, if it is set then the game generates the footprint itself at runtime based on the OBJD files in the package. )

Now you'll need to link the new command in to the rest of the Init function. You need to find the other line in the Init function that has "Return True" as its true target, then change it so that it is pointing to the line number of the command you just added. If that makes no sense, I suggest you look up a couple of BHAV tutorials, they explain it better than I have and they have pictures.

This technique hasn't been broadly tested, but I did try it on 3 quite different objects and it worked in each case (a couch, a table, and a decorative plant). Let me know if you find anything that doesn’t behave in this way and I'll put a note in here about it.

Any questions or requests for clarification are welcome. :D

---

A quick note regarding tables: Before you ask, this only half solves the differently-shaped-table problem. The problem of walking through resized tables is fixed using this technique. Placing chairs around the edge of the table is also fixed. However, the tables still seem to retain the same slots (or something...) for the placement of objects/food etc, so the objects will all be placed on one side of the table.
Advertisement
One horse disagreer of the Apocalypse
#2 Old 16th Oct 2005 at 4:42 PM
Where's the Thanks button!!!?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Retired Duck
retired moderator
Original Poster
#3 Old 16th Oct 2005 at 4:43 PM
I think the post has to be moved into "Tutorials" forum before I get one of those Inge. Sentiment greatly appreciated though! :D
The ModFather
retired moderator
#4 Old 16th Oct 2005 at 5:45 PM
(Moved to General Modding Tutorial)

Thank you Echo for the useful info!

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Field Researcher
#5 Old 17th Oct 2005 at 5:43 PM
Brilliant!! And so simple :D
So you don't really need to reserve the tiles one by one, but rather reserve the whole object instead. Very useful tutorial, thanks a lot!
Lab Assistant
#6 Old 21st Oct 2005 at 5:39 AM
Perhaps that other tutorial can get moved here before it vanishes?

I would also like to add that you can go in the negative direction. For example, a sub-index of -256, -512, and so on will extend the footprint in the opposite direction.

Sweet! Worked like a charm, thanks!

-T
Lab Assistant
#7 Old 21st Oct 2005 at 9:00 AM
thanks so much. this is just what i need for my 16 tile wide theater screen.
One horse disagreer of the Apocalypse
#8 Old 21st Oct 2005 at 9:04 AM
Yes, when I asked a Maxoid why there was still such a thing as a multi-tile object they said it was mainly just legacy and not really necessary. Extra tiles are handy when you want to run different code on different parts of the object, like for example Merola's painting.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Retired Duck
retired moderator
Original Poster
#9 Old 21st Oct 2005 at 9:56 AM
Targa: I was planning on rewriting the original tutorial eventually to include the BHAV info (and updated SimPE gui pics), so when I get that done, I'll certainly try to put it up here. The only reason I haven't so far is that I'd have to go through and change all the image links to bbcode, and I'm feeling lazy at the moment. Thanks for the tip about the negative sub-indices btw, I hadn't ever considered it!
The ModFather
retired moderator
#10 Old 21st Oct 2005 at 2:27 PM
Quote:
Originally Posted by Targa
Perhaps that other tutorial can get moved here before it vanishes?


Which tutorial are you referring to? Please give me a link and I'll take a look.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Lab Assistant
#11 Old 21st Oct 2005 at 7:43 PM Last edited by Targa : 21st Oct 2005 at 11:10 PM.
In Echo's tutorial post at the top of this thread. This one:
http://www.eternal-echo.net/sims/tutorial/

@Echo: The ability to add negative numbers is important, I suppose, since I've had to do it twice now. In replacing an object mesh with a larger mesh, (in my case, going from 2 tiles wide to 6 tiles wide), adding more Object Data's and Object Functions gave me more tiles to the left of center and none to the right, though my object was centered. I could have moved the pivot point in 3dsmax I suppose, but then you would be "grabbing" the right-hand corner of the object when taking it out of the buy catalog and when moving it. Adding 2 obj dat with positive numbers and 2 more with negative numbers widened my footprint equally in both directions, which is what I needed.

Edit: Well, this tutorial worked great for the first object I worked on, but this new object is not only not affected, Sims can walk through any part of the object now, as if it doesn't exist at all. Any suggestions?

Edit2: Never mind, figured it out. Add this to your tutorial:
In "Object Data", each OBJD must have the value "Footprint mask" set to zero.
The ModFather
retired moderator
#12 Old 21st Oct 2005 at 11:41 PM
Quote:
Originally Posted by Targa
In Echo's tutorial post at the top of this thread. This one:
http://www.eternal-echo.net/sims/tutorial/


If Echo wants to repost it here, I'll be glad to move it in the tutorial section.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Instructor
#13 Old 27th Oct 2005 at 10:27 PM
ah this is awesome! just what i was looking for! thank you so much.

xD
Lab Assistant
#14 Old 4th Dec 2005 at 1:15 PM
Ah yes, Echo's footprint tutorial... I'm just a little hesitant about the first part, since there are 4 OBJD's for my object... Will I have to change all of them? Or just one? And then there is a slight complication... the tutorial is meant to add tiles, not remove them. After all the hair-pulling I've been through I get shakey thinking about remutilating my poor package =) But hey... I tend to think of it as worthwhile, since it makes a much better release =)

And now that my browser has refreshed... Greeting Echo.. care to fill me in on removing an extra footprint tile? ;-)

Pax,
Indigo
Retired Duck
retired moderator
Original Poster
#15 Old 5th Dec 2005 at 5:04 AM
Greetings Indigo

Well if you're nervous about mutilating packages, do what I do and make a packup copy of the package first . As for removing tiles, it's really just a matter of working backwards. I'm assuming you still want the object to have multiple tiles, you just want to get rid of some of them (so, say, have two or three instead of four)?

First, figure out which OBJD is the master tile. Make sure you don't do anything to that one, it can stay as it is.

Now look at the other OBJDs, and take a note of the value in their "Multi-Tile Sub Index" field. Using the info in the tutorial (the diagram under "Part Two: Adding More Tiles"), see if you can figure out which OBJD is representing which tile in the footprint. Once you've found which one you want to remove, then take a note of its Instance number. Then you can just delete the OBJD.

To keep things neat, you should now go and delete the OBJf files which has the same Instance number as the OBJD you just deleted (Although strictly speaking it won't break your file to leave it in there).

If you want to reduce it to a single tile/OBJD, it's a little more complicated because you have to undo the multi-tile step as well. The simplest way is to still have a master and a single slave OBJD, but that does use up an extra GUID that isn't needed. If you want to reduce it to a single tile efficiently let me know and I'll explain the steps involved there too.

Hope that made sense. If it didn't, let me know and I'll try to do a more detailed version.

Echo
Inventor
#16 Old 6th Dec 2005 at 3:04 AM
thankyou so much! i have laid off some objects i have made because i wouldn't be able to sort it out but now i can go ahead thanks very much again.
Part-time Hermit
#17 Old 11th Dec 2005 at 6:21 PM
I was fine with the first part of the tutorial, but the Function-Init editing part completely throws me off. I'm not sure what to do to add a new command and where exactly. I got as far as putting those values listed into the boxes, but I have no clue other than that. Do I need to use the Add button at some point?
The ModFather
retired moderator
#18 Old 11th Dec 2005 at 6:38 PM
I suggest to check the option "Special Buttons" (near the Add & Delete buttons); some new buttons will appear. Now select the last line of the BHAV (the one that exits to "Return True") and click "Add via True".
This will add a new line, already linked to the previous one. You just have to check if the OpCode is 0x0002, and then fill in the operands from the tutorial.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Part-time Hermit
#19 Old 11th Dec 2005 at 7:13 PM
OK, I feel like a complete dummy, but I still don't get it. To be able to view the last line of the BHAV I have to open it in a separate window (by clicking on View BHAV). If I click on that line with the Return True value there and then go back to the main window and click Insert Via True, it doesn't do anything to that line, it just adds a line to the main window and links it to something else, not the line I want it to.
One horse disagreer of the Apocalypse
#20 Old 11th Dec 2005 at 7:24 PM
No don't use View BHAV. That is a readonly viewing of the BHAV pointed to in an opcode, just so you can see what code you're calling. It's not the current BHAV.

Are you trying to open the BHAV via the Object Function table? That's not right, you want to look at the filetype list and select the appropriate BHAV to open from there. Then you wil be able to edit it.

If you are already doing that right, and you can't see the last lines, you can pull the plugin pane a bit bigger and you should also be able to see a scroll bar

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Part-time Hermit
#21 Old 11th Dec 2005 at 7:48 PM Last edited by IgnorantBliss : 11th Dec 2005 at 7:55 PM.
No, I have the Behaviour Function and the Function Init open, but I only see one line in the Plugin view, there is nothing to scroll down to. Even going to Advanced Mode doesn't change it. I'm using SimPE 0.52. Could this object (a coffee table) only have one line to begin with?
One horse disagreer of the Apocalypse
#22 Old 11th Dec 2005 at 8:08 PM
Yes very possible. Usually a standard object like a table simply calls the Init from the semiglobals. But you should be able to add lines after that line if you wanted something extra to happen. Obviously you need to make sure the new line is linked into the flow so it actually runs. Just click Add.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Part-time Hermit
#23 Old 11th Dec 2005 at 8:12 PM
OK, I added a line after that one line like told in the tutorial, but now I can't place the coffee table anywhere, the placement arrows just stay red regardless of where I try to place it. So I guess I did something wrong still.

Edited to add: Never mind, I made a mistake with the OBJf that probably caused the problem.
One horse disagreer of the Apocalypse
#24 Old 11th Dec 2005 at 8:17 PM
Would you like to list your edited BHAV here? If you tick "Special buttons" in your BHAV editor one option is to copy the listing to your clipboard, then you can paste it into a forum post.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Part-time Hermit
#25 Old 11th Dec 2005 at 8:24 PM
OK, the placement problem was because the extra OBJf was missing. I had added it at some point but had several different versions of this table saved and it was missing from this one. Now I can place the table on the floor just fine. Now if only I could make the new tile fully functional, being able to place items on it .

Thanks for the help!
Page 1 of 11
Back to top