PDA

View Full Version : Tutorial: Making Your First Custom BHAV


Pages : [1] 2

Echo
25th Mar 2006, 12:10 PM
This tutorial steps you through the process of adding a completely new behaviour to an object. It assumes no prior experience with BHAV programming, (or any programming really, although it would certainly give you a head start,) although it does assume reasonable familiarity with the SimPE program. The steps describe the full process, from adding a new item to the pie menu, having the sim walk to your object, manipulating the sim's motives and statistics, having the sim perform actions, adding randomization and decision based paths, safely looping the interaction, and adding guards to limit its use. It aims to explain the concepts and basic steps in a generic way with practical examples, in order to provide the ability to make lots of different sorts of behaviours.

It is made and tested with SimPE 0.56, and is heavily illustrated.

The attached file "Custom Interaction Tutorial.zip" is the PDF version of the tutorial. If you cannot view PDF files, an HTML version of the same tutorial is available at my website here (http://www.eternal-echo.net/sims/tutorials/interactions/). A copy of the object that was created in this project ("echo-tutorial.zip") is also attached, so you can compare with your own work.

As stated in the tutorial, you are welcome to post any questions you have about the material here. If you are having trouble completing a step, please post the troublesome object along with your detailed description of the problem, so I can find the problem more efficiently (and with less guesswork). :)

SuperFly
7th Apr 2006, 04:05 PM
I've been having a problem with the first step- I import the semi-globals, change the groups, then add in a new string. I commit and save, but then in Pie Menu Functions, the new string does not appear. I've tried commiting, saving, and then closing then reopening the package, but to no avail- what could the problem be?

Thanks, :)

SuperFly

Echo
8th Apr 2006, 01:28 AM
Could you post the object? It makes diagnosing a whole lot easier! ;)

When you went to the pie menu functions, did you follow this part:

Click on the "view" option, and press the "Add" button. An exact copy of the "View" option will be added onto the end of the list. Make sure this copy is selected.

Across to the right you should see a drop down list labeled "Pie String ID". Click on this, and you should get a list of all the lines in the "Pie Menu Strings" file. Find the one you just added, and select it. The name of the interaction on the left should change to match it.

Failing that, take a look at the instance numbers of the Menu Strings and Menu Functions - they should match?

SuperFly
8th Apr 2006, 07:16 PM
Ahh, that fixed the problem- thanks Echo :)

dragonarts
13th Apr 2006, 07:29 PM
Echo, this is without doubt one of the best tutorials available! I have wanted to work on BHAV's ever since I made my fist objects recolor, and just couldn't figure it out. Now, thanks to you, I CAN! The attached pic is of my custom painting, done by this tutorial, with one of my sims dancing in front of it.

I haven't even finished the tut yet. I only have gone as far as putting the hula dance in the list of BHAV's, but I'm so excited I just couldn't wait to thank you. As you may be able to see looking at the pic, I went ahead and maxed out all the motives with my painting. also, it's using a custom mesh and texture file. The painting really is from a painting, one of my own watercolors.

Now all I have to do is finish the tut, tweak this object so it works just how I envisioned it, and offer it up here. Then go on and do the "magic" system I've been dreaming of since I started. I'd like to figure out how to make it a skilling system like from your Harry Potter magic skilling system. I've got so many ideas! *brain starts to overheat* Don't know if I can figure that out, but I want to try so much. :giggler:

Echo
14th Apr 2006, 02:10 AM
Looks pretty much perfect to me! Very cool!

There's not much in the tutorial about proper skilling (it was on the original draft, but the explainations were getting quite complicated and, well, the tutorial was already pretty long) but if you get to the end and decide you want to use the magic-skilling system let me know and I'll give you a quick rundown on how to make your object use the hidden magic skill. If you were wanting to create your own hidden skill I can probably help with that too, although it's a little more complicated. :)

PS - The painting's gorgeous! My paintings tend to come out looking a lot like that Llama painting sims with very low creativity skill make, so I'm in awe.

dragonarts
14th Apr 2006, 03:03 AM
The corners of the texture got messed up when I resized the new mesh, so I have to redo the UV map and fix it. Won't take long... And I wanted to give more options than just maxing all the stats at once.

As for the skilling, I think the magic skill would work nicely, but the type of effects are very different. Actually, I'm not totally sure modding can accomplish everything I want to have happen, but I'm sure I can get some of it in place.

What I have in mind is, well... big. A whole system. I developed a type of powers for a book I mostly got written, and then developed the system of powers into a Dungeon and Dragons class for my son to use. (he likes to play) If you've read any of my threads, and seen the Kii skins you've seen a tiny bit of what I've developed. Not that these powers would be limited to my custom skins. But there are 8 "realms", and each realm has 4 aspects. Even if I give each aspect of each realm only one effect, that's still 32 powers. And eally, they should each have at least 3 or 4. So that would be... um... lots of things to have happen. I haven't got all the effects worked out on paper yet. If I use the magic skilling, then powers would build, as skill builds. Aspects could stack, but you still have 8 realms.

Yes, I really appreciate your offer to help. I'll probably come begging. Thanks.

Edootjuh
17th Apr 2006, 02:07 PM
Finally, set the value in the "Guardian BHAV" to 0x0. The purpose for this box will be described a little later, but for now, just set it to 0.


Finally, look at the fields for "Action BHAV" and "Guardian BHAV".
??????

Echo
19th Apr 2006, 09:32 AM
Hmm... I do tend to overuse the word "finally" when I forget to proof read. :) The second is just for consolidation - you don't have to do anything, it's just interesting to look at given what you've just learned. :)

Edootjuh
20th Apr 2006, 06:48 AM
I think this tutorial should be sticky, it really helped me out

dragonarts
20th Apr 2006, 03:23 PM
I subscribed to the thread so I can always find it. But I agree that making this a sticky would be good. Maybe the Powes That Be here will do that soon. This is a GREAT tutorial.

Morague
22nd Apr 2006, 01:14 AM
Echo,

Thank you for a very well written, easy to follow tutorial that explains how to do things!

I still have much to learn but I keep plugging away at it. Eventually I'll get there :)

joe698
27th Apr 2006, 06:14 PM
:rofl: thanks LOADS!!!this is a great tutorial

franckys
27th Apr 2006, 11:44 PM
exellent.
thank's.

CynicalChick
27th Apr 2006, 11:59 PM
This is great. Thanks for putting it into such an easy to use format. I'm having much fun with it :)

peregrine
10th May 2006, 07:14 PM
Thank you very much for going to all this trouble. I've done only a very little of this sort of thing before but using trial and error. This is very well written and very accessible, and beautifully presented.

What I would like to know is what do you do if you are using an object which has no pie menu strings/functions in the cloned package NOR in the globals, for instance, plantglobals. I wonder if you could help?

Echo
13th May 2006, 10:24 AM
You can import pie menu strings and function tables from a different object or semi-global group. Just make sure, firstly, that they both have the same instance ID. Then, go into your OBJd file, open the "Raw data" tab, and find the line that says "Interaction Table ID". Set that value to the instance ID of the pie menu files. If all goes well, you should now have a pie menu again. :)

peregrine
19th May 2006, 12:55 PM
Thank you Echo. Apologies for the delay in reading your post. Have followed your advice and it all works fine.
Having been working through your tutorial again I am really impressed by how clear and helpful it is, and how the explanations manage to lead one on to new and different areas of experimentation. You have a real gift for communication. Thanks so much for doing this.

blobomotz
13th Jun 2006, 05:27 PM
Hello :)

Thx a lot for this tutorial !! The light come :rofl:

But ... (an answer = 2 questions) ... i see items with sub-level menu choice .
I read some with Simpe but i don't really undestand the logical way.

With this sub-level menu choice ... that's an explosion of possibility. can you explain the basis of this concept ?

Any way, your tutorial have answer too many question and thanks again and again :D :beer: :)

Echo
14th Jun 2006, 10:36 AM
When you say sub menu, I assume you're talking about when you click on an item in the pie menu, and a second pie menu expands around that? Actually, that's fairly simple to do. In the pie menu strings, you can enter lines like:
Study.../Cooking
Study.../Mechanical
Study.../Cleaning
(pulled from the Bookshelf)
the .../ seperates the menu from the sub-menu. So when that shows up in game, there's a pie menu item called "study", and when you click on that a second level menu opens up with "cooking", "mechanical" and "cleaning" in it. Because each of these is on their own line in the Pie Menu Strings, you can give them each their own line in Pie Menu Functions, and point them to different BHAVs. :)

blobomotz
14th Jun 2006, 02:34 PM
GREAT :) Thank you very much !!!

Your explanation and somes item download ... i undersstand :Pint:

It's a good day !

Thank you again, you are great :king:

seresv
14th Jul 2006, 07:15 PM
Echo u r awesome for making this tutorial.

gelydh
18th Jul 2006, 02:19 AM
I'm not sure if this is even worth asking, but I suppose it wouldn't hurt to do so. :)

I've been using this tutorial to extract animations into a painting for picture/posing purposes and in doing so have come across a good deal of animations that turn up this (http://img99.imageshack.us/img99/6039/sp3220060717200854cd6.png) error (with testingcheatsenabled turned on, otherwise the animations simply doesn't run). The error isn't too surprising since (I assume) it's telling me that it needs a certain bone from another object/Sim to work. However, there are similar animations that work fine.

A good example would the photobooth animations. All of them (normal, goofy, romantic, solo and duet) can be extracted and work perfectly EXCEPT for several of the 'romantic-couple' photobooth poses (there are four poses each for solo, Sim A, and Sim B). I suppose I'm asking why exactly this isn't occurring for all animations that have to do with an object or another Sim. Many 'social' animations (or, animations that involve two Sims) also do this, where one (the 'initiator' or the 'receiver' animation) will work, while the other won't. There's also no set pattern that I've been able to discern with this; sometimes the initiator animations will fail and sometimes the receiver.

Is there a workaround to force these animations into running? Is there something missing from the 'non-working' animations? I'm not really expecting a solution, just information or some input. :)

Echo
18th Jul 2006, 10:28 AM
While it's hard to come up with a hard-and-fast rule for IK animations, they tend to be animations where bones in two objects/sims have to touch one another at a particular time. This isn't always true, but tends to be the pattern. A lot of the social interactions don't have to match up perfectly, or force two objects to touch each other - in these cases, no one is going to notice if one sim's animation is slightly out of sync with another. That's why they don't all end up being IK.

As for a workaround? If there is I don't know of it. The best solution I've been able to come up with was to spawn a transparent clone of the IK object and use that - but that's vastly impractical!

Max3D
19th Jul 2006, 10:23 AM
i think this is one of the most instresing and helpfull tut on bhav... really thnx :beer:

about skilling, i wish to see how my sim are learning, i'm talk about the "skill meter"
i've tryed to read the int from the bookcase semi-global....
but i didn't find anythink about "meter" can you help me ? :)

Echo
19th Jul 2006, 10:34 AM
I'm hoping to write a tutorial on skill and motive management some time in the next couple of weeks, but if you can give me a contact email I'll put together some notes and send my sample object in the mean time. :)

solfal
19th Jul 2006, 11:04 AM
I'm hoping to write a tutorial on skill and motive management some time in the next couple of weeks, but if you can give me a contact email I'll put together some notes and send my sample object in the mean time. :)

Great! You are my hero :D

Max3D
19th Jul 2006, 11:34 AM
so we can put our fingers on bCon too :D
:beer:

Bella1234200
20th Jul 2006, 09:55 AM
Yes, im having a problem... I use the newest simPE and when i have to right click on the things and then go 'Resourse' there is no resourse there is 'Create Resourse' But no 'Resourse'... What do i do?

Echo
20th Jul 2006, 10:34 AM
Bella: The steps in the tutorial shouldn't have changed since they were written - it was written with 56, only one version lower than the current release. :) Could you copy and paste the passage you're having trouble with here? I'm not sure which bit you're referring to. Just so you know though, the "Resource" tab is generally near the very bottom of the window. If it isn't there, you can get it back by going to Window > Resource Information. :)

Bella1234200
20th Jul 2006, 01:19 PM
oh.. k.. i just found it... thanks!

Max3D
25th Jul 2006, 11:40 AM
My object can be used only by one sim per time.
so i'm working on the guardian to know if my oject is aviable

i've tried to work a bit with the slot but i'm too neubie to made it works...
so i've tryed with 0x1b if it will fail the guardian will retourn false :)

that's works but i'm curious to know how to do it in correctly mode, also 'cause the sims will say "hey no path to get the object" .. and i don't want it :P

bobthefish
27th Jul 2006, 02:54 PM
I finished the part about the animation when you walk towards the painting, but the custom painting cant be placed on the wall, the only way to place it is to use move_objects on and the animation works fine.

Why cant i place it on the wall?

Echo
2nd Aug 2006, 06:06 AM
bob: Did you change the init function at all? Can you post the object?

bobthefish
2nd Aug 2006, 01:46 PM
I think i might of done, ill see if i can work out how to upload these kinda things.

I think the link works.

Edootjuh
2nd Aug 2006, 07:11 PM
Hi, I've made another object with this tutorial (lost the other while reformatting computer)
I'm using SimPE 0.58.1.29278, and when I add the animation command, it doesn't say "Animation: [No AdultAnims: Private STR# 0x0081 file]:0x0000", it says "Animation: [Fallback: Global] "a-noExpression" [AdultAnims: STR# 0x0081:0x00]". I'm sure I entered the Operands correctly. Is it something with SimPE or did I do somehing wrong?

