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!
One horse disagreer of the Apocalypse
Original Poster
#1 Old 28th Apr 2005 at 11:30 AM Last edited by Inge Jones : 29th Apr 2005 at 3:09 PM. Reason: Added a bit
Default Combining objects in one package
I suppose someone is going to jump up and say "We've known this for ages!!" but I thought I'd post anyway, in case it helps anyone. This is specially useful for combining two objects which do exactly the same thing but use different 3D models, like two windows or two single beds. I am not yet sure if it can also be used to hold a door and its diagonal in the same package.

1. Open your package with SimPe. In Text List file 0x85 add a line with the new object model name

2. Clone each of the Object Data files that made up the original object and give them each a new instance ID. Single tile objects will have had only one Object Data file.

3. For each of the new Object Data files:
a. Give them a new GUID
b. Edit field 0x48 to match the number of the string holding your new model name.
c. For a multi-tile object, go to field 0x000A “Mult-tile master ID” and change it to a new number – using the *same* new number in each of the Objd’s that you made for your new model.

4. Clone each of the Object Function files that made up the original object and give them instance IDs that match the new Object Data files, making sure that each object function file matches the equivalent new Object Data file. Single tile objects will only have had one Object Function file.

Optional: If your 2nd object needs a different catalogue description, clone and edit one, remembering to change the relevant number in the new object's Objd file. Also here you can change price and so on.

Please continue to read the thread as other people have added some valuable advice.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
3 users say thanks for this. (Who?)
Advertisement
The ModFather
retired moderator
#2 Old 28th Apr 2005 at 11:42 AM
Very useful info! In your experience, do you think that the "Name Reference" file is to be cloned, too? Usually there is a Name reference for each Object Data, with matching Instance ID...

I didn't know that adding a line to the TextList 0x85 would let the game treat the combined objects as one; so far, I've noticed that multiple entries in the TL 0x85 are often used to switch between alternative model shapes.

One last thing, just to confirm what you have already said: the two objects must be of the same kind, because they must refer to the same SemiGlobal BHAVs (no more then 1 "Global function" file is allowed in the same package).

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

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


I *DON'T* accept requests, sorry.
One horse disagreer of the Apocalypse
Original Poster
#3 Old 28th Apr 2005 at 11:49 AM
Ah! You're here already - I was gonna post in your glass door thread just in case you *could* use this for the diagonal files. You wouldn't be able to change the number of the multi-tile master ID, but then maybe the bits in objd about diagonal and straight selectors would take care of that.

Quote: Originally posted by Numenor
Very useful info! In your experience, do you think that the "Name Reference" file is to be cloned, too? Usually there is a Name reference for each Object Data, with matching Instance ID...


I think they are happy to share. I have for some time been making extra hacked doors by merely copying the file of an existing door and changing the model name. I have never had to edit the NREF.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Test Subject
#4 Old 28th Apr 2005 at 12:06 PM
Ive found that editing the NameReference For windows and doors seems to prevent the game from 'cutting the holes in the wall'

My vehicle is like my pc - the fewer instance's of windows the better
The ModFather
retired moderator
#5 Old 28th Apr 2005 at 12:09 PM
I will try and apply the rules stated above on my door and window. so far I've always been a little scared about changing the Instance IDs of the OBJDs, because I feared to alter the init process and/or the functions of the objects.
But I would definitely like to have both straight and diagonal in the same package...
Instructor
#6 Old 28th Apr 2005 at 12:41 PM
Inge: I've actually seen some package files that contained a normal and diagonal version of an object. I can't recall who off hand, I think it may have been blinds from BetterBeSim or Boblishman, but I have seen it. I remember being surprised that they did that when I was going through and polygon counting all my new meshes.
The ModFather
retired moderator
#7 Old 28th Apr 2005 at 1:44 PM
You're right! I myself helped Boblishman with some diagonal blinds, fixing a problem with the diagonal not retaining the custom colour. But the actual "merging" was done by Bob, I guess. Anyway, I'm going to try and "merge" my doors right now... *crosses fingers*
One horse disagreer of the Apocalypse
Original Poster
#8 Old 28th Apr 2005 at 1:46 PM
Good luck :D
The ModFather
retired moderator
#9 Old 28th Apr 2005 at 2:40 PM
Thanks for the wishes, but no luck so far...

I've merged the two packages, giving unique Instance IDs to the diagonal OBJDs (and changing the instance IDs of the OBJF and NREF accordingly); I've added the diagonal cres reference appending a new line to TextList 0x85 and changed the field 0x48 into the OBJD accordingly.

Result: the game didn't crash (at least ), but now the door can't be placed any more on straight or diagonal walls. I guess there's a problem with the global BHAVs that manage the placing action; probably, changing the Instance IDs of the OBJD messed up something.
I noticed that all the doors have a particular Instance ID map: 0x41A7-41AA-41AB for the straight version and 0x41A7-41AB for the diagonal. Maybe this can't be changed.
If I'm right, this means that the straight door and the diagonal can't be merged, because two couples of OBJDs will have the same Instance ID.

