Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/23/2024 in all areas

  1. I have updated these scripts to use the new pop up panel format currently in GE 9.0.4. The original scripts will still be available should you prefer to use them as sometimes the operation of these new versions may seem a little slower. Refer to the relevant tutorials on ways of using these new scripts Terrain Height,Paint Terrain and Spline Placement scripts (Tutorials) Create Field Dimensions and Farmlands Tutorial Spline Panels.zip available at the end of this topic Installation, copy paste the Spline Panel folder into the C:/Users/Your Computer Name/AppData/Local/GIANTS Editor 64bit 9.0.4/scripts Folder. Spline Paint Panel This is the updated version of the Spline Paint script and no longer needs a separate Set Up script to create User Attributes or a separate Terrain Layers script to print the terrain Layer no as a reference. The script itself works roughly the same way as the previous version so parts of the tutorial are still relevant regarding operation. Texture’s are now automatically read from the map.i3d and selected by using the relevant drop down arrows, any additional textures created and added to the map.i3d will also be automatically added to the drop down selections. The script only needs to be activated once further execution is done via the Paint Button. To activate the Paint Terrain by Spline pop up, in GE -- Scripts—Spline Paint Panel the following panel will it appear. Measurements can be inputted manually (recommended) or by using the sliders <> next to the relevant boxes. Example image showing texture drop down with DIRT Selected Once you have made your selections ensure the spline is selected (if no spline selected a warning will appear in the console log) and select the Paint button at the bottom. Other splines can be used simply by selecting them adding any new settings and selecting Paint. Random Paint is carried out the same as before, this time by selecting Selected in the drop down then add your settings and select the Paint Button. Individual sides of random paint(left or right) can also be selected by selecting -1 (at the bottom of the drop down list) in the non painting edge texture drop down. Spline Height Panel This updated script no longer requires a separate Set Up script or use User Attributes to work. Activate the Set Terrain Height by Spline pop up in GE by selecting Script—Spline Height Panel this only needs to be done once in each session as the Panel can be used with other splines without further activation, execution of any new settings being carried out by selecting the Set Height button The settings can be set either manually or by using the slider <>. A spline can be selected before or after filling in the various settings, if a spline is not selected a warning will appear in the console log prompting you to select a spline When happy with values and with a spline selected, select the Set Height button at the bottom of the panel to activate the script. There are some restrictions on minimum/maximum values, Set Centre Width – 0 to 255m Set Spline Height -- -50 to 255m (-50 to allow for spline transformations on higher terrain) Set Edge Width -- 0 to 50m Set Edge Height Left/right -- -20 to 20 Set Edge Smooth Left/Right – 1 to 20 Set Distance Between Points – 0.5 to 100 The existing tutorial on Spline Height can still be used for reference. An updated version of the Spline CSV Creator Panels script is available here https://farmerboysmodding.com/index.php?/topic/2471-spline-csv-creator-panel-updated/ This new version creates a spline.obj file from the newly created spline for direct import into Blender without the need to convert from a .csv file This spline.obj will still need converting to a curve in Blender to create roads etc. Spline CSV Creator Panel This updated script again no longer needs a Set Up script to initialise User Attributes to work. It now does not need a map name inputted as the script automatically puts the CSVdata folder created by the script and containing the new spline.i3d and splineCsvData.txt files in the same folder as the map.i3d Activate the CSV Creator pop up by selecting Scripts – Spline CSV Creator Panel in Select a spline, enter the distance required between CSV points and select the Create CSV button. Other splines can also be used by repeating the above ensuring that any new splines have a different name. Used in conjunction with the Blender Plugin for CSV Data Field Creation(Dimension) Scripts These are in a separate folder called Field Creation Scripts and consist of three separate scripts that are needed to perform a complete field creation. Create_FieldDimensions Panel The pop up Create Field Dimensions is activated in GE by selecting Scripts—Field Creation Scripts - Create Field Dimensions Panel No further activation is required as further script execution is now done by the Create Field Dimension button The FieldDimension_SetUp script is no longer required as the Create Field Dimensions Panel script when activated now automatically creates a new transform Group in the scenegraph 'Field_Creation_Transform' with all the required transform groups. Create_Field_Dimension pop up The Main Fields transform to create the fieldDimensions will be the fieldsNew –fields transform group and Markers transform newFieldMarkers – Markers. Field dimensions created for the Paint Farmland Field xml Panel will use the farmlandDimensions –fields transform group and the same Markers TG (once the markers have been reset to suit) Once the markers are created select the relevant fields transform enter the field no and select the Create Field Dimension button to execute the script. Any duplicate field numbers will activate a warning text in the console log. Paint Farmland Field xml Panel This panel is activated in GE by selecting Scripts—Field Creation Scripts – Paint Farmland Field xml Panels Panel. As is the case with the other scripts no further activation is required as all execution is done by the Create Farmlands button Set Path to XML – gives two choices farmlands.xml, if your farmlands.xml is in the same folder as your map.i3d or xml/farmlands.xml if you farmland.xml is in a separate xml folder in your map.i3d folder. These two paths are the most commonly used by map makers if you have the farmlands.xml elsewhere then I suggest moving it temporarily to the map.i3d folder. Set Total Fields – this is adjustable either by manual entry (recommended) or by the slider <> between 1 and 255 the 130 is an arbitrary figure farmlands.xml entries will still only show your actual field numbers. Set Land Price – is the multiplier applied to any land prices adjustable either by manual entry (recommended) or by the slider <> between 0 and 10 Set NPC Area – Allows choosing of an NPC area "ALPINE","US","FR" from the drop down selection can be different for each field if required. Number of Different NPC’s -- This is the number of different NPC’s available in the base scripts a number between 1 and 15 is randomly chosen by the script or can be selected manually for each field ownership created. Number can be increased if map maker has added extra NPC’s. Show on Farmlands Screen – If Yes then the field is shown on the games Farmlands screen, No the field will not be shown, used in cases where the farmland is bought with a placeable i.e. BGA Default Farm Property – Yes assigns that field to the ownership of the default (player) farm, No field is then buyable in the normal manner. Once all the relevant details have been entered select the farmlandDimensions –fields –field01 for example and select the Create Farmlands button. The infoLayer_farmlands.grle will have been painted (can be checked in GE by selecting the Terrain Info Layer Paint Mode together with the Info Layer –farmland and the Lands Farmlands number) and an entry for that field created in the farmlands.xml the field number being obtained from the field name i.e field01 will be Field01 in the farmlands.xml Warnings will appear in the log if a field number already exists in the farmlands.xml Subsequent fields can be created by selecting the next field number in the farmlandDimensions –fields transform and selecting Create Farmlands I have included the Paint Field Ground Foliage script (although not yet updated, WIP) together with its reference image, in this folder to keep all the scripts for Field Creation together. A little tip for speedily resetting the markers to create the new field dimensions for the Paint Farmland Farmlands xml script is to scale the X and Z axis by a factor of 0.1/2 depending on size required, (marker size has no effect on actual position) but bear in mind the scaling will be done with reference to the Markers TG (fieldmapIndicator position) so could appear distorted depending on position Spline Place and Spline Foliage scripts will also be updated to use the new pop up panel system in due course. Further information and guidance can be currently found in the Create Field Dimensions and Farmlands Tutorial, though this will also be updated in due course to reflect the changes. Spline Panels.zip
    1 point
  2. Create Duplicate Offset Splines This is an updated version of an original script by TracMax all I have done is added a simple panel UI and allowed the creation of a new folder (parallelSplines) in the same place as the map.i3d for the newly created i3d and txt files. As always copyright remains with the originator. One use of the script is when creating roads/lanes etc as it creates a new spline at the chosen distance parallel to the original so making it easy to add fences/power lines etc aligned to the roadway/lane and also for traffic/pedestrian splines To install Download the Parallel Splines Panel.zip (available at the end of the tutorial) unzip and copy/paste into the following directory. C:/Users/******/AppData/Local/GIANTS Editor 64bit 9.0.6/scripts Replacing * with your computer name. Using the script Select -Script -Parallel Spline Panel in GE --Scripts in the pop up select the spline, enter desired offset and select Create Offset Spline, a new folder will be created in the same place as the map.i3d called parallelSplines and the newly created spline .i3d will appear in this folder along with a data.txt file for that spline, data.txt file suitable for importing into Blender with the correct alignment using the addOn available here, https://farmerboysmodding.com/index.php?/topic/2438-blender-plugin-300-and-above-for-splinecsv-data/ The spline name will include the following:- name of spline (in scenegraph) offset value parallel.i3d e.g. spline02_-10_parallel.i3d A message will also be printed in the console log showing the two files have been created in the parallelSplines folder. New Spline .i3d and .txt files: spline_20_parallel.i3d and spline_20_parallelData.txt created in /parallelSpline Folder The full file path to the new spline.i3d will also be printed in the log. Then simply import the required spline into GE in the normal manner and use as required. Although the spline can be used in conjunction with an existing splineObjects transform group I suggest creating a new splineObjects transform group (Select – Scripts - Spline Placement Combined Panel) otherwise if deleting placedObjects you could delete all previous object placement. The following image shows the operation and the resultant new files in the folder. ParallelSplinePanel.zip
    1 point