You are on page 1of 67

Scripting Farming Simulator with Lua

Zander Brumbaugh
Visit to download the full and correct content document:
https://ebookmass.com/product/scripting-farming-simulator-with-lua-zander-brumbaug
h/
Zander Brumbaugh and Manuel Leithner

Scripting Farming Simulator with Lua


Unlocking the Virtual Fields
Zander Brumbaugh
Seattle, WA, USA

Manuel Leithner
Buttenheim, Bayern, Germany

ISBN 979-8-8688-0059-7 e-ISBN 979-8-8688-0060-3


https://doi.org/10.1007/979-8-8688-0060-3

© GIANTS Software GmbH 2024.


This book is an open access publication.

Open Access This book is licensed under the terms of the Creative
Commons Attribution 4.0 International License (http://​
creativecommons.​org/​licenses/​by/​4.​0/​), which permits use, sharing,
adaptation, distribution and reproduction in any medium or format, as
long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if
changes were made.
The images or other third party material in this book are included
in the book's Creative Commons license, unless indicated otherwise in a
credit line to the material. If material is not included in the book's
Creative Commons license and your intended use is not permitted by
statutory regulation or exceeds the permitted use, you will need to
obtain permission directly from the copyright holder.

This work is subject to copyright. All rights are reserved by the


Publisher, whether the whole or part of the material is concerned,
specifically the rights of translation, reprinting, reuse of illustrations,
recitation, broadcasting, reproduction on microfilms or in any other
physical way, and transmission or information storage and retrieval,
electronic adaptation, computer software, or by similar or dissimilar
methodology now known or hereafter developed.

The use of general descriptive names, registered names, trademarks,


service marks, etc. in this publication does not imply, even in the
absence of a specific statement, that such names are exempt from the
relevant protective laws and regulations and therefore free for general
use.

The publisher, the authors, and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.

This Apress imprint is published by the registered company APress


Media, LLC, part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY
10004, U.S.A.
Foreword
As the CEO of GIANTS Software, I am pleased to introduce this book on
scripting with Farming Simulator Lua. The modding community has
always been an essential part of Farming Simulator’s success, and our
developers have worked tirelessly to ensure that they have the tools
they need to create incredible mods.
Since its inception in 2008, the Farming Simulator franchise has
seen tremendous growth. Our community has been a significant factor
in this success, and we continue to support and encourage modders to
create innovative and exciting mods for our game. Scripting is a critical
aspect of modding in Farming Simulator, and we recognize that it can
be challenging for newcomers to grasp. With this book, we aim to
demystify the scripting process and provide a comprehensive guide to
creating Lua scripts that can enhance gameplay and introduce new
features.
This book is the result of our collaboration with Zander Brumbaugh.
The book provides a step-by-step approach to scripting, starting with
the basics and progressing to more advanced topics, making it suitable
for beginners and experienced modders alike. Our hope is that this
book will inspire and encourage modders to push the limits of what is
possible in Farming Simulator. I am constantly amazed by the creativity
and ingenuity of our community, and we believe that this book will help
take modding to the next level.
Finally, I would like to express my gratitude to the global Farming
Simulator modding community for their continued support and
contribution to the Farming Simulator franchise. With this in mind, we
have made every effort to ensure that this book is accessible to
modders of all backgrounds and skill levels. We have included examples
and explanations that are easy to understand, regardless of your
experience with scripting. In conclusion, I would like to thank the two
authors of this book for their hard work and dedication. They have
done an outstanding job of creating a comprehensive guide to scripting
with Lua in Farming Simulator. I am confident that this book will
become an invaluable resource for modders and will help drive the
modding community forward.
Happy modding!
Christian Ammann
Founder and CEO, GIANTS Software
Introduction
About Farming Simulator
Since its initial release in 2008, Farming Simulator has been the
premier farming simulation video game. As new generations of the
game have been released, there have been increasingly new ways to
play and build any farm you can imagine. Something that makes
Farming Simulator truly unique is the ability to create your very own
mods.
Mods are a way for you to make Farming Simulator your own,
unique experience through modifying the game in a variety of ways.
With mods, you can create something as simple as a new vehicle or a
whole map, give yourself infinite money, or even change the game in its
entirety. With many resources available and a large community of
passionate creators, getting started with mod development is easier
than ever.
The best part of this system is that many creators are already
earning a living by making new mods. Whether you wish to be a mod
creator only as a hobby or want to pursue it full-time, there are plenty
of opportunities for you.

What You’ll Learn


