Menu

LEX File Exchange
EA Support Files
SC4 Wikipedia
Network Addon Mod
Dependencies
Chat
Welcome, Guest. Please login or register.
Did you miss your activation email?

October 26, 2021, 02:39:14 AM

Login with username, password and session length

Author Topic: Creating your own prop Families (Extended version)  (Read 13788 times)

0 Members and 1 Guest are viewing this topic.

Offline jeronij

Creating your own prop Families (Extended version)
« on: January 17, 2007, 10:48:22 AM »
Hello dear Sim City 4 Devotion members !!!

I am glad to have been given permission to post an extended a much more detailed tutorial about how to create your own prop families, gently created by Sam and completed with the help of some veteran members of this community. A big thanks go to them all  :thumbsup:

With no further detail, here is the transcription.

Transcription starts
Hi everyone, after some questions over at SC4 Devotion, I wrote up a little tutorial on prop families. I made it mostly for my own use as the tutorial I used to use is a little out of date (its the one on the STEX), but thought it might be useful for Jeronij's site if he wanted it. I'm not sure if there is an existing tutorial that covers the same material (if so then this one is redundant)

I've posted it here first for people to preview if they want, and comment on whether or not its suitable for release. I think it probably covers some existing material, but I could leave it out if necessary.

Also, since its based on what I understand of prop families there may be some mistakes, inaccuracies or omissions. So I didn't want to post it publicly without letting people here see it first and having option of veto. Especially since most if it is BSC material. I thought it might be useful to have a current compilation if there wasn't already one.

Tutorial: Using Existing Props in New Prop Families

This tutorial expands on my basic outline of how to make prop families. It also explains how to make a copy of prop files and add them to a new prop family while leaving the original files intact. I have learned the hard way to never modify core dat files, or dependency files from other creators.

Disclaimer: this is a new tutorial and there may still be some minor errors or omissions. If you find any please let me know so I can correct them. Its also not official material, it is just how I do this process. Other people may have different methods. None of this material is my original work (except the compilation of it), it has been a long process of research by many people to work this out. Many of those people were BSC members.The tutorial assumes the audience is fairly familiar with Ilive's Reader and its functions.

What is a Prop Family?

When using the Lot Editor, you can place props on a lot. When you place an ordinary prop it always uses the same prop when the lot is plopped or grown in the game.

You can make your lots more interesting by using prop families. A prop family contains a number of different prop models. If you place a prop family on a lot, each time you plop or grow the lot in the game, it will choose a random prop from the family. This way you can make one lot, but have it look different each time it is used in the game.

You can make your own prop families, but it requires a bit of modding. Its not too difficult though.

Prop Family IID Range

If you are going to create your own prop families, then please ask Barbyw for an instance (iid) range for your families. Each prop family must have a unique iid, and using your own range will ensure that yours don't conflict with anyone else's. There is a request thread here: http://www.simtropolis.com/forum/messageview.cfm?catid=109&threadid=8226.

It is the prop family iid that links all the props into the family. This is how the game knows which props are in the list for it to pick from.


Making a prop family from existing props

I do not create my own props. I must use props that others create, and these are usually found in published prop packs. Lets say I find some nice props, and I want to put them into a prop family.

I will assume that I already know the names of the props I want to use, and which prop pack they are in. I will also assume that the original creator has said its ok for me to use his or her props.

I'm going to use for my example Cycledogg's four Street Trees that can be found in his BSC CP PropPack Vol02 (CP_PropPack_Vol02.dat). The prop exemplar names I want are:
CP_SpruceTree_StreetA
CP_SpruceTree_StreetB
CP_SpruceTree_StreetC
CP_SpruceTree_StreetD

Firstly I start Ilive's Reader and then open BSC CP PropPack Vol02. I locate the four exemplar files that I want and highlight them in the middle pane.



Then (still in the middle pane and with my mouse over one of the four exemplars) I right click, and from the pop-up menu, select Copy Files.



Now I create a new dat file (go to the File menu and select New)

In the middle pane of the reader, I right click and choose Paste Files. The screen should look similar to the picture below.

Now I have a new file with the four prop exemplars in it.



At this point we have a problem. You may notice that the TGI numbers of these exemplars are exactly the same as those in Cycledogg's original prop pack (compare the images above). We need to make sure our new exemplars have their own unique TGI numbers. (TGI: Type Group Instance)

