The GIANTS Editor is the main application you will use to create mods. In the editor, you can run scripts, preview and manipulate models, and stage your creations before publishing them to the ModHub. In this chapter, we will explore the features and tools of the GIANTS Editor. Familiarizing yourself with the interfaces that mod creators work with is the first step in the path to making your own.

After reading this chapter, you will know the tools and features of the GIANTS Editor, be able to create and change the properties of objects in your mod, and manage application settings.

Technical Requirements

You will need to download the GIANTS Editor and optionally additional software for this chapter. As such, you will need an Internet connection and web browser available to you. The minimum requirements for the GIANTS Editor and other applications are as follows:

  • Farming Simulator 22

  • Windows 10 64-bit

  • Intel Core i5-3330 or AMD FX-8320 or better

  • Nvidia GeForce GTX 660, AMD Radeon R7 265 graphics card or better (min. 2 GB VRAM, DX11/DX12 support)

  • 8 GB RAM

  • 35 GB free hard drive space

Installing the GIANTS Editor

To begin this chapter, we will return to the GDN website (https://gdn.giants-software.com) and head to the Downloads section. If you have not already made a GDN account, you will need to do so before you can download any of the free software on your computer. When you have navigated to the Downloads page, look for the most recent version of the GIANTS Editor available for your platform and game (e.g., Farming Simulator 22). By clicking the product name, you should be prompted to download the executable for the GIANTS Editor. You can see the relevant section of the Downloads page in Figure 2-1.

Figure 2-1
A screenshot presents the G D N window. It lists the downloads with four columns titled product name, platform, size, and date, with its corresponding attributes in 7 rows.

All GIANTS Software applications can be downloaded through the GDN

Once you have downloaded the executable, run it and proceed through the steps listed in the setup wizard. When the setup tasks have been completed, launch the GIANTS Editor application, and you should be greeted by a welcome menu. That is the first step complete!

In the next section, you will learn how to navigate the GIANTS Editor.

The Viewport

With the GIANTS Editor opened for the first time, a “Getting Started” window will pop up showing some useful information to get help about the editor. After closing it, you should see several panels on each side of a gray space. This space, called the viewport, is where you will see the models, map elements, and any other visual part of your mod. Your viewport will not be very interesting without any objects in your scene. Let’s follow these steps to create your first object:

  1. 1.

    Go to the Create menu at the top left of the editor window.

  2. 2.

    Click the Cube button from the Primitives dropdown menu.

We will explore the Create menu and other application menus in greater detail in the “Application Menus” section of this chapter. For now, you should see the cube you have inserted into your scene. Your viewport should look something like what is depicted in Figure 2-2.

Figure 2-2
A screenshot presents the viewport window. It features a 3 D view of the cube with a pop-up menu that includes highlighted shaded and poly count options.

The viewport is the main element you use to see and interact with your scene

Let us now look at how to examine this cube and anything else you may add to your scene.

Movement and Camera Manipulation

Manipulation of your camera in the GIANTS Editor is quite simple. Your camera will move relative to the direction you are facing while holding the right mouse button (RMB):

  • The W key will move your camera forward.

  • The A key will move your camera left.

  • The S key will move your camera back.

  • The D key will move your camera right.

  • Holding the Shift key while moving your camera will cause movement to occur at a faster rate, which is convenient for moving across large areas in the scene.

If you feel that the camera is moving too fast or too slow, you can adjust the speed of the camera by pressing KEY_NUM_MINUS and KEY_NUM_PLUS, respectively. For clarity, these are the plus (+) and minus () buttons on the number pad of a keyboard. The current navigation speed is displayed in the bottom-right corner of the window.

Let us now cover how you interact with objects in your scene. To select an object in your viewport, simply click the physical object with the left mouse button (LMB) or via the Scenegraph Panel, which we will cover in more detail in the “The Scenegraph Panel” section of this chapter. When you have an object selected, you can press F to bring your camera to the object. This is convenient when you have many objects in your scene and want to move your camera to one specifically.

Let us now look at some of the options available to change how we look at objects with the viewport and more.

Viewport Options

By right-clicking anywhere in the viewport, you will bring up a new menu with a list of options as seen back in Figure 2-2. Let us now look at what each of these options does.

Camera

The first option from this list is Camera, which allows you to set your perspective to any camera object within your scene. You may find this feature useful in instances where you want to test a camera object players will eventually use as part of your mod or simply to have multiple viewpoints available in different areas of your scene while in the Editor. Note that you cannot delete a camera object if your perspective is currently set to it.

Framed Rotate

The next option from the list is a toggle for Framed Rotate mode. When this option is enabled, you can move your camera around an arbitrary point in space; this is a very useful feature for examining an object in your scene. To do this, enable Framed Rotate, select an object and press the F key to bring your camera to it, zoom out, and press ALT+LMB to move your camera around its new pivot point.

First-Person Mode

This option enables a special mode that is useful for creating maps. It allows the user to walk through a map like a player using the mouse and the A, S, D, W keys for movement. Note that you should only enable this mode when editing a map as it requires a terrain object in the scene. Use the ESC key to disable the mode again.

Shading Modes

Listed after these options are two modes for viewing your scene; these two modes are called wireframe and shaded. When viewing your scene in shaded mode (the default mode), objects will be rendered (displayed) with shadows and appear as they would in the game. In wireframe mode, you will always be able to see the topology of objects in your scene and see objects through other objects. If you are unfamiliar with the process of 3D modeling, topology refers to the layout of the smaller 3D components that make up your model, often called polygons or tris (triangles).

Show and Selectable

Following these viewing mode options are options for what objects you can see and interact with in your scene. The first Show option includes a dropdown menu and list of object types that are shown only when enabled. Similarly, the Selectable option also produces a dropdown menu where you can choose which types of objects you are able to select with your mouse in the viewport. These settings are convenient when you are working in complex scenes and want to filter only for the types of objects you want to interact with.

Grid

The Grid option shows a grid with 1×1 squares when enabled. The grid can help to give you a frame of reference when creating your scene when terrain is not present as well as keeping objects aligned.

Polycount

Lastly, the Polycount option when enabled will show you additional information about objects you are selecting. This relates back to what you are able to see in the wireframe viewing mode. Because of how computer processing works, the lower the polycount of an object, the less computationally expensive it is to render.

In the following section, we will learn how objects in your scene are structured and how to navigate them all most efficiently.

The Scenegraph Panel

As previously mentioned, the Scenegraph Panel is an important menu that allows you to see all of the objects in your scene. This will become important when you begin programming as you will need to refer to objects in your scene, and this reference will be based on the organization of objects in your scene. You can see how your Scenegraph Panel might look when there are multiple objects in your scene in Figure 2-3.

Figure 2-3
A screenshot of the scene graph pop-up menu. It includes perspective, cube, transform, light, transform, spline, plane, and cube options.

The Scenegraph shows all of the objects contained within your scene

You may notice some objects in Figure 2-3 seem to be a list under another object. This descent is related to how objects are organized in the GIANTS Editor. Let us now explore what this hierarchy is called and how to navigate it.

Entities and the Parent-Child Hierarchy

In the GIANTS Editor (and many other applications like it), objects are stored in what is called a parent-child hierarchy. A parent-child hierarchy is one where an object is stored inside of something (its parent) and the object is the child to its parent. Each object in the engine is an entity with a unique ID used to access it. Please keep in mind that this ID is not persistent and can change on every game or editor startup. An entity can be a TransformGroup, a shape, a camera, etc. The entity type defines a feature set for the object. For example, a camera entity can be used as a viewport camera, a Shape entity has special functions like materials, and Transform entities can be used in the parent-child hierarchy and have a position in the world. Looking at Figure 2-4, you can see three objects: the Scenegraph, a Camera object named perspectiveCamera, and two Transform Group objects named parentTransformGroup and childTransformGroup. In the GIANTS Editor, the Scenegraph is always at the top of the parent-child hierarchy; that is, any objects in your scene are a descendant of the Scenegraph. In this example, perspectiveCamera and parentTransformGroup are direct descendants of the Scenegraph or its children. The Transform object named childTransformGroup is the child of parentTransformGroup; you can alternatively say that childTransformGroup is parented to parentTransformGroup:

Figure 2-4
A screenshot presents the screen graph dialog box. It includes child transform group under parent transform group.

This example shows the parent-child hierarchy of the GIANTS Editor

In the next section, we will look at the application menus of the editor

Application Menus

In this section, we will explore the various application menus in the GIANTS Editor and discuss which options you should know about as a beginning mod creator.

The File Menu

The File menu contains many options related to what you are currently working with inside of the GIANTS Editor. Let us look at each menu option and what they do.

The New button will reset the editor to an empty environment when pressed. Before the environment is cleared, you will be prompted to save any unsaved changes to the current file or to create a new file if you have not saved your work before.

The Open button will open your file explorer and allow you to open any .i3d files you have saved and continue editing them.

The Save and Save As buttons will save your current environment to an .i3d file. If you have not previously saved your work to a file, only the Save As button will be available and will prompt you to select a location on your computer and file name for the file to be stored with. If you have previously saved your work to a file, only the Save As button will prompt you to choose a new location and file name, whereas the Save option will simply overwrite your existing file.

Clicking the Open Mod button will allow you to open mods that have already been exported to mod file formats such as .zip or .xml instead of an .i3d file. Alternatively, selecting the New Mod from Game option will allow you to import game assets to your environment and use them to create a new mod, creating all of the relevant files in a directory of your choice. You can freely use any of the assets or components of them in your new creations.

The Import and Import as Reference options allow you to add 3D models and assets in .i3d or .fbx file formats to your scene. The difference between these options is that Import as Reference will create a link to the file you import. That is, any modifications you make to the original file you imported as a reference will be instantly shown in the file you imported to. This behavior does not occur when using the Import feature – with this, you would need to reimport the file if you wish to bring over any changes you have made.

If you wish to export the 3D elements of your mod, there are three options to choose from. The Export all with Files, Export Selection, and Export Selection with Files options all allow you to convert the objects in your environment into 3D model file formats, such as .i3d and .obj. The meaning of with Files is that it will include files like textures in addition to the base .i3d file. Without exporting with files, textures are referenced only with absolute or relative file paths and thus will not appear if shared with others. The functional difference between the export all and export selection is that export selection will only include objects that you are currently selecting in your scene as opposed to every object in your scene.

The Preferences button will open a menu that contains various settings related to the tools and interfaces of the GIANTS Editor. Not all of these settings will be relevant to you as a beginner, but feel free to explore each of them. If you have set preferences in a previous version of the GIANTS Editor, you can select the Import Preferences option, and the editor will automatically transfer over your preferences.

Lastly, hovering over the Recent Files button will produce a dropdown menu of any files you have recently worked with in the GIANTS Editor. Do note that opening recent files from this menu will change your scene without prompting you to save. Save any changes you have made to your scene before opening a recent file from this menu.

In the next section, we will discuss the Edit menu and the meaning of each option it contains.

The Edit Menu

The Edit menu contains a list of options related to actions you make in the editor in addition to the key bindings associated with them. Let us look at some of these options and what each of them does:

  • Undo – Undo your last action

  • Redo – Redo your last action

  • Clear History – Clear the list of last actions

  • Cut – Copy and remove an item from your scene

  • Copy – Copy an item from your scene

  • Paste – Add a copied item to your scene

  • Delete – Delete a selected item from your scene

  • Duplicate – Duplicate a selected item in your scene

  • Replace – Replace objects of one type with another throughout the scene

Some other options this menu provides include Freeze Transformation, Move to Camera, and Interactive Placement. Freeze Transformations will allow you to set the frame of reference for a selected object to its parent for different properties. For example, if an object parented to your scene (top of the hierarchy) is moved from the origin (global center of your scene) and you apply this option to the Translate property, it will treat it as unmoved from the origin. Another example is if your object is rotated and you apply this option with the Rotate property selected, the rotation arcs will reset as if the object was not rotated. You will likely not need to use this option until you are a more advanced creator or find a situation where this is particularly helpful.

The Move to Camera option allows you to set the position and orientation of a selected object to that of your camera. This is convenient if you want to orient something based on your camera’s perspective rather than trying to estimate with your tools.

Finally, the interactive placement button lets you freely place a selected object where your mouse is when the left mouse button is held down if your mouse is intersecting another object in your scene.

Do note the key bindings associated with each action we have covered as pressing these will be quicker than navigating to the menu.

You are also able to detach this application menu for quick access.

In the next section, we will look at the options in the Create menu.

The Create Menu

The Create menu displays options to insert objects into your scene. In the GIANTS Editor, there are six primary types of objects:

  1. 1.

    Transform Group

  2. 2.

    Light

  3. 3.

    Camera

  4. 4.

    Audio Source

  5. 5.

    Spline

  6. 6.

    Navigation Mesh

  7. 7.

    Note

  8. 8.

    Primitives (e.g., Cube, Plane, etc.)

Clicking a create option will create the object (see Figure 2-5), add it in the Scenegraph, select it, and show its values in the attribute window on the right-hand side of the GIANTS Editor. The Edit Menu section, we already created a cube primitive by using the Create menu. Try to explore the other actions of the Edit menu and see the effects of each.

Figure 2-5
A screenshot presents the GIANTS editor page that lists the options under Create with highlighted primitives and a cube. It features a 3 D view of the cube over a gridded surface.

You can insert primitive objects and more via the Create menu

In the next section, we will look at the View menu.

The View Menu

The View menu is, as the name implies, important to how you view your scene – particularly in viewing 3D models. Most of the options contained in this menu were covered in the earlier “Viewport Options” section. We will discuss only the options that were not covered previously.

The first of these is the Enable TAA option; when enabled, temporal anti-aliasing will be used in rendering your scene, resulting in less jaggedness around objects and textures which creates a better appearance.

The Profile menu produces a dropdown menu when hovered over that shows presets for graphical quality in the viewport. If you are experiencing a low frame rate or other poor performance while editing, you should lower this setting.

Debug and Texture Streaming items show more advanced features of the editor that are normally not used by modders. They are included in the editor because the GIANTS Editor is also used by the GIANTS Software team internally to develop the game.

The following section will explore the contents of the Scripts menu.

The Scripts Menu

The Scripts menu contains a list of all available scripts. Through this menu, you can select the Create new script option to create new scripts. We will explore this more in the “Scripting” section of this chapter. For now, we will continue to the next section and discuss the Window menu.

The Window Menu

The Window menu allows you to toggle visibility or window mode for the various menus of the GIANTS Editor. Many of these windows are visible by default, including the Scenegraph, Viewport, Console, and Attributes windows. Feel free to look at any windows that are not visible by default, but we will cover almost all of these in future chapters as they become relevant. In the meantime, you can change where in the application most windows are displayed by clicking and dragging the top of most windows you currently have visible. This is a point of customization for you to make your environment as efficient for you to work in as possible.

We will now look at the options in the Help menu.

The Help Menu

The final application menu of the GIANTS Editor is the Help menu. This menu contains a list of options related to information about the editor itself and additional resources for its use. Almost all of these options will redirect you to the GDN, which we covered in the first chapter. This serves as a good reminder of the value of the resources that can be found on the GDN.

Now that we have covered all of the application menus of the GIANTS Editor, we will look at other windows and elements you should familiarize yourself with.

The Attributes Panel

When an object in your scene is selected, you will see properties about the object displayed in the Attributes Panel. Properties are values that change the behavior or appearance of an object in your scene. For objects of the Primitive type, some properties include Translate, Rotate, and Scale which refer to the position, orientation, and size of the object, respectively. The properties displayed in the Attributes Panel will change depending on the type of object you have selected as different objects have different functionalities. You can see what the Attributes Panel might look like when a Cube is selected in Figure 2-6.

Figure 2-6
A screenshot presents the attributes dialog box that lists the options under transform, which includes fields for name, I d, index path, translate X, translate Y, translate Z, rotate X, rotate Y, rotate Z, scale X, scale Y, scale Z, clip distance, and object mask.

The Attributes Panel shows the properties of a selected object, a cube in this case

An important attribute shown in Figure 2-6 is Clip Distance and Min Clip Distance. These properties are used to determine from how far or near away an object should be visible. In the figure, the cube will not be visible once it is 300 meters away from the current camera (the hardware scalability settings can have an effect on this value). Setting a sensible value for this property can greatly improve performance when there are many objects in your scene. Min Clip Distance is set to 0 in our example. That means it’s visible in the range of 0–300 meters. If you want to hide an object within a certain distance, you can set Min Clip Distance to 40, for example. With this setup, the object will be invisible if the camera to object distance is lower than 40 meters or greater than 300 meters.

As a creator, you can also define custom properties for objects via the User Attributes window. These custom properties can be valuable for keeping track of information or making settings for systems when creating your mods.

In the following section, we will discuss the tools and benefits of the Toolbar.

The Toolbar

The Toolbar is an element of the editor where you can quickly access a variety of tools and actions. In the toolbar are five primary sections called File, Play, Mode, Terrain, and Miscellaneous. You can additionally create buttons in your toolbar that will run programs you’ve written when pressed; we will cover this in the “Scripting” section of this chapter. You can see the whole Toolbar in Figure 2-7.

Figure 2-7
A screenshot of the toolbar. It includes file, edit, create, view, scripts, window, and help, along with several tool icons.

The Toolbar contains buttons for different actions and tools

File Section

The File section includes nine buttons as shown in Figure 2-8. The following actions are available:

  1. 1.

    Create a new i3D file

  2. 2.

    Open an existing i3D file

  3. 3.

    Open the current file in a text editor

  4. 4.

    Reload the current file

  5. 5.

    Save the current file

  6. 6.

    Save the current scene in a new file

  7. 7.

    Import an i3D file to the current scene

  8. 8.

    Undo the last action

  9. 9.

    Redo the last action

Figure 2-8
A screenshot of the toolbar with several tools. It includes the following tools, new file, open existing file, open current file, reload the current file, save the current file, save the current scene, import a file, undo, and redo.

File toolbar

Play Section

The Play toolbar allows you to test your mod, in different ways. The first test option, indicated by the play button icon (Figure 2-9), will begin physics simulation, play sounds, and additional rendering like showing particle emission and animations. The option indicated by the eye icon lets you test your mod in first-person mode. In this mode, you will be able to walk around the map of your mod and interact with objects from a first-person perspective and feel the effects of gravity like walking around in Farming Simulator.

Figure 2-9
A screenshot of the toolbar. It features a play and view tool icon.

Play toolbar

Mode Section

Let us now look at some of the different options shown in the Mode section of the Toolbar for manipulating objects within your scene (Figure 2-10).

Figure 2-10
A screenshot of the toolbar with 6 options. It features explore mode, switch between Map and Model views, navigate modules, and zoom in and out.

Mode toolbar

Local/World Mode

This button toggles the object mode between world space and local space manipulation. In the scenegraph hierarchy, the transform attributes of an object are stored relative to the parent object, so-called local space attributes. By default, the manipulation of the object within the viewport is based on local space transformation. You can change this by activating the world space mode. Now the movement is independent of the parent object.

Snapping

With the snapping button, you can toggle the snapping mode. Using the down pointing arrow, you can set the snap deltas. For example, if you set the snap value to “1.000” and try to move an object, it will move in 1 m steps.

Let’s now have a look at the different manipulation modes. Note that when none of these modes are selected (default), all three tools are available when an object is selected. If you gain mastery over these different modes, this setting may be preferable to quickly manipulate an object without any switching.

Translation Mode

When in Translation mode (shortcut: W key), selected objects will show three arrows and three planes through which to move the selected object. When using the arrows, the object will simply follow in the direction you drag your mouse along the axis indicated by the arrow you grab.

When using the planes to move objects, the object will freely follow the movement of your mouse except on the axis of the plane you selected. Try translating a primitive object using the arrows; notice how the Translate attributes change and how each axis (X, Y, or Z) is affected by exactly one of the arrows. You can see a reference for these axes and their color-coded handles in Figure 2-11.

Figure 2-11
An illustration presents a 3 D view of the cube. The axis and its corresponding lines are represented in three different shades.

The Translate tool allows you to move objects along the X, Y, and Z axes

Rotation Mode

The Rotation mode (shortcut: E key) shows three arcs with which to rotate a selected object. Like the Translate mode, each color-coded arc corresponds to an axis of rotation. Try rotating a primitive object and seeing how the Rotate attributes are changed. Do note which arc corresponds to which axis may not be intuitive as the arcs rotate around the previously illustrated axes. Figure 2-12 visualizes this difference.

Figure 2-12
An illustration presents a 3 D view of the cube. The axis and its corresponding lines are represented in three different shades. It includes three arcs of the rotation mode to rotate a selected object.

The Rotate tool allows you to rotate around the Translation axes

Scaling Mode

The Scaling mode (shortcut: R key) allows you to scale objects in your scene with a set of three handles similar to the translation arrows. When scaling a primitive object, the amount you scale by is mirrored across the axis. That is, positively scaling along the Y axis (vertically) 1 unit in this mode increases the total size by 2 units. Whenever you want to make something bigger or smaller in your scene, you should use this mode.

Miscellaneous Section

The Miscellaneous section brings up three different actions (Figure 2-13):

  1. 1.

    Prefab Explorer to download existing objects (e.g., buildings)

  2. 2.

    Reload all textures of the current scene

  3. 3.

    Reload textures of the selected object

Figure 2-13
A screenshot of the toolbar. It includes the following tools, prefab explorer, reload all textures of the current scene, and reload textures of the selected object.

Miscellaneous toolbar

Terrain Section

If you want to create maps of your own, you will need something to stand on; this is where terrain comes in. The toolbar (Figure 2-14) has the following elements to modify the terrain:

  1. 1.

    Terrain sculpting

  2. 2.

    Terrain painting

  3. 3.

    Mesh/object painting

  4. 4.

    InfoLayer painting

  5. 5.

    Procedural painting

  6. 6.

    Foliage painting

Figure 2-14
A screenshot of the toolbar. It includes the following tools, terrain sculpting, terrain painting, mesh painting, info layer painting, procedural painting, and foliage painting.

Terrain toolbar

But first of all, you need a terrain node in your scenegraph. To add one, follow these steps:

  1. 1.

    Go to the File menu.

  2. 2.

    Select the New Mod From Game option.

  3. 3.

    Import one of the maps from the Item dropdown menu.

This will import all of the files and assets from the game into a new working directory of your choice. With a map now imported, we can begin to modify its terrain with the different terrain modification modes of the GIANTS Editor. Before exploring the tools and modes for editing, we will need to open the Terrain Editing window from the Window application menu to see and control how we modify our terrain. With this window opened, we will start by using the Terrain sculpt mode as an example.

Let us first select terrain sculpt mode, which is indicated in the Toolbar by the icon with the up and down arrows as seen in Figure 2-15.

Figure 2-15
A screenshot of the terrain sculpts mode icon that has the up and down arrow over a rough terrain.

Terrain sculpt mode can be toggled via the Toolbar

Once you have the tool selected, you will not be able to move your camera as usual until you deselect the tool, which can be done by clicking the icon again. To move your camera when in this mode, you can use Alt+RMB to move forward and backward in the direction the camera is facing. Additionally, you can use Alt+LMB to rotate the camera and Alt+LMB+RMB to move the camera along the relative X and Y directions. Do note these movement modes are also available when not using the terrain editing modes.

Returning to the sculpt mode, you can use LMB to grow terrain upward, RMB to shrink terrain downward, and middle mouse button (MMB) to smooth terrain by default. Additionally, by pulling your mouse wheel back, you can increase the size of the area that will be affected by the tool. Oppositely, you can push the mouse wheel forward to decrease the size of the affected terrain area. These settings, among others, can be changed in the Brush section of the Terrain Editing window. Note also that from this window you can change the shape of your brush from a circle to a square. You can see what sculpting grass-textured terrain in your scene with a circular brush might look like in Figure 2-16.

Figure 2-16
A 3 D view of a location. It features a raised grassy terrain and is highlighted by a spherical-shaped bounding box, using a terrain sculpt mode tool.

You can use terrain sculpt mode to modify terrain in your scene

While there are more terrain editing features and modes, these will be the most relevant to you as a beginner making your mod. As with other topics we have covered, you are encouraged to explore anything we did not cover. The next section will give you a first look at programming and some of the elements of the GIANTS Editor relevant to it.

Scripting

In this last section, you will get your first taste of programming by creating your first script, which is what we call a file that holds code. To add a new script, follow these steps:

  1. 1.

    Navigate to the Scripts application menu.

  2. 2.

    Select Create New Script.

  3. 3.

    You will be prompted to enter a name for your script.

  4. 4.

    Enter a name of your choice – perhaps test.

The Script Editor should appear within a new window in the GIANTS Editor and include some comments by default. Comments are lines of code that don’t do anything and simply hold text; in Lua, comments are lines that begin with two dashes (--). After these lines, add a new line with the following content:

print("Hello world!")

Hello world! is a traditional first line of code for many programmers. With this line written in your script, click Save and then Execute. You should see the output of your program in the Output window of the GIANTS Editor. Note that you can access the Script Editor at any time via the Windows application menu. As mentioned in “The Toolbar” section of this chapter, you can assign a script you create to a button in one of five custom script toolbars. Having a shortcut to a script in the toolbar is a handy way to speed up the modding process. For example, as a map creator, you could create a script that perfectly aligns fences. With the shortcut button in the toolbar, you would simply need one click to align the fences.

To add a script to the toolbar, open it in the Script Editor; at the top of the window, select one of the script button slots from the dropdown menu next to the Toolbar label for your script to be assigned to, as seen in Figure 2-17. You can upload an icon so that you can easily identify each of your scripts. Once you’ve done this, simply click the button with your chosen icon in the Toolbar, and you should see the output of the script in the console.

Figure 2-17
A screenshot presents the script editor dialog box that lists the options under test. It includes the name and toolbar. The toolbar consists of a dropdown menu with highlighted scripts 1.

You can bind scripts to Toolbar buttons to be conveniently run when pressed

There you go, your first program is complete! You will learn the fundamentals of Lua and how to make more complex systems in Chapter 3, “The Lua Programming Language.” For now, let’s look at what other editor elements are relevant to writing and running Lua code.

The Console

The Console is a window of the GIANTS Editor that can be used to write and execute Lua code. After writing your code in the textbox of the Console, press Shift+Enter to have that code execute instantly. This is useful when running simple commands or doing math with what’s offered by the Lua libraries but also to affect things in your scene, such as changing fog or other properties. In the next chapter, you will gain experience with the Console as you execute simple programs to gain familiarity with the Lua programming language.

Summary

In this chapter, you learned how to use the GIANTS Editor and what tools and features it offers. You should now feel comfortable creating and changing the properties of new objects, managing application settings, creating and executing a script, and manipulating elements of your environment like terrain with built-in tools.

The next chapter will teach you to program in the Lua programming language and about general programming constructs that will be key components of your future as a mod creator and as a programmer more generally. By the end of the following chapter, you will be able to make your own programs in Lua with proper style and the knowledge to produce optimized code.