This book will take you on a deep dive into the many resources, tools,
techniques, and opportunities available to you as you begin or continue
your journey as a mod creator. By the end, you should feel confident in
your ability to make programs in the Lua programming language,
import 3D models, and ultimately create any mod you can envision.
Any source code or other supplementary material referenced by the
author in this book is available to readers on GitHub. For more detailed
information, please visit https://www.apress.com/gp/services/source-
code.
Table of Contents
Chapter 1:​Introduction, GDN, ModHub, Modding Tutorial Videos,
LuaDoc, FarmCon…
Technical Requirements
Exploring the GDN
Modding Resources
Video Tutorials
Documentation
Community Forum
Downloads
LuaDoc
YouTube
Looking at the ModHub
Financial Opportunities of Mod Creation
How to Attend FarmCon
Participating in the Mod Contest
Summary
Chapter 2:​Getting Started with the GIANTS Editor
Technical Requirements
Installing the GIANTS Editor
The Viewport
Movement and Camera Manipulation
Viewport Options
The Scenegraph Panel
Entities and the Parent-Child Hierarchy
Application Menus
The File Menu
The Edit Menu
The Create Menu
The View Menu
The Scripts Menu
The Window Menu
The Help Menu
The Attributes Panel
The Toolbar
File Section
Play Section
Mode Section
Miscellaneous Section
Terrain Section
Scripting
The Console
Summary
Chapter 3:​The Lua Programming Language
Technical Requirements
Learning About Data Types and Creating Variables
Data Types
Setting and Manipulating Variables
Numbers
Booleans
Strings
Tables
Dictionaries
Conditional Statements
Declaring and Using Loops
for Loops
Iterator Function
while Loops
repeat Loops
Learning About Functions
Functions in Programming
Recursion
Classes
Demonstrating Programming Style and Efficiency
General Programming Style Rules
Summary
Chapter 4:​The GIANTS Studio
Technical Requirements
Installing the GIANTS Studio
Application Menus
The File Menu
The Edit Menu
The View Menu
The Debug Menu
The Window Menu
The Help Menu
New Project
Starting the Game
Debugging Scripts
Using Breakpoints
Using the Locals Tab and the Callstack
Summary
Chapter 5:​Making a Diner with a Rotating Sign
Technical Requirements
Preparing the Mod Folder Structure
Creating Mod Scripts
Creating XML Files
Creating Lua Files
Testing the Mod
Summary
Chapter 6:​Rotating Mower Mod
Technical Requirements
Creating Mod Scripts
Creating XML Files
Creating Lua Files
Testing the Mod
Summary
Chapter 7:​Speed Trap Trailer Mod
Speed Trap Trailer Mod
Technical Requirements
Creating Mod Scripts
Creating XML Files
Creating Lua Files
Testing the Mod
Summary
Chapter 8:​Mileage Counter HUD Mod
Technical Requirements
Creating Mod Scripts
Creating XML Files
Creating Lua Files
Testing the Mod
Summary
Chapter 9:​Multibale Spawner Mod
Technical Requirements
Creating Mod Scripts
Creating XML Files
Creating Lua Files
Testing the Mod
Summary
Chapter 10:​Money Cheat Mod
Technical Requirements
Creating Mod Scripts
Creating XML Files
Creating Lua Files
Testing the Mod
Summary
Chapter 11:​Publishing on the ModHub
Technical Requirements
What Is the ModHub?​
Creating an Account
ModHub Creation Guidelines
Using the TestRunner
Uploading Your First Mod
Getting Feedback and Updating Your Mod
Rewards and Awards
Summary
Chapter 12:​Documentation and Appendix
Debugging
print
printCallstack
Position, Orientation, and Size
getWorldTranslat​ion
setWorldTranslat​ion
setTranslation
getTranslation
worldToLocal
localToWorld
localToLocal
setRotation
getRotation
getWorldRotation​
setWorldRotation​
localRotationToW​orld
worldRotationToL​ocal
worldDirectionTo​Local
localDirectionTo​Local
localDirectionTo​World
setDirection
setScale
getScale
Entities
clone
createTransformG​roup
setName
getName
setVisibility
getVisibility
setUserAttribute​
getUserAttribute​
getHasClassId
ClassIds Enum
Entity Relations
link
unlink
getParent
getChild
getChildAt
getNumOfChildren​
getRootNode
Camera
getCamera
setCamera
I3D
loadI3DFile
loadSharedI3DFil​e
LoadI3dFailedRea​son Enum
streamI3DFile
cancelStreamI3DF​ile
streamSharedI3DF​ile
releaseSharedI3D​File
Physics
getRigidBodyType​
RigidBodyType Enum
setRigidBodyType​
getCenterOfMass
setCenterOfMass
getMass
setMass
raycastAll
raycastClosest
raycastCallback
overlapBox
overlapSphere
overlapCallback
Network
streamReadBool
streamReadFloat3​2
streamReadInt16
streamReadInt32
streamReadInt8
streamReadIntN
streamReadString​
streamReadUInt16​
streamReadUInt8
streamReadUIntN
streamWriteBool
streamWriteFloat​32
streamWriteInt16​
streamWriteInt32​
streamWriteInt8
streamWriteIntN
streamWriteStrin​g
streamWriteUInt1​6
streamWriteUInt8​
streamWriteUIntN​
Index
About the Authors
Zander Brumbaugh
is a programmer, game designer,
technical author, and AI researcher
based in Seattle, Washington. His work
as an independent developer on the
Roblox platform has been played more
than 300 million times. He has created
popular games like My Salon, Power
Simulator, Munching Masters, and more.
Zander is also a multiple-time best-
selling textbook author, with works on
programming and game development.
He currently attends the the Paul G. Allen
School of Computer Science and
Engineering at the University of
Washington where his research focuses on the improvement of
language models for real-world settings.

Manuel Leithner
is a senior gameplay programmer based
in Buttenheim, Germany. While working
on his bachelor’s and master’s degrees in
business informatics/information
systems, he started modding for Farming
Simulator 2008, the first title of the
series. A few years later, he worked as a
freelancer for GIANTS Software on
several DLCs and major game releases. In
2015, a branch office in Erlangen,
Germany, was opened, and he became
the head of the office as a branch
manager. Since then, he has also become
the lead gameplay programmer and responsible for gameplay across
the whole franchise.
About the Technical Reviewer
Simon Jackson
is a long-time software engineer and
architect with many years of Unity game
development experience, as well as an
author of several Unity game
development titles. He loves to both
create Unity projects as well as lend a
helping hand to educate others, whether
it’s via a blog, vlog, user group, or major
speaking event.
His primary focus is with the Reality
Toolkit project, which is aimed at
building a cross-platform Mixed Reality
framework to enable both VR and AR
developers to build efficient solutions in
Unity and then build/distribute them to as many platforms as possible.

OceanofPDF.com
© The Author(s) 2024
Z. Brumbaugh, M. Leithner, Scripting Farming Simulator with Lua
https://doi.org/10.1007/979-8-8688-0060-3_1

1. Introduction, GDN, ModHub, Modding


Tutorial Videos, LuaDoc, FarmCon…
Zander Brumbaugh1 and Manuel Leithner2
(1) Seattle, WA, USA
(2) Buttenheim, Bayern, Germany

In this chapter, we will explore the GIANTS Developer Network (GDN)


and other important resources and materials available to mod creators
(you!).

Technical Requirements
You will not need any software or additional materials for this chapter
as it will mostly cover information. However, it may be beneficial to
have an Internet connection and web browser available to you to search
any topics covered in further detail or visit any websites mentioned.

Exploring the GDN


The GIANTS Developer Network (GDN) is the hub for all mod
creation–related materials for Farming Simulator. Through the GDN,
you can talk with other mod developers, view documentation for
Farming Simulator and mod creation tools, watch tutorials, and make
sure all the software you are using is up to date. Please note that you
need to create an account to access the full feature set of the website.
You can see a preview of the GDN website in Figure 1-1.
Figure 1-1 The GDN contains all of the necessary resources to make great mods of
your own
In this section, we will explore all aspects of the GDN. If you want to
navigate the website yourself while reading, you can use the following
link:

https://gdn.giants-software.com

Modding Resources
The GDN includes different sections that can prove to be excellent
resources at any level of mod creation experience. In this section, we
will cover each section and discuss what information they cover.

Video Tutorials
The Video Tutorials section of the GDN contains groups of videos
which give you a step-by-step guide on how to create a variety of in-
game systems for your mods from scratch. Some of these topics include
map creation, gameplay mods, sound design, effects, and more. These
tutorials can be a helpful addition to this book for learning critical
modding skills.
In addition to the free tutorials, there are other video contents from
events such as FarmCon, which we will discuss in greater detail in the
FarmCon section of this chapter. These videos are a good source of
information about the best techniques and practices when creating
mods of your own.
The newest 5.0 tutorials are paid tutorials that cover most recent
release content. While access to these tutorials is paid, they are
included with the collector’s edition of Farming Simulator.

Documentation
The documentation section is one of the most important parts of the
GDN, as it contains all official information for working with the GIANTS
Editor, in-game interactions, mod creation, and the Lua programming
language. Do note that the documentation section of the GDN is
different from the documentation section on the main Farming
Simulator website, which teaches you how to play the game rather than
develop mods.
Under the Fundamental Reading section, there are links to the
Editor and Studio documentation. The Editor documentation contains
detailed information about using the GIANTS Editor, the main piece of
software you will use when creating your mods. The editor allows you
to combine both programming elements and physical, 3D elements to
create more advanced mod types. You will learn how to navigate and
use the GIANTS Editor in Chapter 2, “Getting Started with the GIANTS
Editor.” The Editor section of the GDN is something we will refer back to
frequently.
The GIANTS Studio is a new tool for creating, editing, and
debugging script mods. It works as an editor and a “remote” debugger
in one. It interacts with the game as you create your mod and provides
you with valuable information. Because of how the application is
designed, it is a powerful environment that allows you to work on
multiple mods at once. The studio is a separate application from the
editor and will be important when you begin creating your own scripts
in Lua.
The Scripting section of the GDN covers all of the vital information
relating to the Lua programming language and how it relates to
creating mods for Farming Simulator. We will cover this section in more
detail in the LuaDoc section later in this chapter.
The Content Creation section covers fundamental information
about importing 3D assets from various popular 3D modeling
applications, including Maya and Blender. For clarity, 3D modeling is
the process of making all of the items you see and are able to interact
with in the game; people who make 3D models are called 3D modelers.
To put it simply, 3D models include all of the “things” you see in the
environment around you.

Community Forum
The forum is an excellent place to connect with other mod creators.
Here, you can ask for help with specific issues you run into when
developing your mods and get answers from other experienced users in
a short amount of time. Additionally, you can have general developer
discussion about best practices, software tips, and more. Like the
Documentation section, do note that the forum of the GDN is different
from the forum on the main website, which is for general discussion
about Farming Simulator and the player community rather than mod
creation. Figure 1-2 contains a preview of the forum.

Figure 1-2 The GDN Forum is valuable for getting feedback and support from other
creators
Let us look now at each category of the forum and its purpose.
The Engine category of the forum is dedicated to discussion about
the game engine of Farming Simulator. If you are a beginning developer,
you will likely not need to interact with this section as it mostly covers
advanced topics of how the programming language interacts with the
game engine or how applications like the GIANTS Editor are
implemented at the technical level.
The Exporter category of the forum is where mod creators can
request help or talk about methods of using 3D modeling applications
for creating or importing models for use with their mods. For example,
if there is a tractor model you want to include in your mod but are
having difficulty exporting it, you can post in this section and see if
other creators have a solution to your problem.
The Modding category is an important part of the forum as it is
where you should post any questions related to your work on mods. For
instance, if you are not sure how to accomplish some sort of behavior
or have an idea but are running into an issue, you can post your
question here and have other members of the community assist you.
Additionally, there is a Miscellaneous category which includes four
subcategories, those being Feedback, Feature Requests,
Documentation, and Off Topic. The Feedback category is where you
can make general comments about your experience with Farming
Simulator or any applications you use for making your mods. The
GIANTS Software team always values community feedback when
making updates and deciding which direction to take the game.
The Feature Requests category is like the Feedback category but
specifically where you can request new features or make suggestions
for changes. While your suggestions are not guaranteed to be
implemented, features and other additions that improve the gameplay
or development experience will always be considered.
The Documentation category of the forum is where you can ask
questions or make suggestions regarding the Documentation section of
the GDN.
The Off Topic category is used for general development discussions
or any topics that do not fall into any of the other categories.

Downloads
The Downloads section of the GDN is where you should always look to
find the newest, updated versions of development applications made by
GIANTS Software, including the GIANTS Editor and the GIANTS Studio.
In addition to applications, there are also plug-ins and other add-ons
for third-party software to make a more streamlined development
experience. In this section, we will review which each category of the
Downloads section offers.
The Editor category contains a list of releases for the GIANTS
Editor. To ensure that you are able to take advantage of the newest
features, make sure to download the most recent release version. We
will walk you through the download process in Chapter 2, “Getting
Started with the GIANTS Editor,” which covers the GIANTS Editor.
The Exporter category includes plug-ins for various popular 3D
modeling applications. These plug-ins create a more streamlined
development experience by handling metadata and doing certain tasks
as you export your 3D models for use in Farming Simulator mods. The
applications currently supported include Blender and Maya.
The Studio category has a list of releases for the GIANTS Studio. As
mentioned in the “Documentation” section, the Studio is a relatively
new tool, so there are fewer versions released compared to the editor.
Like the GIANTS Editor, you will want to make sure you have the latest
version of the application installed to take advantage of the newest
features and bug fixes. We will also cover the setup process for this
application in Chapter 4, “The GIANTS Studio.”
The Other Tools category of the Downloads section includes a
limited amount of task-specific tools that may improve your experience
creating mods. You are unlikely to interact with these tools until you are
somewhat advanced as a creator but you are encouraged to explore
nonetheless.
The Modding category includes applications, documents, images,
and other media related to mod creation.
The Miscellaneous category includes any relevant downloads that
do not fall into any other listed categories.

LuaDoc
In Chapter 3, “The Lua Programming Language,” you will learn how to
use the Lua programming language. Programming is what brings life
to games and game systems. Any interactions you see, such as clicking a
button and causing something to happen, are a result of programming.
Those who program are called programmers. Lua is a fast, lightweight
programming language that uses many universal programming
constructs. So whether you are already an experienced programmer or
have never done any programming before, you will learn everything
from the basics to intermediate concepts in this book.
LuaDoc refers to the Lua documentation made by GIANTS Software.
This documentation is included under the Documentation section of
the GDN. For convenience, a link directly to the FS22 version of LuaDoc
has been included here:

https://gdn.giants-
software.com/documentation_scripting_fs22.php
LuaDoc includes information not only about the Lua language but
specifically how your programs are meant to interact with existing
systems within Farming Simulator. Furthermore, much of the source
code for the game systems within Farming Simulator are documented
here and available to view through the GIANTS Studio.

YouTube
YouTube and other video streaming platforms also have many video
tutorials available that you may find useful. Often, these videos may
make a specific system or cover a specific issue that you will not find on
the official site. However, as these videos are not official, they may not
use the best practices and are not officially endorsed.

Looking at the ModHub


The ModHub is where you will publish your mods for all players to be
able to use. The ModHub has different categories including maps, many
different types of vehicles, and different buildings or farm technologies
for players to include in their game.
The best-performing and highest-quality mods can appear in
several algorithmic categories including Latest and Top Downloaded.
These categories are then featured to players on the front page of the
ModHub.
When users download your mod, they can leave a review on a five-
star scale. Naturally, mods with a higher rating are more likely to be
downloaded by other players and find their way into the sorts shown
earlier. With dedication, your mods can also see wide usage and be
shown at the top of these sorts. You can see a preview of the ModHub
and the mentioned categories in Figure 1-3.
Figure 1-3 The ModHub lets users discover new mods and enhance their Farming
Sim experience
Next, we will look at how many mod creators are already earning
money by making their Farming Simulator mods available to the
community.

Financial Opportunities of Mod Creation


As mentioned in the introduction, there are ways to earn money by
creating mods and making them available for all Farming Simulator
players to use. Once you create a quality mod, it must go through a
manual approval process. This process ensures that the mod does what
it claims to do and that it is free of any prohibited content. This content
can vary, but copyrighted material, such as specific brands or
companies, are generally not permitted to appear in your mod. If your
mod is approved to be published on the ModHub, you may be eligible to
receive payouts from GIANTS Software based on how many times your
mod is downloaded. Remember, quality mods that receive the best
reviews are more likely to appear in certain categories of the ModHub.
When your mod is featured, more users will be able to see it and
download, allowing you to earn more money from your mod.
In the next section, we will look at the annual Farming Simulator
event, FarmCon.

How to Attend FarmCon


If you become a successful mod creator or just want a new way to
engage with all things Farming Simulator, FarmCon is an annual
convention that attracts members of the community from around the
world. There is simply no better place to connect with other mod
creators and community members.
FarmCon attendees are often the first to see new teasers, trailers,
and announcements about the future of FarmCon. There are also many
presenters with talks focusing on best techniques for players to build
their farming empires and the best tips and tricks for mod creation. You
can see a promotional image from FarmCon 22 in Mannheim, Germany,
in Figure 1-4.
Figure 1-4 FarmCon is an annual convention for all things Farming Simulator
You may have some questions about what your FarmCon experience
might look like or about the logistics of going. The following are some
FarmCon FAQ that might be insightful:
Do I need a ticket for FarmCon?
A ticket is generally required for admission into the venue and in-
person attendance.
Do I have to visit FarmCon to get all the new info?
We will not hide any new information about Farming Simulator at
the event. You can follow announcements on the blog after the event.
What language is FarmCon presented in?
Most presentations at FarmCon in person will be held in German.
I have further questions, how can I contact you?
If you have any further questions about FarmCon, you can contact
us via email at farmcon@giants-software.com.
If you want to stay informed about FarmCon, Farming Simulator,
and other exciting GIANTS Software projects, follow our social media
accounts listed here:
@farmingsimulator @farmingsim
@FarmingSimulator
In the next section, we will look at official mod creation contests
hosted by GIANTS Software.

Participating in the Mod Contest


With each major release of Farming Simulator, there is a contest for
mod creators to participate in. Those who create the best mods or maps
can win some incredible prizes when the winners are announced at the
FarmCon the year following the release. For the winners, prizes have
included computer accessories, cameras, high-end computer graphics
cards, and trips to the factories of various farm equipment
manufacturers.
If this excites you, you will have all the skills you need to participate
by the end of this book. The following are some of the general rules for
participating in the contest:
Contestants – Teams or individuals may create submissions.
Allowed in submission – New mod or map. No skins or prefabs.
Origin – Only self-created mods (3D models, 2D textures,
programming) will be accepted.
Entry – A person or team may only enter once.
In the next section, we will briefly review what you have learned in
this chapter and what to expect in the next.

Summary
In this chapter, you learned about the GIANTS Developer Network and
what resources are available to you as you begin your journey as a mod
creator. You also learned how to engage with other members of the
community and the best ways to learn about events and see important
updates relating to Farming Simulator.
With what you have learned about the mod-making process and
environment from this chapter, you have been set on the path of being
able to make anything you can envision in your mods. In the following
chapter, you will familiarize yourself with the GIANTS Editor, the main
software you will be using for creating your mods.
Open Access This chapter is licensed under the terms of the
Creative Commons Attribution 4.0 International License (http://​
creativecommons.​org/​licenses/​by/​4.​0/​), which permits use, sharing,
adaptation, distribution and reproduction in any medium or format, as long as you
give appropriate credit to the original author(s) and the source, provide a link to the
Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the
chapter's Creative Commons license, unless indicated otherwise in a credit line to
the material. If material is not included in the chapter's Creative Commons license
and your intended use is not permitted by statutory regulation or exceeds the
permitted use, you will need to obtain permission directly from the copyright holder.
OceanofPDF.com
© The Author(s) 2024
Z. Brumbaugh, M. Leithner, Scripting Farming Simulator with Lua
https://doi.org/10.1007/979-8-8688-0060-3_2

2. Getting Started with the GIANTS


Editor
Zander Brumbaugh1 and Manuel Leithner2
(1) Seattle, WA, USA
(2) Buttenheim, Bayern, Germany

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 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. Go to the Create menu at the top left of the editor window.

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 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 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 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. Transform Group

2. Light

3. Camera

4. Audio Source

5. Spline

6. Navigation Mesh

