Object Relocator

The Object Relocator is a utility for moving Buy and Build Mode objects around in the catalog en-masse by changing their Room, Function, Sub-Function, Community, Build and Sub-Build flags, and also their Price.


Start the application.

From the "File" menu, choose the "Select Folder..." option; a "Select Folder" dialog opens. Navigate into your Sims 2 Download folder, pick a sub-folder that contains Buy Mode objects and click the "Select Folder" button.

The dialog will close, and a progress bar will appear as the utility finds every .package file in the selected folder (and sub-folders) and then locates every buy mode object within those .package files. When finished the objects are displayed as a table, one row per object with columns for the various flags and numeric data that can be altered.

Click on any row to select it, the bottom editor area will be filled in with the values for the object.

Click the checkboxes to change the rooms, community and use settings. Use the drop-downs to change the function and sub-function settings. Enter a new price as desired, and press Return/Enter. As you make changes the row selected will change.

Click on another row to select it. The previously selected row, because it has been changed, has a light pink background.

Click on the changed row to select it, then right-click on it. An option to "Restore Original Values" appears, click on it; the changes are undone. Click on any other row to show that the light pink background has also been removed.


While we could select objects one at a time and change their catalog details, frequently we want to be able to move a group of related objects together.

Click to select an object.

Holding down the Ctrl key, click on another object to select both.

As the two objects I've selected have the same rooms in common, the checkboxes under Room Sort are still ticked, but those under Community Sort have blue 'minus' marks to indicate that the selected objects do not share the same settings. Also the price displayed is blank, as they have different prices. If the Function Sort/Subsort were different the drop-downs would also be blank.

Changing the sort flags, drop-downs and/or price, changes all selected objects.

You can also hold down the Shift key and click to select a range of objects.


With changes made to one or more objects, clicking the Save button will update the objects within their packages and (by default) make a backup of the original .package file in the same sub-folder with a .bak extension.

Note: Closing the utility when there are unsaved changes will prompt if you really want to discard the edits.


Background

This utility started life as "WTF Is...", a way of finding where custom content had been placed in the catalog. SimPe was then used to move the objects if required. With the expansion of my DbpfLibrary to support updating (some) resources within .package files, the original (unpublished) utility was expanded to make changes to the catalog (OBJD) data directly.


Object Table Columns - Buy Mode

Title: The object's title from its associated CTSS entry (if any). The mouse-over tooltip displays the object's description from its associated CTSS entry (if any).

Name: The object's OBJD name. The mouse-over tooltip displays the full path to the containing package file. If the GUID is column is hidden, the tooltip also displays the object's GUID.

Path: The object's OBJD .package file, relative to the selected folder.

GUID: The object's GUID. The mouse-over tooltip displays the object's full resource (TGIR) details.

Rooms: A human-readable list of rooms the object appears under in the catalog.

Function: The function sort and subsort the object appears under in the catalog. If the object has more than one function sort flag set, this will be blank.

Community: A human-readable list of community spaces the object appears under in the catalog.

Use: A human-readable list of what life-stages can use the object and if this is a group-activity.

Q(uarter) Tile: If quarter tile placement is enabled for the object.

Price: The object's price. After altering this value it is necessary to press Return/Enter to make the change "stick".

Depreciation: Four values showing the depreciation limit, initial, daily and self values. The mouse-over tooltip displays the order of the values. After altering these values it is necessary to press Return/Enter to make the change "stick".


Object Table Columns - Build Mode

Title: The object's title from its associated CTSS entry (if any). The mouse-over tooltip displays the object's description from its associated CTSS entry (if any).

Name: The object's OBJD name. The mouse-over tooltip displays the full path to the containing package file. If the GUID is column is hidden, the tooltip also displays the object's GUID.

Path: The object's OBJD .package file, relative to the selected folder.

GUID: The object's GUID. The mouse-over tooltip displays the object's full resource (TGIR) details.

Build: The build sort and subsort the object appears under in the catalog. If the object has more than one build sort flag set, this will be blank.

Price: The object's price. After altering this value it is necessary to press Return/Enter to make the change "stick".


File Menu Options

