Jump to content

Updated Spline, CSV, Height, Paint, Place, Scripts


WrinkleysRule
 Share

Recommended Posts

  • Wrinkley

NOTE:

These scripts are personal edits of original scripts by various authors ( Stegei, Evgeny Zaitsev, Nicolas Wrobel,TracMax and W_R ) and posted on the FarmerBoysModding site
for members of the FarmerBoysModding community's personal use and not intended for any general public release.
Furthermore they are posted on the understanding that NO monetary gain whatsoever,regardless of source can be made from all or parts of them by any person(s).
Including but not limited to, Patreon, soliciting for or requiring donations for work done for any purpose, posting on a website that gives any form of remuneration per download.

Copyright remains with the original creators of these scripts.

 

It would appear there has been some confusion with the new and old versions of these scripts so to avoid any confusion delete any previous versions of these scripts before installing these new versions and read the New Tutorials relevant to the script you are using.

 

Installation

First a big thank you to Stegei, Evgeny Zaitsev, Nicolas Wrobel and TracMax  the originators of some of these scripts.

Whats New

All the scripts no longer require the use of the Script Editor and are now executed directly from the script dropdown in GE ,- Select--Scripts

The scripts now contain a set of Set Up scripts (Spline CSV Creator Set Up, Terrain Paint Set Up, Terrain Height Set Up and Spline Placement Transform ).

These have to be run before using the main script as they create in the User Attributes panel of GE the User Attributes required for each script.

They only require to be run once for each spline used whilst editing, also if the map is saved between edits the User Attributes created are also saved to the spline used so the setup script does not have to be run again when the map is opened for subsequent edits.

 

Because of the various changes/updates to all the scripts it is recommended that all previous versions be deleted before installing the new versions.

 

Download and unzip the Updated Spline Scripts.zip, and copy/paste the contents as laid out in the zip directly into

C:\Users\Your Computer name\AppData\Local\GIANTS Editor 64bit 9.0.3\scripts

The Updated Spline Scripts.Zip  contains the following files,  a brief description of each follows, further detailed information is contained in the relevant tutorials.

 

 

Spline CSV Creator Set Up           Creates in Giants Editor User Attributes Panel the User Attributes for the 

Spline CSV Creator script.

 

Spline CSV Creator                          Creates a new Spline.i3d aligned to the terrain with the CSV distance set by the

CSV Distance attribute in the User Attributes panel,  also created is a

 Spline CSV data .txt both are placed in the new  CSVdata  folder created in the root folder of your map.

Requires Spline CSV Creator Set Up to be executed first.

 

Terrain Paint Set Up                       This script prints the terrain layer textures numerically in the Giants Editor Console

 log.

It also creates in the Giants Editor User Attributes panel the necessary User Attributes  for the Terrain Paint  script operation..

Terrain Paint                                      For painting along the spline using map terrain textures, different textures can be

 selectedand painted for the centre and left and right edge areas.

Requires Terrain Paint Set Up to be executed first.

Terrain Height Set Up                    Creates in the User Attributes panel of Giants Editor the necessary User Attributes

 for the Terrain Height script

Terrain Height                                  Allows for setting the terrain height using a spline and has independent height

 settings for centre width, left and right edge width.

Requires Terrain Height Set Up to be executed first.

Spline Placement Transform      Creates a splineObjects transform group with the correct hierarchy in the

 Giants Editor Scenegraph and in User Attributes panel the User Attributes necessary

 for the operation of the Spline Placement script.

Spline Placement                           Places objects along a spline at terrain height at fixed or random distances

along/around and either side of the spline

                Requires Spline Placement Transform to be executed first

Spline Placement Delete             Deletes ALL objects in the placedObjects  transform group.

                                -----------------------------------------------------------------------------------------------------------------

 

Giants Editor Spline Scripts User Attributes

 

Brief description of the various User Attribute settings, further information available in the relevant tutorial.

 

Note:

If the map is saved the User Attributes created will be saved (complete with settings) to the relevant Transform Group/Object and will be available when the map is reopened, as such to avoid complications with the save if any of the individual User Attributes are deleted (by selecting the red X) then the next time any of the scripts are run a warning will be printed in the Console log, example below

\ WARNING\

                ATTRIBUTES ERROR

                  PLEASE RESELECT

                SPLINE PLACEMENT  TRANSFORM

The User Attributes will then have to be set up again by reselecting the named Set Up script in the above case the error is with the Spline Placement  script

Spline CSV Creator script

User Attributes created after selecting Scripts-- Spline CSV Creator Set Up

T0rYI2Z.png

Terrain Height script

User Attributes created after selecting Scripts—Terrain Height Set Up

B0cVhv1.png%20%20

Terrain Paint script        

User Attributes created after selecting Scripts—Terrain Paint Set Up

2UudFBv.png

 

The letters in brackets on the left of each Attribute name are there to ensure correct layout if more than one set of spline attributes are set up on a single spline, the script name is also entered to separate the individual Script Attributes, example below.