7. Note

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.
Another random document with
no related content on Scribd:
banished after it had been put in force went away and made no
attempt to come back; but in June 1659 four who were more resolute
and determined appeared in Boston with the avowed intention of
defying the law. They were William Robinson, Marmaduke
Stevenson, Nicholas Davis, and Mary Dyer. They were arrested and
sentenced to banishment (September 12th), with the threat that they
should suffer death if they remained or returned to the colony.
Nicholas Davis and Mary Dyer “found freedom to depart; but the
other two were constrained in the love and power of the Lord not to
depart, but to stay in the jurisdiction, and to try the bloody law unto
20
death.” They withdrew to the New Hampshire settlements, but in
about four weeks returned to Boston prepared to die, and were
joined there by Mary Dyer, who had decided to share their fate. They
were arraigned before the General Court, which was then in session,
and admitting that they were the persons banished by the last Court
of Assistants, were sentenced to be hanged in a week from that time
21
(October 19th). The authorities evidently were afraid of popular
sympathy, for they gave orders for a military guard of one hundred
men to conduct them to the gallows, while another military force was
charged to watch the rest of the town, and the selectmen were
instructed to “press ten or twelve able and faithful persons every
night to watch the town and guard the prison.”
Neither side would yield: the Quakers had come back with the
declared purpose of dying for their faith and for the principle of
religious liberty; the authorities did not dare to withdraw from the
position in which they had rashly placed themselves, and the leaders
do not seem to have had any desire to do so. They felt that the
question of their authority was at stake, and that if they yielded their
power over the people would be gone. They were willing to claim for
themselves and their institutions the protection of the laws of
England, but they would not admit any appeal to those laws when
they conflicted with the colonial regulations. They claimed to own the
colony in full sovereignty, in virtue of their charter on the one hand
and their deeds from the Indians on the other, and they argued that
they had the same right to exclude obnoxious and dangerous
persons, and to destroy them if they persistently thrust themselves
upon them, that a householder has of resisting a burglar, or a
shepherd of killing the wolves that break into his sheepfold.
It is a great mistake to say that they had come to the colony from
a zeal for religious liberty. What they had come for was to be in a
place where they could order religious affairs to suit themselves. As
Besse, the Quaker historian, shrewdly remarks: “They appear not so
inconsistent with themselves as some have thought, because when
under oppression they pleaded for liberty of conscience, they
understood it not as the natural and common right of all mankind, but
22
as a peculiar privilege of the orthodox.”
The tragedy was performed on the twenty-seventh day of
October 1659; the prisoners, walking hand in hand, were brought to
the gallows by the soldiers. They were insulted in their last moments
by the bigoted Wilson, and when they tried to address the people
their voices were drowned by the beating of the drums. Robinson
and Stevenson died bravely, and Mary Dyer mounted the ladder to
meet her fate; her skirts were tied, the rope was about her neck, and
she was on the point of being “turned off,” when she was released by
the magistrates in consideration of the intercession of her son, who
had come up from Rhode Island to try to save his mother’s life. She
unwillingly accepted the grudging gift, and went back to Rhode
23
Island.
The popular feeling was so strong against the magistrates for
their severity, that they thought it best to put forth a declaration, in
which they argued that their proceedings were justified by the law of
self-defence, and by the precedent of the English laws against the
Jesuits; and they calmly stated that what they had done was only to
present the point of their sword in their own defence, that the
Quakers who had rushed upon it had become “felons de se,” and
that their former proceedings and their mercy to Mary Dyer upon the
“inconsiderable intercession” of her son “manifestly evinced that they
24
desired their lives absent rather than their death present.”
The bodies of the unfortunate men were treated with indecent
brutality, and were buried naked beneath the gallows. Mrs. Dyer
remained away for six months, and then the spirit moved her to
return once more and die. Her husband wrote to Endicott to beg her
life, but without avail. No mercy could be shown her as long as she
defied the law. It is said that her life was offered her if she would
promise to keep out of the colony henceforth, but she declined to
25
receive the favor. “In obedience to the will of the Lord I came,” said
she, “and in his will I abide faithful to the death.”
Meanwhile the prisons and the house of correction had been the
fate of other delinquents, and the jailer and executioner had had
plenty of employment with the scourge. The Southwicks, with their
eldest son Josiah, were whipped, fined, and imprisoned for
withdrawing from the public services and worshipping by
themselves, and their two younger children were ordered to be sold
26
as slaves to the West Indies in satisfaction of the fines imposed.
W. Shattuck was whipped, fined, and imprisoned. Sarah Gibbons
and Dorothy Waugh were whipped. Hored Gardner, a woman with a
sucking babe, and a young girl who came into the colony with her,
were scourged with the “three-fold knotted whip, and during her
tortures she prayed for her persecutors.”
William Brand was thrown into the House of Correction, and,
refusing to work, was beaten constantly by the brutal jailer with a
tarred rope an inch thick. The pathetic record says: “His back and
arms were bruised black, and the blood was hanging as in bags
under his arms, and so into one was his flesh beaten that the sign of
27
a particular blow could not be seen, for all became as a jelly.”
William Leddra and Rouse, whose ears had been cut off, were
ordered to be whipped twice a week with increasing severity until
they consented to work, and were at last dismissed from the colony
under pain of death if they returned.
Patience Scott, a girl eleven years old, was imprisoned as a
Quaker, but discharged, after a period of detention, in consideration
of her youth; but her mother, Catherine Scott, for reproving the
magistrates for a deed of darkness, was whipped ten stripes,
although she was admitted by them to be otherwise of blameless life
and conversation.
Christopher Holden, who, in spite of losing his ears in 1658, had
returned once more, was banished upon pain of death by the same
28
court that had hanged Robinson and Stevenson. Seven or eight
persons were fined, some as high as ten pounds, for entertaining
Quakers, and Edward Wharton, for piloting them from one place to
another, was ordered to be whipped twenty stripes, and bound to his
good behavior. Divers others were then brought upon trial, “for
adhering to the cursed sect of Quakers, not disowning themselves to
be such, refusing to give civil respect, leaving their families and
relations, and roaming from place to place vagabonds like”; and
Daniel Gold was sentenced to be whipped thirty stripes, Robert
Harper fifteen, and they, with Alice Courland, Mary Scott, and Hope
Clifton, banished upon pain of death; William Kingswill whipped
fifteen stripes; Margaret Smith, Mary Trask, and Provided Southwick
29
ten stripes each, and Hannah Phelps admonished. In November,
William Leddra, who had been released, returned, and was at once
arrested. On his trial the opportunity of withdrawal was again
extended, but he refused to accept it, and was executed March 1,
1661. As he ascended the ladder he was heard to say: “All that will
be Christ’s disciples must take up the cross,” and just as he was
being thrown from its rounds, he cried in the words of Stephen, “Lord
Jesus, receive my spirit.” Wenlock Christison, who had been before
this sentenced to death, but allowed to leave the colony, had
returned, and during Leddra’s trial he came boldly before the Court
and told the astonished judges: “I am come here to warn you that ye
shed no more innocent blood.” He was at once arrested, and was
brought up for trial three months later. There was an unusual
difference of opinion in regard to the case, and the condemnation
was only secured by the violence of Endicott, who was able to
browbeat the others into consent. But the sentence they passed was
never executed. The people were tired of bloodshed, and the
opposition which was shown in the General Court to any further
proceedings was so great as to make a change in the law
30
necessary.
The humanity of the delegates to the Court was probably
considerably quickened by a sense of the dangerous position in
which the colony stood since the restoration of Charles II., who, they
might naturally fear, would call them to an account for their
proceedings, especially as the colony had allowed nearly a year to
pass without any recognition of the change in the political situation.
The General Court attempted to save its dignity by interposing a
still greater number of shameful and unusual punishments between
the first offence and the death penalty, and declared that, “being
desirous to try all means with as much lenity as might consist with
safety to prevent the intrusions of the Quakers, who had not been
restrained by the laws already provided, they would henceforth order
that such intruders should be tied to a cart’s tail and whipped from
town to town toward the borders of the jurisdiction. Should they
return after being dealt with thus thrice, they were to be branded with
the letter R on their left shoulder, and be severely whipped and sent
away again at the cart’s tail. Should they again return, they were to
31
be liable to the former law of banishment under pain of death.”
It is quite possible that this appeared to be lenity to men like
Endicott and Norton, but it is very doubtful whether the Quakers so
considered it. It did not prevent, though it anticipated, an order from
the king directing that any Quakers imprisoned or under sentence
32
should be released and sent to England for trial. To make this still
more galling to the pride of the colony, it was sent by Samuel
Shattuck, a Salem Quaker, who had been banished from the colony
under pain of death if he should return, and who, we cannot doubt,
thoroughly enjoyed his mission and the humiliation of Endicott. For a
short time the order was obeyed and then the “lenient” laws were put
in force again; and, as many delicately nurtured Quaker women
found to their cost, the “tender mercies” of the saints were cruel.
Palfrey remarks, with great gratification apparently, that “no hanging,
no branding, ever took place by force of this law,” but that “under its
provisions for other penalties the contest was carried on for a
considerable time longer.”
It would be wearisome to cite all of the subsequent proceedings;
a few of them will suffice to show that the treatment of the Quakers
still continued to be extremely severe, and that in spite of it all they
persisted in braving the threats of the magistrates. It was not until
1679, when religious toleration was forced against their wills upon
the good Christians of Massachusetts, that the Quakers found any
safety within the boundaries of the colony.
In 1661, when the Quakers were set free at the command of the
king, some of them were whipped at the cart’s tail twenty stripes
33
apiece, on the ground that they were vagabonds.
In 1662, Josiah Southwick, who had returned from his
banishment, was whipped at the cart’s tail in Boston, Roxbury, and
Dedham, and dismissed into the woods with a warning not to return.
The magistrates apparently had found that their old style of whipping
was too humane; for the whip used on this and several subsequent
occasions was made, not of cord, “but of dried guts like the bass
strings of a bass viol,” with three knots at each end—a weapon
which, according to contemporary testimony, made holes in the back
34
that one could put pease into.
In December 1662 Ann Coleman, Mary Tompkins, and Alice
Ambrose were stripped to the waist and whipped at the cart’s tail in
Dover, Hampton, and Salisbury, and were forced to walk the entire
distance in slush and snow up to their knees. The “lenient” sentence
required indeed that they should be whipped in each town in the
jurisdiction, but the constable at Newbury found in the warrant some
flaw by which he was able to release them. On their return to Dover,
they were seized by the constables by night, dragged face
downwards over snow and stumps to the river, one of them at least
was doused in the stream and dragged after a canoe, and they were
only released because the storm was too severe for their tormentors
35
to brave. Ann Coleman, again, with four friends, was whipped
36
through Salem, Boston, and Dedham. Elizabeth Hooton, a woman
of over sixty years of age, Fox’s first convert, was first imprisoned,
and then carried two days’ journey into the wilderness, “among
wolves and bears,” and left there to shift for herself. On returning,
she was kept in a dungeon at Cambridge two days without food, tied
to the whipping-post and flogged there, then taken to Watertown,
where she was flogged with willow rods, flogged again at Dedham,
and then carried into the woods as before. Coming back once more
to fetch her clothes from Cambridge, she and a companion, “an
ancient woman,” and her daughter were whipped in private, in spite
of which we find her coming once more to Boston, and on that
37
occasion she was whipped again at the cart’s tail. Mary Tompkins,
Alice Ambrose, and Ann Needham also appear again and again in
the records of suffering. One Edward Wharton, who was most
resolute in defying the authorities, was constantly under arrest, and
even a bare enumeration of his floggings would fill a page.
In 1665 Deborah Wilson, for going naked through the streets of
Salem “for a sign,” was whipped; but the constable executed his
office so mercifully that he was displaced. There is a pathetic
incident mentioned by Bishop, the Quaker historian, that “her tender
husband, though not altogether of her way, followed after,” as she
underwent her punishment, “clapping his hat sometimes between the
38
whip and her back.”
Eliakim Wardwell, at Newbury, was fined heavily in 1665 for
entertaining Wenlock Christison; and this injustice in addition to the
other cruel acts, so affected his wife Lydia that, although a modest
and delicate woman, she came naked into the meeting at Newbury,
as a testimony against them. She was seized and hurried away to
the court at Ipswich, which sentenced her to be whipped at the
nearest tavern post. Bishop says:

