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!
The ModFather
retired moderator
Original Poster
#1 Old 14th Jan 2006 at 9:54 PM Last edited by leefish : 17th Jan 2014 at 5:22 PM.
An overview over the Package structure


THE PACKAGE STRUCTURE - AN OVERVIEW

By Numenor
Credits to WES_H for the graph



DISCLAIMER: This is NOT a tutorial; it is intended to help average-experienced object creators performing specific tasks, or to give users a deeper in-sight on specific modding-related subjects. So, don't expect to find step-by-step explanations, to be performed "blindly". Please DO NOT REPOST the following info, or part of them, on other sites.



-------------------------------------------------------------------------------------




INTRODUCTION

The image above depicts the relationships between the different files contained in a Package. It was drawed by Wes_h in order to describe the structure of an objectpackage (i.e. not clothing, skin or other sims-related packages), but - after all - the described structure applies quite well to any package.
In any case, the InfoCenter's purpose is to discuss about objects, and therefore we'll concentrate on this subject.

Please not also that htis is just an overview: for further info, please refer to the other InfoCenter articles (not all the parts of a package are still explained in detail).


THE PACKAGE STRUCTURE

The first thing to take note of, is the different colours used in the picture above: they are used to ideally split the package in different sections.
The most important one, depicted in green, is the Scenegraphic Chain, or Scenegraphic Tree, that defines how the object will look: its shape and its materials.
Not included in the Scenegraphic Chain, but also relevant for defining the exterior look of an object, is the "Property Set" (depicted in blue); it can assume the form of a Material Override (in standard objects), or an XML property set (in Neighborhood objects, fences and other types of objects).
The light brown STR# (Text Lists) have the important function to list the scenegraphic elements used by the objects, and therefore it is used as "pivot", a union trait, between the Scenegraphic chain and the main object data (depicted in dark brown.
The Object Definition, along with the other OBJD related files, define how the object acts in the game, what interactions are available for them, and all the object functions.

As you can see, the various elements (colours) are all strictly related, in a sort of circular binding.

The Scenegraph Chain is "connected" with the Object Data files by means of the XML/Material Override (that contains both the GUID of the object and the CRES reference), and the STR# 0x85 (that has the same GroupID of the OBJD and contains the name of the CRES).
The CRES, in turn, is the "root" of the scenegraphic tree, and connects various scenegraphic elements.




-------------------------------------------------------------------------------------

OTHER USEFUL RESOURCES

Modding InfoCenter Index - Comprehensive list of all the InfoCenter threads
The Resource Node - A more detailed description of the CRES
The Object Function - Learn about the OBJf file
Simantics and BHAVs - A starting point to understand the object behaviour functions
Lights & LGHT files - An explanation about how the lights work
The TXTR file - Learn about the Texture formats





-------------------------------------------------------------------------------------
Attached files:
File Type: zip  The Package Structure.zip (31.3 KB, 458 downloads)

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.
Advertisement
Mad Poster
#2 Old 16th Mar 2006 at 8:09 AM
Just some silly questions...