savoury
2nd Aug 2006, 07:37 PM
Thank you so much for this tutorial! I have loaded a painting with some animations for my storytelling.

Now, I have another question.

I understand how to start to stack the menu items (ie: "Call .../") but what I cannot seem to figure out is how to place the menu items under the main heading of "Call ..."

Does this make sense?

Echo
5th Aug 2006, 06:48 AM
bobthefish - At some point, you seem to have accidentally deleted the "Function - Init" BHAV. You can check for broken things like this in any object by opening up the OBJf files and looking for lines that say "[BHAV not found]". I put it back in, the attached version should work fine now.

Edootjuh - Don't worry about it, just keep going with the tutorial. What that is telling you is that:
a) It can't find anything in the private level that matches your number, so it will try to "fall-back" to a more general level,
b) The closest level of animation if can find is the global sim animations, in this case, "a-noExpression"
Just keep following the steps anyway, it'll sort itself out once you have your private STR file set up. :)

savoury - If you have two menu options:
Top Menu .../Bottom Menu A
Top Menu .../Bottom Menu B
then you will get a top level menu called "Top Menu", and when you select that the second level ("Bottom Menu A" and "Bottom Menu B") will show up. If you're trying to dynamically populate it though (eg - Call [all the different people in the house]) then you're getting a bit more complicated. There's a discussion on it here:
http://www.modthesims2.com/showthread.php?t=175668

zookini
6th Aug 2006, 01:55 AM
Aha! I got it to work on the first try! :D I only did parts 1 & 2, but... Fantastic job with the tutorial Echo. It was very easy to understand with your step-by-step instructions. Thanks :)
http://img145.imageshack.us/img145/4909/bhavtx2.png

adriana_mail2000
6th Aug 2006, 11:55 AM
Great tutorial! Thanx! I only started working on mods and BHAVs a few days ago and I think I got a bit greedy from the first time.
I have a question, though. I want to copy the BHAV from one package to another, the whole pie menu options and functions. The original object is a bed and I want to copy it to a bed, so .. the same object.
I cloned the object I want to add the BHAV to, I replaced the files from: Behaviour constants, Behaviour functions, Object functions, Pie menu functions, Pie menu strings, and from the Text List the MakeActionString prim string set file with the files from the object that has the BHAV i want to copy. I did this to make the whole process easyer.
But... something doesn't work. Thru the process, I have had the pie menu partially show up (in wasn't working like the original), do some stuff (not the stuff it was supposed to) and after, when I replaced all files, not only that it made the bed unselectable, but also caused eratic behaviour in my sims(they jump from one place to another and they hace no free will).
The objects are both custom objects downloaded and I want to "customize" them even more.
In the zip:: BHAVbedClone is the original bed, that works
bedroom7reservable is the bed i want to add the property to

I want to know what did I do wrong in the process and.. well.. why doesn't it work and how can I fix it.
:)

Echo
6th Aug 2006, 01:52 PM
Well I'm happy to take a look at the file for you and will do so as soon as I have a chance, but I've got to ask... Why not just clone the file with the behaviours you want, and just replace the mesh with the mesh from the object you want? It's orders of magnitude easier than trying to port behaviours across objects! :)

sims2playerette
7th Aug 2006, 04:33 PM
Hi Echo! firstly i'd like to say: WELL DONE ON SUCH A FANTASTIC TUTORIAL!!! :D
I have completed up to and including stage 3, but I have a question. I have made the hygene and bladder motives go up and decided I wanted to add a cleaning skill point. I used the expression command: my person data>cleaning skill> := >Literal>100
It worked fine, but it won't go up any higher than 1 skill point, how do I make it so that it will? (go up 1 skill point at a time, like a bookcase, kinda)

Echo
8th Aug 2006, 11:07 AM
Change the ":=" to a "+="
The former says "Make skill equal this value". The latter says "Add this value to the current value". :)

:)

sims2playerette
8th Aug 2006, 11:15 AM
oooooooooooohhhhhhhhhhh.............thankyou!! You are great!! :D

sims2playerette
9th Aug 2006, 11:26 AM
Echo, just a thought, if you have the time and the patience and the generosity, etc :)would you be able to write a very quick guide on what all the symbols mean in the expression command? (like ":=" and "+=" and all the rest?) I would be so grateful if you could :)

Echo
9th Aug 2006, 12:15 PM
Boolean Operators(true or false)
> [Is greater than]
< [Is less than]
== [Is equal to]
Flag set [Is bit set in a flag field]
>= [Is greater than or equal to]
<= [Is less than or equal to]
!= [Is NOT equal to]

Mathematical Operators
a += b [Assign a + b to a]
a -= b [Assign a - b to a]
a := b [Assign b to a]
a *= b [Assign a x b to a]
a /= b [Assign a / b (division) to a]
Set flag [Set bit in flag field]
Clear flag [Unset bit in flag field]
a mod= b [Assign remainder (modulus) of a/b to a]
a and= b
a or= b [Bitwise or?]
a xor= b [Bitwise exclusive or?]
a abs(rhs) b [Assign the absolute value of b to a]
Assign 32 bit value [Same as := but for 32 bit value]

[b]Combined Operators
a ++ and < b [Assign a+1 to a, then Is greater than b]
a -- and > b [Assign a-1 to a, then Is less than b]

SassyTeffie
11th Aug 2006, 12:04 AM
First, thank you so much for this awesome tutorial! Without it I would still be totally lost! I have some questions, though. I am trying to get a dialogue to pop up as the first event in a chain of events. However, I cannot figure out how to change the text that pops up. Second, what should I do check if the adult Sims have jobs? (I want the answer to that question to determine where the string goes.) Finally, I want to put a guard on that checks the household's money (just what is available to spend) and only allow access to this function if the total is less than 5,000 simoleons. Please help me! Thanks!

sims2playerette
11th Aug 2006, 09:54 AM
thanx, lifesaver!! :)

Echo
11th Aug 2006, 12:05 PM
The text in dialogues is pulled from the text list with instance number 0x12D. As for checking household's money, I haven't tried it myself, but maybe try out this one in a guard?
[prim 0x0019] Alter Budget (test if Literal 0x0000 multiplied by 1 may be subtracted as misc expense)
Parameters -> 0000xxxx010000000000000000000000 (where xxxx = little endian amount to check)

SassyTeffie
11th Aug 2006, 05:56 PM
The text in dialogues is pulled from the text list with instance number 0x12D. As for checking household's money, I haven't tried it myself, but maybe try out this one in a guard?
[prim 0x0019] Alter Budget (test if Literal 0x0000 multiplied by 1 may be subtracted as misc expense)
Parameters -> 0000xxxx010000000000000000000000 (where xxxx = little endian amount to check)

I think I'm just not getting this. I still do not quite understand how to enter custom dialogue in. Could you run it by me one more time? Thank you so much!

Echo
12th Aug 2006, 06:15 AM
SassyTeffie: Try this page - http://www.modthesims2.com/showthread.php?t=111469 - and read Adidas' "Part 5 Dialog and Array" section (well, at least the part about the dialog primitive!). He'll probably be explaining it much better there than I can in a single post. :)

HystericalParoxysm
12th Aug 2006, 07:22 AM
Well, I haven't gone through ALL of it (still the last part to go) but what I really wanted to do was be able to access animations through an object, and this tutorial turned out to be exactly what I needed. I'm still a little fuzzy on the operands and all that, but I know I'll figure out the details with time and effort. You've done an incredible job explaining how everything interrelates to each other, and that was definitely the scary part of hack stuff to me, not knowing how everything linked up... Thank you so much, Echo. I was completely daunted by the idea of ever messing with BHAVs, but in a very short time, I've gotten competent enough that I can do this. Don Lothario was hula dancing, yay!

Now to go expand on what I've learned and add a buttload of animations to an object. :D

electric
16th Aug 2006, 12:43 AM
when i get to the Pie Menu Functions part,even though ive ckicked add,then clicked on the copy of View-then inthe Pie String ID box,my new interaction still isnt there even though ive committed and saved the changes in the Pie Menu Strings. Does it take a while to commit-do i have to wait for a 'file committed' box?

Echo
16th Aug 2006, 12:03 PM
It'd help if you could post the object :) Were you using the painting as your base?

butterfly_girl
12th Sep 2006, 08:51 PM
I really like your tutorial, but I'm having a problem in part 4. I've followed it all the way up until after you have me add in the name of the animation to the STR# section. I commited it, and the tutorial says that the description next to the action should say the name of the animation, but it still says:

Animate Sim (Animation: [Fallback: Global] "a-noExpression" [AdultAnims: STR# 0x0081:0x00],

Any help? I've attached two screen shots, one of the STR section with the name added in, and one of the BHAV section with the action selected. Thank you so much if you can help me!

Zach
13th Sep 2006, 01:39 AM
I commited it, and the tutorial says that the description next to the action should say the name of the animation, but it still says:

Animate Sim (Animation: [Fallback: Global] "a-noExpression" [AdultAnims: STR# 0x0081:0x00],
This is normal. The tutorial is a little outdated with respect to the latest version of SimPE, or more specifically, the version of Peter Jones' Simantics Editor plug-in that comes shipped in the latest SimPE.

If you save the package and test it in the game, you'll find the Sim will do the animation. :)

butterfly_girl
13th Sep 2006, 07:38 PM
Well, I can try it... :) I'll tell you what happens.

Edit - Yay it works! Thanks so much! :D

Edit again - Huh, it's showing it now anyways... Go figure.

Echo
14th Sep 2006, 10:50 AM
butterfly_girl - I think you'll find that when you close the file and reopen it, the filetable is refreshed and the list shows up the correct version. :) There is a "Refresh Filetable" button which will probably do much the same thing.

butterfly_girl
14th Sep 2006, 07:53 PM
Yeah...lol I'm glad it was something simple and not some big thing I did wrong. :)

Paleoanth
28th Sep 2006, 10:06 PM
I just did most of this (don't have the coin flip alternate paths stuff done) and I have had a great time. Thanks a ton for this. I am using it for my test tubes in my Mad Scientist set that I will upload here in the next few days.

I really wish I had an annotated list of animations.

Echo
29th Sep 2006, 11:11 AM
Well it's not annotated, but there's this in the wiki:
http://www.sims2wiki.info/List_of_Animations/Base

It is possible to extract the lists from SimPE, I've done it before because I've got most of them listed in my useful stuff spreadsheet, I just can't remember how off the top of my head. If you fiddle for a bit you can probably find it though. :)

Paleoanth
30th Sep 2006, 04:39 AM
Thanks. I actually have that list in .txt on my compy for use. While most animations are pretty self explanatory, it would be nice to know how long they go on and blah, blah, blah. Maybe one year when I don't have anything else to do, I will tackle that.

Li'lDevil
28th Nov 2006, 08:34 AM
I'm having a problem with were I make the thing 'Come do stuff' I put in an instance of 0x1002 in the resorce tab. But when I put it into the Pie menu fuctions-untimed tree table, it says that is an invalid Bhav! What have I done wrong? Or is that ok?

Echo
28th Nov 2006, 08:52 AM
Can you post the object here? I can't tell if there's something wrong if I can't see it. ;)

Li'lDevil
28th Nov 2006, 09:08 AM
I know this is probebly a pain, the site wont let me attach it, it says it's a .package file. I tried to convert it to .rar but it didn't work!

Edit: Don't worry. I figured it out. Here's the file.

Dr Pixel
30th Nov 2006, 03:39 AM
Thanks for this excellent tutorial. I was able to follow it easily, and get everything to work.

Now for my question -

I am working on a "decorative" car, which several people have requested. But I didn't want to make such a large object that did npthing, so I cloned it from a stereo so the radio would work. I used your other tut to make it "non-walkable", and everything works. But I wanted to make the "repair" option always available, so it can be used as a skill object too. I made the menu option "repair" always available, and that also works - but since the stereo is not broken, the Sim will only repair it for a few seconds, then quit.

So what I am trying to do is to have the stereo become broken when the menu option "repair" is chosen, and then have the repair go on just like normal

If I use testing cheats, and click on "set repair level", then on "set maintenance level", it is now broken and my Sim can properly repair it.

So, I imported the "repair" global bhav, and altered it by having it call the "debug set repair level" and then the "debug set maintance level" BHAV's first. I thought this would do the same thing as using them with "testing cheats", but it seems to have no effect at all - the Sim still just repairs the car for a few seconds.

There is also a "repair event" file in the globals, but I wasn't able to make any sense out of it so I left that alone.

I suppose I'm going about this completely wrong, I'm hoping you can point me in the right direction. Or at least let me know if this is actually a very advanced thing that an amature like me shouldn't be attempting.

Echo
30th Nov 2006, 10:46 AM
Jess - You missed the step where you change the group on all your imported files. Find the pie menu functions file, open up the resource tab, and enter 0xFFFFFFFF into the "Group" box. Then do the same for the pie menu strings. It should show up better then. ;)

Dr Pixel - Actually, you're doing it the advanced way, it's just that most people don't really think to do it the somewhat easier way. :) My suggestion is just to make a "come here and animate until I tell you to stop" BHAV just like the tutorial describes. Use a "fixing things" type animation. Then, just before the looping part of the code, paste these in:
[opcode] [parameters]
0x0193 1A87580700000A00000A000001000000
0x01D7 1A834D0800000A000007000001000000
then just after you leave the looping part of the code, add this one:
0x01D8 00000000000000000000000000000000

When you add it to the pie menu, just call the interaction "Repair" and no one will ever know the difference. :)

That's the bare bones of skilling, at any rate. It adds to mechanical, which you can change using the second and third operands boxes on the first row. If you want the funky "Your sim has earned a new skill point" option, then just import the "CT - Skill Gain Dialog" BHAV from whatever it was you cloned.

It may sound like more work, but it ends up being a lot easier than trying to understand how the Maxis guys got their object to work, then figuring out how to change it without breaking it. :)

All that said, you were certainly heading in a valid direction. The problem is that the break/repair system is actually a very complex one which is a pain in the backside to actually work with. And in your case, I have a feeling you don't actually want the thing to change between fixed and broken at all, you just want it to act like it's permanently broken?

Dr Pixel
30th Nov 2006, 09:43 PM
Oh, great idea! I think I can manage that. Yes, you're completely right, I really don't care if the object is broken, I just want the Sims to be able to act like they are repairing it for a while, and gain a skill point. Actually, I think I will just leave the whole original "repair" stuff as-is complete with it's menu option (because eventually the thing really will "break" and need repairs) and just add a new option, maybe I'll call it "tinker with" or something like that.

Thanks again for making such nice, clearly explained, tutorials.

esjay731
18th Dec 2006, 11:25 PM
I am going to look at the tutorial, but got one question, does this show how to change the pie menu that is already there? I want to change some of the text that comes uop when you click on serve meal>???? like

instead of:
pork chops

change it to:
Meatload.

Thanks

Echo
19th Dec 2006, 09:31 AM
esjay - Didn't you ask this question once before? http://db.modthesims2.com/member/showthread.php?p=1509499#post1509499

This tutorial doesn't directly explain how to change the pie menu of an existing object. To do that, you need to create an override package for the food item's text list.

Evil Naruto
27th Dec 2006, 06:22 AM
I'm just wondering if you can edit sim to sim or sim to NPC actions with this.

Echo
27th Dec 2006, 07:50 AM
Hi Naruto! Yes, you do edit social interactions using BHAVs, although the changes are a bit more complicated than you'd find in this particular tutorial. :)

Evil Naruto
28th Dec 2006, 12:59 AM
I figured out how to but the NPC's always leave before any interactions can take place, is there a mod for this?

Echo
28th Dec 2006, 07:59 AM
You mean you've cloned a unique NPC and you're trying to make them do something new, but they keep leaving? Or is this a different problem?

The above is caused by the existing code inside the "main" loop of the cloned NPC, and yes, it's a real pain to get rid of. But no, there's no mod for it, because it's part of the proper behavior for most NPCs. If you don't want your NPC to have that behavior, you need to modify the code for your clone, not use a mod. :)