Without Law or President they condemned her to be tyed to


the fence Post of the tavern, where they sat, which is usually
their Court places, where they may serve their ears with Musick,
and their bellies with Wine and gluttony; whereunto she was tyed
stript from the Waste upwards, with her naked breasts to the
splinters of the Posts and there sorely lashed, with twenty or
thirty cruel stripes, which though it miserably tore and bruised
her tender body, yet to the joy of her Husband and Friends that
were Spectators, she was carried through all these inhumane
cruelties, quiet and chearful, and to the shame and confusion of
these unreasonable bruit beasts, whose name shall rot, and their
39
memory perish.

Eliakim, her husband, some time after, for vindicating her


character, was by order of the court at Hampton bound to a tree and
whipped fifteen lashes. In 1675 a law was passed which made it the
duty of the constables, under heavy penalties, to break up all Quaker
meetings and to commit those present to the House of Correction,
there to have the discipline of the house and be kept to work on
bread and water, or else to pay five pounds.
In 1677 an order was passed requiring an oath of fidelity to the
country, and legal liabilities were imposed upon all who refused the
oath. This struck directly at the Quakers, and was believed by them,
whether justly or not, to have been made for the purpose of vexing
40
and plundering them. A vigorous protest against it was made in
writing by Margaret Brewster, who came from Barbadoes to bear her
testimony against the law and to declare the evils that were coming
upon the colony. Having, as she declared, “a foresight given of that
grievous calamity called the Black Pox, which afterwards spread
there to the cutting off of many of the People. Wherefore she was
constrained in a prophetic manner to warn them thereof, by entering
into their publick assembly clothed in sackcloth and ashes, and with
her face made black.” For this she and four of her friends were
arrested and cast into prison upon the charge of “making a horrible
disturbance, and affrighting the people in the South Church in
Boston in the time of the public dispensing of the Word, whereby
several women ... are in danger of miscarrying.” She was whipped at
the cart’s tail twenty lashes, and the young women who were with
her were forced to accompany her during her punishment. Twelve
Quakers, who were arrested the same day at a Quaker meeting,
41
were whipped, and fifteen the week following.
In the other colonies the sufferings of the Quakers were not so
severe, though in Plymouth they had to endure banishment, fines,
and whippings. In Connecticut, thanks probably to the wisdom of
John Winthrop, the only cases which occurred were met with
banishment, and the Quakers seem to have respected the
jurisdiction where they were mercifully treated. In New Haven there
were several prosecutions; Southold on Long Island seems to have
been the place most frequented by the Quakers, though they also
appeared in Greenwich. The only case of extreme severity was that
of Humphrey Norton, who had already borne his torturing in
Massachusetts, where he had enraged the magistrates by his appeal
to the laws of England. He was arrested at Southold and taken to
New Haven, where he was “cast into Prison and chained to a Post,
and kept night and day for the space of twenty Days with great
Weights of Iron in an open Prison without Fire or Candles in the
bitter cold Winter (December 1657), enough (reasonably) to have
starved him,” as Bishop writes. When he attempted to reply to
Davenport in the Court, he was not suffered to speak, but was
gagged with “a great Iron Key, tied athwart his mouth.” After his trial
42
was over he was whipped thirty stripes and branded H in the hand.
Several who sympathized with or who entertained Quakers were
punished with heavy fines. In New Netherlands they fared little
43
better; and in Virginia the much-flogged Mary Tompkins and Alice
Ambrose found little mercy from the cavaliers, being put in the pillory
and whipped with a cat-of-nine-tails so severely that blood was
drawn by the very first stroke; and George Wilson, “in cruel irons that
rotted his flesh, and long imprisonment, departed this life for his
44
testimony to the Lord.” In Maryland they were subjected to fine and
imprisonment for refusing to take an oath or to serve in the militia.
45
Liberty of conscience was granted in 1688.
It was in New England, and especially in Massachusetts, that the
persecution was general and severe. The magistrates, as a rule,
defended their action, as necessary to the maintenance of their
authority and to the preservation of order and orthodoxy; and their
conduct has been extenuated and excused, if not actually defended,
by modern New England historians.
It is not a pleasant history, but there is something to be said upon
the side of the authorities even by one who has no admiration for
them or sympathy with them. The Puritans had not come to New
England for liberty of thought, but for liberty of action. Having failed,
as they thought at the time, to secure the triumph of their views in
the church and state of England, they preferred to leave the struggle
and come to New England, where they could live under their own
system without being obliged to contend or suffer for their faith—a
point upon which the Quaker controversialists make some very
46
sharp remarks.
They considered the territory which they held to be their own
peculium, and claimed that by their charter they had acquired
absolute sovereignty in its limits, subject to no appeal to England;
and they realized that if appeal to England was granted, their
absolute authority was at an end. One of the leading colonists is
reported to have said: “If we admit appeal to the Parliament this year,
next year they will send to see how it is, and the third year the
government will be changed.” The settlement also had in their eyes a
religious character; it was founded, as they boasted, for religion and
not for trade, and they held that they had a right to dictate the
religious usages and practices therein, as was shown by their
treatment of Mrs. Hutchinson and Wheelwright, Roger Williams and
Gorton, Child and Maverick, not to mention Morton of Merry Mount.
They believed the Quakers to be a pernicious sect, confounding
them with other fanatical bodies which they resembled, and they
feared that the natural consequence of the claim which they made to
immediate revelation would be communistic attempts at the
overthrow of the established order, such as had been seen a
hundred years before in Germany. From these premises the
conclusion was a natural one, that their duty was to nip the evil in the
bud, to crush the Quakers before they became strong enough to be
dangerous to the state. Their action in banishing the first that arrived,
before any overt acts were committed, was undoubtedly technically
illegal; but if the Quakers had been in reality what they fancied them,
no one would have blamed them for their prompt decision. Besides,
they had a law by which they were accustomed to banish heretics,
and the Quakers might very well come under that description.
As regards the compelling shipmasters to carry them back to the
port from which they had come, such a custom had prevailed from a
very early date in the case of undesirable immigrants. Winthrop, in
his History mentions the reshipping to England of a crazy pauper
woman whom the parish of Willesden had sent over to the colonists
in Massachusetts. The Quakers came in spite of banishment, and
the more they were imprisoned and beaten the more daring became
their defiance, the more violent their abuse. They spared neither
priest nor magistrate, and the floods of denunciation which they
poured out were portentous. It is not to be wondered at that a stern
and severe people, living a hard and cruel life of constant struggle
with the elements, and in the constant dread lest their privileges
should be assailed, should have been cruel in their treatment of
these incorrigible offenders.
Judged by the common standard of the age, the cruelty of the
treatment of the Quakers is not so remarkable as to be singled out
above all other cruelties for reprobation. The Quakers themselves
were cruel at times. George Fox himself is said to have been a
witch-finder; and a son of the Samuel Shattuck who bore the king’s
mandate to Endicott appears in the Salem witchcraft trials as a
47
prominent witness against some of the unfortunates. The folly and
fatuity of the treatment adopted is more of a point to notice. In the
colonies where the Quakers were let alone they caused no trouble.
Palfrey’s sneer, that there was no order to disturb in Rhode Island,
may be justified perhaps as regards that colony, but Connecticut
certainly was a well-ordered commonwealth. In Massachusetts, on
the contrary, the same persons kept coming again and again, and
the severer the punishments the madder became their actions. It
should be remembered that the acts usually mentioned as justifying
the Puritans’ severity, such as the performances of the naked
women at Salem and Newbury, of the men who broke bottles on the
pulpit steps, and of the woman who smeared her face with black and
frightened the matrons in the Old South church, were not committed
until after the persecution had been carried on for years, until scores
of women had been stripped naked and flogged by the authorities,
until men had had their ears cut off, and until three men and one
woman had been put to death upon the gallows. The persecution
was a blunder, and the details of it made it a blunder of the most
atrocious description. Power was put into the hands of local and
irresponsible magistrates to sentence men and women to these
shameful and unusual punishments, and brutal constables and
jailers were entrusted with the enforcement of the law without any
due supervision. The most painful part of the whole history is the
attitude of the Puritan clergy, in Massachusetts especially. They were
bitter and bigoted, hounding on the magistrates to their cruel work,
and insulting the unfortunate wretches when they came to suffer.
Quaker instinct rightly, no doubt, fixed upon John Norton as the
“Fountain and Principal unto whom most of the cruelty and
48
bloodshed is to be imputed.”
For the constancy of the Quakers themselves, their endurance
and their fortitude, one can feel nothing but admiration. One
remembers how, centuries before, men who like them were willing to
die rather than to deny their faith had been called the enemies of
mankind, and accused of a perverse and execrable superstition. It
must be admitted, however, that their behavior was often of a kind
that would not be allowed to-day any more than it was then, although
it is to be hoped that our modern statecraft would find milder and
more efficient means of repression than did our predecessors in New
England; yet when one remembers how the Mormons were treated
in Illinois and Missouri, and how the mob destroyed a Roman
Catholic convent in Massachusetts, within the memories of living
men, we may think it perhaps prudent not to be too sweeping in our
condemnation.
The fundamental difficulty in the Puritans’ position was their
illegal and unconstitutional government. To maintain that, they were
led to deny to other Englishmen their rights, and to assert an
independence of the home authorities which was little short of actual
separation.
The second evil principle in their government was the union of
church and state, or rather the subjection of the state to the church,
a church moreover in which the people had no rights except by favor
of the ministers, a church that was a close corporation and imbued
with the spirit of the law of Moses rather than that of the gospel of
Christ. In church, as well as in state, there was a consciousness that
their existence was illegal and illegitimate; that, in spite of their
protests to the contrary, they had separated from their fellow-
Christians in England and had formed a polity for themselves; hence,
just as they felt it necessary to manifest their political authority by
acts of severity upon any who questioned it, so they deemed it
necessary to maintain their orthodoxy by persecuting those who
differed from them in religion. They were ill at ease both politically
and religiously, and they sought to disguise the fact from themselves,
by making proof of all the power that they possessed. Hence it was
that the conflict arose which has stained with innocent blood the
early history of the land. It is not to be wondered that the Quakers
should see, in the horrible death of Endicott and the miserable end of
49
Norton, the hand of an avenging Providence, or that they should
believe that for a distance of twenty miles from Boston the ground
was cursed so that no wheat could ripen because of a blood-red
50
blight that fastened upon it. But we, who live at a time when we
can view the history of the struggle with calmness and impartiality,
may respect the grim determination of the severe magistrates who
felt it their duty, at whatever cost, to keep that which was committed
to their trust free from the poison of heresy and fanaticism, while we
sorrow at the blindness which hid from their eyes the folly and the
cruelty of their proceedings. We may sympathize with the tortured
Quakers, whom we now know to be harmless enthusiasts, yet
without approving or extenuating their mad actions, their abusive
language, or their grotesque indecencies; and we may hope that,
though at enmity in this life, yet, as Browning wrote of Strafford and
Pym,
“in that world
Where great hearts led astray are turned again,”