Can it also show the limit number for how many related files a particular file can link to if any such type of limit?
The ModFather
retired moderator
Original Poster
#3 Old 16th Mar 2006 at 8:04 PM
Err... Would you please clear up your question? (I'm a little dumb tonight :P)

What I know is that, for example, the Shape can point to only one GMND (and multiple TXMTs); and the GMND can point to only one GMDC. But I suspect that this is not a limit, but rather a choice by Maxis: probably, a GMND can cpoint to multiple GMDCs, but this has been never done in Maxis objects.

Also, the TXMT can point to a single main TXTR (plus a secondary, optional, Bump map; and a reflection map... But only one main TXTR).

Do you have in mind something specific?

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.
Mad Poster
#4 Old 17th Mar 2006 at 1:11 AM
Lol, certainly, you couldn't be dumb the last night... You could understand my confusing question...
N, you've answered some of them...

I've extracted and collected some TS2 swim-pool files and try to see how they can make up one whole animated non-sims-functional but decorative object in the base game. In the collection, I've got one cres for the base object, 3 GMNDs, 3 SHPEs, 3 GMDCs, 3 TXMTs, >10 TXTR + a LIFO...
lol, this may not be a complete collection. But the base pool sheet has at least 1 file for each file type mentioned.
So, you see why I asked that question. If the swimpool layers can be re-simulated and can have their position relative to the horizontal layers re-adjusted, wouldn't it be a wonderful re-introduction back into the games for NL and OFB? It can further beautify the fake pool approach while multi-levelled swimpools can be made. Yet, that's just too far for now... It may be even easier to make custom object to do so. But, understanding the mechanism is more important to me for now.
Forum Resident
#5 Old 17th Mar 2006 at 5:54 AM
a CRES can refer to anz number of SHPEs, and a #STR can link any number of CRES, the one which is used is chosen by a BHAV, putting the number of the string into Object Data Field (My, Stack object's) 0x0000 (graphic)
Mad Poster
#6 Old 17th Mar 2006 at 9:56 AM Last edited by niol : 19th Mar 2006 at 6:15 PM.
Wow, bunches of thanks...
(some fresh vegie-fruit juices)


Update after Numenor's post:

Thanks for more info, I still don't know what the other files can be, but hopefully, there'll be IDs to trace back. I'm starting too many things to deal with... But I can learn new things from them at the same time, and that may affect what to fool around next and the new result may affect the plan itself in turn... Hopefully, it's not an eternal cycle... :bandit:
The ModFather
retired moderator
Original Poster
#7 Old 17th Mar 2006 at 10:08 AM
I've not studied the swimming pools, but from your description I see a similarity with the kitchen counters: the counters are composed by multiple CRES (each one connected to its shape, gmnd, gmdc, etc...); and the different CRES are swapped whenever you move the counter and it connects to the other elements. For instance, when you put a counter at a corner, the "corner" CRES is used, and the whole shape changes.

This "swapping" of the CRES is made via BHAVs. I don't know if there are BHAVs (or where they are) in charge of managing the shape of the swimming pools... The pools are build objects, and they may be different from the Buy Mode objects.

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.
Space Pony
#8 Old 31st May 2006 at 12:53 PM
Default I hope this isn;t a stupid question
Hello Numenor,

I've searched & searched for this information & maybe I just can't find it or am just loking for the wrong words.

I've been doing a lot of work with foods lately & I'd like to make the toy oven muffin available as a breakfast food. I want the sims to be able to select it from the fridge menu - this part isn't the problem!

The problem I am having is that the muffin is different than the other foods. Other foods have 2 GMDC, 2 GMND, 2 CRES & 2 SHPE - one for the food & then another one for the food & the plate. However the muffin is only the muffin - no plate. So, I thought that I should be able to to clone one of the other foods & just change that food to the muffin.

But, I'm not sure what I need to do to the GMND, CRES & SHPE files or even if it can be done. Is there some in-depth discussion about what would be needed to do this? I don't mind doing a lot of reading & figuring out I just couldn't find anything after searching for quite some time, so I thought I would ask. Is it possible to do this?

Thanks for your attention! Even if the answer is simply no, it can;t be done. I really appreciate how much you assist everyone with your knowledge.

Thanks,

Morague
The ModFather
retired moderator
Original Poster
#9 Old 31st May 2006 at 2:15 PM
I'm not very expert with food, but I think that the answer is really simple:
- clone a food (any food that has a dish suitable for the muffin)
- replace the mesh of the "stand-alone" food with the muffin
- edit the mesh of the food+dish, replacing the food with the muffin and leaving the dish as is

Since you say you are expert with custom food, you will probably know that food meshes use "morphs", that should be correctly kept during the mesh editing, if you want the food to slowly disappear while the sims eat it.

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.
Space Pony
#10 Old 31st May 2006 at 9:01 PM Last edited by Morague : 2nd Jun 2006 at 4:41 AM.
Thanks Numenor

LOL - I wouldn't say I'm an expert, but I'm getting pretty comfortable with the foods.

I was hoping it would be that easy I was worried because I don't really understand the GMND & I thought I might really mess something up by just switching out the one food mesh for the other.

I'l give it a try & see what happens.

Thanks!

Morague

Just to let you know - this worked great I have the muffin on a plate & have sorted out almost all of the animations - just one food morph is giving me problems but I'll get it Thanks again for your help!
Back to top