Member Controls

SimPE Tutorials > Cloning/Recoloring a Fence
quaxiLink to postposted: Fri Sep 09, 2005 10:46 pm
Avator for quaxi

Member since:
 2006-04-28
Posts:
 3154
The procedure described in this Tutorial is only valid for SimPE 0.48 and above.

Since SimPE 0.48, the ObjectWorkshop does have the ability to work with Roofs, Terrains, Walls, Floors and Fences.
This Tutorial is intended to describe the necessary steps for cloning or "recoloring" a Fence. It is also a simple explanation of the ObjectWorkshop itself, but the Focus clearly is on working with Fences.

Using Fences for Recolors/Clones is brand new in SimPE 0.48, so it might not work for all Fences at once. That is why, Fences, Roofs and so on are only available in the OW Selection if you did turn on the Advanced Mode in Extra->Preferences
quaxiLink to postposted: Fri Sep 09, 2005 10:54 pm
Avator for quaxi

Member since:
 2006-04-28
Posts:
 3154
Base of all this is the dockable ObjectWorkshop, So please make sure you have it open.
quaxiLink to postposted: Fri Sep 09, 2005 10:58 pm
Avator for quaxi

Member since:
 2006-04-28
Posts:
 3154
Nothing unusual in this Step. You start the OW, and let it collect a List of all available Objects, as soon as the TreView is enabled, you can select the Category Other, and browse to the Fences Subsection, where you will find all Fences SimPE knows.

If you do not have the FEnces Category, you either do not run SimPE in "advanced Mode", or you did not reset the FileTable when SimPE did ask you. You have to make sure that the TSData\Res\Catalog\Patterns Folder is part of your FileTable.

When you selected your Fence, simply click on the Next Button.
quaxiLink to postposted: Fri Sep 09, 2005 11:07 pm
Avator for quaxi

Member since:
 2006-04-28
Posts:
 3154
For Fences (and for Roofs, Terrains, Floors and Walls), ObjectWorkshop will not offer you the Recolor Option, as there are no real Recolors for Fences.

However, you can still create a pseudo Recolor, by selecting the Reference Original Mesh Option.
If you do choose this, OW, will not load the Mesh Data into the package it will create. Instead, it will link your Texture to the original Mesh that did Ship with the Game. So that is close to a Recolor :D

If you do not check this Option, SimPE will include the Meshdata as well. Enabling you to change the look of your Fence, just like any other Object.

Numenor explains the meaning for the other Options in this Tutorial.

Note:This Option is mainly intended for Fences, and should not be used with regular Objects!

If you made your choice, click Start Or Next to continue.
quaxiLink to postposted: Fri Sep 09, 2005 11:12 pm
Avator for quaxi

Member since:
 2006-04-28
Posts:
 3154
In this last step (new in the OW since SimPE 0.48 ), you can give your Object a new Name and a diffrent Price.

SimPE will put the data into the correct places. Now click Finish, and SimPE will collect all Files.

If you don't know what the Rename Dialog is for, simply click OK, and you will see the content of the Cloned/Recolored Fence in SimPE.

From here on, everything works like Cloning/Recoloring normal Objects.

Well, everything besides getting a GUID. Which is described in the next Step.
quaxiLink to postposted: Fri Sep 09, 2005 11:26 pm
Avator for quaxi

Member since:
 2006-04-28
Posts:
 3154
Fences have (like normal Objects) a GUID, which is used by the Game to tell the Fences apart. TheObjectWorkshop will automatically create a random GUID for each fence you create. However, as with every Random algorithm, this can result in Conflicts, when two Modders generate a Fence with the same GUID. In that case, the game would only load one of those Fences.

The GUID Problematic does also apply if you created a "pseudo" Recolor!

The GUID is stored in the XML File describing the Object, so for a Fence, you need to open the Fence XML (XFNC) Resource in your package. That Resource contains a Property called guid, it's value is a odd 32-Bit Integer.

As I said, this Number is a completley Random Number, and therefor may cause conflicts with other Modders.

Now you might say, "I get a GUID from the GUID-Database". Well, in my Tests, a Fence with the same GUID as an Object, did not cause a conflict with that Object. So the GUID Database is not a usefull choice, as you would just block a GUID for a regular Object with your Fence.

To solve this, I would suggest to reuse GUIDs you already have registred for regular Objects (You can get a List of all GUIDs you registred so far from the GUID Web-Frontend). This way, you can make sure that a unique GUID within your GUID Range, and can be sure that your Fences do not collide with the ones created by others, assuming they do also stick to this Rule.

However, since Fences, Roofs, regular Objects, Terrains, Wallpapers and Floors do all use their own GUID Space, chances are very low, that two fences will get the same random GUID, as I don't expect to see more than 1000 new Fences :)
quaxiLink to postposted: Fri Sep 09, 2005 11:37 pm
Avator for quaxi

Member since:
 2006-04-28
Posts:
 3154
So that's basically the Tutorial.

One last interesting thing. The Default Sims 2 Wall Mesh is a Fence with GUID 0x00000001, so by setting the GUID for one of your Remeshed Fences to that Number, you will override the default Wall Mesh. Migh be usefull for creative Minds :D
quaxiLink to postposted: Sun Sep 11, 2005 8:13 pm
Avator for quaxi

Member since:
 2006-04-28
Posts:
 3154
Another thing that might interste Creators is, that you can actually influence the position of the Cloned/Recolored Fence in the Catalog.

Open the Text List in the created package, and you will find three rows of Text.

The first one is the Title, the second one is the Description, and the third one is the Priority (0-Based) in the Catalog.

Fences in the Catalog are sorted by increasing Priority, meaning first the Fence with Priority 0, then 1...

Two fences can have the same priority, but you cannot tell the game which one comes first in that case. So if you set your custom Fence to 1, and there already is a Fence with Priority 1, the item will still be one of the first in the List.
quaxiLink to postposted: Mon Sep 12, 2005 10:34 pm
Avator for quaxi

Member since:
 2006-04-28
Posts:
 3154
The original game did not directly support the loading of Custom Fences, but I figured out how to fix it. However I would not suggest doing this, as it is a nasty hack, and potentially can cause conflicts with Original Game content (installed through EPs) or other Custom Fences that were created this way.

Here is how you can make a Fence show up in the original Game.

  1. Open your package and select the Fence XML
  2. copy the guid (which should be a unique value) into the following properties: stringsetgroupid, resourceid
  3. copy the value 0x4c8cc5c0 (which is the global group for fences and stuff) into the properties: resourcegroupid
  4. Commit the Fence XML
  5. Change the TGI value for the Fence XML to group=0x4c8cc5c0, instance={guid}
  6. Change the TGI value for the TextList to group={giud}
  7. Save your package


The key issue is, that the original Game will not find the Fence XML or the Text List, if they are not in the global Group, however, if you put a resource in a Global group, you might override other content in that group, that is why you need to change the instance value to a unique one (hence the use of the GUID).

Again. I would suggest that you inform downloaders that custom Fences are only available from University on.
And if you provide a Fence for the Original game, please offer it as a seperate package and warn the downloaders of the potential Problems (which are, that a fence might override another Fence eitehr custom or original maxis).

If you want to make a Fence you did Download compatible with the original Game for private Use, you can use the "Fix Fence" Action, available in SimPE 0.50, and above


viewthread, 1751, 0