Evil Naruto
28th Dec 2006, 11:14 PM
so I need to make a stay behavior?

Echo
28th Dec 2006, 11:45 PM
Well I'm still not entirely sure what you're trying to create or what you've cloned it from, but if you're coding new NPCs you need to do a fair amount of editing in the "Main" behaviour. Main is what gets run by a sim/object all the time, including when they're not running any interactions etc. If the NPC is walking off the lot all the time, then you need to find the part of the code in its Main function which is making the sim walk off the lot, then remove it. :)

Evil Naruto
29th Dec 2006, 05:34 AM
Thank you, I originaly requested this, but they closed the request area.
I'll will try to make one for all of the NPC's to be treated like average sims, it should be out for testing by thursday.

[Black_Spirit]
4th Jan 2007, 04:58 PM
Hi,all.
I have a problem, I created an object using your tutorial and post it on Modthesims2.com.
It works fine on my computer but someone post a comment, his game didn't load anymore because of my object :

http://modthesims2.com/member/showthread.php?t=212995

Can you help me plz, to find where this problem come from

[Black_Spirit]
4th Jan 2007, 10:23 PM
It may come from a "missing" expansion pack but the object and the animation come from the original game...

Echo
5th Jan 2007, 12:10 AM
Hi Black Spirit :)

The object you cloned was changed in the Pets expansion so that pets could scratch/chew. That means that the Pie Menu Functions file format is specific to Pets being installed.

If you to create a base game compatible object clone, you need to follow the instructions in this thread:
http://www.modthesims2.com/showthread.php?t=193642

[Black_Spirit]
5th Jan 2007, 10:36 AM
Thank you so much :)

Echo
1st Feb 2007, 12:32 AM
Spencer: Assuming you're talking about the animation loop, then yes, that is the general idea... ?

Echo
2nd Feb 2007, 09:57 AM
Then it hasn't gone wrong, it's working the way it's supposed to. ;) The purpose of that section of the tutorial was to show you how to create something that keeps looping until you tell your sim to stop.

If you want the sim to leave under some condition, you need to add that condition in to the code. :)

Echo
3rd Feb 2007, 03:40 AM
Well that depends on what condition you want to have met. If you want sims to leave when, say, their hunger value is low, then you would need to have a line like:
My motive hunger < -0x32
Which has a true target pointing out of the interaction.

[Black_Spirit]
6th Feb 2007, 03:13 PM
Hi again echo, I created this mod : http://modthesims2.com/showthread.php?p=1568978#post1568978 which allow your sim to become a werewolf only on tuesday, thursday ans saturday.
It works very well, but do you think it's possible to create a version of this mod that will allow your sim to become a werewolf one day a month( every 28 day) ?

Smonaff
6th Feb 2007, 03:43 PM
[prim 0x0002] Expression (Global 0x0001 (Day of Month) == Literal 0x001C) True: Become Werewolf False: Don't Become Werewolf

Replace the bit of code you were using to check for the day of the week with the line above and that should do it for you. There are 30 days in a sim month numbered 0 to 29.

[Black_Spirit]
6th Feb 2007, 06:14 PM
Thank you so much !!!

Pixelen
16th Feb 2007, 05:01 PM
Thanks :) Easiest to follow tutorial ever!

nelson_ts2fan_loco
4th Mar 2007, 03:10 AM
Thanx for your tutorial, it's been great, I can now understand how people created the "rejuvenating chamber".
I got stuck in the animation, though.
I put the Animate sim (0x6a) in the opcode. In the operands, when i put them, the link says---- animated sim fallback: global a-no expression---. I'm not gonna go on further, due to a friends screw up in a file and ended messing his whole sims 2, and I don't want that.
My version is .60, and I don't know whether that is the problem, if its the new version of saying what you just wanted in your version, or if I messed up.
Can you help?

Echo
4th Mar 2007, 04:19 AM
Nelson - It's doing that because you haven't got the name of the animation you want to run in text list 0x81 line 0. The instructions for that are in the next few steps. The text that SimPE displays when it can't find a match has changed very slightly between versions, which is why yours doesn't match exactly with mine. Don't worry about it. :D

Just as a side note though - there is pretty much nothing you can do wrong in this tutorial which will result in your entire game getting corrupted. Just don't use your favourite sims when you're trying out a partially completed hack, and don't save any lots with a partially completed hack in your downloads folder. I've made some pretty spectacular modding screw ups in the last two years, but I've never once had to re-install the game because of a bad BHAV. :) Don't be afraid to try something unusual just to see what it does - that's the best way to learn!

nelson_ts2fan_loco
4th Mar 2007, 07:56 PM
Thats what I wanted to hear, Echo, I will keep reading the rest of your tutorial; and if you have more tutorials, I will certainly find them.
For me, its all based on following what the tutorial says; then I start thinking on more difficult things. Thats why I first ask these kinds of questions; they always helped me when I start something new.

And thanks, too, for the side notes, the sims and lot stuff you wrote will help me be more careful. Thats the stuff that helps me the most.
Thaks.

ahmird2
15th Apr 2007, 10:53 PM
Thanx for these. No doubt I will find some useful information in them.

mooman_fl
17th Apr 2007, 02:52 AM
First of all I just wanted to say thanks for the excellent tutorial.

Having said that, I am having a bit of a problem but am too new to this to determine exactly why.

I clone the painting and modified the picture.... tested it, no problem.
I started going through your tutorial and added the menu.... tested it, no problem.
Added the BHAV code from your tutorial and complete your steps.... tested it, problem:

The item shows up in the Buy Mode as expected, but it is unplacable without "moveobjects on". Without that code it just stays red no matter where I try to put. If I place it using "moveobjects on" it works perfect, but having that as a requirement is a little tedious.

Have you seen this problem before or have any clue why I might be experiencing it?

KMN
17th Apr 2007, 05:16 AM
mooman_fl - did you change the instances of the new interaction BHAV, you need to.

porkypine
4th May 2007, 07:26 PM
Oh, THANKYOU, Echo! (dancing on tippytoes!)

Kodiak
15th May 2007, 07:04 AM
Hi guys! First, my thanks for the tutorial, Echo!

I've included the command "Wait For Notify" in my loop and according to the turorial "The sim should just keep on looping until you either tell them to stop, or one of their needs drops to desperation level!", however, mine only stops when I tell them to. I've lowered all the needs to -90 plus (red) but the sim still keeps looping.

Do I have to one by one specify and add codes for all needs as quoted:

If you want the sim to leave under some condition, you need to add that condition in to the code. :)
...or did I not do something right with the "Wait For Notify" command?

Anyone? Thanks.

Echo
15th May 2007, 10:16 AM
You're using it right, your sim pretty much has to reach death level needs to exit on their own. It's still important though, because if it's not there your sims will never die! The wait for notify will pull your sims out of the animation to be reaped when their needs reach rock bottom. :)

Kodiak
15th May 2007, 03:26 PM
Thanks for the quick reply! ;) Therefore, looks like I'll have to add codes as I want my sims to leave and get out of the loop before they reach "rock bottom" needs. :)

abug
30th May 2007, 04:12 AM
Nice tutorial.

By the way was the humor in "Part 2: Making the sim come" intentional? :rofl:

Echo
30th May 2007, 10:55 AM
All humour is intentional. Except when it isn't. :)

Shamael
25th Jun 2007, 05:35 AM
Echo, your tutorial guides this poor soul to free of confusion in hacking BHAV.

I Thank you, Kind One... :beer:

VioletSky
8th Jul 2007, 09:54 PM
Hi Echo!
I've made it to Part 3. Now, I'm using SimPE .62. I've gotten to the part on you're tutorial where I'm supposed to click the single arrow next to the "Operands" spot. I can't really do that since my buttons are hammer&wrench and a quotation mark.
I clicked on the hammer&wrench button thinking they were the correspondent to the single arrow and I got something totally different. Help?

EDIT: I fixed it, nevermind. I must have chosen the Init function by mistake. I chose the hammer&wrench button and the right box showed up.

wndy26
9th Aug 2007, 08:16 PM
Can someone tell me, with this tutorial, if I add skilling to a painting will it affect their animation? I want to have my sims view and earn charisma from viewing - sort of like studying art history gives the ability to converse better about art. Then add a bhav for studying that adds creativity. But I don't want the sims to change their animation - I want the animation to be the viewing animation so when sims come to the art gallery they are not doing strange wild animations while viewing the art.

UPDATE:
NVM...I saw what I needed in the tutorial...gonna work it over this weekend if I can figure out how to create my own item instead of just doing a recolor...lol. I have a fantastic plan for an Art Center/School.

Chrizta0000
23rd Aug 2007, 03:50 PM
I did the first part of the tutorial, you know, the pie menu strings where I had to name the new pie menu. But, when I went into Pie Menu Resources, cloned view, and clicked Pie String ID, I didn't see my animation. Can you please help me?
I also used the painting that you was using in the tutorial.

Echo
24th Aug 2007, 12:21 AM
Hey Chrizta,

If something is not working right for you in this tutorial, I really do need you to post your object in its current state. :) The tutorial is correct, but sometimes it's easy to miss things. Unfortunately, if I can't see the file then I have no way of guessing which things you might have missed. ;) As far as guessing goes though... Did you remember to change the group ID to 0xFFFFFFFF on the two pie menu files?

Chrizta0000
28th Aug 2007, 02:14 AM
Okay, I have a really stupid question to ask, how do you post an object?
And yes, I did do the 0xFFFFFFFF as you had asked.

Echo
28th Aug 2007, 04:34 AM
When you go into reply mode, there's a button called "manage attachments". :)

Rosebine
8th Sep 2007, 07:07 PM
Sorry...i really don't know if this is the right place to ask...but i am new and lost...lol

I want to bring toddlers for outing, as for the children or anyone else.
But they have no " join casual group" options.
My question is : where can I learn to make a hack that would allowes that ?

i thought it was a BHAV, so I posted my question here...again, if i am at the wrong place, please redirect me !!!

Thanks,
Rosemary :0)

Echo
9th Sep 2007, 03:22 AM
You will most likely need a bit of BHAV knowledge, as well as a bit of knowledge about pie menus and possibly plug in socials. Having not tried to make this sort of mod before, I can't give you much more information about how to go about it though. :(

Rosebine
9th Sep 2007, 09:32 PM
Okay, thanks anyways !
I did some mod for the sims one, but for sims2...i really don't know where to find this and that !!!

Rosemary :0)

Cenor
10th Sep 2007, 12:53 PM
First - Let me say THANX ALOT - This was absolutly an opener 4 my confused Mind, wich was trying to figure out how this works.

So I done this Tutorial through all Steps an it worked great beside one Thing:
B4 I have to note, that I'm not running an english version of the Game an used another Object of the same Group-

So When I import the Pie Menu from Semi-Globals and give the Strings names, they not show up.
To explain what I mean:
I called the Behavior "mach was" in german and "do something" english. so far so good in the line where is "view" the german entry is empty and what ever I type in there , in the Game shows up a standard translation "Betrachten" AND
wich is the real bad case my pie-menue Button stays empty even if I say it should use default langauge, and when I try to set german or English as default, what I tried in my desperation the strings all go empty.

So I think there must be a standard translation package anywhere?????
(This is noted in the second form next the string-input needed .....)

All other is fine, but I have to get a german text 4 testing.

Echo
10th Sep 2007, 01:38 PM
Normally what you have done should work. :) Could you post your .package file here so I can see it?

leighkuhn
11th Sep 2007, 06:35 PM
i think possibly your answer to Edootjuh already answered part of my question.

i am trying to add an interaction between toddlers and the orchard trees. i fiddled about and found that i need to enter 89 instead of 81 to call toddlers. this worked great as far as getting the toddler to approach the tree. i also got his little motive to max just fine.

when i get to the animation bit however, there is (surprise, surprise) no "STR#: Anims - Toddler" presumably because the trees currently do not have toddler animations. i also get the "Animation: [Fallback: Global] " deal that Edootjuh got. do i just carry on as you advised Edootjuh, or do i need to do something else as a toddler is involved? like maybe stealing/copying/adding something from an object that *does* have toddler animations?

also, any info you can pass on about setting a gender check on an animation would be appreciated. gotta be a way, female sims aren't peeing standing up!

sorry this is lenghtly. i'm trying to ask clear specific questions, lol.

Cenor
11th Sep 2007, 06:43 PM
You are right it works, not know what i did wrong, but I started a new Projekt and now everything is fine.

Now I'm playing with this and the 2nd tutorial to make something more funny ;)

I'll let you see it, when I'm ready

Rosebine
11th Sep 2007, 10:07 PM
Echo....what if i want to add to the simmies's pie menu ?
add options to a sim, insted of an object...where can i find the "sims" file, to open it in SimPE ?
Hoping i am clear....LOL
in sims one it was the personGlobal .far, but what is it for sims2 ?

Thank you,
Rosemary :0)

Echo
12th Sep 2007, 12:06 AM
like maybe stealing/copying/adding something from an object that *does* have toddler animations?
leighkuhn - Exactly. :D You'll need to steal or create a STR# 0x89 for your package, then put the animations names in that you want the toddler to run. You can import it from any semi-global if you want as long as you change the group to 0xFFFFFFFF, or you can just use the "clone" option on an existing STR# and change its instance number to 0x89.

Rosebine - Do a search on "social plugins". They're the objects you need to clone and edit to get options to show up under a sim's pie menu instead of the object's own pie menu. :)

Rosebine
12th Sep 2007, 02:40 AM
oh thank you a bunch !!!....do I serch in my directory...or here ? (sorry this is probably stupid...lol)

Rosemary :0)

Echo
12th Sep 2007, 04:39 AM
Here on mts2. I'm fairly sure there are a few threads about them somewhere in one of the tutorials forums.

Rosebine
12th Sep 2007, 08:27 PM
Okay, thanks again !

Rosie :o)

Rosebine
13th Sep 2007, 02:39 PM
thanks again Echo, i think you sent me to the right place !...though I don't think i can follow those tuts really...those are made for more experienced hackers, so there is not much details...But ! lol
I tried myself yesterday, and clone a few things, that seems to be what i need to clone...such as "invite a sim on community lot"
there, you find "handles baby/toddlers?"...and then "sitter list"...anyways, I changed a few false, to return to true...

so far it dosen't work...so i have alot to learn.
but at least, hacking the sims one gave me a few basic infos !!! LOL

Thanks a lot, now I'll stop bugging you...

Rosemary :0)

maybesomethingdunno
14th Sep 2007, 10:47 PM
Okay, I have revisited your tutorial to remind myself of the process and make sure I did not forget anything. I have added a custom interaction, but when I try it I get a "Bad gosub tree number" error. I clicked "Delete" and it deleted the active Sim. I can post the object if necessary, but any idea why it happens or how to fix it?

The base object is a lamp; changing the semi-globals from "LampGlobals" to "PaintingGlobals" would not let me place the object giving a "Check tree primitive blocked completion" error. I mention this because the only search result for "Bad gosub tree number" I could find dealt with semi-globals.

Echo
15th Sep 2007, 05:42 AM
Well I have seen both of those errors before, but it would be odd to get them under these conditions. Posting the object would quite probably help, yes. :)

A "bad gosub" can be caused by a couple of things. The first is that you are trying to call a BHAV which is from a different type of object to your own. That is, if you have a painting and you import a BHAV for a lamp, it may expect to be able to find lamp functions when it actually can't. The second is that you're using a BHAV type 8009, but you're running it in the base game. The third is that you've changed the BHAV type after you already added several nodes. The latter two are unlikely for your case, so I'm guessing it's probably the first.

The "Check Tree" call is generally related to you having an "immediate" flag set in your TTAB when you don't mean it, or calling a "Run tree by name" on either an immediate function or one with a check tree which fails.

There are probably other reasons for these, these are just the things I'd check first for those error messages.

If you post it I can take a closer look. :)

maybesomethingdunno
15th Sep 2007, 08:30 PM
Thanks Echo. I cloned the garden spotlight lamp because I wanted the Sim and room to be illuminated during the interaction and have the light turn off after the interaction is over.

I apologize if this was/is not the place to ask for help with this object since I did not follow the tutorial exactly since it is not a painting and, if I remember correctly, I actually imported the Pie Menu strings and functions from the lamp globals. (I first just wanted to view them, then I decided to go ahead and use them with the object...I hope that is okay.) Here is the object; I will be trying to replace all the hair I have pulled out of my head out of frustration. :lol:

bobrien
27th Sep 2007, 09:53 PM
Can you make or link me to a tutorial for creating Semi Global / Global data overrides.
I want to add some more options to all of my pictures.

Echo
28th Sep 2007, 02:04 AM
Can you make or link me to a tutorial for creating Semi Global / Global data overrides. I want to add some more options to all of my pictures.
It's pretty much the same code-wise as making a local hack, except that the only things in the package are the BHAVs you're editing, and you keep the group and instance numbers that the semi-global library uses rather than changing them to 0xFFFFFFFF/0x1???.

Remember though, that making a semiglobal change will affect *every* object of that type, not just yours. It also means that every time a new EP comes out you have to be prepared to check if the code you're overriding has been changed and if necessary, update it. They're much more high maintenance than local BHAV hacks. ;)

TheoneringLOTR06
28th Sep 2007, 11:07 PM
First off-
Thanks soo much for the tutorial!! It's really easy to follow:)
Now, my question.
It's probably one that really..easy, but..:)
At the end of Part 1 you say save and see it in your game.
Save where?
I saved the package file in my downloads. Now there is a custom painting, exactly like the original except the custom one is the only one that has my custom pie menu.
Now, call it a brain freeze, but..
Is this what you want?
Sorry, I'm used to clothing meshes..=P
Thanks again=D

Echo
29th Sep 2007, 01:57 AM
Yep, that's what it's supposed to do. You're making a single hacked painting, not a global hack. :) In the former, the changes apply only to the object you're working on. In the latter it would apply to all objects of that type.

TheoneringLOTR06
29th Sep 2007, 02:46 AM
Okay, that makes more sense, thanks=)
Another thing..I thought I followed everything right I just finished part 3, but when I click 'View' in the game, my custom thing-the hygiene, the position, that's when it happens-not when I click on the custom pie menu option.
Since you mentioned that it might be helpful to have the file uploaded I included it, just in case....
=)

Echo
29th Sep 2007, 05:18 AM
MSD: Sorry, somehow I seem to have missed you post! Which interaction is the one you're working on?

Theonering: The reason it is happening on the wrong menu item is because in your pie menu functions table you have "View" set to run 0x1212, and "My First Interaction" set to run 0x2001. You've just put them in backwards. ;)

TheoneringLOTR06
29th Sep 2007, 02:29 PM
I switched them and now it works!
Thanks=)

maybesomethingdunno
29th Sep 2007, 09:05 PM
No problem, Echo, I needed time away from this silly little object (too much hair-pulling can lead to baldness, after all). :)

Trying to keep it simple, I made an interaction called "Try", which should run a BHAV called "Test". It simply makes the Sim come over to its relative position before calling the same BHAV, "Interaction - Turn ON", which is what the "Turn On.../This Light" pie menu uses. The lamp still lights up at night; however, when "Try" is run, it immediately gives the "bad gosub" error. (I am interested in making objects that light up and project light onto other objects so lamps seem like a good starting point. But, I am apparently missing something important about the addition of unusual, "non-lamp" interactions to lamps. :lol: )

I appreciate your help and this is a great tutorial.

Echo
2nd Oct 2007, 12:12 PM
Are you running with a base game starter or anything like that by any chance? And is there any chance of you posting the error log the game is generating? :)

maybesomethingdunno
2nd Oct 2007, 09:49 PM
Yes. I am using BaseGameStart Pro 1.4b (for Game Environments from Base Game up to Seasons), set for Base Game only (for testing base game compatibility). I have not had time to download and install the newer version, but if the out-dated version is the problem, I will need to make time I guess.

And there is a 100% chance of me posting the error log the game is generating. :)

I had clicked "Delete" during the error message instead of "Reset" for the posted error log. I do not know if that makes any difference with the actual contents of the error log; but if there is a difference, I can post one where I click "Reset" if necessary.


Edit: I hope I am not about to have egg on my face! :blink: I just looked at my SimPE's FileTable and found that "Include Nightlife" is checked. I do not remember if I changed this after I made the initial clone or not. In a few hours (important "real-life" things to do now), I will uncheck that option, reload/restart SimPE and its FileTable, and re-clone just to make sure it is not an issue with some Nightlife component-thing included during the clone. :faceslap:

Echo
3rd Oct 2007, 12:09 AM
Yup, I'd guess that that's your problem. ;) Some of of your BHAVs are of type 0x8009, which was a format only introduced in NL. If you run that in the base game, you'll almost always get "bad gosub" errors.

You can either
(a) try re-cloning without NL,
(b) running the object with NL, or
(c) find all the 8009 type BHAVs and replace them with the equivalent BHAVs from the base game (which will most likely be 8007s). :)

maybesomethingdunno
3rd Oct 2007, 03:59 AM
I did not know about the format change of BHAVs. Well, at least the solution is simple and the splatter of the proverbial egg of shame on my face was not as bad as I feared. :lol:. I will leave the Nightlife requirement since I will probably want to use some Nightlife animations. Sorry if I caused you any grief with this object; I tried it in my full game and it seems to work great. Again, thanks so much. :D

Rosebine
14th Nov 2007, 03:43 PM
This is stupid but...I am using SimPe v.62.1 and i cannot find the ressouce tab, result, i cannot change the group to 0xFFFFFFFF, nor the instance, to something between 0x00001000, and 0x0000FFFF

could you point me where it is please ?
the only place i found something that look like the images you have in the tut, is in CRES....

thank you,
Rosemary :0)

Echo
15th Nov 2007, 08:41 AM
Rosemary, it's normally a tab at the bottom of the screen with a sort of green-and-white box icon next to it. If you haven't got it there, try going to the "Window" menu and click "Resource Information". :)

Rosebine
15th Nov 2007, 07:46 PM
....Thanks ! of course it's there ! it was there...silly me...didn't know where to look

Thank you again !

Rose-silly :0)

Rosebine
16th Nov 2007, 04:02 PM
I have another question !...

I found some of the CAS anims, and it is working in my object, but...how do you call the mesh to appear ?..the book, from the serious anim, the ball from the active child anim...etc.

Thank you !
oh !..i was forgetting...i cloned the painting, like in the tutorial, but my object is suppose to be placeable ONLY on the floor...(indoors or outdoors)
is there another easy object i could clone that dosen't change much how the tut goes ?


Rosemary :0)

Echo
16th Nov 2007, 11:55 PM
Those bits generally require a call to "Create New Object Instance" either directly before the animation starts, or in an event function. They're a little bit tricky though, especially if the objects also have to animate (like a ball being bounced/thrown etc).

You can try using a statue, they're probably pretty close. Alternatively you can just change the placement flags on the painting as described here:
http://forums.modthesims2.com/showthread.php?t=82685

Good luck!

Rosebine
17th Nov 2007, 01:58 AM
Okay ! thank you !...
The "Create New Object Instance", I would put that instead of "anim sim" (0x6A) for instance ?
just before the actual anim....
The anim I put in the strings, is a "02e" anim...there was no "e2o" for the serious cas anim..is it okay ?


Rosemary :0)

Echo
17th Nov 2007, 02:27 AM
Naw, you need both the animate sim and the create new object instance. The cnoi takes the GUID of the object you need to create, and creates it. :) The o2e animation is intended for use on objects, not on sims, so it probably won't do what you anticipate. ;)

Rosebine
17th Nov 2007, 06:13 PM
so...i need both the "o2e"...and the "e-cas-idle-serious"....

Rosie :0)
Thanks...

AH ! one of my new objects works like a charm ! the animations are smoothly played...and all ! thanks Echo ! :D This is relatively easy when we are taught well ! :)

But the one with the "o2e"...anim...lol
I forgot to replace it, with the "e2o"...anim, so my elder is playing the book animation....simply falls to the ground, and wait for his pages to be turned...very funny !...I'll correct this !

