Garry's Mod

Garry's Mod

GBuddy - Your new Best Friend!
 This topic has been pinned, so it's probably important
Szpieg2000  [developer] 22 Apr, 2024 @ 10:42am
Ultimate GBuddy Guide
I'll talk you through how to use GBuddy, how to create content for it on the workshop and more!



First off: Actual use of the GBuddy

Upon loading in the game, you can open the context menu (usually binded by C) where you'll find the GBuddy Icon. Click on it and a menu will appear.

Here you can customize your GBuddy.
CheckBox - Enables the GBuddy and makes it appear on your screen.
First TextBox - Changes the Face of the GBuddy, you can use any material in the game ( I recommend using extended spawn menu in order to find the texture you're looking for)
Second TextBox - Changes It's sound for when the GBuddy is talking, you can use any sound in the game.
Third TextBox - GBuddy's Name, It'll appear in the chat when the GBuddy is talking. You can put anything here.
First Dropdown list - The GBuddy's Personality, this is basically how the GBuddy will act and what it'll say to you.
First Slider - The X Coord Slider Changes the X position of your GBuddy
Second Slider - The Y Coord Slider Changes the Y position of your GBuddy
Second Dropdown list - This is where the GBuddy presets will appear, upon selecting it'll copy the preset and put it on your GBuddy
Create Preset Button - Creates a preset of every settings and adds it to your preset list (You might have to reopen the menu for it to appear in it.)



Now that the basics are done, here comes the more fun stuff that you could do:


-- Adding a custom Material & Sounds --
Adding a custom material is pretty simple, to do it you need to find your Garry's mod directory. Usually the path to it is "C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\garrysmod" or something simillar.
here you need to go inside the "materials" folder, put your custom image in here and when putting the material of the GBuddy put the name and the file extension ex:

MyGBuddyImage.png

if you have added the image inside a folder after materials you also need the path to it like:

GBuddyFaces/MyGBuddyImage.png

You might have to make sure it is a .png file or a .vtf


Sounds are pretty simillar, but instead of the materials folder you need to put it in the "sound" folder which might not exist, but you can add it. and instead of .png make sure to use .wav instead.




-- Creating a New Personality --
To add a New Personality might be confusing, but really simple.
in your Garry's mod directory, go into the data/gbuddy_personality folder, this folder should be automatically added to your data folder when starting up the addon. In there you'll find 5 personalities depressed, funny, helpful, nice, rude. You can change their values, although it's not recommended as the files will get overwritten once an update drops.
Simply Copy + Paste one of the files and give it a unique name.
Then go inside the newly made .json file and make the name the same as the file's name
then you can create new responses as you wish. Make sure to maintain the correct formatting.



-- Editing/Deleting a preset --
This might be fixed in a future update, but as of now there is no way to edit (outside of overwritting it) or delete a preset. in this case you have to go inside the data/gbuddy_preset folder in your Garry's mod directory.
in there you can change all the data.


-- Adding a personality to the steam workshop --
Steam does not like changing the data folder for whatever reason (at least in GMPublisher)
so you have to code your personality in.
to do so you need to go into your addons folder in your garry's mod directory, and create a new folder with a unique name.

from there create another folder inside it called "lua" and in that called "autorun"
inside the autorun folder create a .lua file inside it put this:


if CLIENT then

local perlist = {
name = "PERSONALITYNAMEHERE",
resp = {
"Response1",
"Response2",
"Response3",
"FinalResponse"
}
}

SavePersonalityData(perlist)



end

This should work if not you can add:


function SavePersonalityData(perlist)
local JSONData = util.TableToJSON(perlist)
file.Write("gbuddy_personality/"..perlist["name"]..".json",JSONData)

end

function SavePresetData(prelist)
local JSONData = util.TableToJSON(prelist)
file.Write("gbuddy_presets/"..prelist["name"]..".json",JSONData)
end


Before it to register the functions.

My code also has this comment/note if people come snooping

--[[ For Other People To Create Workshop Personalties and Presets,
SavePersonalityData requires
local perlist = {
name = "NAMEHERE",
resp = {
"RESPONEHERE",
"RSEPTWOHERE",
"RESPTHREEHERE"
... and on and on, make sure last one does not have a ,
}
}

SavePresetData requires
local prelist = {
name = "NAMEHERE",
face = "FACEMATERIALHERE",
voice = "VOICESOUNDHERE",
personality = "PERSONALITYHERE"
}
If you want a custom personality on the save preset data, the client NEEDS to have it in the folder, otherwise it'll break.
Personalities that are in the main addon are: nice, funny, rude, depressed and helpful

]]--
Last edited by Szpieg2000; 22 Apr, 2024 @ 10:59am
< >
Showing 1-5 of 5 comments
Szpieg2000  [developer] 22 Apr, 2024 @ 10:43am 
If you have any questions, Comment them here!
J_henry69 25 Apr, 2024 @ 4:05pm 
how to make gbuddy show up?
Jippedzoogles! 1 May, 2024 @ 9:28pm 
there is an enable button in the context menu
Jippedzoogles! 1 May, 2024 @ 9:29pm 
in the FREAKING!!11
menu in the
FREAKING!!!11
context menu
stupid idiot soupid:GDNormal:
Ruthlessant 15 Aug, 2024 @ 2:30pm 
can you disable the text getting put in chat?
< >
Showing 1-5 of 5 comments
Per page: 1530 50