Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Field Researcher
Original Poster
#1 Old 19th Jul 2005 at 7:12 AM
Default how can i add more attributes to a object?
i want to give more attributes to my object but i don't know how to do it.
is there a way to do it? and if i can, what bhav code should i modify?
thank you...
Advertisement
Retired Duck
retired moderator
#2 Old 19th Jul 2005 at 7:42 AM
I have a feeling that most objects are limited to a max of 8 attributes, that's certainly what is listed in the object error logs.

If your object isn't currently using all 8, then you should be able to just pick an unused one and start accessing it. You may also need to edit your object's text list 0x100 ("Attributes") and name any new attributes you plan on using in your code. Even if it's not necessary, it's a pretty good idea.

If your object is already using 8 attributes (wow, complicated object!) then there's probably going to be a bit more of a problem. I can think of a few ways around it, but they're all pretty whacky (invisible slave objects and stuff like that) so probably all in all not such a good idea.

I've only ever worked with existing attributes, so most of that is speculation. I have a feeling some of Inge's reservable objects put things in unused attributes, so if the above doesn't help you you might want to check those out.
Field Researcher
Original Poster
#3 Old 19th Jul 2005 at 8:31 AM
thank you echo...

yes.. i already used all of the 8 attributes and need some more... ^__^ adding some invisible slave objects will be helpful to solve it, thank you ^^ and i will check about inge's objects, too. thank you so much.

next time i plan to make an object using one of maxis sofas.. -_- i found they have plenty of attributes!!!
One horse disagreer of the Apocalypse
#4 Old 19th Jul 2005 at 8:37 AM
The way to add attributes (and I have no idea what maximum there is but I have had at least 20 without problems) is to edit the OBJD section, where is says Num Attributes (make sure you don't use the type attributes field by mistake). As the attributes start from 0, if your highest attribute is 0x0B (11), you'll need to put 0x0C (12) in this field - ie one more than your highest attribute.

You can get a good idea - sometimes - of what attributes have already been used by looking in STR# 0x100, but just because you see a gap there, or even a word saying "unused", it doesn't mean it's safe to reuse it. Start to use custom attributes at one higher than the highest listed, and add your own to that list mainly as a way to remind yourself what they are. You can use attributes without having a STR# 0x100

Echo, you managed to make it sound like a journey to the ends of the universe!

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Field Researcher
Original Poster
#5 Old 19th Jul 2005 at 8:51 AM
oh!!!!!!!!!!!!

thank you inge!!!!!!!!!! v^^v

i will try it!!!!!!!!!!!!!!!!!!!!! ^_____________^
thank you!!!!!!!!
Field Researcher
Original Poster
#6 Old 19th Jul 2005 at 9:58 AM
UMHAHAHAHA ^^

it works!!! thank you inge!
One horse disagreer of the Apocalypse
#7 Old 19th Jul 2005 at 10:38 AM
Good! Bon voyage with your new object, whatever it may be.
Retired Duck
retired moderator
#8 Old 19th Jul 2005 at 1:15 PM
Inge: I said it was all speculation! Some really useful info there. :D
One horse disagreer of the Apocalypse
#9 Old 19th Jul 2005 at 1:48 PM
Perhaps it would be a good idea to add that I believe the correct way to add a semi-global attribute *is* to add one to the 0x100 string file in the semi-global group - according to a Maxis person I communicated with. Though I do wonder if the "type attributes" in Objd should be edited to reflect these. He didn't say so. Maybe you can have up to 8 semi-attributes before needing to..
Field Researcher
#10 Old 20th Jul 2005 at 3:13 AM
You don't have to define the number of semi attributes in the Objd. They are dynamically defined when the object is created based on the number in the text file in the semi-global group.

My mods for The Sims 2 can now be downloaded from this site.
One horse disagreer of the Apocalypse
#11 Old 20th Jul 2005 at 7:26 AM
Thanks Jeff!
Systemic Anomaly
#12 Old 20th Jul 2005 at 4:31 PM
You would think Maxis would have a consistent model for normal attributes and semi-attr's. There's probably some rationale for it, but it strikes me as an odd design choice.
One of those Maxoids
#13 Old 20th Jul 2005 at 5:53 PM
Me too.
Inventor
#14 Old 20th Jul 2005 at 6:23 PM
MaxoidTom, didn't you design it?
One of those Maxoids
#15 Old 20th Jul 2005 at 10:48 PM
I didn't, I inherited it.
Guest
#16 Old 7th Sep 2005 at 9:12 AM
hi ChristianLov, I'm new to this forum I tried to email you to ask about your all-romance mod (which enabled romance moves in family) but it seems to be only for university and something's wrong with the thread I guess?

Plz email me if interested in a tester coz I'll probably won't log on here again, fachy100-at-hotmail

thanks, bye!
Lab Assistant
#17 Old 28th Nov 2005 at 7:28 PM
I just discovered this thread.

The nb used for attributes is the greatest of nb in OBJD and size of the local text file.

I've verified that attributes defined in the text list are always valid even if the nb in OBJD is lower. And attributes without a name work too if within OBJD's defined range.
Acces with index greater than both numbers returns an error.
Back to top