Jump to content
Sam

Tutorial - Making Custom Farm Fields

6 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Several people have asked in this forum how to make customisable farm fields for use in the Lot Editor, that don't override any of the in game ones. This tutorial shows you how to do this.

As it is a lengthy tutorial, I've given it a thread of its own.

Beware, this is not a Lot Editor tutorial, as you can't do this kind of work in the Lot Editor. It requires Ilive's Reader and involves modding. As it is detailed you will need to be careful to follow all the steps. I've tried to give step by step instructions, but I've written the tutorial very quickly and there may be some small details omitted.

Making a Farm Field Template Tutorial

1. As for any lot making, remove everything from both your plugins folders to your plugins disabled folders (make them if you don't have them). Startup Manager can do this for you at the click of a button.

2. Start up Lot Editor, and in the Choose Lot to Edit screen, find the Maxis Green Grass Park (0x4ab05a13 - Pz1x1_Grass). This lot is a good lot to pick as the basis of your template as it already has an invisible building and conforms to slopes.

3. If your lot has any props, effects of overlay textures (ie anything other than a base texture) remove it now.

4. Click Save As and give your lot a good name (eg sam_FarmField_template). This will become the basis of your farm field template.

Note: I suggest always including a unique creator prefix in a consistent place in any file name you create. For growables this should be after the type and size, but before the descriptive name (eg PZ1x1_sam_farmhouse)

5. Exit the Lot Editor

Ok that was the easy part, now the hard work begins.

In your plugins folder you should now have a single new file called something like sam_farmfield_TutorialTemplate_16d55781.SC4Lot

Note the numbers which you didn't add to the file name. These will be important later.

6. Make a backup copy of this file, in case you make a mistake in the next steps. Put the backup somewhere safe.

7. Open this file in Ilive's Reader. It will look something like below:

field_1.jpg

In the left pane you should see two exemplar files. One will be your lot exemplar, the other is the building exemplar. We will start with the building exemplar, as it is more intuitive than the Lot Exemplar. Click on each exemplar to find out what it looks like. The building exemplar should look like the below picture:

field_2.jpg

At this point I would suggest you download one of the more up to date BSC or CSX farm field files and use it to compare what your exemplar should look like when it is finished. You can open a second copy of Ilive’s Reader to compare both files side by side. I’m using the BSC Farm Fields - CSX Forestry from https://www.sc4devotion.com/csxlex/lex_filedesc.php?lotGET=1740. This is what its building exemplar looks like:

field_3.jpg

As you can see, our template has far more items than it needs and some of these will have bad effects on our cities if we leave them in our farm field.

8. Remove all the items I’ve highlighted pink below. Select them, right click and click delete property

field_4.jpg

Our file should now look like this:

field_5.jpg

9. Now lets compare our field with the CSX field again. Some of our properties have the wrong values so we need to fix them. You can edit properties by double clicking on them. You need to change the following:

a. Parent Cohort – this needs to be set to the Farm Field Parent Cohort which is –

Type: 0x05342861

Group: 0xa7bddf17

Instance: 0x00004100

Your farm field will “inherit” some properties from the Parent Cohort, especially those that are not added to your farm field (as these override the parent cohort values)

field_6.jpg
b. Exemplar Name – give it a good name (this will appear in the lot query window) eg Sam Field – Trees

c. Set Bulldoze Cost, Pollution at Centre, Power Consumed, Pollution Radii and Water Consumed to suitable values. Remember, every square tile of this field in your city will produce/consume this amount so keep it reasonable. If you want them to have no effect set them to zero – do not delete them, or your field will use the values set in the Parent Cohort instead.

d. For now leave the Query Exemplar GUID as it is. This is will give your field the park query when you click on it in the game. You can later change it to a custom query if you are able to create one.

e. For Occupant Groups, ensure it has only two reps unless you are adding custom occupant groups. Delete any that relate to parks. Set the first Rep to 0x00014100 and set the second Rep to 0x00003002. This means it is an Agricultural Building (first Rep) and an Industrial: Out building (second rep). These occupant groups will confer certain properties to your lot, so you don’t want the park ones there.

10. Now you will notice there are some properties missing. We will have to add these. To add a property right click and then pick Add Property.

field_7.jpg
field_8.jpg

11. In the dialog box, where it says name, drop down the list and start typing the name of the property you want to add. When you find it in the list, select it. To add the required Reps, click the Add button on the right and then set the Reps as listed. Then click the upper Apply button, then the lower Apply button. Then move on to add the next property:

a. Add Exemplar Type. Add one Rep and set it to 0x00000002 (which is buildings)

field_9.jpg
b. Add Capacity Satisfied. Add two Reps. Set the first to 0x00004100 (farming jobs). Set the second to the number of jobs you want each tile of field to give eg 0x00000002

c. Add Growth Stage. Add one Rep. Set it to 0xFF (so that your field will only grow if a farm uses it)

d. Add Monopoly Piece. Add one Rep. Set it to 0x01 (this means it can be called by a farm building and it fills the zoned area around the farm building)

e. Add Building Foundation. Add one Rep. Set it to 0x194B1000. This is the invisible foundation. You don’t normally want your fields to have foundations. Do not delete or omit this property if you don’t want your fields to have foundations. Omitting it will give your fields the default foundation.

Your file should now look like the picture below. It should have all the properties and they should be correct values.

field_10.jpg

12. Save your file (File > Save As)

Ok we should be done with the building exemplar, so we have done half of what we need to do now. On to the next step, which is to set up the Lot Exemplar.

13. In the right pane, click on the other exemplar file. Its names won’t be as user friendly as the one you were just looking at. It will look something like below:

field_11.jpg

14. Lets take a look at the CSX field and compare the two:

field_12.jpg

field_13.jpg

15. We need to change the following properties because they have park settings, and won’t let our lot behave as a farm field:

a. LotConfigPropertyZoneTypes. Set the Rep to 0x07. This is the value for the Agricultural Industry zone

b. LotConfigPropertyWealthTypes. Make sure it has one Rep (add or delete as necessary). Set the Rep to 0x01. This is the value for Low Wealth

c. LotConfigPropertyPurposeTypes. Make sure it has one Rep (add or delete as necessary). Set it to 0x05

d. If you did the very first stage in the Lot Editor correctly and deleted all the props and overlay textures, there should be only one LotConfigPropertyLotObjectData line. There is one for each prop, texture or effect on your lot (plus extras for some other things like transit enabled tiles or land/water constraints)

16. Save your file. We should be done with the Lot Exemplar now. It should look something like the picture below:

field_14.jpg

17. This is your Farm Field Template. Backup your new file.

18. Exit Ilive’s Reader (be sure to close all copies, Lot Editor and the game do not like it running at the same time)

19. Go back to the Lot Editor. In the Choose Lot to Edit box, look for your Field Template file (if at step 4 you put your creator name and the word template in the file name it should be easy to find).

20. You will notice that unlike the farm fields, this new farm field has the Save As button enabled. Each time you Save As, a new farm field will be created that will not override others.

21. To use your template, click Save As, give it a new name and decorate it as you like.

Okay, this is the basics of creating a new farm field. But wait, there’s more. Your new farm field will not work unless you attach it to a (new) farm.

22. Once you have made a new farm field that you want to attach to a farm you will need to make a farm lot that uses it. There is a trick to this. You need to make a suitable farm building first (eg using a BAT model and the Plugin Manager). Then use the Lot Editor to place your new building on a Maxis base lot, using the Replace Item button on the Building tab.

23. Now you will need to use Ilive’s Reader to find your farm field’s Instance ID (IID).

24. Open your new field in Ilive’s Reader.

25. Find which of the two exemplars is the building exemplar and click on it.

26. Look in the pane where you clicked on the building exemplar. On the right side of the pane there should be three numbers, a type, a group and an instance. This instance id is the one you need to use to refer to a field file.

27. Write it down. Close the field file but leave the Reader open.

28. You should also have a new farm descriptor file (xxxxx.SC4Desc) that you made in the PIM, and a farm lot file that you made in the Lot Editor. The descriptor file contains the building exemplar for the farm, and this is what you need to attach your farm field to.

29. Open your farm descriptor file in Ilive’s Reader. It should look similar to below. (You can merge it into the lot file if you like, in which case you should dispose of the descriptor file).

field_15.jpg

In the building exemplar you will see a property called Field Lots. This is the list of field IIDs that the farm lot uses. Each time it grows it chooses one field from the list of choices.

30. You can edit the Field Lots property, and either add your farm field IID to the list, or remove the ones that are already there (delete the reps) and add only your own field IID as a rep (or a selection of your new fields, each as a separate rep). Eg below I’ve removed all the Maxis fields, and added my own:

field_16.jpg

field_17.jpg
31. Save your file

32. Test your new farm and field in the game. Make sure they work.

33. Fix any problems that appear.

  • Like 1

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Hi Sam! I successfully made the lot template, called:"CORN FIELD"   but from No. "22."  i dont understand.. 15.gif

I make a model in Bat, then what should i do with it?  Then, what lot sould i put that building on?

- i cant find the IID.  Isn't that called the parent cohort ?

Which lot sould i open, and when?   14.gif  Aaaaaaah

BTW, is it really necessary to attach a building to the farm lot?    I dont want to upload farm buildings to STEX, just some farm lots.  I saw others, and they did the same thing. Like simgoober. How' they do that?

Could you pls help me?

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Originally posted by: HunD88

    ...

    BTW, is it really necessary to attach a building to the farm lot?    I dont want to upload farm buildings to STEX, just some farm lots.  I saw others, and they did the same thing. Like simgoober. How' they do that?

    Could you pls help me?

    quote>

    In order to have farms in the game, you actually need two lots per farm. The first is the 1x1 farm field lot (this is the one the tutorial is mainly about). The second is the lot that has the farm building on it (I didn't write much on this since the fields are the tricky part). The farm building lot grows first, then the fields grow around it. The fields that grow depend on the fields that are associated with the farm building lot.

    In your case, you have made some field lots (I think), but since they are not yet associated with any farm building lot in the game, you will never see them used by the game (they will not be automatically used by farms already in the game).

    In step 29, see how I've outlined in red one row from the farm building exemplar? These are the Instance IDs of the farm fields that are associated with this farm lot. Since your field lot is not among these, this farm cannot grow your fields. That is why you need the second lot.

    Simgoober did indeed have actual farm lots that grew the fields he made, they were just in another pack. That's why he said on the readme of his farm lot that you needed to download the field pack as a dependency.

    Originally posted by: HunD88

    ...

    I make a model in Bat, then what should i do with it? 

    ...

    quote>

    You just need to make a lot the way you normally do with a BAT. Make your BAT, use the PIM to make your building descriptor (ie drag your model over the IR option in the tree), then make a lot in the Lot Editor and place your farm building on it. You will need to start with a Maxis farm lot that is about the same size as they one you want to make, then in the Building Tab, click change building and find your new BAT in the list. When you are all done with that click Save As.

    Once you've done that then you need to continue with step 23.

    Originally posted by: HunD88

    - i cant find the IID.  Isn't that called the parent cohort ?

    quote>

    No, its not the Parent Cohort. If the Parent Cohort is what you are seeing then you are looking at the wrong side of the screen. Look at the second picture in step 7. In the middle part of the screen there is a column called Instance. That's where the ID you want is. See where the purple arrow is pointing in the picture below:

    field_2a.jpg

    I hope this helps.

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections