Goat Simulator

Goat Simulator

94 Bewertungen
Mutator making tutorial
Von Geneosis
A more advanced guide to mutator creation based on my own experience and containing a basic mutator example.
4
3
2
   
Preis verleihen
Favorisieren
Favorisiert
Entfernen
Mutator creation basics
Here are a few facts you have to know before going any further:
  • Mutators in this game are made by programming using a language called UnrealScript. If you don't have any knowlege in programming, you will have trouble to understand what is going on here so I strongly advice to find yourself some tutorial about programming in general on the internet. And if you are looking for a standard programming language to learn I suggest the C++ language as UnrealScript is based on this one.

  • This guide will not teach you how to program in UnrealScript either, but it will tell you where to find examples that you can use as a basis to understand the language yourself.

  • When making mutators, you can include custom contents into the game (custom models, custom sounds, custom textures, etc...), once again this guide won't explain how to make this extra content but only how to package it inside your mod. If you want more infos about creating this content search for Unreal Engine 3 tutorials.

Note: You can click on the images to see them in full size.
Installing the Dev Kit
First of all, you will need to install the Dev Kit of Goat Simulator, to do that go to your steam Library, select Tools and double click on Goat Sumulator Development Kit.
Finding the game folder
In the rest of this guide I will use {GoatSimFolder} to designate the path to your Goat Simulator main folder. As this path may be different depending on your computer, this is how to find it: In your game library, right click on Goat Simulator and select Properties.


In the property window, go to the Local FIles tab and click Browse Local Files.


This will open the explorer in your own {GoatSimFolder}.
Installing WOTgreal (optionnal)
WOTgreal is a community-made IDE for UnrealScript, so basically a software designed to read, write and organize .uc files. You can always use any other software you want to edit those files (like notepad), but WOTgreal will make the programming task way easier for you with a lot of useful shortcuts and tools this is why I suggest installing it.

You can find the installer here[mega.nz]. This is a WOTgreal v3.006 I uploaded myself as the original link I used was no longer working :/ If you are using this version you should be able to skip some of the initial steps below as they are already done :)

When installed, launch WOTgreal and do the following settings modifications:
First open Options > Preferences.


In this menu, if you can see "Unreal Development Kit" in the Game Type list, then you can skip the "Edit Game Types" part.

Else go to the Game Information tab and click Edit Game Types, in the sub-window opening, click Add.


This will open a menu to create a custom game type, fill it as on the image below and then click Ok.


Close all sub-windows and go back to the Game Information tab, select "Unreal Development Kit" in the Game Type list and then fill all the fields as on this image by replacing D:\Program Files (x86)\Steam\steamapps\common\GoatSimulator by your {GoatSimFolder}.
Leave the Deleted Class Fldr unchanged, or select any existing forlder you want on your machine.

NB: The final character in the Source Root Dir is a backslash (\) not a quote (').

Then click Apply and your IDE should be ready.

Note: WOTgreal sometimes freezes at startup. Kill it and start it again until it works.
Extracting the mod example
Here is the Mutator Example I made for this tutorial : download[mega.nz]. Sources are now also available on GitHub[github.com].

Place TutoMutator.zip in your {GoatSimFolder} and do Extract Here with your compression program.


This zip file contains two things, the first one is the source files of the example mod, you can find them here: {GoatSimFolder}\Development\Src\MutatorExample\Classes


The second thing is a group of files required to publish your mutator in the workshop, you can find them here: {GoatSimFolder}\GoatGame\Mods\MyMods\ExampleOutput


If WOTgreal was started, restart it to see the new mod appear in the file browser.
If the Packages tab is not visible yet you can click on the icon at the top to show it.
Then you can see the source files of the example mod here and open them with double click.


Those two files are full of comments and contains a lot of basic information you might need to start making your own mods, take the time to read them.
Finding code samples
If you are looking for a precise behaviour to add to the game, the first thing you should thik about is: Is there an existing mutator in the base game doing something close to that?

Most of the time, the answer is yes, and the cool part is that you can actually see the code of this mutator and learn from it :)

So when you identified an interesting behaviour, you can look for the corresponding mutator in the folder {GoatSimFolder}\Development\Src. Here, any folder starting with the word Goat contains parts of the code of the main game, and DLCs. So you can explore them to find whatever mutator you are looking for. In the base game mutators are usually named GGMutatorSomething.uc and mutator components named GGSomethingComponent.uc. In any case you will always find the mutator component name at the end of the mutator file.

If you are using WOTgreal you can also visualize those folders and files directly in the Packages area. Also you can use [Ctrl]+[Click] shortcut on a class name in the code to automatically open the file where this class is defined.


If you are looking for some behavior you found in one of my mods, you can also access their files on GItHub[github.com].
Compiling with the Dev Kit
Here is a shot introduction to the Dev Kit program:
(1) Starts the compilation of the selected scripts and produce a result in the selected folder.
(2) Shortcut to start the game and test your mods.
(3) Shortcut to start the Editor (used to make maps, skins, sounds, etc...)
(4) Name of the folder where your mod will be created during compilation.
(5) Location of the source files of your mod.
(6) Compilation logs, will contain warnings and errors if you compile a code that is not correct.


