Difference between revisions of "SimPE Resource Editing"

From SimsWiki
Jump to: navigation, search
 
Line 1: Line 1:
When you starting modding the Sims 2 you will use a tool called [[SimPE]] to view and edit the packages you create. There are lots of [[InternalFormats|Internal Formats]] that SimPE calls resources. You will see the various types of resources in your package shown in the left hand pane of SimPE - the Resource Tree. Each type has a number beside it showing how many resources of that type are in the package you are looking at, and if you select one of the types, the Resource List pane will display a list of those resources. Depending on the type of resource the Plugin View tab will provide a different editor suitable for looking at and editing the resource in question. You will no doubt get to know the resources by their [[FormatsByName|four character names]], BCON, BHAV, GMND etc. Each resource also has a [[List of Formats by Type|hexadecimal number]] as its type - you will see if it you switch to the Resource tab when you have a resource selected.
+
==Introduction==
 +
[[Image:SimPE-Resources.JPG|frame|Resource Tree and Resource List]] When you starting modding the Sims 2 you will use a tool called [[SimPE]] to view and edit the packages you create. There are lots of [[InternalFormats|Internal Formats]] that SimPE calls resources.
  
[Note: Some screen shots coming and more blurb - this is a work in progress - how do you say that in this Wiki?]
+
You will see the various types of resources in your package shown in the left hand pane of SimPE - the Resource Tree. Each type has a number beside it showing how many resources of that type are in the package you are looking at, and if you select one of the types, the Resource List pane will display a list of those resources. Depending on the type of resource the Plugin View tab that will be populated with the contents of the resource you next select from the Resource List, will provide a different editor suitable for looking at and editing the resource in question.
 +
 
 +
You will no doubt get to know the resources by their [[FormatsByName|four character names]], BCON, BHAV, GMND etc. and the longer more descriptive name also shown by SimPE for each resource type, but it worth knowing that each resource also has a [[List of Formats by Type|hexadecimal number]] as its type - you will see if it you switch to the Resource tab when you have a resource selected. This may be the only time as a new modder you may ever come across the hexadecimal number which is the type of the resource - SimPE shows you these resources by name which is far more friendly.
 +
 
 +
==Resources==
 +
[[Image:ResourceTab.JPG|frame|Resource Tab]]
 +
There are a few common things to say about resources regardless of their type. We have mentioned the Type already which is represented by a hexadecimal number, and a friendly name.
 +
===Group===
 +
Each resource has a value for Group. If you are making a stand-alone package, for example a new object cloned from an existing one, your Group value will be 0xFFFFFFFF. This indicates that the group is contained within this package. If you browse through the objects.package file you will see many different values for resources in there, with items that are part of the same object sharing a group value, or items in a specific semi-globals section sharing a group value. If you have a package that updates one of these resources and keeps its original group value (instead of changing it to 0xFFFFFFFF) you have made a package that will be considered [[Tutorials:How_to_Create_a_Global_Mod|global mod]]. You will also see resources with a group value of 0x1C050000 - these are also resources in your package and are the [[Tutorials:Understanding the Scenegraph|scenegraph]] resources.
 +
===Instance===
 +
Each resource has a unique value to identify it - this is the instance. Scenegraph resources have an instance value that uses both the Instance (High) and Instance values, but other resource types have a zero Instance (High) value. ''Is this accurate?''
 +
 
 +
Some instance values have special purpose - for example the STR# resource, others you assign yourself as you create new resources and refer to them in other places.
 +
 
 +
The non-scenegraph resources follow a specific scheme for the numbering.
 +
{| class="wikitable"
 +
|+'''Resource Numbering'''
 +
|-
 +
!Resource classification!!Numbering
 +
|-
 +
|Primitive||0x00xx
 +
|-
 +
|Global||0x0nxx
 +
|-
 +
|Semi-Globals||0x20xx
 +
|-
 +
|Package||0x10xx
 +
|}
 +
 
 +
 
 +
===Compressed===
 +
''I have no information on the compressed field - hopefully someone else can fill in this gap''
 +
 
 +
[[Image:ResourceListContextMenu.JPG|thumb|right|Context Menu on Resource List]]
 +
===Manipulating Resources===
 +