Rosemary :0)

Echo
19th Nov 2007, 06:28 AM
Ha! How amusing. :D And you're quite welcome. :)

pcgamer92
21st Nov 2007, 05:24 AM
Thanks this was Excellent. :sheep: :llama: :turtle: :bunny: :duck:

vexkilla
21st Dec 2007, 10:42 PM
Firstly, it was a great tutorial, really clear.

Secondly, this is nothing to do with the tutorial, but on SimPE when I go
Extra>Run Sims 2

Nothing happens, do you know why?

Echo
21st Dec 2007, 11:26 PM
vex - Nope. Did you have the right CD in the drive? You'd probably have more like asking at the SimPE forum...

butterflyiii2006
24th Dec 2007, 05:41 AM
Dear Echo,
I'm not sure if this is the right place for my question-- but since the topic is paintings here goes.....I would like to add some CC portraits to the art easel -- I don't really need any actions other then the model to pose....So, what tuts do I need to help me accomplish my artist to paint my picture??I' ve done some recolors with SimPe and with the Wizard-- so in alot of respects I guess I'm still a newbie with all of this... So, make the tut easy-- and I should be able to get the pics I'd like to have painted by my simmie2 artist. I have the base game up to OFB-- if that makes any difference.
Thanks in advance....And I hope this is the right spot for this question.. If it isn't I'll apologize ahead of time.......
ButterflyIII2006

Echo
24th Dec 2007, 05:57 AM
butterfly - Are you asking about loading your own images into paintings created on the easel for your own use, or were you hoping to make a sharable easel?

The former was an ability introduced along with one of the EPs, but I can't remember which. The latter involves cloning the easel and the painting, then altering the textures for the painting and fixing up the GUIDs in a manner similar to this:
http://www.modthesims2.com/showthread.php?t=127742

$RaMRoM$
6th Mar 2008, 12:16 PM
Hi Echo!

Cool Tutorial, I've done this before the object animation tutorial, and i was successful, Thanks

treeag
24th Apr 2008, 05:10 PM
Great tutorial, Echo :D Thanks a lot.

I have a question though, I don't know if this is the right place to ask but I'm making an object mod with a painting where a sim can click on it and get an option to turn into a zombie. It mainly works, however I can't figure out how to update the walk style or assign the zombie locomotion animation.

I've tried looking in the objects package and found locomotion - zombies and it contains "Assign Locomotion Animations" 05000200000000000000000000000000. I tried putting it in my package but [fallback=global] appeared although in the objects.package it doesn't present. I ignored it and tried it in game and instead of walking like a zombie it just 'flew' across the room. Any idea?

Echo
25th Apr 2008, 01:06 AM
Locomotions are stored in text list 0x84. You need to import that text list from the same object that contained the "Locomotion - zombies" function. :)

treeag
25th Apr 2008, 01:22 AM
Sorry for being pain in the ass but I tried importing the SG - Locomotion Anims which is in the same group (0x7F01EC29) as the Locomotion - Zombies but the [fallback : global] still appears... What am I doing wrong?

Do you have to change the group of the text list to 0xFFFFFFFF too or just leave it as it is? I've tried it both ways and it's still doesn't work.

Thanks in advance

Echo
25th Apr 2008, 02:56 AM
Yep, change the text list to 0xFFFFFFFF, then close SimPE and re-open the package. Sometimes SimPE doesn't recognize new text lists straight away. :)

treeag
25th Apr 2008, 03:09 AM
God I feel so stupid :( I can't get it to work.

http://img90.imageshack.us/img90/6416/46555247ng3.th.jpg (http://img90.imageshack.us/my.php?image=46555247ng3.jpg)http://img90.imageshack.us/img90/7948/43407316lf6.th.jpg (http://img90.imageshack.us/my.php?image=43407316lf6.jpg)

:cry: The sim still 'flew'

Echo
25th Apr 2008, 03:24 AM
Okay, try changing the parameters to:
05000100000000000000000000000000
(Change the 2 to a 1) and see if that fixes it?

treeag
25th Apr 2008, 03:50 AM
IT WORKS!!! :D :D :D So it should be 'private', eh?

Thanks a lot you're the best, Echo!

Expect a bunch of red roses with a love note in your doorstep :anime:

Echo
25th Apr 2008, 05:53 AM
Great! You're quite welcome...

... Wait, how do you know where I live??? ;)

treeag
25th Apr 2008, 09:36 AM
Isn't it listed below your avatar? Melbourne, Australia. I'll just have to fly there and stalk you :P .

But hey, I got a cousin there! Maybe I won't have to fly there after all. :)

thetit4n
2nd May 2008, 05:30 AM
Animation step problem, I know a similar problem has been posted many times but when i get to this step i dont get the normal message. i get this:

[prim 0x006A] Animate Sim (animation: [Fallback: Global] "a-noExpression" [AdultAnims:0x00 (Private)],
Event tree: --- (Private),
Anim Speed: ---,
Interruptible: False,
Start at tag: ---,
Trans to Idle: False,
Blend out: True,
Blend in: True,
Flip Flag: False,
Synch to last anim: False,
Use controlling object as anim source: False,
Not hurryable: False,
IK Object: Stack Object ID 0x0000,
Priority: 0x00 (low))

the only reason i think that there is a major problem is because i don't see "81" in there anywhere, and it seems to be the key to the step :) anyways here is my package file. I appreciate your help Echo, great tutorial. I hacked sims 1 objects back in the day and i just got sims 2 a few days ago and was very eager to jump into hacking thinking piece of cake, then i was ".package" like wtf.... anyways, your tutorial made it easy to go from sims1 hacker to sims2 hacker :D

Echo
2nd May 2008, 10:14 AM
Don't worry about that, it's just a slight change in the way SimPE is decoding the line. Keep going with the instructions as they are and it should still work. :)

thetit4n
2nd May 2008, 03:24 PM
Don't worry about that, it's just a slight change in the way SimPE is decoding the line. Keep going with the instructions as they are and it should still work. :)

thanks echo, your a genious

babu357
23rd May 2008, 04:06 PM
I did this tut and it worked for me ...except instead of walking up to the painting when you click on it, my SIM starts to boo or jeer when the painting is clicked on. XD Actually , it was kind of funny. But I'm wondering where I went wrong. Any ideas ?
Babu.

Echo
24th May 2008, 02:37 PM
Could you post the object here, so I can take a look? My best guess is that you might not have changed which BHAV is being run when your interaction gets called (in the TTAB part, where you have to change the number of the BHAV to match the instance ID of the one you just created). If that's the case, it'll just call the default "View" interaction, which can involve booing at the painting. :)

Dani1202
21st Jun 2008, 07:05 PM
Great Tutorial, echo! But I've still got some questions:

I've added an "animate overlay"-command to get my sim go into the handcuffed pose. Before that I've added a line which sets temp 0x0001 0xFFFF. The animation is supposed to use this value as it's loop count. All just like in jixs' prop hack - but my sim doesn't animate... :cry: I've attached the object, can you please take a look? (It doesn't have it's own GUID yet, so it's just the "Tea-Time with teak"-chair (or how that one's called in english)).

EDIT: OK, it works with the "animate sim" command, but why not with the "animate overlay" command, I don't get it...It has to be the overlay, as the sim should sit down still "cuffed".

And also: how can I make a sim sit on a chair? I don't wanna use the "sit"-option, because I wanna make a "Tie-Up-Chair", (for kidnapping- ,burglar- ,brutal interrogation- ,etc storys) to which the sim can be tied (The Sim sits down, the cuffed-animation starts and ropes (cloned from the handcuffs) spawn at the wrists) and only release himself when the player uses a "release"-funtion from the pie menu. I only need to know how I can sit the sim down. That has to work somehow with slots and the right animation, but I want to know how it goes exactly.

I know, that's a plenty of questions, but could you please help me? :)

Echo
22nd Jun 2008, 12:21 PM
Hi Dani!

I've only been able to take a quick look, but a few thoughts:
- take off the '_anim' at the end of the animation name in the text list. It doesn't need to be there, and may or may not interfere with correct functioning. :)
- try setting the priority higher (yours is at low, try medium). If the priority is too low, then regular idling animations will play over the top of yours and you won't actually see the end effect. For overlays, I think low is for idles, while medium is more for poses. :)

As far as getting the sim to sit on a chair, the easiest way probably *is* to use the sit function, and just tweak it to suit your needs. If you really need to rewrite it though, you'll need to use "go to routing slot" to get the sim in the right position initially, then "snap into" to get them into the correct slot, then "animate sim" to play the transition to sitting animation, then "animate overlay" to keep them sitting while you do your other code. Then roughly the reverse to get them out again. :)

Dani1202
22nd Jun 2008, 01:17 PM
OK, thanks for your advices, I managed to get rid of the problem with the overlay animation. I don't know what exactly was the solution, since I've made a few changes simultaneously, but it works now! :D
OK, let's see how I get my sim to seat down...

Dani1202
16th Jul 2008, 12:10 AM
Hi, me it's again!^^
I#ve had some time to work on the chair and the animation start works now. I still don't know how to make my sim sit down, if i just add a line with the "interaction - sit" BHAV, it creates an error in the game. The problem of staying seated until the release funcion is chosen should work with the comfort-motive: Just decreaase the comfort when the sim gets tied, and not increase it while seaten. The release-function maxes the comfort an the sim should stand up - at least i hope so...^^ That way the sim would stay seated unless other motives are too low.

But my most recent problem is that the release-function reates an error ("illegal data field owner" or something). And i don't know why - *sigh*I've attacehd the objects. You'll need both for the chair to wörk, but the error must lie in the chair itself.

:help: ,please! (again^^)

Echo
17th Jul 2008, 10:53 AM
Hi Dani :)

Could you attach your error log as well?

Reganster
17th Jul 2008, 09:34 PM
I am trying to make the Prints Charming Fingerprint scanner raise the mechanical skill and not cleaning for my custom career reward object, but I don't see a Start- Skill function in any of the BHAV's. It seems like it would have to be there to increase the cleaning skill, but I can't find it.

Echo
18th Jul 2008, 11:51 AM
There are a couple of them, in the semi-globals. "Interaction - Teach" and "Interaction - Scan". :)

Reganster
22nd Jul 2008, 10:58 PM
All of my BHAVS are like function main and function init and stuff like that, no interaction teach or scan

Echo
23rd Jul 2008, 12:11 AM
The interactions are in the semi-globals, you have to import them, like you had to import text lists and pie menus in this tutorial. ;) They're getting called from the TTAB.

treeag
29th Jul 2008, 05:36 AM
Echo, how do you add a new pie menu to the destination? I mean like when you click on the ground you get "walk here" and "run here", I want to add a new option, can it be done?

Thanks in advance

Richi3frog
30th Jul 2008, 12:50 AM
Hi Echo! This is a great tutorial! It helped me a lot, I could make the hula dance painting without any conflict.

However; how can I make a Sim to build a skill with a custom interaction?, for example I want my Sims to build Logic skill while playing the videogame console. So I added a practice interaction to the pie menu but it's not working! Whenever my Sims get to practice they just play but don't gain any skill. I'm attaching my package in case you (or someone else with more knowledge than me) can help me. Thanks in advance.

Echo
30th Jul 2008, 10:35 AM
treeag - I think what you're after is the "Destination" object. It should show up somewhere in the Object Workshop. It has the pie menu for places sims can click on and go to. :)

Richi - Glad it worked for you! Well done getting the painting working. :) Regarding the attached file, the first thing I notice is that you've got the groups set up to override base game objects? Is that what you're aiming for, or was that an accident? :) The second thing is that the "Interaction - Practice" is a really complicated BHAV... It's also referencing some globals which I don't have, so I'm guessing two things from that - firstly, that you've copied this BHAV from another object, and that you've got an EP which I don't have installed? Can you give me a bit more information about how you got to this point?

treeag
30th Jul 2008, 12:33 PM
Thanks :) And when I clone it, should I check "set custom group ID", "fix cloned files" or leave them unchecked? Also, do I have to assign a new GUID? :blink: Sorry for the stupid questions :P .

Echo
30th Jul 2008, 01:48 PM
Nope, you'd want to create an override package, so you want to keep the existing group and instance IDs, then delete anything you don't actually want to change from the package (which would be pretty much everything except for the TTAB and TTAs). Then any new BHAVs you add need to be added to the same group as the existing ones in that package, but with different instance numbers so they don't accidentally override the existing ones. :)

Richi3frog
30th Jul 2008, 10:06 PM
Regarding the attached file, the first thing I notice is that you've got the groups set up to override base game objects? Is that what you're aiming for, or was that an accident? :)

I want it to override the original console as I do not want to have two game consoles in my game.

The second thing is that the "Interaction - Practice" is a really complicated BHAV... It's also referencing some globals which I don't have, so I'm guessing two things from that - firstly, that you've copied this BHAV from another object, and that you've got an EP which I don't have installed? Can you give me a bit more information about how you got to this point?

I got all EPs and SPs up to IKEA, except for TSS. Well, first I tried copying the BHAV from Numenor's gaming system which has the options to practice, ask for lessons and offer lessons but it didn't worked.

Then I tried with the SimSanto Biotech Station as it has almost the same options (ask for/offer lessons, practice) but it didn't worked. So I tried to mix both and ended in this.

The only thing I want is to have an option so my Sims can practice (build logic) in the game console.

Hope you can help me with this information. Thanks in advance.

P.S: I'm attaching Numenor's gaming system which I took the BHAVs from.

Echo
31st Jul 2008, 11:05 AM
Richi - BHAVs aren't really self-contained files that can be copied direct from one object to another. They link to lots of things, and a lot of things link to them, and if any one of those things isn't in the right place, or called the right thing, then it won't work. Numenor's gaming system has a lot of BHAVs that yours doesn't, and they're using different instance IDs so you can't just copy them as is, you'd have to reconnect them using different instances.

Perhaps a better way to approach this is to think about what you need sims to do in order to have them gain skill while playing, then write a BHAV of your own. You can look at how Numenor (and others) have gotten skilling to work, and use those same techniques in a BHAV that specifically caters to your need? There's a tutorial on adding skilling to an object which doesn't have it here if that helps:
http://www.modthesims2.com/showthread.php?t=222531

Richi3frog
31st Jul 2008, 05:19 PM
Thanks for your help!

There's a tutorial on adding skilling to an object which doesn't have it here if that helps:
http://www.modthesims2.com/showthread.php?t=222531

I'll try this and let you know if it works or not!

upinout
3rd Aug 2008, 07:17 AM
Hi Echo,

I finally got my object I've been working on to work exactly how I want, boosting aspirations and motives, and proper autonomous use, but now I have a couple other problems.

When 2 sims try to use the object at the same time it throws out an error message about undefined transitions... I'm not sure what this means.

I did follow your other tutorial, "Making a better interaction - Entries, exits, skills and motives" and added the entry and exit, along with the code for making the object "in use".

One other issue I've been having is with the "wait for notify".

When I tell the sim to use the object, the sim stays until one of two events occur; either I tell the sim to stop or the sim's Social motive drops down to 50. Even if I try to tell the sim to do something else, it won't until it is released from the current interaction. This works perfectly when directed by me to use the object.

However, when the sim uses it autonomously, any little thing will cause the sim to stop. Shouldn't the "wait for notify" prevent this from happening?

Since each of these issues is covered in two different tutorials, I figured I would post both issues in one thread, instead of making 2 seperate posts. I hope this is okay.

I'm including the object I'm working on (a modified version of xanathon's borg alcove) and the most recent error log. If you could take a look and maybe give me an idea of where to adjust the code, I would really appreciate it.

Echo
3rd Aug 2008, 08:14 AM
Okay, the error message is most likely because your first line "Go To Relative Position" points to "Error" if it fails. That means that if the sim can't route to the necessary position (for example, there's another sim in the way!), then you'll get an undefined transition error. Make that target point to false and the sims will stop erroring.

Not sure about your autonomy problem though... I'm pretty sure Wait for Notify also manages autonomous actions, but I haven't had to test that for a good while now so I may be wrong. When your sims are stopping, is it a controlled stop or an error ('jump bug') stop?

upinout
3rd Aug 2008, 09:00 AM
Okay, the error message is most likely because your first line "Go To Relative Position" points to "Error" if it fails.

And now that you pointed that out, I feel like such a dope for not seeing it in the first place. :P

I really have to remember to read through the lines and think them through logically to catch those little things. I was always afraid of programming, but these last 3 days have actually been a lot of fun. :)

Thanks so much for your help with this.

I almost forgot to answer your question, I think it's a controlled stop. I haven't received any errors when it happens.

__________________________________________
I have a new question--


Add another command to the loop, just after the idle. Set this command to opcode 0x0119, which is the global "Wait For Notify"..........This one is making the statement "I need to stop looping". If this is true, then the BHAV will follow the green line. If this is false, then the red line will be followed."


So according to your tutorial, if the wait for notify sees that the user has cancelled the interation, it will return true, and *should* follow the true path in the code.... And not just stop the interaction in it's tracks, right?

When I cancel the interaction before it comletes, the sim doesn't do what the code says it should do. In the code, I have the wait for notify's true path set to make the sim walk away from the alcove and release it from being "in use".

Yet when I test the alcove in the game, If I cancel the interaction, the sim does stop using the alcove, but they just stay in it, and it becomes unusable (it stays in use). So the Walk away and standard exit commands aren't getting called when the action is cancelled...

I have testing cheats turned on, but I'm not getting any errors.

do I maybe need to adjust the operands in the wait for notify command?

If so, What do "ticks" and "allow push" mean?
________________________

*Edit 2*

I just figured out why I was having an issue with the wait for notify.. and it had nothing to do with that command, it was the command I had it linked to that was the problem. So nevermind :)

Kolipoki
5th Aug 2008, 11:39 PM
Thanks Echo this is just what i needed. I've been looking for one ever since i could create an object. :)

treeag
19th Aug 2008, 03:35 PM
A quick and I believe stupid question again here, Echo. Sorry for bothering you again and again...

Can you activate cheats from BHAVs? What I'm trying to do is to activate a bunch of cheats for story telling (e.g debug mode, snapobjectstogrid, allow45degreeangleofrotation, moveobjects on, plumbbobtoggle off, showheadlines off, etc) at once and deactivate them. Is this possible at all?

Thanks in advance.

Echo
20th Aug 2008, 01:18 AM
No, not really. A few things can be done (speeding up/slowing down time for example,) but that's mostly co-incidental. Cheats and BHAVs are managed by completely different parts of the code.

treeag
20th Aug 2008, 09:29 AM
Ok thanks a lot :D I did find the ones about the time but no references at all about the cheats :P . Thanks for answering :anime:

Hydromancerx
6th Dec 2008, 10:48 AM
I have been following the tutorial but am stuck when it comes to adding a BHAV. You see rather than using a painting i used a rug. because i want to have an invisible rug that will do animations based upon what you click on the pie menu. Such as "Mine" would use the digging hole animation and would gain body skill and maybe give money as well.

Anywho I got through Part 1 and went in game to test my rug to see if it had an additional menu. And it did but when you click on it to "View" or "My New Interaction" they never let you X out the viewing.

I am guessing its because the rug has no BHAV or BCON. How do I get one into my rug object?

If its not possible how do i get an object to have non-collision like rugs which can be set under other objects and is flat? Because i want to use this spot with other objects such as if i had it do mining i would place it near a rock or something or if for chop tree (if i can find an animation that fits) i would put it near a tree.

Please help. I am new to the whole adding pie menus to objects.

EDIT: I am guessing you can add it the same way you added the pie menu parts. Do I go to "Import Semi Globals" and add them? If so which ones?

Echo
7th Dec 2008, 07:52 AM
Hi Hydromancer!

First thing I'll say is that it really, really is best if the first time you do a tutorial, you do it exactly as described. It'll only take a couple of hours, but you'll be able to get through to the end without too many problems. Once you've done that, you'll be better equipped to improvise around other issues like the ones you're having now. :)

Now, I'm a little bit confused. After you cloned the rug, did you import the semi-globals from the Rugs semi-globals, or from the Paintings semi-globals? The reason importing the pie menu works here is that you start with a rug, then imported rug semi-globals. If you start with a rug, you should really import rug semi-globals. :)

Finally, if you're talking about Maxis rugs, I'd strongly recommend not using them as a base for anything. They're strangely constructed and very hard to use as a modding base. Use a large statue instead and set the "can walk" flags so sims can walk over it. If it's going to be invisible, it doesn't really matter what it looked like when you cloned it, eh?

Hydromancerx
8th Dec 2008, 03:56 AM
@ Echo

Yeah I figured that and plan on following the tutorial as is 1st.

The rug had no simi-globals when i cloned the object and then I imported the semi globals of the painting when i followed it. I also noticed it had a lot of other things not described in your tutorial. I am guessing they are related to other expansions such as Free Time having the sim assess the picture and from Pet such as chew/scratch the picture. I took those out as i was following the tutorial so they would match.

This is good to know since I was 1st considering using a sculpture as a base object like the meshing/texture tutorials had you do. And your right it would not matter what it looked like if it was going to be an invisible spot. Plus if i ever wanted to ave say a place mat or some flat marker I could always export the rug mesh (if it has one) to do so.

Thanks for your response and great tutorial.

Echo
8th Dec 2008, 08:35 AM
Good stuff! If you *really* need to clone a rug, use these ones:
http://www.modthesims2.com/download.php?t=46922
They're base-game compatible, and they don't have any of the oddities involved with the Maxis rugs. :)

coward67
9th Dec 2008, 04:01 AM
before i go ahead and start, could you tell me if this is even possible, i want to make a banquet table, that when you go to fill it up with food you get shocked by lightning that increases your motives, aspiration meter and gives aspiration points, but can only be used once a day, is this possible? is there any other information i need to know?

Echo
9th Dec 2008, 05:08 AM
Yes, it is possible, although some things there are easier to do than others. :) I assume you have completed this tutorial already? It will set you in good stead for those other changes. :)

Hydromancerx
9th Dec 2008, 06:26 AM
@Echo

Ok so I took your advice am used a vase as my base object. Following your tutorial so far everything works up to Part 4. In part 4 I put in the starting point into the operand box. It gives me a similar result in the "Instructions Settings" description but in the 3rd box nothing shows up except for 0x2(2):[prim0x006A]Animate Sim("0")

I also noticed that the red lines always showed F and not E when i put them in part 3.

When i use the object it will walk up to the vase and view it. It always faces the same direction. Thus if it is behind the face it will face opposite of the vase. How do I make it face the vase no matter which direction you click from.

I am also confused on this part ...

"Select "Text Lists (STR#)" from the file types list, and take a look at the instance numbers. Can you see one with the instance number 0x81? No? That's probably why the animation command couldn't find it! But we know that paintings do have interactions that animate the sims, so they have to be able to pull animations from somewhere. That means that there is probably going to be a Text List 0x81 in the semi-global library."

Where is that? Is that the same button we put the hygiene part in with the "pop-up wizard"?

Thanks for you help in advance.

Echo
9th Dec 2008, 07:55 AM
F means "return false", E means "create an error log". When you're trying stuff out, it's good to point things to E so you can see where something goes wrong. :)

If your sims are going to the wrong place near the vase, you've probably got the wrong parameters in the "Go To Relative Position" command. The semi-global library is the "import semi-globals" tool you used to import the pie menu files. Part 4 will resolve itself after you import the text list from the semi-globals.

coward67
10th Dec 2008, 03:58 AM
um, actually im having trouble with step 1... how do i find out what my object globals are?

coward67
10th Dec 2008, 05:29 AM
nvm i solved that problem but i cannot get my ibject to show up in the catalogue! it may sound pathetic, but its not! i have made objects show up in the catalogue before and i dont see why this would be different... think you could help me out?

Echo
10th Dec 2008, 05:41 AM
I can only help diagnose issues if you post your object. ;)

coward67
10th Dec 2008, 07:15 AM
1. how do you post your object and 2. i have had trouble getting the coin toss interaction, no globals are showing up!

so sorry if i am bugging you.

Echo
10th Dec 2008, 08:41 AM
1. You post your object using the "manage attachments" button. You have to use the "Go Advanced" method of posting, not just the Post Quick Reply.

2. I thought you couldn't get the object in the catalogue? Have you solved that problem now?

Are you following the tutorial exactly? Cloned the same painting, following exactly those steps one at a time? It seems like you may be rushing it, maybe if you slow down and read things carefully you might have more luck. :)

coward67
11th Dec 2008, 12:49 AM
nope, still cant get it in the catalogue, i was going on anyway, i am not the kind to give up easily, i am attaching it, and i have read many instructions several times and i have read this one several times and tried solving it several times, see if you can help, thanks.

Echo
11th Dec 2008, 08:37 AM
Okay, you've cloned the wedding arch (Indigo's? It looks familiar...) but the tutorial was designed for deco objects, like paintings and statues. I'd strongly recommend following the tutorial with the recommended painting object before trying to apply the steps to another object. The arch in particular is quite complicated to work with as a base for these sort of "ground-up" hacks. :)

coward67
11th Dec 2008, 07:09 PM
ok thanks, yes it is indigo's, i will try working with some decoraive objects, if only i could find a good looking altar, i think i know where to find one, the tutorial did help lots btw, i wouldnt have been able to do this myself, i am a bit dull in the head but even i can follow this tutorial! thanks.

