Utility Poles with Wires Terrain Tutorial FS19 - PMC Farming

Wires for Poles Tutorial

2021-02-04 Updated.

This tutorial needs proof reading from various skill level users, if you have corrections or questions please contact us.

Spline Placement Scripts

This tutorial uses splinePlacement v1.3 scripts by TracMax Batch.Files.And.Scripts.2024-03-18 Torrent Magnet. Unpack the 7-zip archive and place .lua scripts into Giants Editor scripts directory.

SplinePlacement_Create.lua will create needed transformgroups for these scripts to function. First create empty transformgroup by Create -> Transformgroup, then select this new "transform" item, now run SplinePlacement_Create.lua from the scripts menu, if you just dropped it to scripts root directory it will be named "Spline Placement Create". When executed it will create various child transformgroups.

SplinePlacement_Delete.lua will delete objects from splinePlacement -> placedObjects transformgroup, very useful when you go back and forth testing scripting variables Smiley :)

splinePlacement_v1.3_Fixed_Distancetester.lua is not used in this tutorial.

Creating Utility Poles

You need a utility pole and a wire objects. For utility pole object use mapUS utilityTransitionPoleUS-R and as for wire object... dunno, there is one german rural area telephone pole prefab in giants modhub.

Our screenshots show utility pole object from Midwest Horizon terrain and wire object from Kjmeyer.

Create three transformgroups and place them into the utility pole where the wires connect. These three transformgroups must be right after the utility pole object, if there are any other items or transformgroups there then wire objects are connected to those.

Utility Poles with Wires Transformgroup 1 Location
Utility Poles with Wires Transformgroup 2 Location
Utility Poles 
with Wires Transformgroup 3 Location

Make sure the wire locator transformgroups are first / top-most right below the utility pole (powerPole in our example) item. See below screenshot for an example.

Utility Poles with Wires Transformgroup Order

Create utility pole line using 65 meter splinePlacement v1.3 script by TracMax Batch.Files.And.Scripts.2024-03-18 Torrent Magnet, as usual. First create the spline, as you can see from our screenshot example you can make nice smooth flowing shapes for utility pole splines.

Utility Poles with Wires Spline for Poles

Move/duplicate utility pole object into splinePlacement -> objectsToPlace transformgroup. Then select splinePlacement transformgroup and run the 65 meter placement script.

Utility Poles with Wires Spline Created Poles

We have used 65 meter distance between utility poles, it seems to be pretty decent value judging by various American real life farming areas from google/maps.

Creating Wires

Wire object must be setup in a way that gizmo is on one end and blue arrow points along the wire.

Utility Poles with Wires The Wire Object

To measure wire length put a transformgroup on the one end, then move it to the other end using blue gizmo arrow and see translate Z value.

Download EasyFence script by modelleicher Batch.Files.And.Scripts.2024-03-18 Torrent Magnet and open it in proper text editor (notepad++ for example).

E_wireNodesCnt is wire nodes count, how many wires does your utility pole have.

E_fenceWire is wire node number, check it by selecting the wire object and then from attributes -> transform -> ID.

Utility Poles with Wires FenceWire Node Number

E_startWireLength is length of the wire object.

E_fenceTransform is transformgroup ID where utility pole objects are located.

Utility Poles with Wires FenceTransform Node NUmber

E_maxPosts is number of utility poles. Find this number by selecting last created utility pole object and check its attributes -> index path and its the last number of that index path number, heh.

Utility Poles with Wires MaxPosts Number

In our above example image you see the index path being "4>0|1|82" and the last number, 82 in our case (this is on our example, yours most likely will be different), is the count of how many utility pole objects the script created. Use this number for E_maxPosts variable value.

E_startPost leave it to zero (0).

Utility poles must be in sequential number order, you cant have index path 1 object being somewhere middle of the line. This is not an issue if you place utility poles using splinePlacement 65m script.

How to actually script generate the wire objects: first place the utility poles, then just run Easy Fence script (EasyFence.lua), no need to select any specific transformgroup or anything. Wires are created on those three transformgroups which indicate the wire location on each utility pole.

Once wires are placed there will be bugged wires on the LAST pole. Go to the placedObjects, open last pole transformgroup and the wire transformgroups and delete the wires, actually you can just delete all three wire transformgroups.

Utility Poles with Wires Buggy Last Pole

Here is the final result overview.

Utility Poles with Wires Placed Overview

Looking good, love my new wires which were created all automatic scripting way Smiley ;)

Utility Poles with Wires Placed Closeup