The other problem I had to solve was about the Slots: I had to add two lines into the Text List 0x90, to hold the bone names for the diagonal door, and added two entries in the SLOT file, copying the values from the diagonal door (that, btw, were exactly the same as the straight one).

Anyway, I'm attaching the "merged" package, for anyone to take a look (if interested ). If you are going to test it in-game, remember to delete the original straight and diagonal doors from the download folder.
Attached files:
File Type: rar  NOT-WORKING_WallWindow-Door_straight+diag.rar (17.5 KB, 23 downloads) - View custom content

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

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


I *DON'T* accept requests, sorry.
One horse disagreer of the Apocalypse
Original Poster
#10 Old 28th Apr 2005 at 2:46 PM
Have you tried this but without touching the NREF at all, just let them all share the same one? I have no idea what the NREF does, but I've found I've been able to ignore it so far, while other people report problems if they do touch it.
The ModFather
retired moderator
#11 Old 28th Apr 2005 at 6:36 PM
In the straight door there are three NREF, one per OBJD. They won't be shared anyway, because each NREF has its own Instance ID, matching the OBJD ones.
As far as I know, the NREF is used only to calculate a GroupID that is used to displace the 0xFFFFFFFF one, that's why all the NREFs related to the same object are identical (except for the Instance ID).

I'll try your suggestion, anyway, thanks.
One horse disagreer of the Apocalypse
Original Poster
#12 Old 28th Apr 2005 at 6:51 PM
But when I combined two doors into one package, I only did exactly what I said in the message at the top of this post and nothing more. Although I made Objds with new Instance IDs they had no NREF to match them.

Hmm maybe the big difference between us is that I wasn't including any of the graphical code, just the BHAVS and associated stuff. Obviously the NREFs in question were still in existence elsewhere
The ModFather
retired moderator
#13 Old 28th Apr 2005 at 7:33 PM
I guess that the NREFs are irrelevant. The problem about the door not being placeable any more on the wall must be related to something else...
Instructor
#14 Old 28th Apr 2005 at 7:59 PM
I know this works for recolours. I've not tried it on objects though. Have you tried, right clicking on the packed file list, click add, change the file type to package and select the second package?
The ModFather
retired moderator
#15 Old 28th Apr 2005 at 9:26 PM
No need to try: I know there would be *a lot* of file conflicts (same file types having same Instance IDs)
Thanks for the suggestion, anyway!

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

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


I *DON'T* accept requests, sorry.
Lab Assistant
#16 Old 29th Apr 2005 at 1:03 PM
Numenor, I checked your package and found the problem: you forgot to change field 0x000A to a new number, as indicated in step 3c). I changed it for each of the Objd’s for the diagonal door and now it’s working.

I also noticed and corrected some other problems in your package:

1. The shape file “numenor-wallwindowdoordiagonal_doorframe_s_shpe” (instance 0xFF2B501E) referenced the part “wallshadow”, although the correspondent gmdc “numenor-wallwindowdoordiagonal_doorframe_s_gmdc” didn’t have that subset.

2. The geometric nodes “Numenor-WallWindowDoor_r_door_s_gmnd” (instance 0xFF5B284F) and “Numenor-WallWindowDoor_r_door_n_gmnd” (instance 0xFFE550B3) both contained the item “doorvalue_brass” in the block “tsMaterialsMeshName”, although it was not present in the block “tsDesignModeEnabled”.

As for the slots, I think that the effect of your modifications would be to add the two new slots to both objects. So, I imported the Slot file for the diagonal door and changed its instance number to 0x81. Then, I changed the field 0x14, “slots id”, to that number in the two object data files for the diagonal door. I also removed the two lines you added to the Text List 0x90 as I think they aren’t used anywhere.

I attached to this post the working package.
Attached files:
File Type: rar  Numenor_WallWindow-Door_straight+diag.rar (17.5 KB, 26 downloads) - View custom content
The ModFather
retired moderator
#17 Old 29th Apr 2005 at 1:48 PM Last edited by Numenor : 29th Apr 2005 at 2:07 PM.
Raquelcesar, you are a saint

I skipped the 0x000A field editing because I thought that Inge's suggestions applied only to two objects that should be combined together, while in this case the two objects were alternative one to the other. These Object Data files are not my forte...

As for the missing wallshadow, you're right: in the last release I've removed the mesh, because it wouldn't work anyway, and I forgot to delete the reference in the "south" frame Shape; thanks for having spotted (though in these cases the game simply ignores the missing subset).

And lastly, the "brass" subset wasn't included in the tsDesignModeEnable block on purpose; this block lists the recolourable parts, and the brass handle isn't recolourable. Actually, that entry in the tsMaterialsMeshName is redundant: the block instructs the game to look for the "glass" MATDs in the WallWindow (external reference), and for the "brass" MATD in the door itself (redundant internal reference). Basically, the "brass" entry is ignored by the game.

Your help was valuable indeed: now we know that Inge's suggestion can be pllied to doors and windows, too, and this is VERY useful! Thank you again, to both you and Inge.

