Welcome to
Mod The Sims
Online: 3026
News:
Have an account? Sign in:
pass:
If you don't have an account, why not sign up now? It's free!
Other sites: SimsWiki
Reply  Replies: 10 (Who?), Viewed: 17278 times.
Search this Thread
Old 14th Jan 2006, 09:54 PM Modding InfoCenter - An overview over the Package structure #1
Numenor
Original Poster

The ModFather



Join Date: Sep 2004
Posts: 8,400
Thanks: 197390 in 174 Posts
39 Achievements

View My Journal


>>> MODDING InfoCenter <<<

THE PACKAGE STRUCTURE - AN OVERVIEW

By Numenor
Credits to WES_H for the graph



DISCLAIMER: The "Modding InfoCenter" threads are NOT tutorials: they are 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.
All the "Modding InfoCenter" threads are created and mantained by Numenor and JWoods. Everyone is welcome to post his own questions or additional information about the specific thread subject.


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






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





-------------------------------------------------------------------------------------
Download - please read all instructions before downloading any files!
File Type: zip The Package Structure.zip (31.3 KB, 390 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.
Last edited by Numenor : 14th Jan 2006 at 10:08 PM.
17 users say thanks for this.
[ Click here to view a longer list ]
Old 16th Mar 2006, 08:09 AM #2
niol
Mad Poster

Join Date: Jan 2005
Posts: 4,433
Thanks: 8916 in 106 Posts
18 Achievements


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?
Old 16th Mar 2006, 08:04 PM #3
Numenor
Original Poster

The ModFather



Join Date: Sep 2004
Posts: 8,400
Thanks: 197390 in 174 Posts
39 Achievements

View My Journal


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.
Old 17th Mar 2006, 01:11 AM #4
niol
Mad Poster

Join Date: Jan 2005
Posts: 4,433
Thanks: 8916 in 106 Posts
18 Achievements


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.
Old 17th Mar 2006, 05:54 AM #5
Fat D
Forum Resident

Join Date: Nov 2004
Posts: 768
Thanks: 4923 in 10 Posts
13 Achievements

View My Journal


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)
Old 17th Mar 2006, 09:56 AM #6
niol
Mad Poster

Join Date: Jan 2005
Posts: 4,433
Thanks: 8916 in 106 Posts
18 Achievements


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:
Last edited by niol : 19th Mar 2006 at 06:15 PM.
Old 17th Mar 2006, 10:08 AM #7
Numenor
Original Poster

The ModFather



Join Date: Sep 2004
Posts: 8,400
Thanks: 197390 in 174 Posts
39 Achievements

View My Journal


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

Join Date: Sep 2004
Posts: 436
Thanks: 30991 in 41 Posts
20 Achievements


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
Old 31st May 2006, 02:15 PM #9
Numenor
Original Poster

The ModFather



Join Date: Sep 2004
Posts: 8,400
Thanks: 197390 in 174 Posts
39 Achievements

View My Journal


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.
Old 31st May 2006, 09:01 PM #10
Morague
Space Pony

Join Date: Sep 2004
Posts: 436
Thanks: 30991 in 41 Posts
20 Achievements


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!
Last edited by Morague : 2nd Jun 2006 at 04:41 AM.
Reply


Section jump:


Powered by MariaDB Some icons by http://dryicons.com.