To do this, in the middle pane, I select all four exemplar files, right click and select Generate New Group and Instance.



The results should now be similar to below. Notice the exemplars now have different TGI numbers.



At this point ReIndex and Rebuild the directory file (in the middle pane, right click, and pick ReIndex. Then, again in the right pane, right click and pick Rebuild Directory File).

Then save the new dat file before something bad happens (go to the File menu and choose Save As). Give it a good name. I'm going to call mine sam_CP_SpruceStreetTrees_propFamily.dat With this name I can tell:
It is a file I modified
It contains prop families
The original creator was Cycledogg (CP)
It contains the Spruce Street Tree prop exemplars

These exemplars should not now conflict with any other in game file. But it still doesn't do what we want. The props still belong to the families that Cycledogg originally gave them.



To change these, I select the first exemplar file in the middle pane. Then in the right hand pane, I double click the Building/Prop Family property. The results are shown below:



Since this is a new exemplar file I can safely delete the iids that Cycledogg added (since they are still in the original file), and add my own.

I will delete the first rep (the first white cell under the values list) by clicking on it, then clicking the Remove button.

I will delete the second rep the same way.

I will then find the next available prop family iid in my range, which is 5A100050. I overwrite the third rep with 0x5A100050.

Then I click the apply button on the lower right, then click the apply button on the lower left.



Your results should look similar to the picture below. Note the value in the Prop/Building Family property now appears as we wish it to.



But we have only done the first exemplar out of four. So at this point, you will need to change the other three in the same way (ie pick the file to modify in the middle pane, then in the right pane, find the Prop/Building Family property, double click it, delete any unwanted values and add your own)

Then all four of our new exemplars should belong to our new prop family.

At this point it is wise to ReIndex and Rebuild the directory file, then save your dat file.

We now have our new props in a new prop family. They should be available in the Lot Editor, listed under the family iid.

Advanced Feature - Naming Your Prop Family

We can if we wish, give the family a name by adding a Parent Cohort file, using the method outlined by Jeronij. This name will appear in the list of prop families in the Lot Editor, which makes choosing the right family for our lots much easier.

In my example above, the iid of my Parent Cohort file must be 6A100050 (because the family iid was 5A100050, I must add 1 to the left most digit). Then in the Lot Editor, the new family will appear in the list with its name.

To do this, I'm going to copy a Cohort File from one of my previous prop families. (Open the file that contains the family, find the Cohort file to copy in the middle pane, right click, and select Copy File)

The Parent Cohort file should appear in the middle pane before any of the prop exemplars that use it. To do this, in the middle pane I'm going to click on the first exemplar file in the list. Then I right click and choose Paste File.



This will put the Cohort file as the second item in the list which is not what we really want.



So I will now copy the first file in the list (the exemplar file above the cohort file), click on the parent cohort file, and paste the exemplar file.

This will put a new copy the first exemplar file below the parent cohort in the list. Now we have two copies of the same exemplar, so I can safely remove the copy above the parent cohort file in the list. (In the middle pane click on the file to be removed, then right click and select Remove File)