EDIT:
Oh, and the connection between the field 0x0014 and the Slot instance # is very interesting, I didn't know!

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

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


I *DON'T* accept requests, sorry.
One horse disagreer of the Apocalypse
Original Poster
#18 Old 29th Apr 2005 at 2:04 PM
Oh! Numenor sorry if I didn't explain it properly. Yes the method was not for combining two objects into one object, but rather for allowing two or more separate objects to share the same package and therefore some of the package resources such as BHAVs.

I'm also happy that it can work for doors and their diagonals, thank you for being the guinea pig, and thank you Racquelcescar :D
The ModFather
retired moderator
#19 Old 29th Apr 2005 at 2:11 PM
So, you meant to combine multiple objects in the same package while the game still treats them as separate objects? If so, I've completely misunderstood the scope of your explanation...
But if this is the case, the two objects won't be buyable separately, or at least they will have the same catalog description...
One horse disagreer of the Apocalypse
Original Poster
#20 Old 29th Apr 2005 at 2:18 PM
Quote: Originally posted by Numenor
So, you meant to combine multiple objects in the same package while the game still treats them as separate objects?


That's the idea.

Quote:
But if this is the case, the two objects won't be buyable separately, or at least they will have the same catalog description...


When I was using this for myself it was for a range of things which would just say "simlogical pay door", and having the same menu and price and everything else the same, so you're right, I left out an instruction to also duplicate the catalogue file and point one of the Objds to it. I was considering the scope to be much narrower than has actually turned out to be possible.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Lab Assistant
#21 Old 29th Apr 2005 at 2:53 PM
Numenor, I realise that some of the changes I made to your package weren’t really necessary, as you pointed out. I was just being perfectionist. But guess who the culprit is? Everything I know about the rcol chain I learned from you, reading all your posts about the matter.

Also, I noticed that the brass handle isn't recolourable. So, I just deleted that entry from the tsMaterialsMeshName block.

I also didn’t know how the object referenced the slots. But you made me think about it. I looked at the object data file and noticed that the value in the “slots id” field was the instance number of the slot file. So, I decided to make an experiment. And it worked! Or, at least, I think it did. Actually, I think that, in this case, you don’t need to add the diagonal door’s slot file because, as you said, it is exactly like the one for the straight door. So, both doors can share the same slot file.

I also don’t know if the object makes any use of the text list 0x90. It contains the names of the slots but I don’t see those names elsewhere in the package. I mean, the slots in the slot file have no names, so they must be referenced in a different way. Maybe that list is just for human use… This certainly needs more investigation.

Inge, thank you very much for the information you provided here. This is something that I’ve been concerned with. I had some situations where I had two or more interdependent objects that made me though that the best solution would be to package them together. However, I never really tried to do it. Maybe I will try it now.
The ModFather
retired moderator
#22 Old 29th Apr 2005 at 4:40 PM
I've tested the "merged" package, and actually it doesn't work correctly...
The doors *can* be placed correctly in straight or diagonal position, but regarding their position (facing inward or outword), they either lose the "open door" animation (the sims passes through the closed door) or are unusable at all (the sims refuse to pass through the door).

There's definitely something more we have to learn about the slots; this problem made me think of the re-meshed objects that lose the animations because in the extracting/reimporting process the bone information are lost. Maybe it's not the export/import process that is to blame... There must be a relation between the "Bones" named in the TL 0x90 and the SLOT files. We have messed up with them and have lost the animations, so if we understand what's going on, maybe we can halp upgrading the MeshTool and Delphy's extraction plugin.
Lab Assistant
#23 Old 29th Apr 2005 at 5:02 PM Last edited by raquelcesar : 29th Apr 2005 at 5:37 PM.
Numenor, restore the field 0x0014 to its original value (80) in the two object data files for the diagonal door (and you can remove the second slot file). I think this solves the issue. This must mean that I was completely wrong about that field. Sorry…

I’ll continue investigating this problem.

EDIT: Correction: This solves the problem! I've just tested and the animations run ok. But why?
Instructor
#24 Old 29th Apr 2005 at 5:08 PM
Hmm, so this process would work for say curtains and blinds though since they don't require any animation, right?
The ModFather
retired moderator
#25 Old 29th Apr 2005 at 9:35 PM Last edited by Numenor : 29th Apr 2005 at 9:40 PM.
RAQUELCESAR
I have still problems with the diagonal doors: the ones facing inwards can't be used at all, and the ones facing outwards have no animations...
The straight door work fine, though, like you said.

I've noticed one thing about the slots: in the TL 0x90 there are 4 entries, 1 "slot" and 3 "routes"; in the SLOT file there are 4 entries, too: 1 "Container" and 3 "targets". Obviously there is a connection: seems that in the TL 0x90 there are the names associated to the SLOT entries. But I can't find where these names are called... Maybe in some semiglobal BHAV?

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

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


I *DON'T* accept requests, sorry.
Page 1 of 2
Back to top