both now are able to respect each other’s loyalty of purpose and
fidelity to their respective conceptions of truth.
NOTES.
1
Vide infra, Note 6.
2
George Fox, Journal. It is well to notice that of the ministers
mentioned by Fox by name or parish, Nath. Stevens, the rector
of Fenny Drayton, was a Presbyterian of some eminence, and
was ejected for non-conformity in 1662. So also was Matthew
Cradock, the “priest of Coventry,” who was a distinguished
non-conformist divine. The priest at Mansetter, who advised
tobacco and psalm-singing, kept his living during the whole
period of the Commonwealth, and so may be presumed not to
have been a “Churchman” in the commonly received sense of
the term. “One Macham,” of whom Fox speaks, and who
seems to have treated him with more sympathetic kindness
than any of the others, was a loyal Churchman and was
sequestered in 1645, as a penalty for his adherence to the
bishop and the king to whom he had sworn allegiance. It is
rather surprising to find historians in general, even those who
should be better informed, assuming that, because these men
were filling the parishes of the Church of England, they were,
therefore, Church of England clergymen.
3
Bishop, George, New England Judged, London, 1661, pp. 14–
25.
4
Geo. E. Ellis, Memorial History of Boston, vol. i. p. 181.
5
Hubbard’s History of New England, p. 553.
6
Massachusetts Records, iv. (1), 276.
7
Bishop, 5–13.
8
Hazard, Historical Collections, ii. 349. Rhode Island Records, i.
374.
9
Mass. Records, iv. (1), 277.
10
Bishop, 38, 39.
11
Bishop, 40, 42.
12
Mass. Records, iv. (1), 308. Bishop, 50.
13
Mass. Records, iv. (1), 325.
14
Bishop, 72, 73.
15
Mass. Records, iv. (1), 345, 346.
16
Mass. Archives, vol. x. p. 246.
17
Mass. Records, iv. (1), 348. (In payment for this work Norton
received five hundred acres of land, a good price for a sermon.
Ibid., p. 397.)
18
The Heart of New England Rent at the Blasphemies of the
Present Generation. Printed by Samuel Green, Cambridge in
New England, 1659. The arguments used in this declaration
are so characteristic of the spirit of the times that the following
extract may be useful. The author has been demonstrating that
the Quakers were heretical on various points of the faith, and
that the Scriptures authorize the punishment of false believers.
He continues:
“But other Scriptures omitted, I shall here transcribe only two
more, both of which are eminently pregnant with this truth:
wherein also are cases put between the cause of God and our
near relations, on purpose to provide against obstructions in
this great business of religion.
The first we have Deut. xiii. per totum.
Relating to all times succeeding that constitution; ‘If thy
brother, the son of thy mother, or thy son, or thy daughter, or
the wife of thy bosom, or thy friend, which is as thine own soul,
entice thee secretly, saying, Let us go and serve other gods,
which thou hast not known, thou, nor thy fathers; Thou shalt
not consent unto him, nor hearken unto him; neither shalt thine
eyes pity him, neither shalt thou spare, neither shalt thou
conceal him.’ vers. 6, 8. The second we have Zech. xiii. 1, 3.
Expressly relating unto the times of the Gospel. In that day,
viz.: after the Coming of the Messiah in the time of the Gospel
when the families of the tribes shall mourne Chapt. xii. 11. The
familie of the house of David apart, & the familie of the house
of Nathan apart, etc. There shall be a fountain opened, i. e. the
doctrine of Christ under Moses’ dispensation is compared to a
fountain vailed, 2 Cor. iii. 13, etc. Under the Gospel
dispensation to a fountain opened. The vail of the Temple &
the ceremonial law being taken away. And it shall come to
pass that when any shall yet Prophecie, then his father & his
mother that begat him, shall thrust him through, when he
prophecieth. These words [thrust him through] may be
understood either of a Capital punishment judicially dispensed,
or of any other smart punishment piercing though not Capital.