Select Folder: Display the Select Folder dialog.

Recent Folders: A list of reecently selected folders.

Configuration: Display the standard Sims2Tools configuration dialog; not needed by this utility.

Exit: Exit the utility; if there are unsaved changes a prompt appears.


Options Menu Options

Show Name: Adds a column to the table displaying the object's name.

Show Path: Adds a column to the table displaying the object's .package file relative to the selected folder.

Show GUIDs: Adds a column to the table displaying the object's GUID.

Show Depreciation: Adds a column to the table and additional controls to the editor area displaying the object's depreciation details.

Exclude Hidden: If checked, removes hidden objects from the table. Hidden objects have no room flags set AND no function flags set AND no community flags set, typically these are tokens, but they can also be objects that only appear in collections.

Hide Locals: If checked, removes local objects from the table. Local objects are custom content with a group id of 0xFFFFFFFF. Checking this automatically unchecks "Hide Non-Locals".

Hide Non-Locals: Removes non-local objects from the table. Non-local objects have a group id other than 0xFFFFFFFF, this includes all Maxis objects and some custom content. Checking this automatically unchecks "Hide Locals".

Disable Build Mode Sort Filters: Removes some filters used to determine what is and isn't a Build Mode object, so displays more objects that can cause issues if changed, such as diagonal doors and windows. This option is reset to off when the application is closed.


Mode Menu Options

Buy Mode: Displays Buy Mode objects.

Build Mode: Displays Build Mode objects, half-walls, fences, windows, doors, wall coverings, floor coverings, etc.

Auto-Backup: If checked, backup files are created before changes are saved.

Make Replacements: Disabled unless "Hide Locals" is checked. If checked, the "Save" button becomes a "Save As..." button which displays a "Save As" dialog allowing a new .package file to be selected to store the edited OBJD resources in. Provided this .package file loads later than any of the .package files containing the edited objects, you have created a replacement for the object(s). With care, this feature can be used to move standard Maxis objects around in the catalog and reprice them.


Moving Objects Between Buy/Build Modes

To move objects between Buy and Build modes, first make sure you a) have a backup and b) make sure you know what you're doing!.

  • Ensure "Exclude Hidden" is un-checked
  • Select the object(s)
  • If in buy mode, clear the room flags and set the function sort to blank; if in build mode, set the build sort to blank
  • Switch mode
  • Set the room and function sorts or build sorts as required

FAQ

Can't SimPe do all this (and more)?
    Yes, but it forces you to open the .package files one at a time and make the changes. It may also not be obvious which objects are in which .package files just from the name of the files. Additionally, for multi-tile objects, or packages containing more than one object, you will need to understand the relationships between resources to be sure you are editing the correct OBJD.

Is this a replacement "The Sims 2 Categorizer"?
    Not intentionally, see "Background" above.

Can I use this to move .package files?
    Yes, from the right-click context menu.

Can I use this to delete/rename .package files?
    No.

Do you intend to add that functionality?
    Probably not.

Will you expand the editor area for the "Xyz" value?
    No.


Shortcut Keys

  • Alt+F - File menu
  • Alt+H - Help menu
  • Alt+M - Mode menu
  • Alt+O - Options menu
  • Alt+S - Save / Save As...
  • Alt+F4 - Exit

  • Ctrl+G - Show/Hide non-local objects
  • Ctrl+L - Show/Hide local objects
  • Ctrl+O - Open (Select) folder

  • F1 - Help (about)
  • F2 - Switch to Buy Mode
  • F3 - Switch to Build Mode

Credits

lucydique for input to the Sims 2 Categorizer fix

crisps for testing Build Mode

sushigal007 for helping with the various table sorting issues

trotylka for help testing moving objects between buy and build modes

CatherineTCJD for identifying various problems with legacy .packages

daydreamingdrawerette for suggesting the Quarter Tile option

HugeLunatic for details on the Quarter Tile option

sethyb0o for pointing out the displayed price issue for XFNC/XOBJ items

belladovah


Source Code

Source code can be downloaded from GitHub


Simblr Links


Change Log

Version 5.5

  • Fixed the bug when an object's description was missing.