A right mouse button context menu exists on the Resource List pane allowing you to manipulate the resources found there. If you want to grab a particular resource from another object (or directly from one of the main game packages) you can use "Extract..." from the context menu. This will save the resource as a file wherever you choose to save it. You can then use "Add..." to bring it into a different package, or drag the previously saved file and drop it onto the Resource List. If you extract a number of resources at once, SimPE will create an XML file represented all of them and you can drag that to the Resource List to add them all into your package at once. You can also clone resources that are already in your package.
 +
 
 +
==Navigating through the resources in this Wiki==
 +
This section of the Wiki was originally produced when the various file formats were being decoded and there is a lot of information about the actual bits and bytes of these formats that have ultimately formed the basis for tools such as SimPE to hide them from the average modder editing these resources.
 +
 
 +
This section of the Wiki is currently undergoing some updates with the plan being that the original decoded information about the file formats are retained under the hexadecimal number topic and the four character name topic which currently redirects you to the same is used to describe the resource type in terms of how you would use it, understand it and edit it from SimPE - with a link to the decoded information too, to tie them together.

Revision as of 23:26, 8 July 2009

Contents

Introduction

Resource Tree and Resource List
When you starting modding the Sims 2 you will use a tool called SimPE to view and edit the packages you create. There are lots of Internal Formats that SimPE calls resources.

You will see the various types of resources in your package shown in the left hand pane of SimPE - the Resource Tree. Each type has a number beside it showing how many resources of that type are in the package you are looking at, and if you select one of the types, the Resource List pane will display a list of those resources. Depending on the type of resource the Plugin View tab that will be populated with the contents of the resource you next select from the Resource List, will provide a different editor suitable for looking at and editing the resource in question.

You will no doubt get to know the resources by their four character names, BCON, BHAV, GMND etc. and the longer more descriptive name also shown by SimPE for each resource type, but it worth knowing that each resource also has a hexadecimal number as its type - you will see if it you switch to the Resource tab when you have a resource selected. This may be the only time as a new modder you may ever come across the hexadecimal number which is the type of the resource - SimPE shows you these resources by name which is far more friendly.

Resources

Resource Tab

There are a few common things to say about resources regardless of their type. We have mentioned the Type already which is represented by a hexadecimal number, and a friendly name.

Group

Each resource has a value for Group. If you are making a stand-alone package, for example a new object cloned from an existing one, your Group value will be 0xFFFFFFFF. This indicates that the group is contained within this package. If you browse through the objects.package file you will see many different values for resources in there, with items that are part of the same object sharing a group value, or items in a specific semi-globals section sharing a group value. If you have a package that updates one of these resources and keeps its original group value (instead of changing it to 0xFFFFFFFF) you have made a package that will be considered global mod. You will also see resources with a group value of 0x1C050000 - these are also resources in your package and are the scenegraph resources.

Instance

Each resource has a unique value to identify it - this is the instance. Scenegraph resources have an instance value that uses both the Instance (High) and Instance values, but other resource types have a zero Instance (High) value. Is this accurate?

Some instance values have special purpose - for example the STR# resource, others you assign yourself as you create new resources and refer to them in other places.

The non-scenegraph resources follow a specific scheme for the numbering.

Resource Numbering
Resource classification Numbering
Primitive 0x00xx
Global 0x0nxx
Semi-Globals 0x20xx
Package 0x10xx


Compressed

I have no information on the compressed field - hopefully someone else can fill in this gap

Context Menu on Resource List

Manipulating Resources

A right mouse button context menu exists on the Resource List pane allowing you to manipulate the resources found there. If you want to grab a particular resource from another object (or directly from one of the main game packages) you can use "Extract..." from the context menu. This will save the resource as a file wherever you choose to save it. You can then use "Add..." to bring it into a different package, or drag the previously saved file and drop it onto the Resource List. If you extract a number of resources at once, SimPE will create an XML file represented all of them and you can drag that to the Resource List to add them all into your package at once. You can also clone resources that are already in your package.

Navigating through the resources in this Wiki

This section of the Wiki was originally produced when the various file formats were being decoded and there is a lot of information about the actual bits and bytes of these formats that have ultimately formed the basis for tools such as SimPE to hide them from the average modder editing these resources.

This section of the Wiki is currently undergoing some updates with the plan being that the original decoded information about the file formats are retained under the hexadecimal number topic and the four character name topic which currently redirects you to the same is used to describe the resource type in terms of how you would use it, understand it and edit it from SimPE - with a link to the decoded information too, to tie them together.

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox