Differences

This shows you the differences between two versions of the page.

Link to this comparison view

fielddefs [2017/05/24 14:27] (current)
Line 1: Line 1:
 +====== How to set up field Dimensions (field deff'​s) ======  ​
  
 +Game Version: ​ FS15 and later\\
 +GE Version: ​ ? and later
 +
 +----
 +
 +[[modding_tutorials|Modding Index]] | [[map_making|Map Making Tutorials]]
 +
 +----
 +
 +===== Intro =====
 +
 +This will hopefully help you get your filed Deff's allocated to each field regardless of there size or shape, this TUT will explain how to make the none square fields, covered by the dimensions to stop you from cultivating the none square field and not getting the error " you don't own this field ".
 +
 +===== Prep Work =====
 +
 +
 +
 +===== Full Details =====
 +
 +[size=18pt]Welcome to my second TUT, this is for creating field dimensions (field deff'​s) to suit the size of you maps fields.
 +without them conflicting with each other and giving error'​s "​[color=red]You don't own this field[/​color]"​.[/​size]
 +
 +Firstly there may be things added to this TUT at a later date, ie how to work out Ha size and field price.
 +This is mainly to get the dimensions into your map so they work alongside other fields.
 +
 +So to start this TUT we are going to expect there is a Transform group named "​[color=red]fields[/​color]"​ in your maps Scenegraph.
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field1_zps6k8fmvzz.png?​t=1442254677[/​img]
 +
 +If there are NO "​[color=red]fields[/​color]"​ Transform group within the Scenegraph, the the best thing to do is import one from another map. To do this just open a map, doesn'​t really matter which one and then look for the "​[color=red]fields[/​color]"​ Transform group within the Scenegraph and click on it to highlight it in [color=blue]BLUE[/​color]. Then go to file at the top left and move down to the selection for "​[color=red]export selection with files[/​color]",​ no look where the files are for the map you are editing and open the map folder so you can see the i3d file for the map. copy it here and call it fields just like the Transform once this is done then open the map in GE and import the "​[color=red]fields[/​color]"​ from the exact same place, once on the map "​[color=red]DO NOT I REPEAT DO NOT[/​color]"​ change the position of the Transform group for the "​[color=red]fields[/​color]"​ make sure these are left as Transform X,Y,Z set to 0,0,0. This is really important to do this. Once this is done close the GE and save, then in the map files area where the i3d file was you will have a i3d for "​[color=red]fields[/​color]"​ and also one for the "​[color=red]fields shapes[/​color]",​ delete these 2 files from the map and then re open the map in GE, and you will see the map has the "​[color=red]fields[/​color]"​ in place and ready to rock and roll.
 +Now you can continue onto the next part of the TUT.
 +
 +
 +Now that we have the "​[color=red]fields[/​color]"​ highlighted open [color=blue]user attributes[/​color] window in GE if it's not already, the we just need to check a few things are okay.
 +There should be a [color=blue]onCreate[/​color] box open and should have the following within "​[color=red]FieldDefinition.onCreate[/​color]"​
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field5_zps5exetbnl.png?​t=1442254681[/​img]
 +
 +Now click on the highlighted "​[color=red]fields[/​color]"​ and this will open a subfolder, hopefully called "​[color=red]field01[/​color]"​ if it's not called "​[color=red]field01[/​color]"​ and maybe called something else then just open the [color=blue]Attributes[/​color] window in GE and change the name at the top, and also when opened reduce the clip distance to "​[color=red]250[/​color]",​ I try and get into the habit of re-doing the clip distance every time I open a new object, so for my instance everything in the "​[color=red]fields[/​color]"​ directory I would reduce down to "​[color=red]250[/​color]"​ but this is just my preference and not required, but by getting into the habit of this will save you a lot of time and better game performance in the end.
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field8_zpsbzut2jcn.png?​t=1442254681[/​img]
 +
 +Next we need to make sure the [color=blue]user attributes[/​color] are set for the "​[color=red]field01[/​color]"​ as we need to duplicate this transform for the amount of fields you have, so rather than having to do this for all the fields you are going to create, you only need to set it once as the others are copies from the original "​[color=red]field01[/​color]"​.
 +
 +So move you [color=blue]user attributes[/​color] into view and click on "​[color=red]field01[/​color]",​ now in the [color=blue]user attributes[/​color] window there should be three active attributes, but I have noticed that a lot of "​[color=red]field01[/​color]"​ don't have the "​[color=red]ownedByPlayer[/​color]"​ added for some reason, so if not I will show you how to add them, if you do have it just skip this addition part.
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field6_zpsktlcoxuk.png?​t=1442254681[/​img]
 +
 +[color=red]ADDITION OF THE THREE ATTRIBUTES[/​color]
 +With the "​[color=red]field01[/​color]"​ highlighted in the [color=blue]user attributes[/​color] click in the name box in the "​[b]Add New Attribute[/​b]"​ area, now type as follows "​[color=red]fieldArea[/​color]"​ and where it says type just below click on the box and change this to "​[color=red]float[/​color]"​ then press Add. you will now see above the fieldArea has been added, now click in the name box again and now type this as follows "​[color=red]fieldPrice[/​color]"​ and change the type to "​[color=red]integer[/​color]"​ and again press Add, you now have the fieldPrice Added, the last one again in the name box type as follows "​[color=red]ownedByPlayer[/​color]"​ and change the type to "​[color=red]boolean[/​color]"​ and they are now complete within the "​[color=red]field01[/​color]"​ group.
 +
 +and you should have a [color=blue]user attributes[/​color] which looks like the picture above, but forget about the numbers within for the moment.
 +
 +[b]ADDITION END[/b]
 +
 +Now what you need to do is have a quick count of the amount of fields you are needing to create, for this picture shown below you can see I had the 1 "​[color=red]field01[/​color]"​ and just duplicated it by pressing [color=blue]left Ctrl[/​color] and [color=blue]D[/​color] until I had the amount needed for the map, don't worry as these can be added or taken away later. in the picture below you can see all the duplicated "​[color=red]field01[/​color]"​
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field10_zpsnxi9ah9j.png?​t=1442254681[/​img]
 +
 +Now all you need to do is change the field number of each one, so they follow numerical order. As these show on your PDA map as this number in the game, the picture below shows the fields in numerical order and to do this just re-open your [color=blue]attributes[/​color] window in GE and at the top where it has a name "​[color=red]field01[/​color]"​ change it to "​[color=red]field02[/​color]"​ and continue this down the list until all the fields are re-numbered.
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field11_zpsvuvvkupe.png?​t=1442254681[/​img]
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field12_zpsh3scho8r.png?​t=1442254681[/​img]
 +
 +Right now this is done, this is the fields directory done and as we add them to the fields, I will explain other things to add or subtract according to the shape of the field in the following stages, and try not to loose myself also.
 +
 +So now we need to place the "​[color=red]field01[/​color]"​ and so on to there associated field, you can move all these now or do them individually,​ your preference but I prefer to place them all in the middle of the field so I know they are all there, also start at "​[color=red]field01[/​color]"​ and work your way down the list just so not to miss creating field deff'​s.
 +
 +So here I have made a little sample of fields that overlap each other and running along side a road structure, so hopefully after following this your field deff's will cover all the field that is belongs to, and not encroach on any neighbouring fields.
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field13_zpsheoshgwy.png?​t=1442254681[/​img]
 +
 +So this picture has explained it a little, let's get straight to placing "​[color=red]field01[/​color]"​ depending on how many entrances there are to the field, it's up to you where to place the buy icon, but like mentioned before if not already done place them in the centre or choose where you want to place it before starting the field deff'​s,​ because if the "​[color=red]field01[/​color]"​ is moved later the field deff's will also move and will no longer cover the area you chose. [color=red][b]So very important to choose the area before editing the deff'​s[/​b][/​color]. Click on the "​[color=red]field01[/​color]"​ and when highlighted move to the area you want to place it press on the keyboard [color=blue]left Ctrl[/​color] and [color=blue]B[/​color] then left click on the maps field where you want to place it.
 +I'am going to place all these in the centre now in the Scenegraph open all the child folders to open out the "​[color=red]field01[/​color]"​ directory shown below.
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field14_zpsby56ydjc.png?​t=1442254723[/​img]
 +
 +Now at this point everything is more or less set to the centre point where the buy icon is located, but this needs editing so we will start with the [color=red]fieldBuyTrigger[/​color] and work our way down, this can be left in the middle of the field but if you prefer it at a gate entrance or even in a field buy area (store) so all the buy triggers are at the same place, it's up to you but remember to make some sort of map for these as they all appear the same, so a little map with the field numbers on will help. [color=red]triggerIconBuyField[/​color] should really stop with the [color=red]fieldBuyTrigger[/​color].
 +
 +[b]Field Deff'​s[/​b]
 +Let's start to set the deff's click on "​[color=red]corner01_1[/​color]"​ move this to the left lower part of the field, press [color=blue]left Ctrl[/​color] and [color=blue]B[/​color] and click on the map where you want this to be show in picture below.
 +
 +http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field15_zpsrd8d2zia.png?​t=1442254723
 +
 +Now we need to zoom right out so we can see the sphere as a guide, as you can see the lines show where they are going and it's important to get this bit correct, the [color=red]RED[/​color] arrow needs to be pointing away from you look at the pictures shown.
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field16_zpstrz3433l.png?​t=1442254723[/​img]
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field17_zpsdl5pq4xp.png?​t=1442254723[/​img]
 +
 +Now zoom up into the air so you can look down on the field, and keep a eye on the [color=blue]BLUE[/​color] line, when zoomed out this will stretch to show the the area it is going to cover to the right of the field shown in these pictures.
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field18_zps06cgyenl.png[/​img]
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field19_zpsb8mtzero.png?​t=1442254722[/​img]
 +
 +Now with the top view still there, in the Scenegraph click on the "​[color=red]corner01_2[/​color]"​ and you will notice this changes to a different location, but we are going to set it as the same as "​[color=red]corner01_1[/​color]"​. So while the "​[color=red]corner01_2[/​color]"​ is still selected in the [color=blue]attributes[/​color] window in GE there are three figures which need changing to zero'​s,​ these are the Translate x,y,z. shown in the [color=red]RED[/​color] box in the next pictures.
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field20_zps3ya05dx4.png?​t=1442254722[/​img]
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field21_zpsczegthb1.png?​t=1442254722[/​img]
 +
 +Now you will notice that "​[color=red]corner01_2[/​color]"​ is now directly over the top of "​[color=red]corner01_1[/​color]"​ and again with the "​[color=red]corner01_2[/​color]"​ selected grab the [color=blue]BLUE[/​color] arrow and move it to the right up to the fields edge without touching another field.
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field22_zpsnhkvgrzd.png?​t=1442254722[/​img]
 +
 +While we are still in "​[color=red]corner01_2[/​color]"​ in the [color=blue]attributes[/​color] window copy the figure from "​[color=red]Translate Z[/​color]",​ now click on the "​[color=red]corner01_3[/​color]"​ in the Scenegraph and do the same for Translate x,y by setting them at zero, but on the "​[color=red]Translate Z[/​color]"​ paste the number in here which you copied from "​[color=red]corner01_2[/​color]"​ this will now place "​[color=red]corner01_3[/​color]"​ above "​[color=red]corner01_2[/​color]",​ now all you need to do is grab the [color=red]RED[/​color] arrow and move this upwards towards the edge of the field where you think it won't effect the neighbouring fields.
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field23_zpszvkvfsxt.png?​t=1442267195[/​img]
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field24_zpsmk5b73zd.png[/​img]
 +
 +On this next picture you will notice the shape that has just been created around the map, with the field deff's that have just been placed. They have created a barrier around the field in the shape from your corner markers.
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field25_zpswqd854h3.png[/​img]
 +
 +Also [color=red]NOTE[/​color] that these deff's that have been placed for the first "​[color=red]corner01_1[/​color]"​ have not covered all the fields area, and this is where you need to make a duplicate of the "​[color=red]corner01_1[/​color]"​ until you have covered all the area of the field you are placing deff's for. in the picture below you can see the first "​[color=red]corner01_1[/​color]"​ and I have made another 3 duplicates within [color=red]fieldDimensions[/​color] group. The "​[color=red]corner01_1[/​color]"​ when copied already has the "​[color=red]corner01_2[/​color] and [color=red]corner01_3[/​color]"​ already inside as it's own group, so you don't need to make duplicates of these. As shown below I have just opened "​[color=red]corner01_1[/​color]"​ to show you these are here.
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field26_zpsxrfo3hlc.png?​t=1442268534[/​img]
 +
 +So all you have to do is keep repeating this process until the whole field is covered and not passing any other field deff's [color=red][b]THAT ARE NOT[/​b][/​color] in the same "​[color=red]field01[/​color]"​ or whichever group. The next picture will hopefully help better with the coloured boxes all being different field numbers, let's say the [color=red]RED[/​color] boxes are for "​[color=red]field01[/​color]"​ and the [color=blue]Blue[/​color] boxes are for "​[color=red]field02[/​color]"​ and the [color=orange]ORANGE[/​color] boxes are for "​[color=red]field03[/​color]"​.
 +
 +The same colour boxes can overlap as they are going to cover the same field, but must not overlap another.
 +
 +Also note if your field is small or big try and stretch each field deff as far as possible, so you only need to use the correct amount to cover the fields. Don't worry if one field has 2 "​[color=red]corner01_1[/​color]"​ or whether you needed to placed 5 or more, as long as the field is covered you will be fine.
 +
 +[color=red][size=16pt]The picture below Has (map01'​s) in the text, These are (corner01_1'​s) which need to be duplicated to create the box effect[/​size][/​color]
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field27_zps2qdsp9qo.png?​t=1442268534[/​img]
 +
 +The only thing left to do is place the number where you want it to show on the PDA, and that's done by clicking on the "​[color=red]fieldMapIndicator[/​color]"​ in the Scenegraph and pressing [color=blue]left Ctrl[/​color] and [color=blue]B[/​color] and then click on the maps field where you want this to show.
 +
 +[img]http://​i578.photobucket.com/​albums/​ss221/​robbiewm/​field28_zpsdcprscmw.png?​t=1442268534[/​img]
 +
 +So that is the end of the TUT and I do hope I haven'​t left anything out, and also know how difficult this looks and also the way it is presented but it is really hard to try and write and show pictures on this, rather than making a video to show how easy it is. All the same thanks for looking and I do hope I have helped you's succeed with field deff's if you weren'​t aware of how to do them.
 +
 +
 +Also like mentioned this TUT may be changed due to the price and Ha, as I did mention before I have my own method of how to get the HA and the price somewhere near, but not accurate and think Steve or Bill from the team may update this to include this into the TUT. 
 +
 +
 +Thanks for looking and again hope this helped.
 +
 +
 +
 +
 +Read more: http://​mappersparadise.freeforums.net/​thread/​68/​set-field-dimensions-deffs#​ixzz3mEFvFKMH
 +
 +----
 +
 +Original Author: ​ robbie | Date:  September 20, 2015
 +        ​
 +[[modding_tutorials|Modding Index]] | [[map_making|Map Making Tutorials]]