Now all our files are present and in the correct order, but I need to make some changes to the Cohort file. First I change its instance id to 6A100050. (In the middle pane, click on the Cohort file. Then on the Reader's top button bar, click File Info button. On the pop-up screen click the Edit button. You will get a new pop-up screen. In your head or on a piece of paper, take your prop family iid and add 1 to the left most digit (my prop family iid was 5A100050 so the new number will be 6A100050). Type this new number into the Instance box of the latest pop-up screen, then click ok. (see the second picture below)





Close the File Info box. Its a good idea to Save.

Now I need to alter some of the properties in the Parent Cohort file. (If you click on the cohort file in the middle pane, the properties are shown in the right pane). Note in the picture below the properties of my cohort file have incorrect values (because it is just a copy from another family)



First I need to alter the Building/Prop Family property to match the prop family iid that I have used for the family, ie 5A100050

In the right pane, double click the Building/Prop Family property. There should only be one Value box. I change this to match the prop family iid and apply the changes.

Now I alter the prop Exemplar Name property. To do this, in the right pane I double click it, and in the values box, I give it the name I want. This is the name that will appear in the prop families list in the Lot Editor. My personal preference is to put the family iid at the front of this name, so that I always know which family I am using in the LE. Apply the changes.

Tip from Deadwoods: make sure the family name is not too long or you won't see all of it in the family window in the LotEditor.

The Cohorts properties should now look similar to the image below.



Re-Index, Rebuild the directory file and Save.

Our prop family file is now done. We should be able to use it in the Lot Editor now.



Note: Our prop family only contains the descriptor files for our props. The model files are still in the original prop pack, so this prop pack will still be a dependency of any lot that that uses this prop family. Unfortunately this may not be detected by some dependency scanners. I always keep a spreadsheet of the prop families I have created and the prop packs the models came from. This way I can make a complete dependency listing for them.

Appendix:

One other thing I should have mentioned - when I create new prop exemplars from existing props I usually change their exemplar names. Every prop exemplar is listed in the Lot Editor props list (the list that appears when you click the Add Prop button). This can clutter up the menu if we keep making copies of props, and make things hard to find.

Usually I add to the original exemplar name a prefix which indicates the new props are from a family. This way I know not to use them when adding props from the prop list (as opposed to the prop family list). For example, I might rename the first prop exemplar above to zz_spf_CP_SpruceTree_StreetA

zz_
this should make the prop appear towards the end of the Lot Editor's prop list, out of the way of the regular props

spf_
short for sam's prop family (indicates its a prop family prop made by sam)

CP_SpruceTree_StreetA
indicates the original prop exemplar this prop is a copy of, and that it was made by Cycledogg.

I renamed the exemplars I used in my prop family and you can see from the picture below, the individual props now appear at the end of the Lot Editor's prop list, well out of my way.



This is purely a personal preference of mine, but other people are likely to have different methods.


Last edited by Sam on Wed Jan 17, 2007 1:18 pm; edited 5 times in total

End of transcription
I hope you find this helpful  ;D
I am currently not active - Please, contact Tarkus for any site related matter. Thanks for enjoying SC4D :D


Autism Awareness;  A Father Shares
Mallorca My Mayor Diary


Offline CabraBuitre

Re: Creating your own prop Families (Extended version)
« Reply #1 on: November 17, 2007, 02:51:01 PM »
As I'm not sure where else to post this question... I think I'll do it here!  I've had problems with prop familes that USED to have the proper names in the lot editor no longer show up correctly (in other words, they now say "unnamed."  There are a FEW that still have their names in the prop family screen, but the great majority do not (for example, in SG's section of the lot editor, prop families 0xa5a00100-113 are "unnamed", 0xa5a00115-18 are named)  Is there anything I can do to make these reappear?  It would make lotting much, much easier.
Check out Abelfarei!

Offline BarbyW

  • Administrator
  • Forums Legend
  • *
  • Posts: 5508
  • Total likes: 8
  • Reputation: 57
  • CL: SC4D  Goddess
Re: Creating your own prop Families (Extended version)
« Reply #2 on: November 17, 2007, 03:54:48 PM »
The associated cohorts for the families you are missing are all in SG's MEGA pack so I can only suggest that you reinstall it.
Inside every old person is a young person wondering what happened. TP



Barbypedia: More alive than the original

Offline CabraBuitre

Re: Creating your own prop Families (Extended version)
« Reply #3 on: November 17, 2007, 04:48:21 PM »
ok, I'll give it a shot, thanks.
Check out Abelfarei!

Offline CabraBuitre

