WrinkleysRule Posted September 22, 2022 Posted September 22, 2022 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 or view. 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. 24/05/23 --- Newer versions of these scripts available here 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 Terrain Height script User Attributes created after selecting Scripts—Terrain Height Set Up Terrain Paint script User Attributes created after selecting Scripts—Terrain Paint Set Up 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. 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 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_18.12.2022.zip 1 5
puka Posted September 22, 2022 Posted September 22, 2022 Am I missing something here? I actually can't see the Updated Spline Scripts.Zip at the bottom. And Wrinkley, Thank you very much for these amazing tutorials 🥳
WrinkleysRule Posted September 22, 2022 Author Posted September 22, 2022 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 1
puka Posted September 23, 2022 Posted September 23, 2022 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!
bdbssb Posted September 24, 2022 Posted September 24, 2022 Glad to see this. Apologies that site issues were hindering this update. Great thanks to @WrinkleysRulefor pushing through.
WrinkleysRule Posted October 16, 2022 Author Posted October 16, 2022 Scripts have been Updated, now use User Attributes for entry of data. 1
jdunn1019 Posted October 19, 2022 Posted October 19, 2022 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
WrinkleysRule Posted October 20, 2022 Author Posted October 20, 2022 What happens if you do as the \Warning\ says, \ WARNING\ ATTRIBUTES ERROR PLEASE RESELECT SPLINE PLACEMENT TRANSFORM
jdunn1019 Posted October 20, 2022 Posted October 20, 2022 REMAKE the SPLINE PLACEMENT TRANSFORM with the User attributes again it
WrinkleysRule Posted October 20, 2022 Author Posted October 20, 2022 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.
WrinkleysRule Posted October 20, 2022 Author Posted October 20, 2022 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.
WrinkleysRule Posted October 28, 2022 Author Posted October 28, 2022 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. 1
WrinkleysRule Posted December 12, 2022 Author Posted December 12, 2022 Added Updated scripts due to a couple of errors in Spline Placement script. Line 62 should read --- local monitor = getNumUserAttribute(splPl) not ---local monitor = getNumUserAttribute(mSplineID) Line 74 should read --- local scaleHigh= getUserAttribute(splPl, "(h).Set Scale High ") not --- local scaleHigh= getUserAttribute(splPl, "(h.)Set Scale High ") Apologies for errors
BennoBlocksberg Posted December 17, 2022 Posted December 17, 2022 hi guys thanx for this very helpful scripts, i set my map to one unit per pixel, so now i have a problem whit the resolution of the textures. has anyone a solution ? thanks a lot # cheers
WrinkleysRule Posted December 17, 2022 Author Posted December 17, 2022 In the User attributes there is a setting for adjusting the distance between textures when painting "(s).Set Distance Between Textures" which is set by default at 0.5, try lowering this figure to say 0.25 and see what result you get. Your image is almost the same as the example image in the tutorial of a setting of 1.5 in the "(s).Set Distance Between Textures" attribute.
BennoBlocksberg Posted December 17, 2022 Posted December 17, 2022 hi, thankx for your answer. i tried, but is not working. i think the soulution can be in downscale the texture_weight maps of a half, but i wan't do this. maybe there is a solution in the script inself, also in the editorUtils.lua maybe change only one number
WrinkleysRule Posted December 17, 2022 Author Posted December 17, 2022 To overcome this problem change the following in the Terrain Paint script at line 99 "for i = 0, mSideCount, 1 do" to --- "for i = 0, mSideCount, mSplinePiece do" this will set the texture paint distance to the "(s).Set Distance Between Textures" value I will do some further tests before updating the main scripts to this new setting
WrinkleysRule Posted December 17, 2022 Author Posted December 17, 2022 Glad that change solved your problem, as I said I will do some further test with both of the scripts that use that sequence (Terrain Height,Terrain Paint) before updating the Updated Spline Scripts.zip package with the new settings. 1
BennoBlocksberg Posted December 17, 2022 Posted December 17, 2022 another question, i am looking for a spline script was plancing object offset to the left or right side.?
WrinkleysRule Posted December 17, 2022 Author Posted December 17, 2022 If you are refering to a script that places objects a set or random distance either side of the spline then the Spline Placement script does exactly that see the tutorial.
BennoBlocksberg Posted December 17, 2022 Posted December 17, 2022 now i got it very nice that tool, love it
WrinkleysRule Posted December 18, 2022 Author Posted December 18, 2022 Scripts have now been updated to correct problems when used with custom maps using a pixel size other than the default 'TerrainTransformGroup --- unitsPerPixel="2" '
Sanya Posted December 29, 2022 Posted December 29, 2022 @WrinkleysRule is it possible to remake the terrainPaint script so that it draws not ordinary textures on a spline, but cultivated, etc in terrainDetail? It would be very useful if want to get a field quickly and with precise edges without using gimp/photoshop... so that they are drawn inside a closed spline
WrinkleysRule Posted December 29, 2022 Author Posted December 29, 2022 Unfortunately there doesn't seem to be any commands within the Giants Editor Lua set up that will allow painting of foliage or terrain detail by spline, unlike the textures which have the 'setTerrainLayerAtWorldPos' command Why don't you just use the spline to create the field border, then using the Limit to Texture box in the FoliageLayer Painting panel to paint the chosen Terrain Detail without overpainting the spline paint texture. for example spline paint -- grass foilage Layer --Terrain detail --Ground TYpe --Cultivated Limit to Texture -- dirt or whatever the terrain texture is inside the spline grass border area Because of the way the terrain is painted you will only be able to get precise edges by painting in a North/South or East/West direction following the terrain sections. You can also use the new field spline to place hedges/trees etc around your field, (removing sections for gateways manually of course) The image below shows the result of the above settings although I have substituted the dirt texture for Rough Sand to give a clearer indication of the painting--- centre texture is the Terrain Detail ---Cultivated
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now