* * * * *
“Wee through grace abhorre prejudicing the liberty of
conscience the least measure, and account such report of us
to be a slander. And through the same grace; Wee both dread,
and beare witness against, liberty of heresy, liberty to
Blaspheme the Blessed Trinity, the Person and Office of Christ,
the holy-Scripture, the tabernacle of God, and those that dwell
in heaven. Howsoever fallaciously transformed into, and
misrepresented under the plausible vizard of liberty of
conscience falsely so called. We say Religion is to be
perswaded with Scripture-reasons, not Civil weapons: with
Arguments, not with punishments. But blasphemies immediate
and heresies carried on with an high hand, and persisted in are
to be suppressed with weapons and punishments; where
reasons, and arguments cannot prevail.
We distinguish between Heresie (Quiet and alone,
Turbulent, i. e. incorrigible) accompanied with soliciting the
people to apostacy from the Faith of Christ to defection from
the churches, to Sedition in the Commonwealth. And that after
due meanes of conviction, and Authoritative prohibition.
We subject not any to Civil or Corporal punishment for
heresie, if quiet and alone. We do not inflict any Church-
censure in case of heresie, without doctrinal conviction on the
Churche’s part, and contumacy on the delinquent’s part
foregoing.
In case of Heresie incorrigible, in conjunction with
endeavours to seduce others thereunto, and tending to the
disturbing of Publick-order, we acknowledge it to be the pious
Wisdom of the Magistrate to proceed gradually, and where
gentler meanes may rationally be looked at as effectual, there
to abstain from the use of any severer remedie.
And according to this method, hath been the gradual
proceeding of the Magistrate here, with those (hitherto
incorrigible) Quakers, who from England have unreasonably
and insolently obtruded themselves upon us. 1. Instructing
them. 2. Restraining them untill an opportunity for their returne.
3. Publishing a law to warne and prohibite both them and all
others of that sect, from Coming into this jurisdiction: otherwise
to expect the house of Correction. And in case they returned
yet again, then to loose one of their eares, etc.
At last upon experience of their bold contempt of these
inferior restraints, and that after their being sent away again
and again, they continue to return yet again and again; to the
seducing of diverse, the disturbance, vexation and hazard of
the whole Colonie. The Court finding the Law passed, to be an
insufficient fence against these persons, proceeded to a
Sentence of Banishment.
Their restraint before the Law published, was but restraint in
the Prison, until an opportunity of shipping them away. They
who after the Law was published, would that notwithstanding,
break in upon us from England, or other forraign parts, by
Rode-Island, after their correction received, and discharging
their dues, might return again to the Island, if they pleased.
The wolfe which ventures over the wild Sea, out of a ravening
desire to prey upon the sheep, when landed, discovered and
taken, hath no cause to complain, though for the security of the
flock, he be penned up, with the door opening unto the fold fast
shut; but having another door purposely left open, whereby he
may depart at his pleasure either returning from whence he
came, or otherwise quitting the place.
Their Sentence of Banishment as Circumstanced, by an
Impartial and equal eye, may be looked upon as an Act which
the court was forced unto se defendendo, in defence of
Religion, themselves, the Churches, and this poore State and
People from Ruine: which the principles of confusion, daylie
and studiously disseminated by them, threatened to bring all
unto, if not seasonably prevented. Exile from a wilderness,
from a place of exile; though voluntarie, from a place;
confinement whereunto would indeed justly be called exile, is
an easie exile.” (Pages 48, 49, 53, 54.)
19
Rhode Island Records, i. 376–378. See also the letter of the
General Assembly, 378–380.
20
Bishop, 95.
21
Mass. Records, iv. (1), 383.
22
The Sufferings of the People called Quakers, by Jos. Besse,
London, 1753, ii. p. 177.
23
Bishop, 89–95, 109.
24
Hubbard’s History of New England, p. 173. See also an
Address to the King (Charles II.), Dec. 19, 1660, in which the
colonial authorities argue as follows: “Concerning the Quakers,
open and capitall blasphemers, open seducers from the
glorious Trinity, the Lord’s Christ, our Lord Jesus Christ, etc.
the blessed gospell, and from the Holy Scriptures as the rule of
life, open enemies to government itself as established in the
hands of any but men of their oune principles, malignant and
assiduous promoters of doctrines directly tending to subvert
both our churches and state, after all other meanes for a long
time used in vajne, wee were at last constrejned, for our oune
safety, to pass a sentence of banishment against them, vpon
pajne of death. Such was theire daingerous, impetuous, &
desperat turbulency, both to religion & the state civil &
ecclesiastical, as that how vnwillingly soever, could it have binn
avoyded, the magistrate at last, in conscience both to God and
Man, judged himself called for the defense of all, to keep the
passage with the point of the sword held towards them. This
could do no harm to him that would be warned thereby: theire
wittingly rushing themselves therevpon was theire oune act, &
wee, wth all humility, conceive a cryme bringing theire blood on
theire oune head. The Quakers died, not because of theire
other crymes, how capitall soever, but vpon theire superadded
presumptuous & incorrigible contempt of authority; breaking in
vpon vs notwthstanding theire sentence of banishment made
knoune to them. Had they not binn restreigned, so farr as
appeared, there was too much cause to feare that wee
ourselves must quickly haue dyed, or worse; and such was
theire insolency, that they would not be restreined but by
death; nay, had they at last but promised to depart the
jurisdiction, and not to returne wthout leaue from authority, wee
should haue binn glad of such an opportunity to haue sayd
they should not dye.” Mass. Records, iv. (1), 450–453. Bishop,
113.
25
Mass. Records, iv. (1), 419.
26
Mass. Records, iv. (1), 366. Bishop, 90, 91.
27
Bishop, 44–48, 52–54.

You might also like