Re: Creating your own prop Families (Extended version)
« Reply #4 on: November 17, 2007, 05:08:05 PM »
Unfortunately that didn't work.  Any other thoughts as to why it wouldn't?  I re-downloaded the megapack here at SC4D (which I hadn't had downloaded before... I only had the previous one from the STEX).

EDIT:  I also noticed that D66's families are largely unnamed as well.  Could I have something that is conflicting with these to prevent them from showing up?
Check out Abelfarei!

Offline BarbyW

  • Administrator
  • Forums Legend
  • *
  • Posts: 5508
  • Total likes: 8
  • Reputation: 57
  • CL: SC4D  Goddess
Re: Creating your own prop Families (Extended version)
« Reply #5 on: November 17, 2007, 05:34:48 PM »
D66's are largely unnamed but I have no idea why SG's are no longer showing. Open SG's MEGA pack in Reader and only look for the Cohorts. If they are in place then you do have something conflicting but what it could be I have no idea.
Inside every old person is a young person wondering what happened. TP



Barbypedia: More alive than the original

Offline CabraBuitre

Re: Creating your own prop Families (Extended version)
« Reply #6 on: November 17, 2007, 05:59:04 PM »
I think I found it... I uninstalled "PropFamilyNames.dat" which really isn't all that necessary, as I don't use Maxis props when I lot-build... when I removed it, then SG's props show up correctly!  I'm not sure if anyone else has had a problem similar to this... but perhaps we've just found out the solution!
Check out Abelfarei!

Offline BarbyW

  • Administrator
  • Forums Legend
  • *
  • Posts: 5508
  • Total likes: 8
  • Reputation: 57
  • CL: SC4D  Goddess
Re: Creating your own prop Families (Extended version)
« Reply #7 on: November 17, 2007, 06:01:48 PM »
I always have that file in my plugins so that shouldn't cause a conflict at all. It is very odd ::)
Inside every old person is a young person wondering what happened. TP



Barbypedia: More alive than the original

Offline soulstealer

Re: Creating your own prop Families (Extended version)
« Reply #8 on: February 29, 2008, 12:57:35 PM »
Thanks for the tutorial  :thumbsup:

How can you change if the props in the family rotate in random or stay fixed?
« Last Edit: February 29, 2008, 01:00:27 PM by soulstealer »

Offline RippleJet

Re: Creating your own prop Families (Extended version)
« Reply #9 on: February 29, 2008, 01:29:21 PM »
How can you change if the props in the family rotate in random or stay fixed?

You can't. $%Grinno$%
Props in a family are always selected randomly. ;)

Offline soulstealer

Re: Creating your own prop Families (Extended version)
« Reply #10 on: February 29, 2008, 02:31:18 PM »
bugger.
so the only way around is to create same props with different orientation and place them in the family.

Offline RebaLynnTS

Re: Creating your own prop Families (Extended version)
« Reply #11 on: February 29, 2008, 03:03:19 PM »
bugger.
so the only way around is to create same props with different orientation and place them in the family.

Yep!

Offline Unassigned

  • Forums Mayor
  • *
  • Posts: 156
  • Total likes: 0
  • Reputation: 0
  • Sitting on a cornflake.
Re: Creating your own prop Families (Extended version)
« Reply #12 on: July 02, 2008, 11:28:13 AM »
IID request thread link in the OP (the tutorial) is b0rken.
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination

Offline SimFox

Re: Creating your own prop Families (Extended version)
« Reply #13 on: September 21, 2008, 01:44:15 PM »
Are there any differences to creating building families as compared with props.
I´ve followed this tutorial and did successfully created the prop family, but when I try to follow the same line with building exemplars nothing seem to happens - namely I don't see new building family listed in Lot Editor Replace Building family window.

Also I'm wondering about that PropFamilyNames.dat CabraBuitre and BarbyW were talking about and I can't seem to find it anywhere...Scanned entire HDD and found no such file... Exactly where is it supposed to be?

Offline BarbyW

  • Administrator
  • Forums Legend
  • *
  • Posts: 5508
  • Total likes: 8
  • Reputation: 57
  • CL: SC4D  Goddess
Re: Creating your own prop Families (Extended version)
« Reply #14 on: September 21, 2008, 03:04:56 PM »
The BSC Prop Family Names mod is what we are referring to.

With regard to building families, the procedure is exactly the same as for making prop families but they will only appear in the Replace Family list of LE if the exemplars are the same type - ie R$/R$$/R$$$ - as the building you wish to replace and the lot is big enough to hold the building.
« Last Edit: September 21, 2008, 03:06:35 PM by BarbyW »
Inside every old person is a young person wondering what happened. TP



Barbypedia: More alive than the original

Offline FrankU

  • It's Frank, the U is just for the suspense
  • BeNeLux Team
  • Forums Guru
  • *
  • Posts: 3348
  • Total likes: 228
  • Reputation: 14
  • Dutch Housing Project
  • CL:
    U Grow It
Re: Creating your own prop Families (Extended version)
« Reply #15 on: October 12, 2009, 03:02:36 AM »
This is a very versatile tutorial! Clear and easy to follow. Thanks a lot.

I have one addition.
If you start your own prop family from scratch, the exemplar files do not contain the "Building/prop family" property.  But it is easy to add this by left clicking in the right pane, select "Add property" and select "building/prop family". Then you add the right number ( Ox and then the iid Barby gave you) and save the file. Now you copy this property into all other exemplars. Reindex, rebuild etc....