GeneralOperationsDirector
12th Dec 2008, 07:04 PM
Hi, Echo. I`ve read your tutorial, and it seems simple enough, so I gave it a try. I first tried it by editing a package that simsample had cloned from a vase for me, and while I have not finished the tutorial, everything I have tried so far works as advertised on that package, and the few issues I had were easy for me to deal with. I therefore decided to try the tutorial again, with an object I cloned myself. I have never cloned an object before, but the process went smoothly, once I figured out how to do it [I had a couple false starts along the way while figuring it out, though :)].

I`m having this (http://www.modthesims2.com/showthread.php?p=2070210#post2070210) problem with my own object, however, and this (http://www.modthesims2.com/showthread.php?p=1213764#post1213764) looks like the required solution, but I haven`t been able to figure out how to do that yet. Would you please be so kind as to amplify? Thanks.

P.S.: I thought the issue here (http://www.modthesims2.com/showthread.php?p=1170680#post1170680) was with the instruction to change something, then look at it. Shouldn`t the instruction to look at it come before the instruction to change it?

Echo
13th Dec 2008, 07:29 AM
Not sure which problem you're pointing to, could you just quote the post you're looking at?

GeneralOperationsDirector
13th Dec 2008, 10:31 PM
If you`re using IE7, like me, the page will load with the referenced post at the top of the screen.

However, to make looking them up easier:

Problem: Post #193 (http://www.modthesims2.com/showthread.php?p=2070210#post2070210)

Solution: Post #17 (http://www.modthesims2.com/showthread.php?p=1213764#post1213764)

The object I tested the tutorial successfully on was a vase.

The object I cloned myself for the unsuccessfull attempt was a rug.

I have not finished the tutorial on the former vase, but I am not trying to do anything to the rug that I have not already succeeded in doing to the former vase.

You said: You can import pie menu strings and function tables from a different object or semi-global group. Just make sure, firstly, that they both have the same instance ID. Then, go into your OBJd file, open the "Raw data" tab, and find the line that says "Interaction Table ID". Set that value to the instance ID of the pie menu files. If all goes well, you should now have a pie menu again. :)Can you amplify on this procedure?

Echo
13th Dec 2008, 11:55 PM
Ah, okay then!

First point I'll quickly make is that if you want to mod a rug, you're better off cloning these ones:
http://www.modthesims2.com/showthread.php?t=46922
They're base game compatible and don't have anywhere near as many confusing or irritating idiosyncrasies as the EAxis rugs. No credit necessary for clones. ;)

That said, yes, you can import the menu from another object. I'm not sure how well it will work for EAxis rugs because, as I said, they're very odd objects that don't follow normal rules. What you do though, is import a pie menu from another object. You'll have to delete or replace *all* the existing interactions though, because it won't have access to the original code.

So just import the menus from some other deco object, and fix the group ID like you did in this tutorial. Then, copy the Instance ID. Open up the OBJD, and click on the "Raw" tab (if it's not already open). Scroll down until you find the "Interaction Table ID" line, and change its value to the instance ID you copied. That's it! :)

GeneralOperationsDirector
14th Dec 2008, 12:21 AM
Quote:

Then, copy the Instance ID. Open up the OBJD, and click on the "Raw" tab (if it's not already open). Scroll down until you find the "Interaction Table ID" line, and change its value to the instance ID you copied. That's it!

That was the part I was confused over. Perhaps it will make more sense when I load up SimPE again. :)

Quote:

You'll have to delete or replace *all* the existing interactions though, because it won't have access to the original code.

Is this why when I clicked on the modified rug`s menu item, the Sim would stand there, doing nothing, and I was unable to cancel the action from the command queue? It is still using the View code copied from the Paintings Semiglobals.

Actually, it isn`t a rug at all; it is the round 3x3 tile that came, if I recall correctly, with H&M Fashion Stuff.

Just to get me started on the "rug", can you tell me how to create a do-nothing BHAV for the menu to call? You know, something that can process the command, allowing it to drop off the end of the command queue successfully, but without actually accomplishing anything.

Also, is there anything that I need to delete from the "rug" besides the actual BHAVs themselves that come in the "file" that I imported from the Painting semiglobals? I mean, I just delete the View BHAV code [not the BHAV itself, or the container that holds the BHAVs], and replace it with the do-nothing code I asked for, or something that I code myself, right? Everything else, I believe, either came with the "rug", or is needed for the menu to function at all, no? Have I confused you yet? I`m beginning to confuse myself.

Alternatively, would it behoove me to clone a painting, and replace the mesh and texture(s) with the mesh and texture(s) of the "rug"? If so, how? I haven`t learned that yet. BHAVs look easier, to me. :) I`m already a programmer.

Echo
14th Dec 2008, 12:36 AM
A little bit confused, yeah. ;)

If you want a BHAV which does nothing, just use the Global "No Op". If you want it to be selected for a few seconds then drop off, use idle(20) or similar.

The sim is probably stuck because whatever option you selected was pointing to a rug BHAV, not a painting BHAV like it was designed to. If it was, say, pointing to BHAV 1234, and in the painting 1234 was view, then that would work in a painting. But import the menu into a rug, and it'll be looking for run BHAV1234 instead, which probably does something very different.

Did you take a look at the alternative rug base I posted? It really would save you a lot of pain. :)

GeneralOperationsDirector
14th Dec 2008, 01:34 AM
I imported [successfully!] both of the Painting semi-globals that your tutorial tells me to, the one that contains the menu itself, and the one that contains the BHAV that performs the View command. I also did the 0xFFFFFFFF thing, also successfully, and I zeroed the Guardian BHAV pointer.

However, while the menu appears in-game, nothing happens after the command enqueues, and when I try to cancel the action, the red X appears, and nothing else happens, including the command dropping off the queue [it fails to drop]. Is there anything in the imported View BHAV that would call items that aren`t in the "rug"?

As far as I can tell, the two menu items correctly point to copies of the Painting semi-global View BHAV that are resident in the subject package, but I don`t know what that BHAV might be doing.

No, I haven`t looked at that object yet. I`ll try using the idle(20) and No Op commands, and see if they help. As I presume that I need to delete the View BHAV opcodes anyway, I propose to replace the View code with one, and the clone of the View code with the other, so I can test both in-game at the same time.

Oh, and in idle(20), is that Sim seconds, or RL seconds?

Ah, and I`m going to fire up SimPE as soon as I submit this post; it should be ready in about five to ten minutes, I think. ...or mebbe it only seems that long?

Edit: I have SimPE open now.

Quote: Then, copy the Instance ID. Open up the OBJD, and click on the "Raw" tab (if it's not already open). Scroll down until you find the "Interaction Table ID" line, and change its value to the instance ID you copied.

With regard to copying the Instance ID, what do I copy from, and what do I copy to?

Edit: With SimPE open, I`ve been reviewing the tutorial, and I think that the menu items are indeed pointing to incorrect code. I`ll look into this further while awaiting your reply, and edit further if I discover anything useful before you return.

Edit: I have [apparently successfully] added two new BHAVs for the menus to exectue. I have yet to figure out how to set the pointers correctly, mostly because I think I still need to set the Instance numbers on the BHAVs themselves.

Edit: I believe that I have now successfully completed Part Two on the "rugstoneinlayround" object. However, I have yet to test it. Would you like me to post the package?

Edit: I believe I have sussed out what you meant by copying the Instance ID into the Interaction Table ID line, and the instance number of the Pie Menu Functions and the instance number of the Pie Menu Strings both already match the number in Interaction Table ID, which probably explains why the menu itself worked fine, even though selecting the menu items did not.

Echo
14th Dec 2008, 03:18 AM
Okay... That's a lot of editing... Is there anything you still need clarified? ;)

GeneralOperationsDirector
14th Dec 2008, 03:19 AM
I dunno.

Do you have anything to say regarding what I`ve been doing?

Echo
14th Dec 2008, 03:32 AM
Not particularly. :) Keep doing it? ;)

GeneralOperationsDirector
14th Dec 2008, 03:42 AM
If I did it right, View should immediately drop quietly out of the command queue, while Test should sit there doing nothing for five Sim minutes, then drop out.

D`you think I`m ready to test in-game? The game takes longer to load than SimPE does. Should I quit SimPE before starting the game? SimPE takes a while to exit, too, doesn`t it?

Edit: I did quit SimPE, I did start the game, I did load up my test neighborhood, and I did test the object.

Results: It works as described. :) Now I need to start having the options do stuff. :) Gracias. Domo Arrigato. Danke Shoen. Merci. Etc. :D .

GeneralOperationsDirector
17th Dec 2008, 06:24 PM
Sorry about double-posting, but I have a new issue. :)

The attached object [which probably requires H&M Fashion Stuff] works perfectly, yet it doesn`t work at all.

It has two menus, Dance and Test.

Dance shows up for both genders. Females do the hula, and males do a different dance. Body goes up by one, Fun goes up by two, and all other motives go down by one. No issues here; this part works perfectly.

Test shows up only for males. It sets the gender to female. I know it works, because the Test menu stops appearing for them, and the Dance menu makes them hula, but no visible changes result, and males still behave as males as far as the wardrobe functions of dressers are concerned. I haven`t yet conducted any other tests.

I have previous programming experience, but I`m still new at this, and unfamiliar with the Primitives and Globals available. Any advice?

Echo
18th Dec 2008, 10:51 AM
In "Interaction - Test" you've got:
My person data 0x0041 := Literal 0x0001
when you should have
My person data 0x0041 == Literal 0x0001

The former stores the value on the right into the location on the left. The latter just compares the two together. :)

J. M. Pescado
18th Dec 2008, 11:45 AM
I think that's what he wanted to do. He said it worked.

Turning a sim male/female is not as simple as that, however. There is a lot more involved, none of it accessible to BHAV, so trying to create a sex changer is right out.

Echo
18th Dec 2008, 12:00 PM
Oh! I see, sorry, misunderstood the nature of the problem. :)

GeneralOperationsDirector
18th Dec 2008, 04:41 PM
Mr. Pescado is correct. The comparison is in the guardian BHAV; the action BHAV is deliberately assigning. It wouldn`t make sense to have a single comparison as the only instruction in an action BHAV. :)

Mr. Pescado is correct. I was attempting to construct a gender changer. :D

Does anyone have any information on anything that is accessible to BHAV manipulation that might be relavent?

Does anyone have any information on anything that might be relavent, BHAV accessible or not?

J. M. Pescado
18th Dec 2008, 06:56 PM
It is possible to attempt such a thing, but I recall it involves lots of monkeying with the sim's file in addition to the flippy bit, some messy business involving propertysets and AGEDs, and Google isn't find anything useful. The idea can mostly be dismissed as being impractical. Constructing a method of doing so in-game is believed to be impossible.

GeneralOperationsDirector
18th Dec 2008, 07:56 PM
Thank you, Mr. Pescado, for looking into this for me. I`d still like to do this, but "like to" does not always equate to "can". :) Ah well, I`ll look into what I can do with BHAVs, and see if I can find anything interesting to do with what I find. :)

Hmm, do you know where I can find information relating to how the game engine performs a birth? Is any of that implimented in BHAVs?

GeneralOperationsDirector
21st Dec 2008, 07:47 PM
Echo, I have a new question [or three] for you: When you have my object in your Downloads folder, what happens to the original Nightlife[!] object I cloned?

In my game, the original object still appears in the Catalog with the correct details, but it is not placeable, as I cannot even grab it from the catalog!

Did I err in my cloning? Should I have set the Group ID to 0xFFFFFFFF for all resources? The object shows up in the Disable Custom Content menu during game start-up, but without the warning symbol.

Also, I have continued to work [intermittantly] on the object. The Dance menu now choses [via three Coin Flips] between four dance moves, and loops until interrupted or Fun goes too high or any other motive goes too low, and sports an immediate "Clock.../Pause" interaction, which, of course, is identical to pressing the Pause button. I`m thinking that a non-immediate "Clock.../Pause" could be useful, to queue an automatic game pause when a Sim completes an action. I`m not sure what the Test item currently does.

I`m also having some difficulty understanding the PDFs posted at the beginning of this thread. They have too much explaining, and not enough explanation, if you know what I mean. What I need is more along the lines of a Programmer`s Reference than a Beginner`s Tutorial.

My current conundrum is how to use dialogs. I can puzzle some other things out myself, if I can generate usable output, but I haven`t yet seen anything about dialogs that is useful to me.

Echo
21st Dec 2008, 11:36 PM
It sounds like you haven't updated all of the GUIDs in a multi-tile object. Check that first, and if it looks fine to you then post the object and I'll take a look see. :)

Regarding dialogs: http://www.modthesims2.com/showthread.php?t=194588

As for programmer documentation... You have to remember that we're hacking a closed source game here, not developing for an API. ;) This tutorial was a "making your first...". It's the equivalent of "Hello World" for BHAV coders, who need hand holding and screen shots on how to do the Sims equivalent of set up their IDE, compile and run their "Hello World". If you want to learn how to do something which isn't covered by the tutorial, clone an object which already has that behaviour and look at how it does it! If you're up for writing some of that documentation yourself for particular commands, it's all ready to go here:
Primitives (http://www.sims2wiki.info/wiki.php?title=Primitives)
Globals (http://www.sims2wiki.info/wiki.php?title=Globals)

GeneralOperationsDirector
22nd Dec 2008, 12:59 AM
It sounds like you haven't updated all of the GUIDs in a multi-tile object. Check that first, and if it looks fine to you then post the object and I'll take a look see. :)I`ve been modifying the object since the last upload, but I haven`t touched anything in the part of the package that is likely to be causing this issue; I haven`t a clue what to touch, or how. If you still want me to upload the current incarnation of the object, I will have to do so after I quit the game, as my Zipper cannot zip files that are currently open, and I am currently alt-tabbed out of the game. :D Regarding dialogs: http://www.modthesims2.com/showthread.php?t=194588Thanks! That looks like exactly what I was wanting. :D I`ll be adding it to my Quick Links menu for review when I`m not also in-game.As for programmer documentation... You have to remember that we're hacking a closed source game here, not developing for an API. ;) I know that. I also know that it means that a Programmer`s Reference Guide is a strictly DIY thing, but I still wanted to say that that style of documentation is more suited to my current skills than the typical "I`ll hold your hand every step of the way" tutorial.This tutorial was a "making your first...". It's the equivalent of "Hello World" for BHAV coders, who need hand holding and screen shots on how to do the Sims equivalent of set up their IDE, compile and run their "Hello World"....and I needed exactly that, but only for a few minutes, though admittedly spread out over several days, as the development environment and the testing environment both take "almost forever" to load, making it extremely awkward to do rapid development cycles, and as long as I have the game loaded anyway, I want to play. :D Thank you VERY MUCH for that!If you want to learn how to do something which isn't covered by the tutorial, clone an object which already has that behaviour and look at how it does it!I`ve been exploring the OpCode selector dialog, and playing with the Operand Editors. This tells me almost as much as the tutorials. :D However, the tutorials do give me a place to start!If you're up for writing some of that documentation yourself for particular commands, it's all ready to go here:
Primitives (http://www.sims2wiki.info/wiki.php?title=Primitives)
Globals (http://www.sims2wiki.info/wiki.php?title=Globals)Thank you once again! I shall "bookmark" those pages as well, and may well update them, if I can figure out how. I was "raised" on the Python-based Wiki [at the Python site], and this engine is a tad different.

Edit: Yes, that thread does contain one of the missing peices I needed. I will now be able to create my own dialog texts. I still need to know to use the $Substitution system to extract values from my game. :)

Again, thank you!

J. M. Pescado
22nd Dec 2008, 01:49 AM
Thank you, Mr. Pescado, for looking into this for me. I`d still like to do this, but "like to" does not always equate to "can". :) Ah well, I`ll look into what I can do with BHAVs, and see if I can find anything interesting to do with what I find. :)At this point, most of the easy interesting things have already been done, so you're stuck with either reinventing the wheel or practicing your skills in private.

