Jump to content

Recommended Posts

Posted

FS25 Spline Modifier Script (Updated)

 

This script allows for the creation of several types of duplicate modified spline’s from a single or multiple splines

It will also reverse the direction of the duplicate spline(s) align them to the terrain and join several splines together to form one new spline depending on the option(s) selected.

Whilst individual splines can be selected and converted, if multiple splines are selected they must all be in the same direction starting from the first splines ‘S’ cv, this is also a prerequisite when joining splines using the Combine Splines option.

Installation

Unzip the FS25_splineModifier_Updated.zip (available at the end of this tutorial) and copy/paste the folder to the location of your  GIANTS Editor 64bit 10.0.4/scripts folder in this case it is,

 C:/Users/*****/AppData/Local/GIANTS Editor 64bit 10.0.4/scripts (replacing the *** with your computer name)

 

New Spline Modifier Panel

SplineModifier.png.692aa18c5cbacd0244f9378871e64b8b.png

 

Overview

 

Set CSV Distance                     --- Allows for the distance between spline cv’s to be adjusted in the duplicate spline(s) (5m set as default)

Set Offset Distance                 --- This value is the distance a parallel spline will be placed away from the original, positive value (+) will place the

                                                       duplicate to the left of the spline when viewed from the ‘S’ cv negative value (-) to the right.

                                                       Value limited to -25m to +25 to minimise placement problems though some adjustment/deletion of

                                                        Spline cv’s may be necessary depending on the  inner/outer curve radius of the original spline.

                                                       Note left/right (+/-) values are viewed from the 'S' cv so if a modified reversed spline is selected the left/right (+/-) position is also reversed. 

Align to Terrain                       --- When selected will create a duplicate of the original spline(s) aligned to the terrain.

Select Reverse                         --- If selected will create a duplicate spline in the reverse  direction of the selected spline cv’s 

                                                      i.e  S to E converted to E to S

Combine Splines                     --- This selection will combine multiple splines into one single spline.

                                                               NOTE: Splines must all be in the same direction (S to E) and selected in order i.e

                                                                          Spline_1 S E, Spline_2 S E etc otherwise it will not work correctly.

                                                                          Spline ends must be in reasonable proximity of each other but might require adjustment when splines

                                                                         combined.

                                                                       Combined spline name will be the first selected spline name.

Separate section in the lower section of the panel enables saving of any selected spline(s) and conversion of any single spline to an .OBJ file both are saved in a new Modified Splines folder in the same location as the the map.i3d.

Save Splines                 -- Saves the selected spline(s) to the Modified Splines Folder.

Create OBJ                    --- Creates/Saves an .obj file of the selected (single) spline to the Modified Splines Folder.

 

Create?Save Spline(s)/OBJ             --- Select this button to execute the script.

When first executed the script will create a new transform group in the Scenegraph called Modified_Splines, any splines created will be automatically loaded into the Scenegraph into this TG and a Modified Splines folder in the same folder as the map.i3d

When the duplicate splines are created they will have the following suffixes for reference depending on option selection

Suffix

'C' combined spline

'T' aligned to terrain

'R' Reversed

So spline with an offset of 8 aligned to the terrain and reversed will be

splineName _8,T,R

A  combined spline with no offset aligned to the terrain will be

splineName,C_0,T.

If a modified spline is selected for further offset then the spline name will contain the first offset value followed by the second offset value

i.e splineName,C_-10,T_20,T would be a combined spline whose first offset is -10 from original spline and second offset 20 from the -10 offset.

 

Using the script

Create the spline(s)

Select the spline(s) – To select multiple splines, select the first spline and holding shift select the others in order

                                   remembering to do it in the correct order if combining them

Select the relevant options

Select Create/Save Spline(s)/OBJ

Saving splines and  converting to an .obj file –For splines -- Select the spline(s) (multiple splines may be saved) -- Select Create/Save Spline(s)/OBJ

                                                                             For .obj file select a spline (only single splines can be converted at one time) -- Select Create/Save Spline(s)/OBJ

Both the splines and .obj will be saved to a Modified Splines folder located in the same folder as the maps.i3d.

Examples

1.thumb.png.23e27635f9c3a0a57871def295992aaf.png

 

2.thumb.png.2f90dad301e9add040cb52313feba094.png

 

3.thumb.png.6e2737bda724cf24779879a306c29adc.png

 

 

 

 

 

 

FS25_splineModifier_Updated.zip

 

  • WrinkleysRule changed the title to FS25 Spline Modifier Script
Posted

You will note that the scripts that are specifically for FS25 in your image are already annotated with FS25  or 25 so I don't see a problem.

The other scripts mentioned ( three of which were definitely not created by me)  may work with other versions

Posted

Mit Roten Pfeil sind  von Älteren FS Versionen 

Also Kann Ich bei den anderen zur Besseren Übersicht  FS25 davor schreiben  wie bei  FS25_spline Modiffier.lua machen

Screenshot_8.jpg

Posted
Quote

So I can write FS25 in front of the others for a better overview, like I did with FS25_spline Modiffier.lua

Sorry I am a bit confused here as the script name in the lua file is FS25 Spline Modifier and displays as such in GE and the script editor

-- Author:W_R
-- Name:FS25 Spline Modifier
-- Namespace: local
-- Description:
-- Icon:
-- Hide: no
-- AlwaysLoaded: no

Also I would have thought it sensible to have the older versions in one folder and the FS25 versions in another instead of mixing the two together.

Posted
25 minutes ago, WrinkleysRule said:

Entschuldigung, ich bin hier etwas verwirrt, da der Skriptname in der Lua-Datei  FS25 Spline Modifier lautet und als solcher in GE und im Skripteditor angezeigt wird

-- Autor:W_R
-- Name:FS25 Spline Modifier
-- Namespace: lokal
-- Beschreibung:
-- Symbol:
-- Ausblenden: nein
-- Immer geladen: nein

Außerdem hätte ich es für sinnvoll gehalten, die älteren Versionen in einem Ordner und die FS25-Versionen in einem anderen zu haben, anstatt die beiden miteinander zu vermischen.

Die Scripte aus Älteren FS Versionen funktionieren ja im FS25

Darum sind die da drin  wo die FS25 Scripte sind

Weil es die Nicht für FS25 gibt 

  • 1 month later...
Posted

This script can be modified by yourself to allow decimal entries to the offset by following these steps

Open FS25 Spline Modifier.lua  in GE script Editor and navigate to line 78
                 local offsetSlider = UIIntSlider.new(offsetSliderSizer, offset, -25, 25 );
replace with the following line
                  local offsetSlider = UIFloatSlider.new(offsetSliderSizer, offset, -25, 25 );


Save and exit the Script editor

Execute the script from the Script - Users Scripts menu
you should now be able to enter a decimal value for the offset

Offset max min values have been reduced to avoid distortion caused by inner and outer radius when setting high values.

An updated script  is currently being created and tested.

  • Like 1
Posted

F25 Spline Modifier Updated
The script basically works the same as before with the following changes.

New panel Layout
Changes
Set Offset Distance now allows decimal input
Splines are now created directly into a Modified Splines TG in the Scenegraph

Separate section in the lower section of the panel enables saving of any selected spline(s) and conversion of any single spline to an .OBJ file both are saved in a new Modified Splines folder in the same location as the the map.i3d.

Tutorial updated to reflect changes

  • WrinkleysRule changed the title to FS25 Spline Modifier Script (Updated)

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