I also have two questions.

1. Is it possible to make prop families in such a way that randomly no prop appears? For example: if I have a prop family of trucks ( I actually made one) I would want in some cases that no truck is visible. Of course I could add a prop that is invisible, if I had one.... Is there a way that is useful and not too hard?

2. I made some prop families. They work correctly. But then one of these families suddenly showed all installed props twice when I select it in the list. When I rotate the props (pressing N) I see that the order of appearance is different than when I made the family the first time. Does anyone have a clue how this could have happened? As far as I remember I have not changed the file since the first time. In the Reader the family looks OK. It is not that I copied all exemplars twice into the dat-file!

Offline BarbyW

  • Administrator
  • Forums Legend
  • *
  • Posts: 5508
  • Total likes: 8
  • Reputation: 57
  • CL: SC4D  Goddess
Re: Creating your own prop Families (Extended version)
« Reply #16 on: October 12, 2009, 08:55:39 AM »
The way to have no prop appear sometimes is to use Prop Random Chance but that means making them with a Resource Key Type 4. joelyboy asked about this in this thread so you should be able to follow the procedure explained there and in the threa Ripplejet pointed him to.

The scond question is odd. Make sure that you do not have another copy of the dat lurking around anywhere. Empty your plugins apart from your prop exemplar dat and the required prop packs and see what happens then. If you still have doubled props showing in LE then you must, somehow, have doubled the exemplars in your dat.
Inside every old person is a young person wondering what happened. TP



Barbypedia: More alive than the original

Offline FrankU

  • It's Frank, the U is just for the suspense
  • BeNeLux Team
  • Forums Guru
  • *
  • Posts: 3348
  • Total likes: 228
  • Reputation: 14
  • Dutch Housing Project
  • CL:
    U Grow It
Re: Creating your own prop Families (Extended version)
« Reply #17 on: October 12, 2009, 09:16:45 AM »
Thanks Barby,

I think this procedure is a bit too complex for me. I have not much time for SC4, so my will to explore the depth of the Reader is limited.

And the other point: yes, it could be that I have two versions of the file in my plugins. I'll have a look when I am at home again.

Offline FrankU

  • It's Frank, the U is just for the suspense
  • BeNeLux Team
  • Forums Guru
  • *
  • Posts: 3348
  • Total likes: 228
  • Reputation: 14
  • Dutch Housing Project
  • CL:
    U Grow It
Re: Creating your own prop Families (Extended version)
« Reply #18 on: November 02, 2010, 05:55:26 AM »
Now I have another question on prop families. I hope I can make it clear.

I wanted to make three prop families. They have the following IID's and contain:
0x5f85180b   CP Trees and shrubs   - a number of trees and shrubs
0x5f85180c   CP Trees      - only the trees out of the upper family
0x5f85180d   CP Shrubs      - only the shrubs out of the upper family

For this purpose I have selected a group of trees and bushes from the BSC MEGA Props - CP Vol01.dat.

I built a file containing all the needed exemplars. Every exemplar is member of two prop families: the trees belong to 0x5f85180b and 0x5f85180c, The shrubs belong to 0x5f85180b and 0x5f85180d. So each exemplar had two values in the building/propfamily entry.
Everything works correctly, so I can work with the file.
So far no questions.

But now: I would like to see the names of the prop families in the LotEditor list. So I added a cohort file and tried to make it show the three names with the correct prop families. But I did not succeed. What should I do?
I tried to put three cohort files in the dat file, where each cohort file contains the names and IID's etc for one prop family. That did not work. Then I tried it by using one cohort file for only the first prop familiy and then two separate dat-files, containing each only a cohort file for the other two prop families. That also did not work.

Is there a correct way of naming the three prop families?
Of course I considered to make three dat-files, each for every prop family, bot in that case I need to make two copies of every exemplar. I thought that would not be necessary.

Offline RippleJet

Re: Creating your own prop Families (Extended version)
« Reply #19 on: November 02, 2010, 07:04:22 AM »
Did you also change the Parent Cohort property for the props, so that they actually point to the TGI of the Cohort Exemplar?
It's quite easy to create and name the prop families (and cohorts) in PIM-X btw. ;)