Hmm, do you know where I can find information relating to how the game engine performs a birth? Is any of that implimented in BHAVs?If you're trying to do what I think you're trying to do, you can't do that, either. EAxis intentionally hardcoded the baby gender selection and refuses to allow it to be altered in any way, just to be annoying.

GeneralOperationsDirector
22nd Dec 2008, 03:15 AM
At this point, most of the easy interesting things have already been done, so you're stuck with either reinventing the wheel or practicing your skills in private.Probably, but practicing my skills in private by reinventing multiple wheels just might generate an interesting twist on an old wheel, and might just be worth sharing. Even if it isn`t, it`ll be fun, and lead me on to bigger and better things. After all, I didn`t create the universe in a single day.If you're trying to do what I think you're trying to do, you can't do that, either. EAxis intentionally hardcoded the baby gender selection and refuses to allow it to be altered in any way, just to be annoying.As usual, you got it right off. However, while a true fix might well be impossible, short of rewriting the executable, I think I have figured out a way to create an automated work-around, though I haven`t tried to do anything with it yet [I need more practice first]. Any ideas on what I`m thinking? I challange you to figure it out [correctlly!] and shoot it down [successfully!] without more than the occasional hint.

GeneralOperationsDirector
22nd Dec 2008, 08:05 PM
Echo, herein please find attached the latest version of my "Magic Carpet Dance Floor" TestObject.package, as it is currently called. :)

Edit: I have since discovered that, in addition to the previously mentioned problems, all of the several instances of the original object that I had placed in a community lot before I even created this object are now bearing this object`s menus!

Edit: This attachment had four downloads when I deleted it. I hope you all enjoy it!

leesester
28th Dec 2008, 10:49 PM
HI
I have been working on a small garage to use as well as the dolls house, but of course the dolls are still in the animations, so I wanted to change them to cars. If I made a global hack all worked ok, but then I had cars with the dolls house. I have tried to create local copies of the relevant BHAVs and string together in the package to get cars but no luck.
I have attached a copy of my garage and the rough cars (small blocks, no own texture mesh or whatever as yet). Please could you have a look at my garage and tell me where I am going wrong?

leesester
28th Dec 2008, 11:47 PM
Echo, herein please find attached the latest version of my "Magic Carpet Dance Floor" TestObject.package, as it is currently called. :)

Edit: I have since discovered that, in addition to the previously mentioned problems, all of the several instances of the original object that I had placed in a community lot before I even created this object are now bearing this object`s menus!

Hi, I am not Echo, but I took a quick look - looking at the package you have only updated the lead guid - as object functions are linked to objects in some way then that might be causing your problem? Anyway, try updating all the guids and then see if that solves your problem of all the original instances showing this behaviour.

Echo
29th Dec 2008, 08:40 AM
leester - There are a couple of things I can see which might be wrong...
- in your imported "Do Play" method, it's still got one "Animate Sim" call which is pointing to the semiglobal event tree "Event - Play - Main" (line f)
- in your imported "Event - Play - Main" method, you've fixed the line 5 call to "Event - Play - Create doll", but line 6 is still pointing to the global one (which will create dolls, not cars).

Try those?

Echo
29th Dec 2008, 08:41 AM
general - as Leester said, you've only updated one GUID. You must update all GUIDs for an object before you put it in game.

leesester
29th Dec 2008, 09:56 AM
Hi Echo - thank you - it worked!! Yay! But, interesting thing for anyone else who may read this one day, I had to remove ALL references to the original BHAV in the entire pie menu before it worked. Thank you, off to make little cars!

GeneralOperationsDirector
29th Dec 2008, 05:17 PM
Thank you, Echo. Just to make sure I do this right, where do I find them? [Meanwhile, I`m loading SimPE, in case I get an answer in the next four hours.]

leesester
29th Dec 2008, 05:20 PM
Hi general, I know how to do this, but if you would rather wait for Echo? I guess you have registered at simPE site? If you want me to help please reply.

GeneralOperationsDirector
29th Dec 2008, 06:20 PM
I assigned a new GUID to the object when I created it, and I did use the SimPE internet connection to register the GUID, but I`m not sure where to find the other GUIDs that need updating. Once I find them all, I know how, though. I`ll gladly accept the help from anyone who knows the right answers. Feel free to download my object to verify where the GUIDs in need of updating are. The posted object is currently obsolete, but the relavent portions are unchanged localy; I`ve only updated what I knew how to deal with.

My current version here at home sports, besides dancing for fun and body, an [almost?] complete replication of the Game Speed buttons functionality in a form that can be scheduled to happen when a Sim completes a previous activity. Wouldn`t it be nice to be able to set your Sim to doing something, schedule a Pause command, set Game Speed to Ultra, and walk away to go do something with the assurance that the game will be paused and waiting for you when you return? ...or have it drop from Ultra to Normal immediately when the boring stuff is done, instead of having to stand ready to pounce on the speed controls? I can, here. :)

leesester
29th Dec 2008, 06:37 PM
Hi
In the object in the resource tree there is a tab called object data (OBJD). In that tab in your object there are about 10 objects. You have only updated 1 - the master object. The others need to be updated in the same way. See attached screenshot (sorry for quality - not good at photoshop).

GeneralOperationsDirector
29th Dec 2008, 06:46 PM
Good enough, even without the screenshot. Thank you. Ah, I take it that those should not be deleted instead? How much of my object can I safely delete, making it take resources from the original object? Do I need to learn the Repository technique?

What do you think of the Clock menu I described? It includes all four speeds, unlike the version you have, which I think has just Pause and Normal.

leesester
29th Dec 2008, 07:20 PM
You should not delete these as they determine the size of object etc. I am not sure if repository really is needed, it will be ok as it stands, particularly as the object really is a code carrier rather than anything else.

The clock menu sounds very interesting, but I will curb curiousity and wait until you release the finished object.

GeneralOperationsDirector
29th Dec 2008, 07:39 PM
Ok. Thank you. If I remember aright, the only one I already changed was the one named "Rug - Tile"; this means that I need to re-GUID the remaining nine entries. As I have only ever used *one* GUID, I`m wondering if the remaining nine will be consecutive with the one I`ve already got. I guess I`ll find out, won`t I? The Test menu calls up some experimental dialogs, which I`m using to learn how to extract information successfully. Once I learn that, I`ll be using them to learn other stuff. :) I`m not sure that the object ever *will* be "finished", as I`m frequently tweaking it to learn something. The Clock menu itself is finished, however, except that I have no-where else to *put* it. :|

Can you suggest some other on-site tutorials and references? I`m more of a programmer than a graphics artist. This is why I used a clone of an existing object instead of creating my own mesh and texture from scratch.

As for the repository technique, if you have NightLife, and I see from your profile that you do, could you confirm for me that my object is missing some recolors that the native object has? I`d like to know how to pick them up without copying them into my object, and the repository technique sounds appropriate, but I don`t know enough about it. This would also allow me to shrink my object by deleting the texture and possibly mesh, no?

leesester
29th Dec 2008, 08:00 PM
hi, well, if you wish to use all existing recolours of the original object then repository is the way to go. The BEST tutorial for that is here:

http://www.modthesims2.com/showthread.php?t=229452

I am a bit busy with another object right now, but when I get the opportunity I will check in game - probably best to wait until you have your GUIDs sorted out. And it does not matter if the guids are not sequential, as long as they are used only once, ever.

GeneralOperationsDirector
29th Dec 2008, 08:15 PM
"probably best to wait until you have your GUIDs sorted out": Done, and they were sequential. :) I appreciate your willingness to verify my suspicions regarding missing recolor options, and I would like to recover them, if possible, especially if that will reduce the filesize of my object; as you noted earlier, it *is* primarily a code vehicle. :) Would you want me to re-post the object? If so, should I do so here, or start a new thread in the Creators` Feedback forum? Thank you for the thread reference; I`ll be pursuing it soon.

Edit: Regarding missing recolor options: My object currently has *none*; I`m wanting to verify if the original object has at least one alternate color, as I remember it having. I currently cannot pick the original object from my Buy Mode catalog, and my game takes too long to load up for me to load it up just to check that before I have to leave for work.

leesester
29th Dec 2008, 08:23 PM
Well, regarding where to post, I think we should try to avoid hijacking Echo's thread (anymore than already), and as it is recolours/meshing questions rather than BHAVs I would post in the forums for recolours/meshes rather than here. Recolour forum link below.
http://www.modthesims2.com/forumdisplay.php?f=534

GeneralOperationsDirector
29th Dec 2008, 08:42 PM
Ok, but that only answers where, not if. Regarding the edit to my previous post, do you need or want me to repost the object at all? Thank you for all your help.

GeneralOperationsDirector
29th Dec 2008, 09:14 PM
Ok. Will do. Will edit and link here after. :)

Edit: Done. Thread here.

GeneralOperationsDirector
30th Dec 2008, 05:48 AM
Echo, leesester, I`ve updated the GUIDs as you two have recommended, and I`ve noticed some oddities that resulted: The copy of the test object that I had placed in my testing neighborhood became a copy of the original object instead of a copy of mine! That original object no longer had my object`s new menus, either. I "sold" that object, and replaced it with a new copy of my object, and everything seems fine. The original object is also now buyable again, as well. The odd part is where the placed copy of the old version of my test object became a placed copy of the original instead, although I suppose that this might be expected by "old hands" at this business.

Once again, thank you for all your help. :)

Echo
30th Dec 2008, 07:06 AM
Echo, leesester, I`ve updated the GUIDs as you two have recommended, and I`ve noticed some oddities that resulted: The copy of the test object that I had placed in my testing neighborhood became a copy of the original object instead of a copy of mine! That original object no longer had my object`s new menus, either. I "sold" that object, and replaced it with a new copy of my object, and everything seems fine. The original object is also now buyable again, as well. The odd part is where the placed copy of the old version of my test object became a placed copy of the original instead, although I suppose that this might be expected by "old hands" at this business.

Once again, thank you for all your help. :)

That's caused by the fallback GUID. If you have an object in game, then you change the GUID of that object, the instance which is already placed doesn't know what kind of object it's supposed to be. As such, it will revert to the closest thing it can find in-game, which is its fallback object. In this case, that was the original object you cloned from. ;)

GeneralOperationsDirector
30th Dec 2008, 06:17 PM
Hmm, makes sense, but the object`s GUID didn`t change; only the GUIDs of its parts. The entire object has a total of ten GUIDs. The one that I presume is for the object-as-a-whole stayed the same, pointing to my object, while the ones that I presume are for the individual spaces occupied by the object`s footprint changed, from pointing to the original to pointing to my object. This slightly confuses me. I would have thought that the one GUID that did NOT change while the object was present in-world would have been more important to object identity than the remaining nine, though I was clearly mistaken on that. ::shrug::

We do know how to edit the fall-back GUID, yes?

Echo
31st Dec 2008, 08:30 AM
They're all relevant, and necessary. If any one changes, then the whole object changes. There is one OBJD which is the "master", yes, but that's just because it's the out-of-world component which the others use as a point of reference. There's also one which is the "lead", but it's only special because (a) you can find it in a BHAV by going "Object's Lead Tile ID" and (b) it's the one at the front corner of the object. :)

We do know how to edit the fall-back GUID, yes?
Yes, we do. But don't do it. :)

GeneralOperationsDirector
31st Dec 2008, 03:31 PM
Why? What problems would it cause? [Just for discussion, as I want to learn; I wasn`t intending to edit the fall-back GUID on this object.] Wouldn`t editing the fall-back GUID be appropriate if we wanted a different object of the same class to substitute for our object when our object goes missing for any reason?

By the way, those Global and Primitive reference pages you pointed me to earlier? They turn out, those that exist, to mostly duplicate the information I can already extract from SimPE, albeit more readably in many cases. I still appreciate knowing about them, though. Thank you.

...which reminds me: Do you have any information about the First Persion Camera global? [I don`t recall the exact name or the opcode at the moment; I`ll come back here and edit this message after SimPE opens.] I`ve been playing with it in the Test BHAV in my Magic Carpet Dance Floor, and it appears to successfully do noting noticable, judging by the fact that the remainder of the BHAV runs.

Edit: The opcode is 0x0266 and the name is "Camera - First Person".