Version 5.4

  • Fixed an issue were it appeared that "Tidy Catalog Strings" wern't being saved (they were, the UI just wasn't being updated correctly).

Version 5.3

  • Added right-click context menu entry to Remove Thumbnail Camera
  • Added Advanced Mode to show/hide lesser used options (Modify All Models, Disable Build Mode Filters, Tidy Catalog Strings, Hood View and Remove Thumbnail Camera)

Version 5.2

  • Added support for changing non-local object's hood view setting
  • Added an option to change the hood view setting of all of the CRES/SHPE resources in the .package file(s) associated with the select item(s) - USE WITH CAUTION!!!

Version 5.1

  • Added an option to show/hide the Hood View column in the resource grid
  • Added a right-click context menu item to make an object (in)visible in hood view

Version 5.0

  • Recompiled to fix compression and SimPe issues - see here

Version 4.0

  • Added "Link Dep" check box under Buy Mode Price to auto-set depreciation values if the Price is changed (% are set in the .config file)

Version 3.5

  • Fixed a bug writing CPF based resources (fences, floor tiles and wall coverings)

Version 3.4

  • Critical fix for accented characters in strings

Version 3.3

  • Editing the Title and Description strings will now remove any associated "comment" (eg, "Edited by Sims 2 Categorizer." or "Batch 2 translation.")
  • Added a new right-click context menu option "Tidy Catalog Strings". This removes all but the default language (EN-US) strings from the catalog (CTSS) resource for every selected object and also any associated "comments" in the default language strings. If you have resources that have been corrupted by the "Sims 2 Categorizer" program, this action should fix the problem.
  • Changing the price for a fence no longer crashes if the cost entry in the associated STR# entry is missing. If the STR# resource isn't available in the .package file, this will be noted in the log file.
  • Added a mode to not include sub-folders when reading objects, by default this is off.

Version 3.2

  • If the diagonal version of a door/window/arch/plant is in the same .package file, repricing the main (grid aligned) object will also reprice the diagonal version. If the diagonal version is not in the same .package file, you can (carefully) reprice them by temporailarly unchecking the "Exclude Hidden" option.

Version 3.1

  • Fixed an issue when opening into Build Mode
  • Added "Other" to Floor and Wall Coverings
  • Added "Surface Type" for floor coverings

Version 3.0

  • Major re-write to support multiple resources per object
  • Adds the ability to change an item's title and description (associated CTSS/STR# entry)
  • Supports multi-tile objects and quarter tile placement
  • Supports changing the displayed price for XFNC (fences and half-walls) and XOBJ (floor/wall coverings) resources
  • Supports Save/Replace/Delete thumbnails (via the context menu)

Version 2.9

  • Fixed the bug that was stopping mouse-over thumbnails being shown

Version 2.8

  • Fixed bug when changing the value of a column when the table is sorted by the same column.
  • Fixed crash when sorting by a column when the first item in the table would be hidden.
  • Fixed bug when entering numbers when the table is sorted on the column being updated. As a direct result of this, it is now necessary to press enter to get price/depreciation changes to be applied.
  • File name is now included in the Path column.
  • "Disable Build Mode Sort Filters" option - checking this will show many more "unknown" objects in Build Mode. By design, this option does NOT persist between sessions.

Version 2.5

  • Fixed a bug when Build Mode subtype was blank (ie hidden)
  • Added blank entry for Build Mode sub-type (enables hiding)

Version 2.4

  • First V2.x release
  • Added Quarter Tile Placement support in Buy Mode (see here for details)
  • Added the ability to move .package files between sub-folders via the right-click context menu
  • Added mouse-over thumbnails for Buy Mode objects (requires the game to have added the thumnails to the ObjectThumbnails cache)
  • Added Build Mode support (toggle between modes with F2/F3 keys)

Version 1.0

  • Initial release


Caveat Emptor

There may be non-standard objects listed! This could include tokens, parts of modular stairs, and other stuff. Blindly selecting every row of the table, without paying attention to what you are doing, and then changing something will probably break your game. But as you're being that blasé, that's your problem and not mine.


Files