The first time you start the Dev Kit, click on the arrows near Script, Cook and Package Mod and make sure that Step Enabled is checked.


When you start working on a new mod, enter the name you want for your mod in the Mod Name field (4). A folder with that name will be automatically created in {GoatSimFolder}\GoatGame\Mods\MyMods when you compile. To compile the example use the name "ExampleOutput".
Remove any item in the Scripts to Compile list (5) and click Add to select the folder name containing the source files of your mod. The names available here comes from the list of folders present in {GoatSimFolder}\Development\Src. To compile the example select the folder "MutatorExample".

Finally when your script is ready click the Start arrow button (1) to start the compilation and wait until the buttons are no longer greyed out.

The first time you compile a new mod you will get an error talking about GoatMod.ini. This do not happen in the example because we did extract the ExampleOutput folder before compilation. But when you make a new mod, after your output folder have been generated, you must create a GoatMod.ini file in that folder and fill it with the following lines using notepad:
[GoatGame.GGDownloadableContentManager] +mAllMutators=(FileName="MutatorExample.ExampleMutator",DisplayName="Example Mutator",Description="Example of description")
Where MutatorExample will be replaced by your source folder name, ExampleMutator will be replaced by your mutator class name, the display name and description can be anything you want, but avoid using special characters or the mod will not appear in the mutator list.

If the compilation is successful (no error), you can test it ingame using the Cooked Game button (2) and selecting the mutator in your list.

Note: If you don't see the log appear in real time, scroll down to the end of the log area an place your corsor on the very last line to fix it.
Adding custom packages (optionnal)
This part will explain how to include a custom package you made inside your mod, you can skip it if you don't know how to create custom content with the Editor.

So let's say you created a package named MyPackage.upk and you are now making a mutator using content from this package.

In order to test your package during the creation of your mod, you must add a copy of MyPackage.upk in {GoatSimFolder}\GoatGame\Content\Packages. So every time the content of your package change, you must override this copy with the original.

When you are done and ready to publish the mod, go into {GoatSimFolder}\GoatGame\Mods\MyMods\ExampleOutput (replace ExampleOutput with the output name of your mod) and create a folder named Packages. Go inside this folder and put a copy of MyPackage.upk in it. This Packages folder will be erazed every time your compile your mod, so I suggest doing this manipulation only before publishing it as you don't need it for testing.
Publishing to the workshop
When you are happy with the current version of your mod, you can publish it to the workshop.
IMPORTANT: DO NOT publish the example mutator I provided here without changing its mutator name, mutator component name, source folder name and output folder name.

Before doing that you have two things to do in the {GoatSimFolder}\GoatGame\Mods\MyMods\ExampleOutput folder:
First create a tags.txt file (or copy the one from the example) and open it with notepad. Then fill this file with the words that best describe your mod, one word per line. Those tags will be used to help find your mod in the workshop search.
Then create a jpg image in this folder and call it previewfile.jpg, this image will be used as the icon of your mod on the workshop.

When this is done, start Goat Sim and navigate to Workshop > My Mods.


Then select your mod in the list and click Upload. This may take a few minutes.


Note: If you want to update a mod your already published, then use Update instead of Upload in the previous step.

When the upload is coplete, the workshop page of your mod should open and you can edit the title, description, and images of your mod.
Conclusion
I hope this guide will help people to start doing fun stuff like I did in this game :)

Let me know in the comments if some part of this tutorial is not working for you or if you have some information to add to complete it ^^

If you have any question about how to make a specific behaviour in a mutator, please ask them in this discussion.
54 Kommentare
VNull 24. Dez. 2024 um 15:26 
Hey nice tutorial! i did have a question: How would I replace the Player Goat with a custom model i made? im stuck at this part haha...
dipaspafe 16. Dez. 2024 um 8:40 
Youtube tutorial needed
Forked Goose 23. Juni 2024 um 6:04 
Thanks for fixing the tutorial download
Forked Goose 3. Juli 2023 um 2:25 
The file is not available, can u fix it?
firefox 17. Okt. 2022 um 16:02 
thanks I can now make my idea:steamhappy:
Daniel Money 26. Aug. 2022 um 10:23 
the files just don't exsist anymore
Geneosis  [Autor] 25. Jan. 2022 um 10:36 
So in the end it looks like Google Drive was being annoying and requesting people to login and ask for acess to the MutatorExample, which was not at all intended -_- So I moved the file to another host website, hopefully everyone can download it fine now? Please let me know if there is any more issues.
Geneosis  [Autor] 7. Okt. 2021 um 10:31 
Looks like the mutator example link may have been broken? I updated it so it should be fine now.
jacksaman 15. Juli 2021 um 3:23 
how do i use mutator for infinite jump mod?/??
Geneosis  [Autor] 22. Apr. 2021 um 13:39 
@ImNotJahan: Yeah, that someting I figured out after a while: materials only apply to certain type of objects X) Unless you tweaks the options to make it apply where you want :p