wi1W8mB.png

Spline Placement script

This script isn’t affected by the multiple attributes problem (shown above)  although it still uses the same spline as the rest the Attributes are assigned to the splinePlacementTransform not the spline itself.

User Attributes created after selecting Scripts—Spline Placement Transform

BVZYV8E.png

To avoid errors and having to repeat the various Set Up scripts it is advisable not to delete any of the

User Attributes until work has finished using the particular spline after which they can be all deleted if required.

 

Further information available from the tutorials

 

Export a Spline from Giants Editor Into Blender to Create Roads/Railways (Updated)

Terrain Height, Paint Terrain and Spline Placement scripts (Updated)

 

Note:

Before using any of these scripts on a current Work In Progress (WIP) map, it is recommended that a blank starter map is used to experiment and get familiar with the scripts, settings, executions and results.

Read the New Tutorials as the operation and execution  of all the scripts has changed.

 

 

 

Updated Spline Scripts.zip

Edited by WrinkleysRule
Updated Scripts 28/10/2022
  • Like 1
  • Thanks 2
Link to comment
Share on other sites

7 hours ago, WrinkleysRule said:

Thank you for telling me I apologise profusely, with all the problems getting stuff uploaded I forgot to add the zip file, now corrected and zip added

❤️ Thank you sir!

Link to comment
Share on other sites

when i tried new the placement script i get this error 

Quote

Warning (script): 'getNumUserAttribute': Argument 1 has wrong type. Expected: Int. Actual: Nil 
  D:\auto_builder\cache\svn\62f28a84498cda5975f048d2294ab8f7\src\base\scripting\lua\LuaScriptSystem.cpp (903): expectedType == Value::VoidType || expectedType == Value::ClassType
LUA call stack:
  =C:/Users/jdunn/AppData/Local/GIANTS Editor 64bit 9.0.3/scripts/farmerboymoddingscripts/splinePlacement.lua (62) : getNumUserAttribute

    \  WARNING\
    ATTRIBUTES ERROR 
      PLEASE RESELECT 
    SPLINE PLACEMENT TRANSFORM

 

Link to comment
Share on other sites

  • Wrinkley

 

So, have you with the splinePlacement transform group selected then filled in the relevant User Attributes and with the splinePlacement transform group still selected, selected the Spline Placement script to place the objects.

 

The splinePlacement transform group has to be selected when entering the User Attributes and also when the  Spline Placement script is run.

Link to comment
Share on other sites

  • Wrinkley

Apologies, I have just noticed an incorrect instruction in the Spline Placement Transform script printed in the Console log, the last line should read,

Set Attribute Values then Select 'Spline Placement' script to Execute

and not

Set Attribute Values then Select 'Place Objects 2' script to Execute

I have altered it and included  the corrected version in the Updated Spline Scripts at the bottom of the tutorial.

 

Link to comment
Share on other sites

  • Wrinkley

The scripts have now all been updated (28/10/22.)
The man difference is in the Spline CSV Creator and Spline CSV Creator Set Up scripts, these have now been changed so that all inputs are done from the User Attribute Panel in Giants Editor.
There is no longer any need to copy/paste the spline.i3d or spline__CSV data from the Giants Editor log.txt this is now down automatically by creating a new folder (CSVdata) in your map root folder and creating a new spline_CSV.i3d and spline _CSVdata.txt in that folder.

Brief view operating the Spline CSV Creator and Spline CSV Creator Set Up scripts,


Open Map in Giants Editor,


Create a spline and align it to the road/rail network you wish to model, naming it accordingly.
The spline can be called any name as long as it has the word spline in it i.e. road01_spline,  spline_2 etc,
the name chosen will also be the name of the spline.i3d and spline_CSVdata.txt  created in the CSVdata folder in your map root folder.


Select --Scripts --Spline CSV Creator Set Up
Insert map name in the (b).Map Name attribute --Full name must be entered note also the entry is case sensitive.
Enter required value in the (c).CSV Distance attribute.


With the spline selected, Select -- Scripts --Spline CSV Creator .
A new Spline.i3d  with your chosen Spline name will be placed in a newly created CSVdata folder in the map root folder along with a Spline_CSVdata.txt file.

(For this example a spline name of road01_spline and a map name of Manor Farm has been used)
The message ‘New Spline: road01_spline_CSV.i3d and  road01_CSVdata.txt created in Manor Farm / CSVdata Folder’ will also appear in the consol log


The new road01_spline.i3d can be imported directly into the map in GE by selecting File-Import and navigating to the CSVdata folder in the map root folder and selecting the road01_spline_CSV.i3d which will then appear at the correct location in your map.
The road01_CSVdata .txt  is for use with the csv_importer script in Blender 2.79(only at the moment) and can be referenced in Blender directly from the CSVdata folder.

All the other scripts and tutorials have been updated to reflect this new change.
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share